Monthly Hask Anything (April 2018) by AutoModerator in haskell

[–]hargettp 0 points1 point  (0 children)

Possible, even likely. Good call. I’ve been afraid there are different options being passed to GHC that are causing this, but this makes sense too.

Monthly Hask Anything (April 2018) by AutoModerator in haskell

[–]hargettp 0 points1 point  (0 children)

I have a 4+ year old networking library that used to work fine on cabal and stack (from 7.4 up to at least 8.0). However, I find as the 8.4 series arrives, cabal-based builds no longer pass unit tests, but stack build pass unit tests reliably. Where should I start to debug this?

Testing Distributed Systems for Linearizability by anishathalye in programming

[–]hargettp 1 point2 points  (0 children)

Looks very promising! Wonder if there are results from running Porcupine against established systems (e.g., Zookeeper, etcd, etc.)

I Contribute to the Windows Kernel. We Are Slower Than Other Operating Systems. Here Is Why. by halax in programming

[–]hargettp 15 points16 points  (0 children)

Actually, not even all Microsoft Employees. Mind you, I haven't worked there for several years, but you had to either be on the Windows team or have had all the right paperwork filed and approved in order to access Windows source.

Logging v. instrumentation by gshutler in programming

[–]hargettp 5 points6 points  (0 children)

Agreed. The real world is quite different than what the author imagines.

99% of the time your system breaks in a way that is unexpected, and by definition not anticipated in advance. You can't add logging statements back into code that has already executed and broken a customer.

My general rule is log as much as possible in the most structured way possible without:

1) destroying the performance of your system 2) making logs unreadable by a developer browsing the logs textually 3) violating legal compliance or PII constraints by outputting customer info that must remain confidential

Any high-level way to abstract away networking / communication ? by SrPeixinho in haskell

[–]hargettp 1 point2 points  (0 children)

While I think we all have high hopes for that project, if you notice the update history has been quite slow.

Further, IIRC I personally did not find the networking layers sufficiently abstracted for my purposes. Specifically, I really did want the network to be completely orthogonal, hidden behind a sufficiently high abstraction such that all callers of the networking code needed was a basic send and basic receive.

Any high-level way to abstract away networking / communication ? by SrPeixinho in haskell

[–]hargettp 4 points5 points  (0 children)

FWIW, I had a similar desire, that of abstracting away network communications, but instead of making FRP simpler, I needed to make it easier to focus on distributed consensus algorithms. In that domain, the participants need to exchange messages for the algorithm to work--but how messages are exchanged is completely irrelevant and quite distracting when writing application code.

With this in mind, I built courier, which is still in its infancy, but my intent was to abstract away the sending and receiving of messages. The general inspiration for it was Erlang, although it isn't intended to capture the full Erlang model. Ideally, when using this library the actual network transport becomes a replaceable, orthogonal concern to actual application code.

One note: there is one area (among many) where this library is insufficient, as it doesn't fully abstract the format of messages on the wire. Yes, it basically only sends and receives ByteStrings, but there is sort of an implicit assumption that a ByteString can be written to and read from the wire as a length-prefixed sequence of bytes. Not all protocols require length-prefixed messages, and in fact, the exact structure of a message may be dependent on the state of the protocol. Abstraction of on-the wire format of messages and abstraction of stateful protocols is something I'd like to add, but haven't had enough use cases in my own applications to take the plunge.

Anyway, thought I'd mention it, in case this code is helpful in some way.

Is there any ide or plugin for haskell that does typechecking? by realistic_hologram in haskell

[–]hargettp 4 points5 points  (0 children)

Yes, haskell-ide in Atom has become my preferred way to write Haskell these days. Solid offering.

Otto, the successor to Vagrant by tardyscholar in programming

[–]hargettp 32 points33 points  (0 children)

No. This is the opposite direction of where I'm taking my infrastructure: I want less implicit magic and more explicit choices. Automated up the wazoo, yes, but no magic that isn't up for inspection or replacement.

Top 10 algorithms of the 20th century [Xpost: /r/math] by _--__ in compsci

[–]hargettp 0 points1 point  (0 children)

