News aggregator

LaTeX question: interpreter examples

haskell-cafe - 0 sec ago
Hi. I'm doing a lot of Literate Haskell lately, with proofs and commentary in each module. I'm not very familiar with LaTeX, but I'm learning. (I'm using lhs2tex and texi2pdf.) However, in my commentary, I occasionally have blocks of example interpreter interaction, and I'm not sure what to do with it. Is there a certain command enclosure that would be appropriate? Ideally, it would treat the text like monospace, and also preserve line breaks. Example text would be: *GCD> extEuclidean 546 2022 (6,100,-27) *GCD> 546 * 100 + 2022 * (-27) == 6 True But this does not come out looking similar in the final output.
Categories: Offsite Discussion

ANN: wxHaskell 0.92

L.S., I am happy to announce a new version of wxHaskell (0.92). What is it? ----------- wxHaskell[1] is a portable and native GUI library for Haskell. The goal of the project is to provide an industrial strength GUI library for Haskell, but without the burden of developing (and maintaining) one ourselves. wxHaskell is therefore built on top of wxWidgets – a comprehensive C++ library that is portable across all major GUI platforms; including GTK, Windows, X11, and MacOS X. Furthermore, it is a mature library (in development since 1992) that supports a wide range of widgets with the native look-and-feel. What's new? ----------- - wxc/setup.hs now stops searching for wxWidgets when a compatible version is found (this solves bug ticket 96) - Support for simple Wizards added - Calendar support added - GCC > 4.5 can now be used on Windows, which is a big improvement, as wxWidgets and wxHaskell must use the exact same GCC, to prevent compatibility problems - wxAui is ad
Categories: Incoming News

ANN: wxHaskell 0.92

haskell-cafe - Fri, 08/28/2015 - 12:14am
L.S., I am happy to announce a new version of wxHaskell (0.92). What is it? ----------- wxHaskell[1] is a portable and native GUI library for Haskell. The goal of the project is to provide an industrial strength GUI library for Haskell, but without the burden of developing (and maintaining) one ourselves. wxHaskell is therefore built on top of wxWidgets – a comprehensive C++ library that is portable across all major GUI platforms; including GTK, Windows, X11, and MacOS X. Furthermore, it is a mature library (in development since 1992) that supports a wide range of widgets with the native look-and-feel. What's new? ----------- - wxc/setup.hs now stops searching for wxWidgets when a compatible version is found (this solves bug ticket 96) - Support for simple Wizards added - Calendar support added - GCC > 4.5 can now be used on Windows, which is a big improvement, as wxWidgets and wxHaskell must use the exact same GCC, to prevent compatibility problems - wxAui is added to wxc, wxAu
Categories: Offsite Discussion

Tom Schrijvers: Position: Functional Programming Technology Transfer

Planet Haskell - Fri, 08/28/2015 - 12:08am
I am looking for a scientific collaborator / candidate PhD student in the context of project vLambda. This technology transfer project supports the Flemish software industry in the adoption of Functional Programming techniques in mainstream languages like Java and C-sharp. The project is subsidised by the Flemish agency for Innovation through Science and Technology (IWT) and proceeds in collaboration with our industrial partners.

You can find the details of the position here.

In case you are interested and happen to be at ICFP, drop me a line.
Categories: Offsite Blogs

Why Haskell is beautiful to the novice

