Re: Installing GHC on my MacBook Air

2023-03-17 Thread Steven Smith
I recommend using macOS package managers to take care of all this. There’s a whole community of knowledgeable folks who have figured out all these build and install details, and I know that it’s simply a matter of doing this to get a working version of the latest, on either x86_64 or arm64

Re: [Haskell] [ANNOUNCE] GHC 9.2.3 released

2022-05-27 Thread Steven Smith
FYI, gpg documentation is incorrect, should be your public key: http://pgp.mit.edu/pks/lookup?op=get=0x88b57fcf7db53b4db3bfa4b1588764fbe22d19c4 Thanks for the release! > $ gpg --import >

Re: osx conundrum

2021-10-14 Thread Steven Smith
ource gives the same libHSbase error > > > > ndefined symbols for architecture x86_64: > "_iconv", referenced from: > _hs_iconv in libHSbase-4.14.3.0.a(iconv.o > > > > > On Tue, Oct 12, 2021 at 2:54 AM Steven Smith <mailto:steve.t.sm..

Re: osx conundrum

2021-10-13 Thread Steven Smith
architecture x86_64: > "_iconv", referenced from: > _hs_iconv in libHSbase-4.14.3.0.a(iconv.o > > > > >> On Tue, Oct 12, 2021 at 2:54 AM Steven Smith wrote: >> I’m a maintainer of the MacPorts ghc port. The MacPorts installations do not >

Re: osx conundrum

2021-10-11 Thread Steven Smith
I’m a maintainer of the MacPorts ghc port. The MacPorts installations do not have this issue, whether installed from the buildbot binaries or compiled from source, that all work on multiple macOS versions 10.9–11. Here’s the build recipe:

Re: [ANN] Cabal-3.6.0.0

2021-08-15 Thread Steven Smith
gt; >  > There, we've purged the cache and I'm seeing everything up to date :) > > >> On Sat, Aug 14, 2021 at 8:17 PM, Emily Pillmore wrote: >> It already exists on the site, but it looks like the old dirs are cached >> >> >> >> On Sat, Aug 14, 2021

Re: [ANN] Cabal-3.6.0.0

2021-08-14 Thread Steven Smith
Thank you! Will the release be posted to the haskell downloads site? https://downloads.haskell.org/~cabal/ Several package managers (e.g. MacPorts) build using this site. > On Aug 5, 2021, at 5:27 PM, Emily Pillmore wrote: > > Hello All, > > The Cabal team is excited to announce the release

GHC Full Bootstrap from Source on macOS

2020-01-19 Thread Steven Smith
Is there a guide or script to build ghc from source (not the prebuilt binary)? At MacPorts we’re running into issues on macOS Catalina 10.15 with the bootstrapped-from-prebuilt ghc. See https://trac.macports.org/ticket/59467 . It would preferable and probably more robust to be able to

GHC 8.8.2 Bootstrap Build Fails on macOS Catalina 10.15, undeclared identifier 'TAG_MASK'

2020-01-17 Thread Steven Smith
I’m trying to upgrade the MacPorts ghc install to the latest 8.8.2. The build fails with: > error: use of undeclared identifier 'TAG_MASK' > :info:build return (StgWord)p & TAG_MASK; This is an error observed with previous ghc versions and on other systems, so I do not believe it is

Re: GHC 8.8.1 Fails to Build on macOS with Native clang 11.0.0

2019-12-23 Thread Steven Smith
> I’m trying to update the MacPorts ghc port. The build isn’t getting the > TAG_MASK #define for some reason, which breaks the build. I see this is a known issue: https://gitlab.haskell.org/ghc/ghc/issues/17146 smime.p7s Description: S/MIME cryptographic signature

downloads.haskell.org server is misconfigured, ignores Accept-Encoding, prevents update checks

2019-12-23 Thread Steven Smith
The downloads.haskell.org server is misconfigured. It's always gzipping its response content, ignoring the Accept-Encoding headers. Even if you set Accept-Encoding: identity the server sends a compressed response. This prevents automated version update checking. For details, see:

GHC 8.8.1 Fails to Build on macOS with Native clang 11.0.0

2019-12-23 Thread Steven Smith
I’m trying to update the MacPorts ghc port. The build isn’t getting the TAG_MASK #define for some reason, which breaks the build. The previous release ghc 8.6.5 builds successfully. I’m following the simple build instructions here: https://github.com/ghc/ghc#building--installing

Re: [Haskell-community] 2018 state of Haskell survey results

2018-11-18 Thread Chris Smith
> For example, just reading this thread, it sounds like the bogus responses also really don't like the new release schedule. Maybe the troll wants the old release schedule back and was just lazy about programming the tool to vary the stack/cabal question answers adequately. There is another

Re: [Haskell-community] 2018 state of Haskell survey results

2018-11-18 Thread Chris Smith
bmissions. Beyond what's in the CSV, the only other > thing I have is (some) email addresses. > > Fortunately I wrote a script to output all the charts and tables from the > survey responses. Once I've identified the problematic responses, I should > be able to update the script to ign

Re: [Haskell-community] 2018 state of Haskell survey results

2018-11-18 Thread Chris Smith
Sadly, it looks like a Cabal/Stack thing. Of the responses with a country provided, 618 of 1226 claim to use Cabal, and 948 of 1226 claim to use Stack. Of the responses with no country, only 35 of 3868 claim to use Cabal, while 3781 of the 3868 claim to use Stack. Assuming independence, you'd

Re: [Haskell-community] Creating a new @haskell.org mailing list?

2018-11-17 Thread Chris Smith
etting this > up, or do you think it should be straightforward? > > -g > On Wed, Oct 24, 2018 at 10:18 AM Chris Smith wrote: > > > > Good point, Simon. education@ sounds like a good choice, with the > understanding that we mean education for the general population, not >

Re: [Haskell-community] Creating a new @haskell.org mailing list?

2018-10-24 Thread Chris Smith
Jones wrote: > Good idea. “k12” is rather USA specific. What about > educat...@haskell.org? > > > > Simon > > > > *From:* Haskell-community *On > Behalf Of *Chris Smith > *Sent:* 22 October 2018 15:32 > *To:* Haskell-community > *Subject:* [Haskell-comm

[Haskell-community] Creating a new @haskell.org mailing list?

2018-10-22 Thread Chris Smith
it at all. Thoughts? Thanks, Chris Smith ___ Haskell-community mailing list Haskell-community@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-community

Re: [Haskell-community] [Haskell-cafe] Standard package file format

2016-09-16 Thread Chris Smith
I guess the overriding question I have here is: what is the PROBLEM being solved? I know of basically no beginners who were confused or intimidated by the syntax of Cabal's file format. It's fairly commonplace for beginners to be confused by the *semantics*: which fields are needed and what they

Re: haskell xml parsing for larger files?

2014-02-20 Thread Chris Smith
Have you looked at tagsoup? On Feb 20, 2014 3:30 AM, Christian Maeder christian.mae...@dfki.de wrote: Hi, I've got some difficulties parsing large xml files ( 100MB). A plain SAX parser, as provided by hexpat, is fine. However, constructing a tree consumes too much memory on a 32bit machine.

Re: [Haskell-cafe] Tutorial on JS with Haskell: Fay or GHCJS?

2013-09-04 Thread Chris Smith
I second the recommendation to look at Haste. It's what I would pick for a project like this today. In the big picture, Haste and GHCJS are fairly similar. But when it comes to the ugly details of the runtime system, GHCJS adopts the perspective that it's basically an emulator, where

Re: [Haskell-cafe] Possible extension to Haskell overloading behavior

2013-07-09 Thread Chris Smith
. On Tue, Jul 9, 2013 at 11:46 AM, Aleksey Khudyakov alexey.sklad...@gmail.com wrote: On 08.07.2013 23:54, Chris Smith wrote: So I've been thinking about something, and I'm curious whether anyone (in particular, people involved with GHC) think this is a worthwhile idea. I'd like to implement

Re: [Haskell-cafe] Possible extension to Haskell overloading behavior

2013-07-09 Thread Chris Smith
Oh, never mind. In this case, I guess I don't need an extension at all! On Tue, Jul 9, 2013 at 1:47 PM, Chris Smith cdsm...@gmail.com wrote: Oh, yes. That looks great! Also seems to work with OverloadedStrings in the natural way in GHC 7.6, although that isn't documented. Now if only

Re: [Haskell-cafe] Possible extension to Haskell overloading behavior

2013-07-09 Thread Chris Smith
to add 'import Prelude' to the top of their code. Am I missing something? On Tue, Jul 9, 2013 at 1:51 PM, Chris Smith cdsm...@gmail.com wrote: Oh, never mind. In this case, I guess I don't need an extension at all! On Tue, Jul 9, 2013 at 1:47 PM, Chris Smith cdsm...@gmail.com wrote: Oh, yes

Re: [Haskell-cafe] Possible extension to Haskell overloading behavior

2013-07-09 Thread Chris Smith
for the suggestion! On Jul 9, 2013 4:20 PM, Aleksey Khudyakov alexey.sklad...@gmail.com wrote: On 10.07.2013 01:13, Chris Smith wrote: Ugh... I take back the never mind. So if I replace Prelude with an alternate definition, but don't use RebindableSyntax, and then hide the base package, GHC still

[Haskell-cafe] Possible extension to Haskell overloading behavior

2013-07-08 Thread Chris Smith
So I've been thinking about something, and I'm curious whether anyone (in particular, people involved with GHC) think this is a worthwhile idea. I'd like to implement an extension to GHC to offer a different behavior for literals with polymorphic types. The current behavior is something like:

Re: [Haskell-cafe] Possible extension to Haskell overloading behavior

2013-07-08 Thread Chris Smith
, Jul 8, 2013 at 12:54 PM, Chris Smith cdsm...@gmail.com wrote: So I've been thinking about something, and I'm curious whether anyone (in particular, people involved with GHC) think this is a worthwhile idea. I'd like to implement an extension to GHC to offer a different behavior for literals

[Haskell-cafe] Announcing postgresql-libpq-0.8.2.3

2013-07-08 Thread Leon Smith
I just fixed a fairly serious performance problem with postgresql-libpq's binding to PQescapeStringConn; in was exhibiting a non-linear slowdown when more strings are escaped and retained. https://github.com/lpsmith/postgresql-libpq/commit/adf32ff26cdeca0a12fa59653b49c87198acc9ae If you are

Re: [Haskell-cafe] [database-devel] Announcing postgresql-libpq-0.8.2.3

2013-07-08 Thread Leon Smith
commands from being issued in a single request, which would subtly change the interface postgresql-simple exports. Best, Leon On Mon, Jul 8, 2013 at 10:00 PM, Joey Adams joeyadams3.14...@gmail.comwrote: On Mon, Jul 8, 2013 at 9:03 PM, Leon Smith leon.p.sm...@gmail.com wrote: I just fixed a fairly

[Haskell-cafe] runghc dies silently when given large numbers of arguments

2013-06-07 Thread Gareth Smith
Hi all, The other day, I wrote the following program in /tmp/test.hs --8---cut here---start-8--- main = error An Error message --8---cut here---end---8--- Then I ran the following: , | gds@lithium:/tmp$ runghc

Re: A language extension for dealing with Prelude.foldr vs Foldable.foldr and similar dilemmas

2013-05-28 Thread Chris Smith
+1 While it might work for teaching, it's not reasonable to ask software developers who want to write useful software to depend on haskell98 instead of base if they want more relevant types. I'd go one step further and say that we're not just talking about whether someone is an advanced user

Re: A language extension for dealing with Prelude.foldr vs Foldable.foldr and similar dilemmas

2013-05-27 Thread Chris Smith
I agree that it would be unfortunate to complicate the Prelude definitions of foldr and such by generalizing to type classes like Foldable. This proposal seems attractive to me as a way to reconcile abstraction when it's needed, and simplicity for beginners. However, it does seem like a common

[Haskell-cafe] A use case for *real* existential types

2013-05-10 Thread Leon Smith
I've been working on a new Haskell interface to the linux kernel's inotify system, which allows applications to subscribe to and be notified of filesystem events. An application first issues a system call that returns a file descriptor that notification events can be read from, and then issues

Re: [Haskell-cafe] A use case for *real* existential types

2013-05-10 Thread Leon Smith
On Fri, May 10, 2013 at 9:00 AM, Andres Löh and...@well-typed.com wrote: This twist is very simple to deal with if you have real existential types, with the relevant part of the interface looking approximately like init :: exists a. IO (Inotify a) addWatch :: Inotify a - FilePath - IO

Re: [Haskell-cafe] A use case for *real* existential types

2013-05-10 Thread Leon Smith
On Fri, May 10, 2013 at 9:04 AM, MigMit miguelim...@yandex.ru wrote: With that kind of interface you don't actually need existential types. Or phantom types. You can just keep Inotify inside the Watch, like this: Right, that is an alternative solution, but phantom types are a relatively

Re: [Haskell-cafe] A use case for *real* existential types

2013-05-10 Thread Leon Smith
On Fri, May 10, 2013 at 5:49 PM, Alexander Solla alex.so...@gmail.comwrote: I'm not sure if it would work for your case, but have you considered using DataKinds instead of phantom types? At least, it seems like it would be cheap to try out.

Re: [Haskell-cafe] A use case for *real* existential types

2013-05-10 Thread Leon Smith
): in this case the type system ensures that no references to the inotify descriptor can exist after the callback returns. Best, Leon On Fri, May 10, 2013 at 6:52 PM, Alexander Solla alex.so...@gmail.comwrote: On Fri, May 10, 2013 at 3:31 PM, Leon Smith leon.p.sm...@gmail.comwrote: On Fri, May 10

Re: [Haskell-cafe] Markdown extension for Haddock as a GSoC project

2013-04-28 Thread Chris Smith
of the internet. -- Chris Smith ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Markdown extension for Haddock as a GSoC project

2013-04-28 Thread Chris Smith
On Apr 28, 2013 6:42 PM, Alexander Solla alex.so...@gmail.com wrote: I think that much has to do with the historical division in computer science. We have mathematics on the right hand, and electrical engineering on the wrong one. I've been called many things, but electrical engineer is a new

[Haskell-cafe] Markdown extension for Haddock as a GSoC project

2013-04-27 Thread Chris Smith
Oops, forgot to reply all. -- Forwarded message -- From: Chris Smith cdsm...@gmail.com Date: Apr 27, 2013 12:04 PM Subject: Re: [Haskell-cafe] Markdown extension for Haddock as a GSoC project To: Bryan O'Sullivan b...@serpentine.com Cc: I don't agree with this at all. Far more

Re: [Haskell-cafe] unsafeInterleaveST (and IO) is really unsafe [was: meaning of referential transparency]

2013-04-12 Thread Chris Smith
in mailing list threads.) -- Chris Smith ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] Haskel let