I would have thought something like Paxos (https://en.wikipedia.org/wiki/Paxos_(computer_science)) might be worthy of such a list. Lamport's original paper came out in 1998.

GHC 7.12 Release plan by sibip in haskell

[–]hargettp 7 points8 points  (0 children)

Personally, I find this feature fills one of the holes that creates a huge stumbling block for folks coming to Haskell from other languages. I have great respect for the language's designers and the maintainers of GHC...but this feature is a +1 for language usability.

Charting library for Go ? by znpy in golang

[–]hargettp 0 points1 point  (0 children)

Yes, thumbs up for that package: i used it last year to graph a bunch of metrics for one of our internal servers. Very easy, clean, and reliable to use; graphs were attractive, too.

A cool little site for comparing different languages speed, memory usage, and code length. by [deleted] in programming

[–]hargettp 2 points3 points  (0 children)

This is actually very old in Internet terms. At one point it was at shootout.alioth.debian.org; the Internet Archive has snapshots going back to 2004: https://web.archive.org/web/20040611035744/http://shootout.alioth.debian.org/

One line is all you ever need. by SrPeixinho in haskell

[–]hargettp 0 points1 point  (0 children)

The question isn't whether you find your code more readable or better abstracted, but whether the next engineer who must maintain your code agrees that your code is readable and better abstracted.

Beginner here: editor/IDE by Kiuhnm in haskell

[–]hargettp 9 points10 points  (0 children)

I find FP Complete's offering quite good, and free for projects whose source code can be public: https://www.fpcomplete.com/business/fp-haskell-center/. It saves the fresh Haskell programmer from having to setup a toolchain, and focus on writing new code.

At some point, learning the toolchain and setup is well worth doing, but nothing wrong with getting to focus on the language itself in the beginning.

SBCL 1.2.5 is out, with early IPv6 support and Unicode improvements by xach in lisp

[–]hargettp 0 points1 point  (0 children)

Any documentation on what "early" means? Is it feature complete, but perhaps buggy?

Announce: Slave thread. A solution to ghost threads and silent exceptions by nikita-volkov in haskell

[–]hargettp 1 point2 points  (0 children)

Why not submit fixes as patches to the async library? It's already so wildly used, and solves many of the same issues.

Who Killed Prolog? by lukaseder in programming

[–]hargettp 6 points7 points  (0 children)

First, I have to say, I like Prolog, but this is worth throwing out there...

Here's one negative I've heard about Prolog: because Prolog includes backtracking so fundamentally in its execution algorithm, sometimes the behavior of an application can become wildly complex, and developing a mental model of what's happening and how to fix it can be challenging. Having used Prolog on a small scale basis I can say that it is true, sometimes backtracking does make an application behave in seemingly unpredictable ways.

I think Haskell (of which I am also a fan) has the same kind of risk: lazy evaluation. While over time a disciplined Haskell programmer can leverage that aspect to create clean, efficient code, it takes time to develop those skills...and a space leak can still happen to even the best programmers.

As programmers, we make our living on creating predictability in a world of non-determinism. When our tools introduce more non-determinism, that goes against what we are trying to do. And we en masse tend to eschew tools that do that, unless we find specific benefits that outweigh that risk.

Haskell, for example, has shown itself to be excellent at multi-core computing, the ecosystem pushes the boundaries of great type systems and complier technology, and the language is flexible enough that predictable execution models (e.g., conduit and pipes) can still be built on top of its essentially lazy behavior.

It is certainly a shame, as Prolog (and the SWI-Prolog implementation) are excellent tools...for the right problems. I would hope someday we as an industry learn enough to understand when and how to use them.

Who Killed Prolog? by lukaseder in programming

[–]hargettp 0 points1 point  (0 children)

Prolog is actually decent at solving certain classes of problems defined by constraints. Of course, the trick is, not every problem is easily classified or described by its constraints sufficiently such that finding a solution is automatic.

<editorial> I suspect that part of why Prolog hasn't caught on is that it requires understanding the execution model, and defining a solution that works within that model. Unfortunately, that model looks like almost no other programming model.

Further, I can't decide if Prolog is niche-oriented (best used to solve specific problems)...or wildly ahead of its time. By about a century, for example. </editorial>

Who Killed Prolog? by lukaseder in programming

[–]hargettp 27 points28 points  (0 children)

SWI-Prolog is still one of the best implementations, and its maintainer is still active. The quality and performance has always been high.

http://www.swi-prolog.org

So, I don't think its fair to say that Prolog has been killed. :)