haskell-cafe - Thu, 08/27/2015 - 10:08pm
Dear cafe, please correct me if questions like this should not go via this mailing list. Presumably everyone on this list agrees that Haskell stands out as a beautiful and pleasant language to have. The recent nitpicking and real-world problems like cabal hell don't change that. However, statements supporting Haskell's beauty usually involve: "In Haskell it is so much clearer/easier/faster to ... than in another language." That is, the beauty of Haskell presents itself to those who can compare it to other imperative or not strongly typed languages that one learned before Haskell. My question is, for what reason should anyone not acquainted with any programming language find Haskell beautiful? Maybe it does not look beautiful at all to the novice. The novice can not draw on the comparison, unless he takes the effort to learn more than one language in parallel. The novice likely also does not have the mathematical background to see the beautiful correspondence between the language and its semantics. (My re
Categories: Offsite Discussion

Haskell hacking internships at Los Alamos National Laboratory (Spring 2016, undergraduate)

General haskell list - Thu, 08/27/2015 - 9:31pm
Hello, We have an ongoing project developing an auto-parallelizing pure functional language implementation loosely based on Haskell/STG. If you are a United States citizen or permanent resident alien studying computer science or mathematics at the undergraduate level with strong interests in Haskell programming, compiler/runtime development, and pursuing a spring semester (2016) internship at a national laboratory, this could be for you. We don't expect applicants to necessarily already be highly accomplished Haskell programmers--such an internship is expected to be a combination of further developing your programming/Haskell skills and putting them to good use. If you're already a strong C hacker we could use that too. The application process for spring semester internships is open here http://science.energy.gov/wdts/suli/. Note the deadline of Oct. 9. Email me if interested, and feel free to pass this along.
Categories: Incoming News

Haskell hacking internships at Los Alamos National Laboratory (Spring 2016, undergraduate)

haskell-cafe - Thu, 08/27/2015 - 8:32pm
Hello, We have an ongoing project developing an auto-parallelizing pure functional language implementation based loosely on Haskell/STG. If you are a United States citizen or permanent resident alien studying computer science or mathematics at the undergraduate level with strong interests in Haskell programming, compiler/runtime development, and pursuing a spring semester (2016) internship at a national laboratory this could be for you. We don't expect applicants to necessarily already be highly accomplished Haskell programmers--such an internship is expected to be a combination of (further) developing your programming/Haskell skills and putting them to good use. If you're already a strong C hacker we could use that too. The application process for spring semester internships is open here http://science.energy.gov/wdts/suli/. Note the deadline of Oct. 9. Email me if interested, and feel free to pass this along.
Categories: Offsite Discussion

Douglas M. Auclair (geophf): Yeah, but how do I do that?

Planet Haskell - Thu, 08/27/2015 - 7:10pm
So, my article on FP IRL has garnered some interest, and I have been asked, 'Yeah, but how do I get started into FP? How can I start using this stuff at my job?'

So, here's my answer. Here's what I do and how I do it.

So, it depends on how and where you want to start this adventure, yes? The beauty of today is that there is so many resources freely available to let you work on them. The problem is that you're good at what you do already, so it'll be hard to move away from what you know already into the domain where it should be easy but it's actually really, really different and that difference can be frustrating: caveat coder.

Also, there are effete programmers out there that tell you how you should not code.

"Oh, Prolog's not pure and it's not functional. You can't do that."

I don't listen to what I can't do. When somebody says to me: "you can't do that," it really means they are saying: "I can't do that." And I'm not interested in listening to the whining of losers. What I'm interested in is delivering results by coding well. If you want to do that, I want to do that with you. If you want to tell me what I can't do, the door is over there, don't let it hit you on your way out of my life.

Sorry. Not sorry.

So.

I host @1HaskellADay where I post a problem that you can solve in any language you want, but I post the problem, and the solution, in Haskell, every day, Monday through Friday. You can learn FP one day at a time that way, be it Haskell, Scala, Idris, whatever you'd like. You write a solution in Haskell, I retweet your solution so everybody can see you're a Haskell coder.

So. That.

Also, there are contests on-line, some with money prizes (kaggle, right?), that you can take on in language X. You may or may not win, but you'll surely learn what you can do easily, and what comes hard in your language of choice.

The way I learn a language is I don't. Not in the traditional sense, that is, of learning a language's syntax and semantics. If I don't have a 'why' then the 'how' of a language is uninteresting to me.

So I make a 'why' to learn a language, then I learn it.

What I do is I have a real-world problem, and solve it in that language. That's how I learn a language, and yes, so I code wrongly, for a long time, but then I start to code better and better in that language, until I'm an expert in that language.

Reading any and everything on the fundamentals of that language, as I encounter them, help me a lot, too.

So, as you can see. I'm learning the 'languages' Neo4J and AWS right now (yes, I know, they aren't languages. Thanks). Lots of fun. I'm doing stuff obviously wrong, but the solutions I provide they need at work, and I'm the only one stepping up to the plate and swinging hard and fast enough to keep them funding these adventures in this tech.

Get that. They are paying me at work to learn stuff that I'm having a blast doing. Why?

