Re: [Haskell-cafe] What happens if you get hit by a bus?
Hehee Great. Haskell is a flexible high level language perfect for domain specific languages it isn't?. A well designed solution is, at the top level, simple and understandable even by non experts. The software transforms the complexities of the hardware into something that the user can understand by means of interfaces, EDSLs etc. The complexity must be hidden in deeper layers. So if you are hit by a bus, the new programmer would be confronted with a simple application layer (ideally simple enough to be understood by a non haskell programmer) , that would permit the evolution of the software, so the new programmer is productive from day one, from the client point of view. More radical adaptations may require deeper knowledge, but at least the shock would be greatly mitigated. 2011/12/16 Yves Parès limestr...@gmail.com: Tell them that if you were instead on Rails, you'd have a huge chance of being hit by a train, which is likely to deal far more damage than a bus. 2011/12/16 Michael Litchard mich...@schmong.org I'm learning what it means to be a professional Haskell programmer, and contemplating taking on side jobs. The path of least resistance seems to be web applications, as that is what I do at work. I've been investigating what some web developers have to say about their trade. One article addresses the question above. His answer was that he uses RoR which has a large community and he is therefore easily replaceable. My question, for freelancers in general, and web developers in particular is this: How do you address this question? I imagine potential clients would need to be assuaged of their fears that hiring me would lead to a lock-in situation at best, and no one to maintain a code base at worst. Lock-in won't be part of my business model, also sooner or later we part ways with the client. When the client wonders, What happens then?, what is a good answer? ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] [Alternative] summary of my understanding so far
On 16/12/2011, Gregory Crosswhite gcrosswh...@gmail.com wrote: On Dec 17, 2011, at 12:35 PM, Matthew Farkas-Dyck wrote: (1) If we do (4), then the documentation ought to be adequate as-is. I see your point that if we do (4) then some and many are no longer problematic for Maybe and [], and thus we don't need warnings for those types. However, nonetheless we will *still* need *big warnings* *for the sake of others who write Alternative instances* for new types to make sure that these instances do not fall into the same trap as Maybe and []. That is, we want to let future authors of instances know about the conditions under which they will need to write their own versions of some and maybe in order to make sure that these methods have sensible behavior. Finally, if we adopt (4) then we will need to change the documentation to remove least from least solutions of the equations since the phrase will no longer be correct. Better still, we could replace the phrase entirely with something like least *converging* solutions of the equations. (*) Ah, true. Sorry. In addition to this, we also really need some additional documentation explaining what the point of some and many are, since few people have any clue about them. :-) Myself, I think it's quite clear by the axioms given, but I certainly shan't grouch about more/better documentation. Cheers, Greg (*) P.S: Dear people who are better at this kind of technical language than I: I am fully aware of the fact that the phrase least converging solutions of the equations [...] is sloppy wording at best and absolutely wrong at worst, but hopefully you should at least understand what I am *trying* to get at. Thus, I would welcome either your feedback on what it is that I am supposed to be thinking and saying, or an explanation about why the idea I am trying to conceive and convey is so intrinsically poorly formed that I am best off just giving up on it. ;-) Actually, now that I think of it, they are not, in general, the least converging solutions -- in the case of a parser, for example, (some (pure x)) would nevertheless diverge (I think). Perhaps least sane solutions (^_^) Cheers, Matthew Farkas-Dyck ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Alternative versus Monoid
On 17/12/2011, Gregory Crosswhite gcrosswh...@gmail.com wrote: On Dec 17, 2011, at 12:51 PM, Matthew Farkas-Dyck wrote: By my reason, the instance (Monoid a = Monoid (Maybe a)) is appropriate, since we have another class for inner-type-agnostic choice -- Alternative! (and MonadPlus, but that's essentially the same, and would be if (Functor m = Applicative m = Monad m), as it ought). Yes, but the problem here is that having different behavior for Alternative, MonadPlus, and Monoid instances is inherently confusing, in the sense that this would almost certainly surprise someone who wasn't already aware of the difference between the instances. On 17/12/2011, Conor McBride co...@strictlypositive.org wrote: So your argument is to create incoherence because we can. I'm not convinced. No, my argument is that Monoid and Alternative ought to have nonsame semantics, since one is a class of types of kind (*), and the other, (* - *). Thus, Monoid operations ought to mean the whole type, and Alternative operations, just the outer type. It shouldn't be a surprise -- it's impossible to put a constraint on the inner type for an Alternative instance, since there is none (^_~) (Functor m = Applicative m = Monad m), as it ought. and as it already is in Strathclyde... By default superclass instances, you mean? If so (and I understand correctly), that's not quite the same; If I write, for (Applicative FooBar - FooBar) instance Monad FooBar where x = f = ... then return would be undefined, despite pure (which ought to be in its own class, anyhow (ō_ō)). Cheers, Matthew Farkas-Dyck ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] I've just heard of a neat security measure that when you compile the code it generates different object code...
On Sat, Dec 17, 2011 at 12:43:11PM +1300, Chris Wong wrote: On Sat, Dec 17, 2011 at 12:27 PM, KC kc1...@gmail.com wrote: ... with the same functionality. Thus, your program would be a moving target to hackers. Would this be challenging with ghc? Although it's possible, I doubt this would do anything. Most exploits are just programmer mistakes; changing the object code doesn't change the fact that there's a gaping security hole in your program. Plus, it would be harder to debug the compiler, since the mangling code would be non-deterministic by definition. So I doubt anyone would try to implement that. I could help though if you want to write a virus in Haskell ;) /M -- Magnus Therning OpenPGP: 0xAB4DFBA4 email: mag...@therning.org jabber: mag...@therning.org twitter: magthe http://therning.org/magnus Most software today is very much like an Egyptian pyramid with millions of bricks piled on top of each other, with no structural integrity, but just done by brute force and thousands of slaves. -- Alan Kay pgpIhry6Qw78h.pgp Description: PGP signature ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] gtk2hs: adding widget during runtime
Hello Haskellers, currently I work with the gtk2hs library to create a graphical user interface. Everything works fine, but there is one problem: How can I insert widgets into boxes during runtime? I tried something like: main = do initGUI window - windowNew box - vBoxNew True 0 l1 - labelNew $ Just label eins bc - buttonNewWithLabel insert! onClicked bc $ (\b - do lh - labelNew $ Just neues label! boxPackStart b lh PackNatural 0 widgetQueueDraw lh widgetQueueDraw b ) box boxPackStart box l1 PackNatural 0 boxPackStart box bc PackNatural 0 containerAdd window box widgetShowAll window onDestroy window mainQuit mainGUI That compiles fine, but the GUI never shows a neues label!. What I want is a widget W, which takes a list L, and produces sub widgets for each element. There are also some Entry widgets and a button B. By clicking on that button B, I want to add an element to the list L, and add a sub widget to the widget W. Thank you for reading, Gary ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] gtk2hs: adding widget during runtime
Hi, Am Samstag, den 17.12.2011, 20:42 +0100 schrieb Gary Klindt: That compiles fine, but the GUI never shows a neues label!. blind guess: Do you need to call widgetShow on the newly created widget? Greetings, Joachim -- Joachim nomeata Breitner m...@joachim-breitner.de | nome...@debian.org | GPG: 0x4743206C xmpp: nome...@joachim-breitner.de | http://www.joachim-breitner.de/ signature.asc Description: This is a digitally signed message part ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] gtk2hs: adding widget during runtime
On 12/17/2011 09:03 PM, Joachim Breitner wrote: Hi, Am Samstag, den 17.12.2011, 20:42 +0100 schrieb Gary Klindt: That compiles fine, but the GUI never shows a neues label!. blind guess: Do you need to call widgetShow on the newly created widget? Uuh! That seem's very elemental, and it works. Thank you. Greetings, Joachim ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Announce: The Haskell Platform 2011.4
We're pleased to announce the release of the Haskell Platform: a single, standard Haskell distribution for everyone. Download the Haskell Platform 2011.4.0.0: http://haskell.org/platform/ The specification, along with installers (including Windows, Apple and Unix installers for a full Haskell environment) are available. The Haskell Platform is a single, standard Haskell distribution for every system, in the form of a blessed library and tool suite for Haskell distilled from the thousands of libraries on Hackage, along with installers for a wide variety of systems. It saves developers work picking and choosing the best Haskell libraries and tools to use for a task. When you install the Haskell Platform, you get the latest stable compiler, an expanded set of core libraries, additional development tools, and cabal-install – so you can download anything else you need from Hackage. What you get is specified here: http://hackage.haskell.org/platform/contents.html Thanks! -- The Platform Infrastructure Team P.S. Special thanks to Mark Lentczner for his excellent work on this release. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] I've just heard of a neat security measure that when you compile the code it generates different object code...
I wonder, if there is any example of actual Haskell program cracked / reverse engineered? GHC-generated code is already quite hard to understand… ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Typechecking Using GHC API
On Tue, 13 Dec 2011 18:16:17 +0100, Sh NJP shayan@gmail.com wrote: I do some pre-processing on a normal Haskell code ( -F ). The pre-processor needs to know the type of each expression. What are the possibilities to do so? Can I use GHC API to employ GHC type checker? If yes, any good tutorial? Is it too naive to think of a function, f :: String - AnnotatedAST , that takes Haskell code and returns its corresponding abstract syntax tree annotated with types? Another, less powerful, but much easier approach would be to use hint, which also provides some type-checking functionality. Unfortunately, the results seem to be just Strings: http://hackage.haskell.org/packages/archive/hint/0.3.3.3/doc/html/Language-Haskell-Interpreter.html#g:7 If you want to see more examples of using the GHC API, you could also take a look at the ghc-mod repository on github, which uses the GHC API to provide type information to Emacs: https://github.com/kazu-yamamoto/ghc-mod Cheers, Daniel pgpBVUtUkkqQF.pgp Description: PGP signature ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Announce: The Haskell Platform 2011.4
Hi, Am Samstag, den 17.12.2011, 16:04 -0500 schrieb Don Stewart: We're pleased to announce the release of the Haskell Platform: a single, standard Haskell distribution for everyone. Download the Haskell Platform 2011.4.0.0: we are pleased to announce the release of the Haskell Platform on Debian: Version 2011.4.0.0 has just been uploaded to the unstable suite. In a few hours you will see it also on http://packages.debian.org/sid/haskell-platform (Ok, this is a bit of cheating; we have packaged the required libraries already a few weeks back, based on the unreleased platform cabal file at http://code.haskell.org/haskell-platform/haskell-platform.cabal, and now just bumped the version number of the meta package.) If everything goes well the updated packages will be available in Debian testing (“wheezy”) in two or three days. Note that Debian slightly deviates from the version constraints as specified in the official platform package, due to non-platform libraries and programs requiring newer versions. At the moment, this is: alexversion 3.0.1 instead of 2.3.5 cgi version 3001.1.8.2 instead of 2001.1.7.4 network version 2.3.0.6instead of 2.3.0.5 You can always check the various platform package versions available in Debian stable (“squeeze”), testing (“wheezy”) and unstable (“sid”) on http://people.debian.org/~nomeata/platform.html On behalf of the Debian Haskell Group, Joachim Breitner -- Joachim nomeata Breitner Debian Developer nome...@debian.org | ICQ# 74513189 | GPG-Keyid: 4743206C JID: nome...@joachim-breitner.de | http://people.debian.org/~nomeata signature.asc Description: This is a digitally signed message part ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe