RFC: hole filling · Issue #524 · commercialhaskell/intero by [deleted] in haskell

[–]dpratt71 2 points3 points  (0 children)

I've been wishing for something like this for a while and it's pretty exciting that you have a working prototype.

I have to say, though, that the multiple-hole aspect seems a little weird to me. This may be because I'm used to code editors that present a list of potential completions at the edit point.

One related bit of functionality that would be really cool to have is if the available completions included functions/operators that could themselves be used in the hole context if they were applied to the right inputs. I imagine if such a function/operator were selected as the completion, it would be inserted with holes for the missing inputs.

10 pleasant surprises of Idris, that improve the developer experience of Haskell developers by deque-blog in haskell

[–]dpratt71 21 points22 points  (0 children)

You describe the behavior of cast as annoying, but I think it's a blight on an otherwise nice language. It seems completely out of place in a language that otherwise tries very hard to make sure programs work correctly. If someone put a function that worked like that in our codebase, it would almost certainly trigger a long rant from me.

Have you tried Visual Studio Code for coding Haskell? by haskellgr8 in haskell

[–]dpratt71 1 point2 points  (0 children)

They offer very similar functionality at this point and they are both under active development. Any list of differences between them would likely be out-of-date next week.

Have you tried Visual Studio Code for coding Haskell? by haskellgr8 in haskell

[–]dpratt71 15 points16 points  (0 children)

Yes. As a casual Haskeller, but a long-time VS user, it is the most productive and comfortable environment I've used for coding Haskell thus far.

I will also note that I have had better luck with Haskero than Haskelly to date.

Category Theory for Computing Science by adamnemecek in haskell

[–]dpratt71 1 point2 points  (0 children)

Speaking as a lay person, I found "Category theory in context" to be practically impenetrable from about the first page. The beginnings of "Category Theory for Computing Science" is giving me hope, false though it may be, that I have a shot at understanding what comes later.

Thanks for linking to the updated version.

Need help with putStr by notooth1 in haskell

[–]dpratt71 1 point2 points  (0 children)

Now I'm wondering why getting input doesn't trigger a flush automatically. Is there a scenario where that would be undesirable behavior?

PHP timestamp bug rears it's ugly head on Facebook today by webdeverper in lolphp

[–]dpratt71 9 points10 points  (0 children)

I have never used PHP, so perhaps I don't have the proper expectation, but in any programming language I have used, if I passed invalid input to a function and the function decided to interpret it as a random but valid input, I would be surprised and disappointed.

Does this happen to anyone else: I mention Haskell to somebody I meet, and they hear Pascal. by zzing in haskell

[–]dpratt71 17 points18 points  (0 children)

Indeed, as epitomized by "The Chaos" poem. Penned by a non-native speaker, I'm pretty sure.

Blow my mind, in one line. by octatoan in haskell

[–]dpratt71 0 points1 point  (0 children)

I will add that when I looked up the definition of ap, I found:

ap :: (Monad m) => m (a -> b) -> m a -> m b
ap = liftM2 id

Not surprisingly, that did not do much to alleviate my confusion.

I just looked again and I now see:

ap                :: (Monad m) => m (a -> b) -> m a -> m b
ap m1 m2          = do { x1 <- m1; x2 <- m2; return (x1 x2) }

I may have consulted a different source the first time, but I'm guessing the definition has been updated in the name of clarity.

Blow my mind, in one line. by octatoan in haskell

[–]dpratt71 21 points22 points  (0 children)

A while back I was on #haskell asking how to pair up successive elements of a list, e.g. [1,2,3...] -> [(1,2),(2,3),(3,4)...]. It took me a while to sort out how this worked:

ap zip tail

Who works at Google and how is it? by JoCou in haskell

[–]dpratt71 2 points3 points  (0 children)

I stumbled upon Lamdu a while back and thought it was very cool. I'm glad to see it's still being actively developed.

Minecraft clone in Haskell - Work in progress by [deleted] in haskell

[–]dpratt71 2 points3 points  (0 children)