Maybe it's because when the VP says, 'Hey, I got a problem here for ya,' I come running?

Here's something I do not do.

I DO NOT ASK: 'can I code in X?' because the answer is always: 'No.'

What I do, is code in X and then hand them a result that so wows them, they feed me the next impossible problem to solve, and I get to set the terms. It's like instead of 'doing my job,' I instead take ownership of the company and its problems, looking for the best solution for the company as its owner. And, like an owner, I say what I do and how I do it, because I know what's best for the company in these new waters we're exploring together in partnership.

Try it that way. Don't say 'we should do X' because that's what (in management's eyes) whiny little techies say. No, don't say anything. Just code it in X, deliver the solution, that you demo to the VP and then to the whole company, and get people coming up to you saying, 'Wow. Just wow. How the hell did you do that?'

No kidding: it takes a hell of a lot of courage to be a water-walker. It has for me, anyway, because the risk is there: that you'll fail. Fail hard. Because I have failed hard. But I choose that risk over drowning, doing what they tell me and how they tell me to do it, because I'm just employ number 89030 and my interview was this: "Do you know Java?" "Yes, I know Java." And, yay, I'm a Java programmer, just like everybody else, doing what everybody else does. Yay, so yay. So boring.

I've failed twice in my 25 years in this field, and wasn't for lack of trying. Twice.

Do you know how many times I have succeeded? I don't. I've lost count. I've saved three teens' lives and that was just in one month. Put a price on that, and that was because I stepped up to the plate and tried, when nobody else would or could. And my other successes, too, and the beauty of my successes is that the whole team won, we all got to keep working on really neat stuff that mattered and got company and customer attention.

And, bonus, "Hey, I've got a business and I need your help."

Three times so far.

Taking the risk leads to success. Success breeds success.

It starts with you, not asking, but just taking that risk, trying, a few times or right off the bat, and succeeding.

And that success, and the feeling you get from knowing you've done something, and you've done something.

They can't take that away from you.

Ever.
Categories: Offsite Blogs

Best areas to focus on in category theory

Haskell on Reddit - Thu, 08/27/2015 - 3:54pm

I am a Haskell beginner who finds Haskell absolutely fascinating and have learned quite a bit of category theory to further my understanding of various concepts. I've learned a great deal and understand to a reasonable degree Monoids, Applicatives, Monads, and Comonads. Where should I direct my learning to have enough practical knowledge to code a Haskell project in an effective manner? It sort of seems like a never ending bucket list of things to learn to get proficient (I see terms like arrows, lens, other advanced functional constructs thrown all over the place and its a bit overwhelming). Assuming I have a relatively small, finite amount of time to learn each week, without a large theoretical background in abstract math, what portions of category theory are worth diving into to be able to code effectively in Haskell and what portions don't yield as much bang for buck?

submitted by DPakeD
[link] [8 comments]
Categories: Incoming News

[ANN] dejafu-0.1.0.0: Overloadable primitives for testable, potentially non-deterministic, concurrency.

haskell-cafe - Thu, 08/27/2015 - 2:30pm
Hi cafe, For the past few months I've been working on a library for concurrency testing in Haskell, which I'll be giving a talk on at the Haskell Symposium next week. Now it's on Hackage! --- Déjà Fu is a library for developing and testing concurrent Haskell programs, it provides a typeclass-abstraction over GHC’s regular concurrency API, allowing the concrete implementation to be swapped out. Why do we need this? Well, concurrency is really hard to get right. Empirical studies have found that many real-world concurrency bugs can be exhibited with small test cases using as few as two threads: so it’s not just big concurrent programs that are hard, small ones are too. We as programmers just don’t seem to have a very good intuition for traditional threads-and-shared-memory-style concurrency. The typical approach to testing concurrent programs is to just run them lots of times, but that doesn’t provide any hard coverage guarantees, and then we need to wonder: how many runs do we need? Fortunately
Categories: Offsite Discussion

apfelmus: FRP — Release of reactive-banana version 0.9

Planet Haskell - Thu, 08/27/2015 - 10:54am

I am very pleased to announce the release of version 0.9.0.0 of my reactive-banana library on hackage. The API is essentially the same as before, but the implementation has been improved considerably: Dynamically switched events are now garbage collected!

This means that the library finally features all the ingredients that I consider necessary for a mature implementation of FRP:

  • Continuous time semantics (sampling rate independence, deterministic union, …)
  • Recursion
  • Push-driven performance
  • Dynamic event switching without time leaks
  • Dynamic event switching with garbage collection

The banana is ripe! In celebration, I am going to drink a strawberry smoothie and toast Oliver Charles for his invaluable bug reports and Samuel Gélineau for tracking down a nasty bug in detail. Cheers!

While the library internals are now in a state that I consider very solid, the library is still not quite done yet. When introducing the API for dynamic event switching in version 0.7, I had the choice between two very different regions of the design space: An approach using a monad and an approach using phantom types. I had chosen the latter approach, mostly because the sodium FRP library had chosen to explore the former region in the design space, so we could cover more of the design space together this way. But over the years, people have sent me questions and comments, and it is apparent that the phantom type approach is too unwieldy for practical use. For the next version of reactive-banana, version number 1.0, I plan to radically change the API and switch to the monadic approach. While we’re at it, I also intend to remove simultaneous occurences in a single event. I will discuss these upcoming API changes more thoroughly in a subsequence blog post.

Categories: Offsite Blogs

something went wrong

del.icio.us/haskell - Thu, 08/27/2015 - 10:00am
Categories: Offsite Blogs

[ANN] discogs2pg-0.1.1: import Discgos' xml into PostgreSQL

Haskell on Reddit - Thu, 08/27/2015 - 8:53am

This is a hobby project of mine. The code is over at github.

I needed a fast way to import Discogs' data dumps (basically, 23GB of XML) into a PostgreSQL database.

I used postgresql-simple's semi-experimental (it can't handle errors for instance) COPY support for storing, hexpat and lens-simple for parsing and bytestring's Data.ByteString.Builder.Prim for escaping text for COPY (I'm pretty sure I can't use postgresql-simple's escaping since it's for INSERT, not COPY's text format, but feel free to prove me wrong).

