Posts by brad@toot.cafe
(DIR) Post #A5EG2PMw51CsIhqfT6 by brad@toot.cafe
2021-03-15T08:50:09Z
0 likes, 1 repeats
@hyperrealgopher Ah, cool. In that case if you want a type variable like ‘a’ to match from the top level type sig to one in the ‘where’ you’ll need to enable the ScopedTypeVariables language extension https://wiki.haskell.org/Scoped_type_variables. Then make sure to introduce type variables in the top level sig with ‘forall’.
(DIR) Post #A5YZvhSrKQ5QQqBYzA by brad@toot.cafe
2021-03-25T04:07:42Z
0 likes, 0 repeats
@hyperrealgopher Oh yeah, I remember that being a _reeeal_ noodle-bender. I just looked at my solution and it's pretty much the same as yours, I had the predicate and the accumulator in the other order though. I flipped foldRight to avoid having to name my lambda too by the looks: https://gist.github.com/bradparker/040acc8409b26bd1f7a7283c666017ec. Such a cool course. Enjoying it?
(DIR) Post #A69bczCDPNz88ebbZQ by brad@toot.cafe
2021-04-11T23:44:50Z
0 likes, 0 repeats
Have an unusual pairing partner today.
(DIR) Post #A69bd0Bti3KDDxSriK by brad@toot.cafe
2021-04-12T00:45:33Z
0 likes, 0 repeats
I think it’s developing opinions about @bernardeli I’s current pairing session.
(DIR) Post #A69ny83ypnozAebNQ0 by brad@toot.cafe
2021-04-12T03:09:22Z
0 likes, 0 repeats
@nergal Hey, cool. I didn't know that, I've only ever heard them referred to as stick insects before (it's common to call them that here in Australia, I think). Thanks :)
(DIR) Post #A6V5aH21cbZoHMdH72 by brad@toot.cafe
2021-04-22T09:35:30Z
0 likes, 0 repeats
@hyperrealgopher I’ve never written a real front end using GHCJS, I’ve only kicked the tires (https://github.com/bradparker/haskell-frontend). I remember GHCJS being a little ... fiddly (https://github.com/bradparker/haskell-frontend/blob/33665f47ddad7c188dc6fb2a9f857da6706cf096/nixpkgs.nix#L19-L29).
(DIR) Post #A6V5aI8nUuaVieoCJ6 by brad@toot.cafe
2021-04-22T09:35:31Z
0 likes, 0 repeats
@hyperrealgopher If you want to dig right into FRP then reflex looks pretty cool. Obsidian systems built a thing that tries to make the dev experience nice, I’ve no first hand experience with it (https://github.com/obsidiansystems/obelisk)
(DIR) Post #A6XEh8WIxCJhoN3wNk by brad@toot.cafe
2021-04-23T10:27:18Z
0 likes, 0 repeats
@hyperrealgopher I picked up Nix the package manager because some Haskell projects used it. For Haskell it has similar aims to Stack, it can manage your GHC version along with giving you a sort of snapshot for all your package deps. But ... it’s way more than that. You can use it to configure reproducible, isolated, somewhat cross platform dev and CI environments for lots of language ecosystems ... simultaneously. NixOS is a Linux distro that uses the package manager.
(DIR) Post #A8b663LwoXsHcCP3xo by brad@toot.cafe
2021-06-24T02:52:11Z
0 likes, 1 repeats
@hyperrealgopher That does look a bit tricky. I've never tried to build using Bazel _and_ Nix or to produce a static Haskell binary. But I know a little Nix. To me it looks like this is where the GHC version is selected: https://github.com/lunaris/minirepo/blob/58c3a67a09e97d22995380bb97f9e8cef6215fa9/nix/haskell/default.nix#L77, it's using the default version of the compiler from the static Haskell reference here: https://github.com/lunaris/minirepo/blob/58c3a67a09e97d22995380bb97f9e8cef6215fa9/nix/haskell/default.nix#L34. It looks like in the pinned version as well as master that GHC is at 8.6.4 (https://github.com/nh2/static-haskell-nix/blob/dbce18f4808d27f6a51ce31585078b49c86bd2b5/default.nix#L3, https://github.com/nh2/static-haskell-nix/blob/382150290ba43b6eb41981c1ab3b32aa31798140/default.nix#L3).
(DIR) Post #A8b74WMc58zsxuY1zc by brad@toot.cafe
2021-06-24T02:55:37Z
0 likes, 0 repeats
@hyperrealgopher Oops my bad, they import a sub-path of that static Haskell repo: https://github.com/lunaris/minirepo/blob/58c3a67a09e97d22995380bb97f9e8cef6215fa9/nix/haskell/default.nix#L42. Looks like that function accepts arguments to change the GHC version: https://github.com/nh2/static-haskell-nix/blob/382150290ba43b6eb41981c1ab3b32aa31798140/survey/default.nix#L37-L48 ... looks like they except that to be called with 8.8.1 as the newest possible version ("ghc881").
(DIR) Post #A8b74WoyNhgMNrogCG by brad@toot.cafe
2021-06-24T02:58:59Z
0 likes, 0 repeats
@hyperrealgopher Hrm, and as for arbitrary binaries ... there isn't a `default.nix` or `release.nix` I guess because you only need the Nix environment to build a fully static binary ... so that makes sense I suppose. If you want extra stuff in that build environment that can be included in the result I guess you might add it here: https://github.com/lunaris/minirepo/blob/58c3a67a09e97d22995380bb97f9e8cef6215fa9/nix/shell.nix#L47-L59
(DIR) Post #A8b89af9cqRHhVCYAS by brad@toot.cafe
2021-06-24T03:15:13Z
0 likes, 0 repeats
@hyperrealgopher Sorry, that looks like it's handled with Bazel (https://github.com/lunaris/minirepo/blob/58c3a67a09e97d22995380bb97f9e8cef6215fa9/example-service/BUILD.bazel#L34-L38)? I'm not sure I'll be of any help there, hope you have better luck with it all soon!
(DIR) Post #A9tf5FyHHtDPlY5fZA by brad@toot.cafe
2021-08-01T23:30:42Z
0 likes, 1 repeats
The names for the Haskell Foundation sponsorship levels are too cute https://haskell.foundation/donations/
(DIR) Post #ABKp7HxxQHtW56q5cO by brad@toot.cafe
2021-09-14T00:02:50Z
0 likes, 0 repeats
@hyperrealgopher Every opinion I have about Haskell stuff comes with that caveat that I’m only a hobbyist but: I’m a fan of Hasql’s API. No type classes, instead a type for SQL Statements that can accept interesting inputs by way of `contramap` and interesting outputs by way of `fmap`. Or both input and output at once via `dimap`. https://github.com/bradparker/whenever-haskell/blob/master/database/Whenever/Repository/Postgres.hs
(DIR) Post #ABVwmB1rFPfz3TpH8q by brad@toot.cafe
2021-09-19T08:42:26Z
0 likes, 0 repeats
Today we got on the bikes for the first time in a very long time. First run with the trailer. I’m calling it a roaring success. Despite his nonplussed expression, I think the little one loved it.
(DIR) Post #ADG3zajvJnUjMKDMLw by brad@toot.cafe
2021-11-10T06:57:41Z
0 likes, 1 repeats
@mhoye "With Schools using Google Forms as a testing platform, students are able to use this shortcut to search through the source of the page, and determine the correct answers." (https://bugs.chromium.org/p/chromium/issues/detail?id=895462) Sure seems to me like there are other solutions to that problem. Far out.
(DIR) Post #ADG3zbkfYVgYUvZT9c by brad@toot.cafe
2021-11-10T07:02:57Z
0 likes, 0 repeats
@mhoye "Summary: Users are able to bypass the Web filter by using the View source options and using an Html editor then accessing the website that should be blocked" ... OK I need to stop reading this now
(DIR) Post #AE0o8g2R13YBa1EdhQ by brad@toot.cafe
2021-12-03T01:53:12Z
1 likes, 1 repeats
https://blog.replit.com/nix-vs-docker A click-bait-y title but a good run down of how Nix and Docker are more complementary than competitive.
(DIR) Post #AKEPRxVbO9UaT9vmwC by brad@toot.cafe
2022-06-07T01:43:30Z
1 likes, 1 repeats
A co-worker's question just reminded me that there's a neat side effect of utility (or generated) CSS: automated feature tests can't rely on class names to navigate the DOM anymore. To get around that constraint we flesh out the accessibility tree. It's good!
(DIR) Post #AKKGvylOTXmQx8KKNU by brad@toot.cafe
2022-06-09T21:29:21Z
0 likes, 0 repeats
Why We’re Sticking with Ruby on Rails at GitLab – The New Stackhttps://thenewstack.io/why-were-sticking-with-ruby-on-rails-at-gitlab/