2013-04-01 Thread A Smith
Hi I think I've mastered much of functional programming with Haskell, or at least I can write programs which process as desired. However the existence of the let statement evades me apart from a quick way to define a function. Then there is the in and where parts. Its been suggested its to do

Re: [Haskell-cafe] GSOC application level

2013-03-06 Thread Chris Smith
Mateusz Kowalczyk fuuze...@fuuzetsu.co.uk wrote: I know that this year's projects aren't up yet Just to clarify, there isn't an official list of projects for you to choose from. The project that you purpose is entirely up to you. There is a list of recommendations at

Re: [Haskell-cafe] Extensible Type Unification

2013-02-08 Thread Leon Smith
It finally occurred to me how to get most of what I want, at least from a functional perspective.Here's a sample GADT, with four categories of constructor: data Foo :: Bool - Bool - Bool - Bool - * where A :: Foo True b c d B :: Foo True b c d C :: Foo a True c d D :: Foo a

[Haskell-cafe] Extensible Type Unification

2013-02-07 Thread Leon Smith
I've been toying with some type-level programming ideas I just can't quite make work, and it seems what I really want is a certain kind of type unification. Basically, I'd like to introduce two new kind operators: kind Set as -- a finite set of ground type terms of kind as kind Range as =

Re: [Haskell-cafe] lambda case (was Re: A big hurray for lambda-case (and all the other good stuff))

