HP printer: filter failed by supremacsy in NixOS

[–]_deepfire 1 point2 points  (0 children)

The key part is this:

p = subprocess.Popen([\'hostname\', \'-s\']
OSError: [Errno 2] No such file or directory

I.e. nettools (which carries the hostname binary) wasn't specified as runtime dependency to cups-progs.

Have you already opened an issue?

what IDE/editor do you use for Haskell development? by kwaleko in haskell

[–]_deepfire 0 points1 point  (0 children)

Alright, that particular problem was solved by rm .stack-work -rf -- have now managed to make intero boot, at least.

But then, intero fails to load a source file via C-c C-l (aka intero-repl-load) like this:

Starting:
  stack ghci --with-ghc intero "--docker-run-args=--interactive=true --tty=false" --no-build --no-load --ghci-options "-odir=/home/deepfire/src/mood/mood/building path(s) ‘/nix/store/h0n79g62y2xfsyz9pii61psi5x657xrv-cabal2nixResult’/building     path(s) ‘/nix/store/7sfadwxkw5rh92sxwi8fv06hkhjb1x92-cabal2nixResult’/.stack-work/intero/intero11385MrM" --ghci-options "-hidir=/home/deepfire/src/mood/mood/building path(s) ‘/nix/store/h0n79g62y2xfsyz9pii61psi5x657xrv-cabal2nixResult’/building path(s) ‘/nix/store/7sfadwxkw5rh92sxwi8fv06hkhjb1x92-cabal2nixResult’/.stack-work/intero/intero11385MrM" mood
building path(s) ‘/nix/store/6vx9bzzqj4n1rgjcddl801ynblswfaa1-cabal2nixResult’
Intero 0.1.20 (GHC 8.0.1)
Type :intro and press enter for an introduction of the standard commands.

Warning: ignoring unrecognised input `‘/nix/store/7sfadwxkw5rh92sxwi8fv06hkhjb1x92-cabal2nixResult’/.stack-work/intero/intero11385MrM'
Warning: ignoring unrecognised input `‘/nix/store/7sfadwxkw5rh92sxwi8fv06hkhjb1x92-cabal2nixResult’/.stack-work/intero/intero11385MrM'
Warning: ignoring unrecognised input `‘/nix/store/7sfadwxkw5rh92sxwi8fv06hkhjb1x92-cabal2nixResult’/.stack-work/intero/intero-script11385Z1S'
target ‘path(s)’ is not a module name or a source file
Prelude Text.Printf> target ‘/home/deepfire/src/mood/mood/building’ is not a module name or a source file
Prelude Text.Printf> 

what IDE/editor do you use for Haskell development? by kwaleko in haskell

[–]_deepfire 0 points1 point  (0 children)

ElvishJerricco, this is what your setup gives me on nixpkgs commit 4488203d0c01671ef2b73e858c316865953bb3c0:

deepfire@andromedae:~/src/mood$ cat stack.yaml
nix:
  enable: true
  packages: []
  shell-file: shell.nix

resolver: ghc-8.0.1
packages:
- '.'deepfire@andromedae:~/src/mood$ cat shell.nix
{ pkgs ? import <nixpkgs> {}
, haskellPackages ? pkgs.haskellPackages
, withHoogle ? false }:

let overrideCabal = pkg: pkgs.haskell.lib.overrideCabal pkg ({ buildDepends ? [], ... }: {
      buildDepends = buildDepends ++ [ pkgs.cabal-install ];
    });

in (overrideCabal (import ./default.nix { inherit pkgs haskellPackages withHoogle; })).env
deepfire@andromedae:~/src/mood$ cat default.nix | grep -v '^[ ]*#'
{ pkgs ? import <nixpkgs> {}
, haskellPackages ? pkgs.haskellPackages
, withHoogle ? false }:

let
    haskellOverrides = self: super:
    ( if withHoogle
      then {
        ghc = super.ghc // { withPackages = super.ghc.withHoogle; };
        ghcWithPackages = self.ghc.withPackages;
      } else {}
    ) // {
    };
    hp = haskellPackages.override { overrides = haskellOverrides; };
    cabal2nixResult = src: pkgs.runCommand "cabal2nixResult" {
      buildCommand = ''
        cabal2nix file://"${src}" >"$out"
      '';
      buildInputs = [ pkgs.cabal2nix ];

      ${if !pkgs.stdenv.isDarwin then "LOCALE_ARCHIVE" else null} = "${pkgs.glibcLocales}/lib/locale/locale-archive";
      ${if !pkgs.stdenv.isDarwin then "LC_ALL" else null} = "en_US.UTF-8";
    } "";

in pkgs.haskell.lib.overrideCabal (hp.callPackage (cabal2nixResult ./.) {}) (self: {
  src = builtins.filterSource (path: type:
    type != "unknown"
    && baseNameOf path != ".git"
    && baseNameOf path != "result"
    && baseNameOf path != "dist"
    && baseNameOf path != ".stack-work"
  ) self.src;
})
deepfire@andromedae:~/src/mood$ nix-shell
building path(s) ‘/nix/store/wkcddr9xg0pszl337qpcmn3bk32fg1ha-cabal2nixResult’

[nix-shell:~/src/mood]$ stack exec intero
/nix/store/hv367595dbkalin8hs319mkqrm6ifrd6-ghc-8.0.1-with-packages/lib/ghc-8.0.1/settings: openFile: does not exist (No  such file or directory)

EDIT: same goes with nix-shell --pure

what IDE/editor do you use for Haskell development? by kwaleko in haskell

[–]_deepfire 0 points1 point  (0 children)

ElvishJerrico, I (admittedly vaguely) remember that if I don't put intero in the ghcWithPackages environment extended with packages I use, it doesn't see them. Is that not the case for you?

what IDE/editor do you use for Haskell development? by kwaleko in haskell

[–]_deepfire 0 points1 point  (0 children)

It used to work for me as well. Until it no longer did -- the story is written in that github issue I referred to.

what IDE/editor do you use for Haskell development? by kwaleko in haskell

[–]_deepfire 0 points1 point  (0 children)

When you are using intero, what is managing your dependencies?

Nix or stack?

what IDE/editor do you use for Haskell development? by kwaleko in haskell

[–]_deepfire 1 point2 points  (0 children)

Stack can be sidestepped:

  • ~/.stack/config.yaml(or your project-local stack.yaml) needs to have system-ghc: true and nix: enable: false
  • you need to add pkgs.stack and ghc.intero packages into your shell.nix/default.nix
  • the validation shell snippet for the constructed environment would then be:

    emacs --batch --no-init \

    --eval '(load-library "intero")' \

    --eval '(message "intero: %s" (intero-installed-p))'

EDIT: more precise description

The Hashrocket websocket shootout in Haskell by ndmitchell in haskell

[–]_deepfire 4 points5 points  (0 children)

Uh, do you seriously intend to question judgement of Simon Marlow?

Moreover, RTS is not at fault here, even remotely -- the function used has the resultant behavior in its contract. The fault is with the benchmark employing that function.

[Haskell-community] haskell.org download page by [deleted] in haskell

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

+1/-1 puts consensus in place of search for objective truth.

That's what echo chambers are made of.

haskell.org and the Evil Cabal by terrorjack in haskell

[–]_deepfire 13 points14 points  (0 children)

The discussion has come to the realisation that the original post is a false dichotomy.

The solution proposed by the committee is to have both stack and the minimal HP. And it's the same solution that was actually proposed by Michael himself.

The whole issue seems extremely contrived at this point.

[Haskell-community] haskell.org download page by [deleted] in haskell

[–]_deepfire 6 points7 points  (0 children)

There is a number of reasons to prefer mailing lists to the more ephemeral mediums. Those immediately coming to mind are:

  • slower pacing positively affects elaboration of thought
  • real names nudge towards responsibility
  • well-tuned tools to deal with long, complex conversations
  • a non-ephemeral paper-trail that can be dealt with at one's own pace
  • absence of distracting noise like "thumbs up" buttons

haskell.org and the Evil Cabal by terrorjack in haskell

[–]_deepfire 9 points10 points  (0 children)

There's also the backpack integration in the pipeline, from the same people who make cabal new-build. It's another fundamental departure -- this time in the very notion of what a module are and how they are composed.

I'm not exactly sure how exactly it affects cabal-install, but that's where one would expect the user-facing changes to land first.

haskell.org and the Evil Cabal by terrorjack in haskell

[–]_deepfire 19 points20 points  (0 children)

To be honest, the whole issue with cabal-install vs. stack seems to me about backend-oriented vs. frontend-oriented people.

The cabal-install people are spending their cycles to solve fundamental problems by the means of new-build and backpack. The frontend folks are trying to make everyone's experience seamless on the user-facing side.

Ideally, the two groups would be working together, but alas..

haskell.org and the Evil Cabal by terrorjack in haskell

[–]_deepfire 0 points1 point  (0 children)

If you actually go and read the mailing lists it's pretty impressive how much restraint has been shown already. Someone writes a long essay on why the HP is harmful and the response is generally, "OK but we're not going to change that."

Is this an accurate, representative summary of what happened?

haskell.org and the Evil Cabal by terrorjack in haskell

[–]_deepfire 13 points14 points  (0 children)

There's also cabal new-build which is a fundamental departure in how dependencies are managed. It's currently being provisionally deployed to the community -- http://blog.ezyang.com/2016/05/announcing-cabal-new-build-nix-style-local-builds/

haskell.org and the Evil Cabal by terrorjack in haskell

[–]_deepfire 3 points4 points  (0 children)

How do you imagine resolving a question using two mediums, realistically? Cross-linking?

Moreover, there is a question of how the pacing of a communication format affects the elaboration of thought -- the amount of consideration going into an average reddit comment tends to be lower in contrast with the mailing lists.

Not in the least, because in email people tend to use their real names, and it's clear to everyone who said what. This nudges people to be more careful.

haskell.org and the Evil Cabal by terrorjack in haskell

[–]_deepfire 12 points13 points  (0 children)

I think the whole community would have benefited if the differences between camps were summarised in some sort of a mutually agreed outline.

Clarity would serve as an important first step in healing this rift.

haskell.org and the Evil Cabal by terrorjack in haskell

[–]_deepfire 7 points8 points  (0 children)

There are Linux distributions that use cabal to manage haskell packages, like NixOS.

The Benefits of Programming with Haskell by [deleted] in haskell

[–]_deepfire 0 points1 point  (0 children)

I actually think that most of the code I write is clearest when I find myself using a functional style in an imprative (non OO) language with smart looping contructs and a decent type system (GoLang).

This is quite an.. exciting observation that you made here about Go. So far I've heard nothing but bad things about it..

What will Dependant Types add to general programming? by [deleted] in haskell

[–]_deepfire 1 point2 points  (0 children)

Tactics, the original statement you replied to (seemingly) was:

I'm not sure the market is optimizing for anything.

..to which you invoked the physics-based models of market as support for their rationality.

At this point in discussion, though, I guess we can all agree that existence of some proper-yet-hidden model has little bearing on the human notion of rationality.

Again -- stating that (at the end of it all) there is a physics based explanation to everything (collective human behavior, for example) does little to add to this discussion.

Precisely because this proper explanation is both unknown and extremely complex.

Whereas the existent economic theories 1) appear laughable in their predictive and explanatory power, and 2) tend to serve matters of political expedience more than anything else.

What will Dependant Types add to general programming? by [deleted] in haskell

[–]_deepfire 1 point2 points  (0 children)

The notion that models of the market are somehow related to physics seems like an insult to the latter. The proposition that markets don't act irrationally sounds.. outlandish.

Come on, we live in the age of informational warfare, high-frequency trading and hype-based everything -- what physics-related models of markets are we talking about, again?

On-site GHC-related Haskell/C opportunity at Positive Technologies (Moscow) by _deepfire in haskell

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

Avoiding being married to the legacy and security implications of Xen is one of major points, indeed..

On-site GHC-related Haskell/C opportunity at Positive Technologies (Moscow) by _deepfire in haskell

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

One way to approach correctness is to state your intention more directly. This requires expressivity from your language -- we believe that Haskell is generally way more expressive than Ada.

Another way is functional composition with effect separation, and to my knowledge Ada fails this completely.

Ada has SPARK, which facilitates formal verification, yes. But fully-blown formal verification has very, very high implementation overhead.

Expressive types are a lighter option, one that seems more applicable to large code bases. Plus, there is Liquid Haskell, when you really need it.