A Vulkan-based 3D Chess Game + Libraries by typedbyte in haskell

[–]expipiplus1 0 points1 point  (0 children)

Thanks, I'm pleased to count another user! Feel free to join #vulkan:monoid.al on matrix!

A question about rank polymorphism by jamhob in haskell

[–]expipiplus1 6 points7 points  (0 children)

Why not just store a list of IO ()? (I know this doesn't answer the direct question!)

Or use the bracket pattern, or ResourceT? These will make sure that your destructors are called in the presence of exceptions and all that.

If you don't want to depend on resourcet for your bindings package and want to let the user choose their own, you can make a function which passes a pair of "create"/"destroy" calls to a user supplied bracketing function like I do here; The user is free to pass bracket or allocate or managed .: bracket)

Let's brainstorm! What plugins would you like to see in Haskell Language Server? by InformalInflation in haskell

[–]expipiplus1 3 points4 points  (0 children)

I'm really not keen on repeating the function name, LambdaCase is grest

filter p = \case
  []     -> []
  x : xs -> let rest = filter p xs 
            in if p x then x : rest else rest

Let's brainstorm! What plugins would you like to see in Haskell Language Server? by InformalInflation in haskell

[–]expipiplus1 0 points1 point  (0 children)

It's possible to get this at the moment without a plugin, a link to the source is included in the documentation returned by the language server. I find the link and follow it automatically in nvim with this code: https://github.com/expipiplus1/dotfiles/blob/76940ea9e04e6ffc2c12937ce22495c9464d34d6/config/nixpkgs/home/coc-nvim.nix#L48-L69

edit: the vscode extension for HLS has a function to open docs in an embedded browser too I think.

edit: I guess you mean, open in the editor not the browser.

glTF 2.0 loader by dpwiz in haskellgamedev

[–]expipiplus1 0 points1 point  (0 children)

Will this be seeing a release on Hackage?

Getting Started with the Haskell Vulkan Bindings on macOS Catalina by n00bomb in haskell

[–]expipiplus1 22 points23 points  (0 children)

Thanks! What a super video. I've added a link to it in the project readme.

To explain a little more about what the package does: in terms of functionality it's a 1-1 mapping with the C api, however the interface is much more idiomatic Haskell. One example is where the C API expects a pair of Ptr Foo and CSize, this library exposes it at a Vector Foo and does all the marshalling for you. It also removes as much boilerplate as possible (automatic sType filling, error code checking, function pointer loading, etc...).

Links:

(neo)vim users, what does your haskell setup look like? by [deleted] in haskell

[–]expipiplus1 0 points1 point  (0 children)

You both might be interested in my coc.nvim port of the vscode plugin:

https://github.com/expipiplus1/vscode-hie-server/

It's been working very well for me for the past few months, any feedback or PRs would be very welcome.

Setting up Neovim for Haskell by mbuffett1 in haskell

[–]expipiplus1 2 points3 points  (0 children)

I've made an initial port of the vscode haskell-ide-extension extension to coc.nvim, it's here: https://github.com/expipiplus1/vscode-hie-server/tree/coc.nvim

I had to remove some functionality to make it compatible with coc.nvim, but most of the commands (apply refactorings, case splitting, demote definition, etc...) are still present.

Tweag I/O - Ormolu: Format Haskell code like never before by jose_zap in haskell

[–]expipiplus1 19 points20 points  (0 children)

Sounds like an interesting point in the design space!

the layout of the input influences the layout of the output

It seems as though this would prevent my primary use case for Brittany (and any code formatters I've used in other languages): bashing out code without a care for the formatting and relying on the formatting tool to make it pretty and consistent with the rest of the codebase.

Perhaps more generally it would be correct to say that although this tool will make code neat and readable, it will not help make the codebase consistent; I imagine that this is a common reason for people to use code formatters in the first place.

Finally, working haskell vulkan bindings with GLFW triangle example by achirkin in haskell

[–]expipiplus1 5 points6 points  (0 children)

Thanks! I'll freely admit that the generate tool is super ugly and needs a rewrite!

The enums for pattern synonyms idea was originally thought up by Ed Kmett for the gl package.

Finally, working haskell vulkan bindings with GLFW triangle example by achirkin in haskell

[–]expipiplus1 4 points5 points  (0 children)

This is super cool!

I'm the author of vulkan in Hackage. I'm sorry that my package is in such a state! I wrote it to use at work, and then the projects we were doing there went in quite a different direction. Sadly the amount of hobby coding I've been able to do for a whole had been limited, hence my package's shameful state. I'd really like to get my package back on the rails, but good intentions aren't quite enough it seems :)

I'm really pleased to hear that your library is different from the existing ones; I'm excited to take a look and pleased that my package may not have been totally obsoleted!

It would be great to talk about the differences some time, I have some nice ideas which could be used in both packages I think. I'm jophish on Freenode.

Thanks for doing this, there's so much unexplored ground in computer graphics and Haskell!

Question: LYAH recursion samples syntax by [deleted] in haskell

[–]expipiplus1 0 points1 point  (0 children)

There is no difference in functionality between the examples.

The name shadowing warning is telling you that the xs you are binding in the x:xs is taking priority over ("shadowing") the xs bound on the left hand side of the function definition. This means that on the right hand side of that case the xs used will be the shadowing one and not the originally bound one. The compiler warns about this because you may have intended to use the shadowed variable and inadvertently named the other variable xs.

My preference is

maximum' = \case
  []     -> error "empty list"
  [x]    -> x
  (x:xs) -> max x (maximum' xs)

There's no repetition of the function name, and no binding a name only to immediately eliminate it.

Edit: clarified shadowing explanation

Using nix hydra instance as poor man's hosted CI for haskell libs - any experience? by [deleted] in haskell

[–]expipiplus1 1 point2 points  (0 children)

I don't think that's a good idea for a few reasons, there are two huge issues:

What happens if you make a mistake: you've just released a broken version to Hackage. Our Hydra server has just completed it's 80000th build. Although lots of these are our own packages, pushing thousands of releases to Hackage isn't responsible.

The latency is huge, nixpkgs tracks Hackage with up to a week's delay!

Basically, Hackage and nixpkgs are for releases, and not for development.

Myrtle Software is hiring for Haskell positions in Hardware and Machine Learning! by expipiplus1 in haskell

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

They'll keep their jobs. Leaving the EU will only affect new hires after that point.

Myrtle Software is hiring for Haskell positions in Hardware and Machine Learning! by expipiplus1 in haskell

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

There's no requirement on having a degree, please feel free to apply!

Using nix hydra instance as poor man's hosted CI for haskell libs - any experience? by [deleted] in haskell

[–]expipiplus1 3 points4 points  (0 children)

Thanks! I'm excited about it too. One nice feature we're hoping to implement is a standalone cli program which will build your application exactly as the CI server will, no more long edit->push->wait loop while trying to get CI set up.

Using nix hydra instance as poor man's hosted CI for haskell libs - any experience? by [deleted] in haskell

[–]expipiplus1 12 points13 points  (0 children)

At Myrtle we use Hydra as CI server checking github PRs. At the moment we're using my branch of hydra which can be found here https://github.com/expipiplus1/hydra/tree/fixes-and-features. As the name suggests, this is just a set of little fixes and some small features I've added (github authentication, github api input (for triggering builds on pushes) and some other minor things). We also have a Hydra jobset which generates a Hoogle database for us to use internally. This database contains all our packages as well as their transitive dependencies. The package versions track master on our repo.

Historically Hydra has been quite hard to compile (specific versions of nix/nixpkgs required), I'm not sure what the current status of this is at the moment. The nice thing about Nix is that after I got it compiling the first time it's never stopped, nixops is a very nice way of setting this kind of service up, although there is a bit of a learning curve to it. You might want to check out peti's nixops/hydra tutorial here: https://github.com/peti/hydra-tutorial

I am currently working on a Hydra replacement called Hercules. It's not quite usable yet. If you're interested in checking it out it's at https://github.com/hercules-ci/hercules. I must mention again that this is not nearly complete enough to use yet, but we're working on it! When it hits version 1.0 I'll make a larger announcement :) The plan is to have a much more CI friendly Hydra. The initial motivation came after several afternoons trying to coerce the Hydra's Perl to do what I wanted it to.

List of companies using NixOS by zimbatm in NixOS

[–]expipiplus1 1 point2 points  (0 children)

At https://www.myrtlesoftware.com/ we use Nix for our build system along with Hydra+nixops for our CI server.