2012-12-30 Thread Chris Smith
On Sun, Dec 30, 2012 at 8:51 AM, David Thomas davidleotho...@gmail.comwrote: Jon's suggestion sounds great. The bike shed should be green. There were plenty of proposals that would work fine. `case of` was great. `\ of` was great. It's less obvious to me that stand-alone `of` is never

Re: [Haskell-cafe] Categories (cont.)

2012-12-21 Thread Chris Smith
It would definitely be nice to be able to work with a partial Category class, where for example the objects could be constrained to belong to a class. One could then restrict a Category to a type level representation of the natural numbers or any other desired set. Kind polymorphism should make

Re: [Haskell-cafe] containers license issue

2012-12-17 Thread Chris Smith
Ketil Malde ke...@malde.org wrote: The point of the point is that neither of these are translations of literary works, there is no precedence for considering them as such, and that reading somebody's work (whether literary or source code) before writing one's own does not imply that the

Re: [Haskell-cafe] How can I avoid buffered reads?

2012-12-09 Thread Leon Smith
On Thu, Dec 6, 2012 at 5:23 PM, Brandon Allbery allber...@gmail.com wro\ Both should be cdevs, not files, so they do not go through the normal filesystem I/O pathway in the kernel and should support select()/poll(). (ls -l, the first character should be c instead of - indicating

Re: Dynamic libraries by default and GHC 7.8

2012-12-04 Thread Chris Smith
I'm curious how much of the compile twice situation for static and dynamic libraries could actually be shared. Even if it's not likely to be implemented in the next year or two, IMO it would make a big difference if it were feasible to generate both static and dynamic libraries at the same time

[Haskell-cafe] PLMW: Mentoring at POPL. Second Call for Participation

2012-12-04 Thread Gareth Smith
the resounding success of the first Programming Languages Mentoring Workshop at POPL 2012, we proudly announce the 2nd SIGPLAN Programming Languages Mentoring Workshop (PLMW), co-located with POPL 2013 and organised by Nate Foster, Philippa Gardner, Alan Schmitt, Gareth Smith, Peter Thieman and Tobias Wrigstad

Re: [Haskell-cafe] How can I avoid buffered reads?

2012-11-29 Thread Leon Smith
= do n' - fdReadBuf fd ptr n if n /= n' then fdReadAll fd (ptr `plusPtr` n') (n - n') else return () main = do (x,y) - twoRandomWord64s S.hPutStrLn IO.stdout (S.append (showHex x) (showHex y)) On Wed, Nov 28, 2012 at 6:05 PM, Leon Smith leon.p.sm...@gmail.com wrote

[Haskell-cafe] How can I avoid buffered reads?

2012-11-28 Thread Leon Smith
I have some code that reads (infrequently) small amounts of data from /dev/urandom, and because this is pretty infrequent, I simply open the handle and close it every time I need some random bytes. The problem is that I recently discovered that, thanks to buffering within GHC, I was actually

Re: [Haskell-cafe] How can I avoid buffered reads?

2012-11-28 Thread Leon Smith
random numbers or use the new Intel RDRAND instruction (when available) would that interest you? Also, what you are doing is identical to the entropy package on hackage, which probably suffers from the same bug/performance issue. Cheers, Thomas On Wed, Nov 28, 2012 at 11:38 AM, Leon Smith

Re: [Haskell-cafe] How can I avoid buffered reads?

2012-11-28 Thread Leon Smith
...@snarc.org wrote: On 11/28/2012 09:31 PM, Leon Smith wrote: Quite possibly, entropy does seem to be a pretty lightweight dependency... Though doesn't recent kernels use rdrand to seed /dev/urandom if it's available? So /dev/urandom is the most portable source of random numbers on unix systems

[Haskell-cafe] Call for Participation: Programming Languages Mentoring Workshop - a POPL workshop.

2012-11-17 Thread Gareth Smith
Mentoring Workshop at POPL 2012, we proudly announce the 2nd SIGPLAN Programming Languages Mentoring Workshop (PLMW), co-located with POPL 2013 and organised by Nate Foster, Philippa Gardner, Alan Schmitt, Gareth Smith, Peter Thieman and Tobias Wrigstad. The purpose of this mentoring workshop

Re: [Haskell-cafe] Call for discussion: OverloadedLists extension

2012-09-23 Thread Chris Smith
Michael Snoyman mich...@snoyman.com wrote: That said, it would be great to come up with ways to mitigate the downsides of unbounded polymorphism that you bring up. One idea I've seen mentioned before is to modify these extension so that they target a specific instance of IsString/IsList, e.g.:

Re: [Haskell-cafe] Over general types are too easy to make.

2012-09-02 Thread Chris Smith
On Sun, Sep 2, 2012 at 9:40 AM, timothyho...@seznam.cz wrote: The thing is, that one ALWAYS wants to create a union of types, and not merely an ad-hock list of data declarations. So why does it take more code to do the right thing(tm) than to do the wrong thing(r)? You've said this a few

Re: [Haskell-cafe] Platform Versioning Policy: upper bounds are not our friends

2012-08-22 Thread Leon Smith
...@freegeek.orgwrote: On 8/17/12 11:28 AM, Leon Smith wrote: And the difference between reactionary and proactive approaches I think is a potential justification for the hard and soft upper bounds; perhaps we should instead call them reactionary and proactive upper bounds instead. I disagree

Re: [Haskell-cafe] Platform Versioning Policy: upper bounds are not our friends

2012-08-17 Thread Leon Smith
I see good arguments on both sides of the upper bounds debate, though at the current time I think the best solution is to omit upper bounds (and I have done so for most/all of my packages on hackage).But I cannot agree with this enough: On Thu, Aug 16, 2012 at 4:45 AM, Joachim Breitner

Re: [Haskell-cafe] Platform Versioning Policy: upper bounds are not our friends

2012-08-16 Thread Chris Smith
I am tentatively in agreement that upper bounds are causing more problems than they are solving. However, I want to suggest that perhaps the more fundamental issue is that Cabal asks the wrong person to answer questions about API stability. As a package author, when I release a new version, I

Re: [Haskell-cafe] Platform Versioning Policy: upper bounds are not our friends

2012-08-16 Thread Chris Smith
Twan van Laarhoven twa...@gmail.com wrote: Would adding a single convenience function be low or high risk? You say it is low risk, but it still risks breaking a build if a user has defined a function with the same name. Yes, it's generally low-risk, but there is *some* risk. Of course, it

Re: [Haskell-cafe] What does unpacking an MVar really mean?

2012-07-31 Thread Leon Smith
On Tue, Jul 31, 2012 at 7:37 AM, Bertram Felgenhauer bertram.felgenha...@googlemail.com wrote: Note that MVar# itself cannot be unpacked -- the StgMVar record will always be a separate heap object. One could imagine a couple of techniques to unpack the MVar# itself, and was curious if GHC

[Haskell-cafe] What does unpacking an MVar really mean?

2012-07-30 Thread Leon Smith
I admit I don't know exactly how MVars are implemented, but given that they can be aliased and have indefinite extent, I would think that they look something vaguely like a cdatatype ** var, basically a pointer to an MVar (which is itself a pointer, modulo some other things such as a thread

Re: [Haskell-cafe] What does unpacking an MVar really mean?

2012-07-30 Thread Leon Smith
Let me clarify a bit. I am familiar with the source of Control.Concurrent.MVar, and I do see {-# UNPACK #-}'ed MVars around, for example in GHC's IO manager. What I should have asked is, what does an MVar# look like? This cannot be inferred from Haskell source; though I suppose I could

Re: Call to arms: lambda-case is stuck and needs your help

2012-07-10 Thread Chris Smith
the longhand version of proc x - case x of. -- Chris Smith ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

Re: Call to arms: lambda-case is stuck and needs your help

2012-07-09 Thread Chris Smith
Right, it seems to me that there are basically three reasonable proposals here: 1. \ of with multiple arguments. This is consistent with existing layout, and seems like a nice generalization of lambda syntax. 2. case of with a single argument. This is consistent with existing layout, and seems

Re: [Haskell-cafe] Call to arms: lambda-case is stuck and needs your help

2012-07-06 Thread Chris Smith
Whoops, my earlier answer forgot to copy mailing lists... I would love to see \of, but I really don't think this is important enough to make case sometimes introduce layout and other times not. If it's going to obfuscate the lexical syntax like that, I'd rather just stick with \x-case x of. On

Re: [Haskell-cafe] Call to arms: lambda-case is stuck and needs your help

2012-07-06 Thread Chris Smith
Whoops, my earlier answer forgot to copy mailing lists... I would love to see \of, but I really don't think this is important enough to make case sometimes introduce layout and other times not. If it's going to obfuscate the lexical syntax like that, I'd rather just stick with \x-case x of. On

Re: [Haskell-cafe] Question on proper use of Data.IORef

2012-06-22 Thread Adam Smith
theValueRef isn't a pointer to theValue that you can use to somehow change theValue (which is immutable). theValueRef is a reference to a box that contains a totally separate, mutable value. When you use newIORef to create theValueRef, it's *copying* theValue into the box. When you mutate

[Haskell-cafe] Current uses of Haskell in industry?

2012-06-13 Thread Chris Smith
It turns out I'm filling in for a cancelled speaker at a local open source user group, and doing a two-part talk, first on Haskell and then Snap. For the Haskell part, I'd like a list of current places the language is used in industry. I recall a few from Reddit stories and messages here and

[Haskell-cafe] import IO

2012-05-16 Thread A Smith
Hi folks I need a little help. I had a hiccup upgrading my Ubuntu system, and eventually did a fresh install. Its mostly fixed to my old favourite ways but I cannot remember what's needed to install the stuff that the import IO statement uses! -- Andrew

[Haskell-cafe] Fwd: Problem with forall type in type declaration

2012-05-04 Thread Chris Smith
Oops, forgot to reply-all again... -- Forwarded message -- From: Chris Smith cdsm...@gmail.com Date: Fri, May 4, 2012 at 8:46 AM Subject: Re: [Haskell-cafe] Problem with forall type in type declaration To: Magicloud Magiclouds magicloud.magiclo...@gmail.com On Fri, May 4, 2012

Re: [Haskell-cafe] Specify compile error

2012-05-03 Thread Adam Smith
Nope - because at compile time, there's no way to know whether createB's argument is a Safe or an Unsafe. That information only exists at run time. Consider the following functions. f :: Int - A f x = if x 0 then Unsafe x else Safe x g :: IO B g = do x - getLine return $ createB $ f

Re: [Haskell-cafe] twitter election on favorite programming language

2012-05-01 Thread Leon Smith
Out of curiousity, was this a plurality election (vote for one), or an approval election (vote for many)? On Tue, May 1, 2012 at 12:11 AM, Kazu Yamamoto k...@iij.ad.jp wrote: Hello, A twitter election on favorite programming language was held in Japan and it appeared that Heskell is No. 10

Re: [Haskell-cafe] ANNOUNCE: pipes-core 0.1.0

2012-04-17 Thread Chris Smith
Paolo, This new pipes-core release looks very nice, and I'm happy to see exception and finalizer safety while still retaining the general structure of the original pipes package. One thing that Gabriel and Michael have been talking about, though, that seems to be missing here, is a way for a

Re: [Haskell-cafe] open source project for student

2012-04-11 Thread Chris Smith
Hmm, tough to answer without more to go on. I think if I were in your shoes I'd ask myself where I'm most happy outside of programming. A lot of good entry level open source work involves combining programming with other skills. Are you an artist? Have a talent for strong design and striking

Re: [Haskell-cafe] adding the elements of two lists

2012-03-26 Thread Chris Smith
Jerzy Karczmarczuk jerzy.karczmarc...@unicaen.fr wrote: Le 26/03/2012 02:41, Chris Smith a écrit : Of course there are rings for which it's possible to represent the elements as lists.  Nevertheless, there is definitely not one that defines (+) = zipWith (+), as did the one I was responding

Re: [Haskell-cafe] adding the elements of two lists

2012-03-26 Thread Chris Smith
simpler than the code in the question, and that defining a Num instance is possible, but a bad idea because there's not a canonical way to define a ring on lists. The rest of this seems to have devolved into quite a lot of bickering and one-ups-manship, so I'll back out now. -- Chris Smith

Re: [Haskell-cafe] adding the elements of two lists

2012-03-25 Thread Chris Smith
that obeys the laws, so it's better to write no instance at all. -- Chris Smith ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] adding the elements of two lists

2012-03-25 Thread Chris Smith
Jerzy Karczmarczuk jerzy.karczmarc...@unicaen.fr wrote: Le 26/03/2012 01:51, Chris Smith a écrit :     instance (Num a) = Num [a] where     xs + ys = zipWith (+) xs ys You can do this in the sense that it's legal Haskell... but it is a bad idea [...] It MIGHT be a ring

Re: [Haskell-cafe] Are there arithmetic composition of functions?

2012-03-19 Thread Chris Smith
If you are willing to depend on a recent version of base where Num is no longer a subclass of Eq and Show, it is also fine to do this: instance Num a = Num (r - a) where (f + g) x = f x + g x fromInteger = const . fromInteger and so on. ___

Re: [Haskell-cafe] Are there arithmetic composition of functions?

2012-03-19 Thread Chris Smith
. -- Chris Smith ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Google Summer of Code idea of project application

2012-03-19 Thread Chris Smith
than I do. -- Chris Smith ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Are there arithmetic composition of functions?

2012-03-19 Thread Chris Smith
about if you're willing to depend on a recent version of base. Effectively, this means requiring a recent GHC, since I'm pretty sure base is not independently installable. -- Chris Smith ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http

Re: [Haskell-cafe] Google Summer of Code idea of project application

2012-03-19 Thread Chris Smith
, but just because re-implementing the whole front end of a compiler for even a limited but useful subset of Haskell is a ludicrously ambitious and risky project for GSoC. -- Chris Smith ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http

Re: [Haskell-cafe] Google Summer of Code - Lock-free data structures

2012-03-18 Thread Chris Smith
implementations than even six or seven at a student project level. -- Chris Smith ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Theoretical question: are side effects necessary?

2012-03-17 Thread Chris Smith
we should ideally call them just effects. But since so many other languages use functions to describe effectful actions, the term has stuck. So pretty much when someone talks about side effects, even in Haskell, they means stateful interaction with the world. -- Chris Smith

Re: [Haskell-cafe] Theoretical question: are side effects necessary?

2012-03-16 Thread Chris Smith
, lazy evaluation (which can be seen as a controlled benign mutation) is enough to recover the optimal asymptotics. -- Chris Smith ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] ANNOUNCE: pipes-core 0.0.1

2012-03-12 Thread Chris Smith
code without ensure. It will then be interesting to see how that compares to Gabriel's approach, which at this point we've heard a bit about but I haven't seen. -- Chris Smith ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org

Re: [Haskell-cafe] Empty Input list

2012-03-12 Thread Chris Smith
) Or, you may want to use a Maybe type for the return... which would mean there *is* a Nothing value you can return: tmp:: [(Int, Int)] - Int - Maybe (Int, Int) tmp (x:xs) y        | y == 1 = Just x        | y 1 = tmp xs (y-1) tmp [] y = Nothing Does that help? -- Chris Smith

