Re: Language design

2015-06-16 Thread Paweł Murias
I think Perl 6 tries to include too much rather than too little.
It will be possible to just use a subset

On 16 June 2015 at 10:32, Michael Zedeler mich...@zedeler.dk wrote:

 On 06/12/15 15:54, Parrot Raiser wrote:

 Has somebody been following the discussions on types?
 http://xkcd.org/1537/ :-)*

 Perl6 has something similar to example 9.

 Ranges, hyper-operators as well as the invocation operators .+ and .*
 doesn't make any sense to me. Those constructs made me stop using Perl and
 look elsewhere. It was a hard decision since I've used the language for at
 least 15 years.

 I hope Perl6 regexes will make it far beyond Perl itself and the notion of
 being able to introduce custom dsl parsed on equal terms as the rest of
 Perl 6 is really sweet.

 Regards,

 Michael.

 --
 Michael Zedeler
 70 25 19 99
 mich...@zedeler.dk

 dk.linkedin.com/in/mzedeler | twitter.com/mzedeler | github.com/mzedeler




Re: Language design

2015-06-16 Thread Paweł Murias
The goal is to avoid everyone using a different not fully compatible
version of everything. Like in perl 5 with the bunch of different ways to
do objects, signatures etc.
Pilling good things on top of each others rather than aiming for an elegant
design is what I consider the core idea of Perl.
Being able to add language features removes most benefits of a simple
design (easy to create tool support).

On 16 June 2015 at 21:08, Fields, Christopher J cjfie...@illinois.edu
wrote:

  I like that I can start with a fairly simple subset of Perl 6 but pick
 up more as I go along, if it’s needed.

  chris

  On Jun 16, 2015, at 9:45 AM, Paweł Murias pawelmur...@gmail.com wrote:

  I think Perl 6 tries to include too much rather than too little.
 It will be possible to just use a subset

 On 16 June 2015 at 10:32, Michael Zedeler mich...@zedeler.dk wrote:

 On 06/12/15 15:54, Parrot Raiser wrote:

 Has somebody been following the discussions on types?
 http://xkcd.org/1537/
 https://urldefense.proofpoint.com/v2/url?u=http-3A__xkcd.org_1537_d=AwMFaQc=8hUWFZcy2Z-Za5rBPlktOQr=tDGDphAO6NEimtzLSSmQFGvp83Nv4of3Q091GUeBRjEm=7Hmiwu-Sis4idF-Q_ljE8Sua23Pck8G3-ksfWbBhIrYs=PQRCsVTexQ1R3RvE9dxZSrXnRAlm1fTQe8795MfVstQe=
 :-)*

 Perl6 has something similar to example 9.

 Ranges, hyper-operators as well as the invocation operators .+ and .*
 doesn't make any sense to me. Those constructs made me stop using Perl and
 look elsewhere. It was a hard decision since I've used the language for at
 least 15 years.

 I hope Perl6 regexes will make it far beyond Perl itself and the notion
 of being able to introduce custom dsl parsed on equal terms as the rest of
 Perl 6 is really sweet.

 Regards,

 Michael.

 --
 Michael Zedeler
 70 25 19 99
 mich...@zedeler.dk

 dk.linkedin.com/in/mzedeler
 https://urldefense.proofpoint.com/v2/url?u=http-3A__dk.linkedin.com_in_mzedelerd=AwMFaQc=8hUWFZcy2Z-Za5rBPlktOQr=tDGDphAO6NEimtzLSSmQFGvp83Nv4of3Q091GUeBRjEm=7Hmiwu-Sis4idF-Q_ljE8Sua23Pck8G3-ksfWbBhIrYs=iGUAJ7_AukicwPFa3SChsHimKrNeYDHD5qt4bXSH4BQe=
 | twitter.com/mzedeler
 https://urldefense.proofpoint.com/v2/url?u=http-3A__twitter.com_mzedelerd=AwMFaQc=8hUWFZcy2Z-Za5rBPlktOQr=tDGDphAO6NEimtzLSSmQFGvp83Nv4of3Q091GUeBRjEm=7Hmiwu-Sis4idF-Q_ljE8Sua23Pck8G3-ksfWbBhIrYs=6wfV4yK6QdDW9C43RQPVa8ziJuXY9w0fiaKrW-qeMSoe=
 | github.com/mzedeler
 https://urldefense.proofpoint.com/v2/url?u=http-3A__github.com_mzedelerd=AwMFaQc=8hUWFZcy2Z-Za5rBPlktOQr=tDGDphAO6NEimtzLSSmQFGvp83Nv4of3Q091GUeBRjEm=7Hmiwu-Sis4idF-Q_ljE8Sua23Pck8G3-ksfWbBhIrYs=ZotvHoV0UCqah2kqY6X4vYlH2KPw83PySPMZSrtymLwe=






