Copperbox revision 3090.
I've added a pretty pretty for the language so far defined. I'll have to at least add a module language - the idea is to allow synthesizer components and so components need to be available as libraries.
Sunday, January 26, 2014
Saturday, January 25, 2014
ochre-lang
Copperbox revision 3089.
I've started work on a new prototype implementation of Ochre looking towards making it a closed DSL rather than an embedded one.
Last time I worked on Ochre (actually Orca) I found it hard both to type programs in Ochre+Haskell and to get an agreeable form of late-binding to allow synthesizer components. My feeling is both might be easier with a standalone DSL.
I've started work on a new prototype implementation of Ochre looking towards making it a closed DSL rather than an embedded one.
Last time I worked on Ochre (actually Orca) I found it hard both to type programs in Ochre+Haskell and to get an agreeable form of late-binding to allow synthesizer components. My feeling is both might be easier with a standalone DSL.
Wednesday, January 22, 2014
config-check
Copperbox revision 3088.
I've added a Writer to the CheckCode monad, so it can record explanations of why a check fails. Previously I tried to use an error type that built a stack of errors, but using a Writer seems simpler.
I've added a Writer to the CheckCode monad, so it can record explanations of why a check fails. Previously I tried to use an error type that built a stack of errors, but using a Writer seems simpler.
Monday, January 20, 2014
config-check
Copperbox revision 3087.
I've made the assert combinators more uniform, adding underscore suffix versions that don't take an error message builder. Also I've added wrappers over Text.printf to build error messages - although I'm usually sanguine about Text.printf here it is too useful to ignore.
I've made the assert combinators more uniform, adding underscore suffix versions that don't take an error message builder. Also I've added wrappers over Text.printf to build error messages - although I'm usually sanguine about Text.printf here it is too useful to ignore.
config-check
Copperbox revision 3086.
More work on the checker combinators, especially improving the naming convention.
More work on the checker combinators, especially improving the naming convention.
config-check
Copperbox revision 3085.
I've changed the internal representation of Checkers so that the base monad doesn't support failure (failure is pushed into the non-polymorphic Result type). This means we lose the Alternative and MonadPlus instances, but we gain better error messages and simplicity (no need for ShortCircuitOkay).
I've changed the internal representation of Checkers so that the base monad doesn't support failure (failure is pushed into the non-polymorphic Result type). This means we lose the Alternative and MonadPlus instances, but we gain better error messages and simplicity (no need for ShortCircuitOkay).
Sunday, January 19, 2014
config-check
Copperbox revision 3084.
I've changed the built-in report printer to use Text.PrettyPrint.HughesPJ - this stops me re-inventing some wheels and allows nicer output.
I've changed the built-in report printer to use Text.PrettyPrint.HughesPJ - this stops me re-inventing some wheels and allows nicer output.
config-check
Copperbox revision 3083.
I've added simplistic reporting to make the final output more user friendly. Reporting is just pretty printing of the new CheckReport data type - a less simplistic report printer could output as HTML for example.
I've added simplistic reporting to make the final output more user friendly. Reporting is just pretty printing of the new CheckReport data type - a less simplistic report printer could output as HTML for example.
Saturday, January 18, 2014
config-check
Copperbox revision 3082.
I've changed the Checker module to re-export the forward and reverse composition operators from Control.Category - (<<<) and (>>>) - rather than define my own. I've also added two new sample checkers.
I've changed the Checker module to re-export the forward and reverse composition operators from Control.Category - (<<<) and (>>>) - rather than define my own. I've also added two new sample checkers.
Wednesday, January 15, 2014
config-check
Copperbox revision 3081.
I've changed to sample checkers to use paths defined with reverse function composition (to get a left-to-right reading) and applied with the focus function, rather than use an operator that aliased the focus function.
Using an operator for focus introduced problems with precedence that snagged up the code. Excepting the introduction of a reverse composition operator, checkers look like good old, simple Haskell again (albeit without explicit pattern matching).
I've changed to sample checkers to use paths defined with reverse function composition (to get a left-to-right reading) and applied with the focus function, rather than use an operator that aliased the focus function.
Using an operator for focus introduced problems with precedence that snagged up the code. Excepting the introduction of a reverse composition operator, checkers look like good old, simple Haskell again (albeit without explicit pattern matching).
Tuesday, January 14, 2014
config-check
Copperbox revision 3080.
I've added assert_ versions of the only_ combinators that fail if the assert fails (rather than short-circuit).
I've added assert_ versions of the only_ combinators that fail if the assert fails (rather than short-circuit).
Monday, January 13, 2014
config-check
Copperbox revision 3079.
I've tidied up the the datatype names in the Checker module so that the most important objects get the best names. Also I've moved all the sample checkers out of the Demo01 module into HydroChecks module.
I've tidied up the the datatype names in the Checker module so that the most important objects get the best names. Also I've moved all the sample checkers out of the Demo01 module into HydroChecks module.
config-check
Copperbox revision 3078.
I've added GroupChecker (should probably be called CheckerGroup) to group together related checkers and started moving the sample checkers into a separate module.
I've added GroupChecker (should probably be called CheckerGroup) to group together related checkers and started moving the sample checkers into a separate module.
config-check
Copperbox revision 3077.
I've extended the Checker datatypes with description and priority (priority is a open measure of severity e.g. Fail | Warn). These should help the Checker runner to create more informative reports.
I've extended the Checker datatypes with description and priority (priority is a open measure of severity e.g. Fail | Warn). These should help the Checker runner to create more informative reports.
Sunday, January 12, 2014
config-check
Copperbox revision 3076.
I've added a counting checker and specialized variants exactly, atmost and atleast that work on Foldables. Actually, I thought these checkers went in commit 3075, so the Svn comment mentions that I fixed a bug in the counting checker.
I've also added more sample data - this should inspire me to write more test checkers.
I've added a counting checker and specialized variants exactly, atmost and atleast that work on Foldables. Actually, I thought these checkers went in commit 3075, so the Svn comment mentions that I fixed a bug in the counting checker.
I've also added more sample data - this should inspire me to write more test checkers.
config-check
Copperbox revision 3075.
I've generalized imall (now called checkall) to work with any Foldable structure. Previously it was specific to IntMap.
I've generalized imall (now called checkall) to work with any Foldable structure. Previously it was specific to IntMap.
Saturday, January 11, 2014
config-check
Copperbox revision 3074.
Some changes to type names and some code clean up.
Initially this revision was an attempt to simplify the implementation of the CheckCode monad by changing success from Okay True (with both Okay False and Fail msg as failure) to Okay () as success and Fail msg as failure. However this change made it difficult to write Applicative checkers (they needed an extra lifter) and imall became more difficult to think about.
Some changes to type names and some code clean up.
Initially this revision was an attempt to simplify the implementation of the CheckCode monad by changing success from Okay True (with both Okay False and Fail msg as failure) to Okay () as success and Fail msg as failure. However this change made it difficult to write Applicative checkers (they needed an extra lifter) and imall became more difficult to think about.
Wednesday, January 8, 2014
config-check
Copperbox revision 3073.
I've improved on yesterday's "operational leak" by using a new onlyJust combinator.
That said, as I add combinators I'm becoming aware that set of combinators is getting wilder rather than more uniform and the style of writing checkers with "path projections" is - shall we say - individual (i.e. not idiomatic Haskell).
I've improved on yesterday's "operational leak" by using a new onlyJust combinator.
That said, as I add combinators I'm becoming aware that set of combinators is getting wilder rather than more uniform and the style of writing checkers with "path projections" is - shall we say - individual (i.e. not idiomatic Haskell).
Tuesday, January 7, 2014
config-check
Copperbox revision 3072.
I've implemented a new combinator imall to apply a checker to all members of an IntMap based an all in Data.List. Unfortunately imall has an operational leak when combined with pattern matching on cases - we must know that uninteresting cases have to produce True so that all (interesting) cases can be combined to produce True for a successful check.
Ideally I'd like to avoid pattern matching for uninteresting cases but as pattern matching is built-in to Haskell this would generate Non-exhaustive pattern exceptions.
I've implemented a new combinator imall to apply a checker to all members of an IntMap based an all in Data.List. Unfortunately imall has an operational leak when combined with pattern matching on cases - we must know that uninteresting cases have to produce True so that all (interesting) cases can be combined to produce True for a successful check.
Ideally I'd like to avoid pattern matching for uninteresting cases but as pattern matching is built-in to Haskell this would generate Non-exhaustive pattern exceptions.
Monday, January 6, 2014
config-check
Copperbox revision 3071.
I've added an onlyif combinator that proceeds only if the initial guard is true, but doesn't fail if it isn't. This will allow conditional checkers that don't produce warnings if they aren't relevant.
I've had to change the internal answer type from a simple Either to accommodate the short-circuit success that onlyif needs.
I've added an onlyif combinator that proceeds only if the initial guard is true, but doesn't fail if it isn't. This will allow conditional checkers that don't produce warnings if they aren't relevant.
I've had to change the internal answer type from a simple Either to accommodate the short-circuit success that onlyif needs.
Sunday, January 5, 2014
config-check
Copperbox revision 3070.
Minor style changes to improve writing checkers - the path operator[*] has been given a very low precedence which lets it play well with the Applicative combinators.
Added an mget combinator to make projections (gets) returning Maybe values deterministic - code can act as if the projection is successful, if it has failed it is transparently caught by the underlying Either monad.
[*] The path operator has changed its ASCII name. The current name may not be final - naming ASCII operators is a bane of programming in Haskell.
Minor style changes to improve writing checkers - the path operator[*] has been given a very low precedence which lets it play well with the Applicative combinators.
Added an mget combinator to make projections (gets) returning Maybe values deterministic - code can act as if the projection is successful, if it has failed it is transparently caught by the underlying Either monad.
[*] The path operator has changed its ASCII name. The current name may not be final - naming ASCII operators is a bane of programming in Haskell.
config-check
Copperbox revision 3069.
More work on ConfigCheck, particularly it now has a run function that runs multiple checkers on a configuration and returns a list of failures.
Also, it seems (top-level) pattern matching would not be that valuable for writing checkers - configs are expected to have many fields so pattern matching is cumbersome. This is fine - it means there is not much loss of clarity / directness if we bury the config in a Reader monad (which forfeits top-level pattern matching).
More work on ConfigCheck, particularly it now has a run function that runs multiple checkers on a configuration and returns a list of failures.
Also, it seems (top-level) pattern matching would not be that valuable for writing checkers - configs are expected to have many fields so pattern matching is cumbersome. This is fine - it means there is not much loss of clarity / directness if we bury the config in a Reader monad (which forfeits top-level pattern matching).
Saturday, January 4, 2014
config-check
Copperbox revision 3068.
A new project / tool for validating configurations.
A configuration is some user data represented as normal Haskell datatypes - however it is expected that configurations will already contain some errors (or at least bad smells) - after all, the configuration may originally be specified in XML, as text etc. Thus, the standard Haskell Way of developing highly refined datatypes with advanced type system features that prevent errors won't work for us, instead ConfigCheck tests instantiated simple datatypes (configurations) with Lint-like rules that identify bad or erroneous data.
The core of ConfigCheck is a static parser monad - i.e. a parser monad that doesn't consume input (it is expected to make multiple, user-directed passes over the Config datatypes). Designing the static parser monad is easy; designing a good API / set of combinators to specify rules already looks more challenging. I'm not sure the API should even look like the regular parser monad combinators Haskell programmers are used to.
A new project / tool for validating configurations.
A configuration is some user data represented as normal Haskell datatypes - however it is expected that configurations will already contain some errors (or at least bad smells) - after all, the configuration may originally be specified in XML, as text etc. Thus, the standard Haskell Way of developing highly refined datatypes with advanced type system features that prevent errors won't work for us, instead ConfigCheck tests instantiated simple datatypes (configurations) with Lint-like rules that identify bad or erroneous data.
The core of ConfigCheck is a static parser monad - i.e. a parser monad that doesn't consume input (it is expected to make multiple, user-directed passes over the Config datatypes). Designing the static parser monad is easy; designing a good API / set of combinators to specify rules already looks more challenging. I'm not sure the API should even look like the regular parser monad combinators Haskell programmers are used to.
Wednesday, January 1, 2014
OpenVG-0.7.0 and OpenVGRaw-0.4.0 - new releases
Copperbox revision 3067.
I've made new releases of OpenVG and OpenVGRaw for Hackage. These fix build problems encountered with GHC 7.6.3 and work with Platform 2013.2.0.0.
I've made new releases of OpenVG and OpenVGRaw for Hackage. These fix build problems encountered with GHC 7.6.3 and work with Platform 2013.2.0.0.
OpenVG and OpenVGRaw
Copperbox revisions 3065 and 3066.
I've updated the Windows install instructions. Revision 3065 mixed up changes between OpenVG and OpenVGRaw - revision 3066 fixed this slip.
I've updated the Windows install instructions. Revision 3065 mixed up changes between OpenVG and OpenVGRaw - revision 3066 fixed this slip.
Subscribe to:
Posts (Atom)
Blog Archive
-
▼
2014
(200)
-
▼
January
(25)
- ochre-lang
- ochre-lang
- config-check
- config-check
- config-check
- config-check
- config-check
- config-check
- config-check
- config-check
- config-check
- config-check
- config-check
- config-check
- config-check
- config-check
- config-check
- config-check
- config-check
- config-check
- config-check
- config-check
- config-check
- OpenVG-0.7.0 and OpenVGRaw-0.4.0 - new releases
- OpenVG and OpenVGRaw
-
▼
January
(25)
About Me
- Stephen Tetley
- Disambiguating biog as there are a few Stephen Tetley's in the world. I'm neither a cage fighter or yachtsman. I studied Fine Art in the nineties (foundation Bradford 1992, degree Cheltenham 1992 - 95) then Computing part-time at Leeds Met graduating in 2003. I'm the Stephen Tetley on Haskell Cafe and Stackoverflow.