Re: [Haskell-cafe] Empty Input list

2012-03-12 Thread Chris Smith
Oh, and just to point this out, the function you're writing already exists in Data.List. It's called (!!). Well, except that it's zero indexed, so your function is more like: tmp xs y = xs !! (y-1) ___ Haskell-Cafe mailing list

Re: [Haskell-cafe] Empty Input list

2012-03-12 Thread Chris Smith
= case drop (y-1) xs of [] - (0,0) Just (x:_) - x -- Chris Smith ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] ANNOUNCE: pipes-core 0.0.1

2012-03-11 Thread Chris Smith
Smith ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] ANNOUNCE: pipes-core 0.0.1

2012-03-11 Thread Chris Smith
want the unawait to occur. -- Chris Smith ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] ANNOUNCE: pipes-core 0.0.1

2012-03-11 Thread Chris Smith
can be exhausted, but when it is, idP will await input, which will immediately terminate the (idP p) pipe, producing the result from q, and ignoring p entirely. -- Chris Smith ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org

Re: [Haskell-cafe] ANNOUNCE: pipes-core 0.0.1

2012-03-11 Thread Chris Smith
). -- Chris Smith ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] ANNOUNCE: pipes-core 0.0.1

2012-03-11 Thread Chris Smith
, looks like idP is still the identity. Of course, the real reason (aside from the fact that you can check and see) is that forP isn't definable at all in Gabriel's pipes package. -- Chris Smith ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http

Re: thoughts on the record update problem

2012-03-08 Thread Chris Smith
to settle fundamental questions about the record system we hope to be using in 10 years time is not based on who has time after work for GHC hacking this month. -- Chris Smith ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http

Re: thoughts on the record update problem

2012-03-08 Thread Chris Smith
be the major concern. But it seems unlikely that claim is true, since in the very same email you express what looks like a pretty serious concern about the semantics that will be exposed to users (namely, the need for a new kind of type annotation). -- Chris Smith

  1   2   3   4   5   >