I have to say it was pretty fun. I learned what contramap is and why it's useful while reading Aeson's internal Builder stuff for escaping ByteStrings (along with, well, how to use Builders), I had to chase a space leak and learned about laziness, and dropped cabal for stack.

The project structure is a mess, I know, I'm still a noob. But from a pragmatic point of view, it works! And it's fast!

submitted by clrnd
[link] [2 comments]
Categories: Incoming News

Type is not in Type

Haskell on Reddit - Thu, 08/27/2015 - 6:42am
Categories: Incoming News

Template Haskell and packages using Obj-C FFI

haskell-cafe - Thu, 08/27/2015 - 5:55am
Hi cafe, I'm currently writing objc specific marshaller for inline-c, and faced with strange behaviour of Template Haskell and FFI. It turns out that it's irrelevant to inline-c and matter of GHC. Here is minimal example package for failure: https://github.com/konn/objcth This tiny package is built up with two parts: 1. A wrapper library to call NSLog function with Haskell's String value. This uses FFI interface, 2. An executable which calls the above library to say hello. If 2. does not contain any Template Haskell macros, everything works fine. But if any TH macro presents, even only top level splice `$(return [])`, then compiler halts with following error: ``` <command line>: can't load .so/.DLL for: /Users/myname/Documents/Programming/Haskell/lab/ghcbugs/objcth/.stack-work/dist/x86_64-osx/Cabal-1.22.4.0/build/libHSobjcth-0.1.0.0-IBzJnZWD04lEmS0Ot4HRVO-ghc7.10.2.dylib (dlopen(/Users/myname/Documents/Programming/Haskell/lab/ghcbugs/objcth/.stack-work/dist/x86_64-osx/Cabal-1.22.4.0/build/libHSobj
Categories: Offsite Discussion

What holds back dead code elimination across modules?

Haskell on Reddit - Thu, 08/27/2015 - 2:32am

Questions like this and this make me wonder why there are such bloated executables. Granted, you can work around it by outsourcing the problem into multiple shared libraries, but why exactly isn't there a pass filtering out just the transitive closure of the code I use in the compiler (rather than in the linker via -split-obj, if I understand correctly)?

I'm sure there are technical reasons, so enlighten me :)

submitted by sgraf812
[link] [23 comments]
Categories: Incoming News