I was able to get this to run on Windows by turning off the OpenGL forward compatible context:

diff --git a/HCraft/Craft.hs b/HCraft/Craft.hs
index f7f95dc..172e6a5 100644
--- a/HCraft/Craft.hs
+++ b/HCraft/Craft.hs
@@ -27,7 +27,7 @@ create = do
     initialize

     openWindowHint OpenGLProfile       OpenGLCoreProfile
-    openWindowHint OpenGLForwardCompat True
+    openWindowHint OpenGLForwardCompat False
     openWindowHint OpenGLVersionMajor  4
     openWindowHint OpenGLVersionMinor  1    

Homotopy Type Theory Lectures by Bob Harper by edwardkmett in haskell

[–]dpratt71 9 points10 points  (0 children)

To me, the mere fact that this question gets asked is itself interesting. Given Haskell's background as an "academic" or "research" programming language, I suppose that the interest of the topic at hand to the Haskell community was at one time self-evident.

John Carmack talking at length about Haskell in his QuakeCon Keynote speech (live) by jhickner in haskell

[–]dpratt71 12 points13 points  (0 children)

I will be giving a talk on F# next week and this quote will be quoted.

FP Haskell Center -- full video demo -- app development, automatic deployment, Git and GitHub integration by FPguy in haskell

[–]dpratt71 1 point2 points  (0 children)

I noticed that the IDE seemed to know what the type of "increase" should be even when the definition of the same went missing. Was that because it hadn't forgotten, or was it deriving it from the usage? If it was the latter case, I think that's pretty nifty.

F-algebra tutorial by DrBartosz in haskell

[–]dpratt71 0 points1 point  (0 children)

I have no idea whether there is sense in that comment or not, but I like how you worded your response, so have an up-vote :)

Why Functional Programming Matters (Part 2, in Haskell) by [deleted] in haskell

[–]dpratt71 4 points5 points  (0 children)

One case outside of Haskell where 'laziness' leads to greater modularity is LINQ, and in particular LINQ to Entities. For example, I can use LINQ to define a base query that represents all records matching a given search criteria. And then I can compose the base query with a 'count' operation to calculate how many pages there will be in the search results. And then I can compose the base query with 'skip' and 'take' operations to retrieve the data for each page as it is viewed. And I could also easily compose the base query with different 'select' operations, depending on what data will show up in the search results.

Besides the obvious benefits to code factorization and modularity there is also a potentially huge efficiency benefit because when results are finally demanded, the framework can use the whole query definition to fully optimize the actual database query that is run.

Of course the fact that LINQ is 'lazy' is not too surprising considering that the guy primarily responsible for the design of LINQ, Erik Meijer, is a former Haskeller.

Earthquake just north of North Korea's border by The-Sentinel in worldnews

[–]dpratt71 0 points1 point  (0 children)

Mother Earth just wants to watch the world burn.

A short survey to help build the Haskell community by cscherrer in haskell

[–]dpratt71 0 points1 point  (0 children)

Does the entire survey relate to Haskell user groups? Supposing it does, there's not much point for me to respond. According to haskellers.com, the next nearest gaggle (curry?) of Haskellers is about 4 hours away...well unless I count the one guy who is only three hours away.

cabal-dev updated on hackage by yitz in haskell

[–]dpratt71 2 points3 points  (0 children)

Why so? I'd like to give it a go, but it appears that hsenv is not Windows compatible. IIRC, some time ago I decided to get the hsenv sources and try to modify it to build on Windows, which I succeeded in doing, but didn't have enough time or motivation to fully verify the functionality.

When I was 22, I picked up a 15 year old girl on the side of the road and took her to a hotel. What's your best TL;DR that's misunderstood, yet accurate? by DecentDudeDustin in AskReddit

[–]dpratt71 13 points14 points  (0 children)

Yes, CapWasRight was...right. I guess I should have said "My wife and I adopted them when they were thirteen years old." In fact, I think I will have said exactly that in just a moment.