Re: Commensurability as Key

2013-08-23 Thread Paweł Murias
One thing to keep in mind is that while adding such things to the Perl 6
core might not be the highest priority at this point something like that
could be implemented as a module (if we have a consistent idea what we
want).
Currently it's possible to change the language to (a subset of) Perl 5 (
https://github.com/rakudo-p5/v5) so it should be possible to at least
prototype the units handling.


2013/8/23 Steve Pitchford steve.pitchf...@gmail.com

 I'll start with your last point:

 At this point, though, plans to expand on Perl 6's capabilities are taking
 a back seat to getting Perl 6's existing capabilities implemented.  This
 has been true for some time now, in fact — which is all the more reason to
 get Perl 6.0 fully implemented as soon as possible.

 I've been lurking here for a while, and have learned a great deal whilst
 reading. I've had previous plays with perl 6, would love to again, but find
 myself limited by freetime. To those ends, I'm just here to chat about
 something that seems interesting - not to try to influence the hard work
 being done by all of those pushing the perl6 project forwards.

 I'm a big fan of Eric Evans Domain Driven design - it's a fantastic book.
 He pushes the importance of context and relevance with respect to object
 orientated programming.

 From that perspective - the answer to the following question is rather
 brutal:

 How would you implement, in a robust way, the following things:

 1 kg + 1 kg = 2 kg
 2 m * 3 m = 6 m^2
 5 kg * (3 m/s)^2 = 45 J

 The answer is that you wouldn't - the problem domain is so vague as to be
 meaningless. 1kg or 1m of what?

 Going back to apples - The value of 1kg of apples in terms of
 representation depends on context.

 For example, it would be a chore to try to arrange a group of apples to
 make an exact kilogram. On an individual basis you may have 6 apples. In
 some cases you may represent that as 6 instances. In another context, you
 may represent a collection of apples in their tray form - which may have a
 notional weight with a tolerance. Now, if one were writing a checkout
 system, it may be sufficient for one to have a fruit class, of which
 apples and oranges are instances, and both are charged in weight - and
 their may be additional algorithms to predict stocking levels and
 re-ordering thresholds, but from personal experience, these algorithms
 often require the backup of business process such as stock takes to ensure
 that waste, theft, and approximation errors are taken for granted, and we
 don't end up with a backlog of rotten apples or empty shelves.

 That's where software engineering comes in. Systems are sharded and
 Classes are defined containing aggregations of behaviour. In a grocer, you
 may never need to add 1kg of apples - you may sell 1.25kg in a single
 transaction, you could sell 6 apples, depending on your pricing structure.
 You could even sell 2kg of discounted fruit which includes apples and
 oranges close to it's use by date.

 Because you have moved away from primitive arithmetic and into object
 behaviour and relationship, the notion of 1kg + 1kg becomes irrelevant.

 Because systems are becoming fragmented, it may make no sense to hook the
 checkout up directly to the purchase system. You can happily sell weights
 of apples, but have stock control implemented by how many trays of apples
 get sent to the shop floor - in this case, you may have an alarm that
 indicates another tray is probably needed, but it tackles the inherent
 disjoint between purchase and sale quantities without any complex, over
 generic modelling of the relationships between trays of apples and weights
 or other quantities sold on the shopfloor.

 The fragmentation of the system in this way also allows the canny grocer
 to flog bags of mixed fruit without worrying that his software developer
 will charge him thousands and delay implementation of what seems the
 exploitation of a simple opportunity by a few weeks.


 -- Forwarded message --
 From: Jonathan Lang datawea...@gmail.com
 Date: Fri, Aug 23, 2013 at 9:47 AM
 Subject: Re: Commensurability as Key
 To: Steve Pitchford steve.pitchf...@gmail.com







 On Aug 23, 2013, at 1:17 AM, Steve Pitchford steve.pitchf...@gmail.com
 wrote:

 
  I think James Bowery's comments are intended to address a real need for
 programming languages to work with units of measurement. It might even
 prevent aircraft accidents which have really happened because fuel was
 delivered in Canadian gallons, or kilograms, when the pilots request was
 for American pounds in his owners manual. Commensurable purchase orders
 would be nice.
 
  Putting tools like PHP and VB to one side for a second,
 
  Maybe I'm getting the wrong end of the stick, but this just seems like a
 case of what is known in object orientated terms as Primitive Obsession -
 in this case, the overuse of integer and float arithmetic where objects
 make far better use cases.
 
  There does seem to be significant