Re: More radical ideas about gc and reference counting

2014-05-04 Thread Arlen via Digitalmars-d
oor development process. The point being, something as simple as a Rational library shouldn't take years for it to become part of Phobos, specially when people are taking the time to do the work. --Arlen

Re: std.rational?

2013-10-05 Thread Arlen
FWIW, about a year ago I submitted rational module. Here are the links: source: https://github.com/Arlen/phobos/blob/units/std/rational.d docs: http://arlen.github.com/phobos/std_rational.html discussion: http://forum.dlang.org/thread/mailman.579.1349545483.5162.digitalmar...@puremagic.com I

Re: Today's github tip - fixing local master

2013-06-18 Thread Arlen
On Tue, Jun 18, 2013 at 2:41 PM, Walter Bright wrote: > I often struggle with understanding how github works. > > > github or git? In any case, have you tried setting up a local and a remote on your local system to try out the commands without the fear of ruining your working repo? You can set u

Re: DConf 2013 last talk

2013-05-03 Thread Arlen
end for D? 2. Are we going to spend the next 10-20 years writing garbage collectors for D? Arlen

Dfix

2013-04-16 Thread Arlen
Gofix, "a tool to mechanically update code to accommodate language and library changes." Mr. Pike talks more about it starting at 8:26 http://www.youtube.com/watch?v=bj9T2c2Xk_s&feature=player_embedded I wish D had such a tool. Any chance?

Re: Migrating dmd to D?

2013-02-28 Thread Arlen
right way to do it. But, I don't see how we could use D's nice features without refactoring. So, I presume this is going to be done in two phases: Phase 1: direct translation to make sure everything works. Phase 2: refactoring to use D's nice features. And your three steps would be describing Phase 1. Arlen

Re: My codebase have reached the critical size

2013-02-22 Thread Arlen
I have the same issue with my Boost.units port: https://github.com/Arlen/phobos/blob/std_units/std/units.d DMD runs out of memory and that's why I've had to comment out most of the definitions. I haven't tried separate compilation, yet. Arlen On Sat, Feb 16, 2013 at 3:37 AM, d

Re: Preliminary submission - std.rational and std.typelist

2013-02-13 Thread Arlen
On Wed, Feb 13, 2013 at 3:48 PM, bearophile wrote: > Arlen: > > > I ran some benchmarks, and I don't see how the rosetta version is more >> optimized: >> > > My message says "See this implementation (that doesn't use an optimized > GCD):". I

Re: Preliminary submission - std.rational and std.typelist

2013-02-13 Thread Arlen
ki/**Arithmetic/Rational#D<http://rosettacode.org/wiki/Arithmetic/Rational#D> > > Bye, > bearophile > I ran some benchmarks, and I don't see how the rosetta version is more optimized: https://gist.github.com/Arlen/4947368 And the results on my 64-bit system, compiled with '-O -

Re: Boost.units ported to D

2013-02-11 Thread Arlen
On Mon, Feb 11, 2013 at 4:18 PM, develop32 wrote: > How about something like meters!15 or newtons!30? For me it is more > pleasing and shorter than multiplication. > 'meters!15' is supposed to be '15 * meters', right? Then how would you express '15 / meters' ? You cannot; therefore, 'meters!15

Re: Preliminary submission - std.rational and std.typelist

2013-02-11 Thread Arlen
similar to what you see with Haskell and Python. Arlen

Re: Boost.units ported to D

2013-02-11 Thread Arlen
On Mon, Feb 11, 2013 at 1:19 PM, Michael wrote: > It is possible write something like? > > auto force = 2.0 * SI.Newton; >> auto energy = force * 2.0 * SI.Meter; >> > > Yes because typeof(2.0 * si.newton) is Quantity!(si.Force) and typeof(force * 2.0 * si.meter) is Quantity!(si.Energy). In the

Boost.units ported to D

2013-02-11 Thread Arlen
Greetings, source: https://github.com/Arlen/phobos/blob/std_units/std/units.d docs: http://arlen.github.com/phobos/std_units.html you will also need the rational module, source: https://github.com/Arlen/phobos/blob/std_rational/std/rational.d docs: http://arlen.github.com/phobos

Re: Preliminary submission - std.rational and std.typelist

2013-02-11 Thread Arlen
Just a quick update: I have made Rational nothrow, fixed toString, and some other minor changes. For the past several months I've used Rational extensively in units (see my other thread), and it works great. source: https://github.com/Arlen/phobos/blob/std_rational/std/rational.d docs:

Re: Preliminary submission - std.rational and std.typelist

2012-10-08 Thread Arlen
On Mon, Oct 8, 2012 at 4:37 PM, bearophile wrote: > Arlen: > > >> Yes, std.math.abs and std.numeric.gcd are very easy to implement for >> BigInt, > > > Don doesn't agree regarding the gcd. To compute the gcd efficiently on large > numbers you nee

Re: Preliminary submission - std.rational and std.typelist

2012-10-08 Thread Arlen
On Mon, Oct 8, 2012 at 2:08 AM, Simen Kjaeraas wrote: > On 2012-44-08 06:10, Arlen wrote: > >> >> 1. To convert a BigInt to floating-point one needs to convert it to >> the built-in integer types first. If you go beyond the limits of the >> built-in types (long

Re: Preliminary submission - std.rational and std.typelist

2012-10-07 Thread Arlen
On Sun, Oct 7, 2012 at 11:16 PM, Jonathan M Davis wrote: > > While this sort of function might be useful from time to time, how often is it > actually, realistically needed? Certainly, I'd argue that it's rare enough > that having a slightly more complicated solution specifically for it makes > m

Re: Preliminary submission - std.rational and std.typelist

2012-10-07 Thread Arlen
On Sat, Oct 6, 2012 at 1:32 PM, Dmitry Olshansky wrote: > > Cool, does it work with BigInt? > No it doesn't work with BigInt, but I did look into it today briefly. There are issues with BigInt that I'm not sure what to do about: 1. To convert a BigInt to floating-point one needs to convert it t

Re: Preliminary submission - std.rational and std.typelist

2012-10-07 Thread Arlen
On Sun, Oct 7, 2012 at 2:23 AM, Philippe Sigaud wrote: > > Double-stage templates (which reminds me of rocket science :) ) > > template Merge(A...) > { > template With(B...) > { } > } > > > Usage: > > Merge!(int,double,string).With!(double,byte) I can live with that, but, as I explained

Re: Preliminary submission - std.rational and std.typelist

2012-10-06 Thread Arlen
On Sat, Oct 6, 2012 at 3:53 PM, David Nadlinger wrote: > > On Saturday, 6 October 2012 at 20:00:47 UTC, Arlen wrote: >> >> You need both of these if you want, for example, fold to work with >> n-dimensional typelists: >> >> template Foldl(alias Fun, Z, alias

Re: Preliminary submission - std.rational and std.typelist

2012-10-06 Thread Arlen
Testing...

Re: Preliminary submission - std.rational and std.typelist

2012-10-06 Thread Arlen
auses code duplication later on.  You need both of these if you want, for example, fold to work with n-dimensional typelists: template Foldl(alias Fun, Z, alias TL) {  } template Foldl(alias Fun, alias Z, alias TL) { } // when Z is a TypeList Thanks, Arlen

Re: Preliminary submission - std.rational and std.typelist

2012-10-06 Thread Arlen
mplemented in C++, :-). I do want to mention that the distinction between dimension and unit is important.  I rather see this: Quantity!(length, float) a = 2 * metre; than this: Quantity!(metre, float) a = 2 * metre; I'll spend more time going over you library once I have some free time.

Re: Preliminary submission - std.rational and std.typelist

2012-10-06 Thread Arlen
There are many unittests, but std.rational doesn't work with BigInts.  It only works with signed integrals because I wasn't sure how to deal with the overflow problem.  - Original Message -  From: bearophile  Sent: 10/06/12 12:54 PM  To: digitalmars-d@puremagic.com  Subject: Re: P

Re: Preliminary submission - std.rational and std.typelist

2012-10-06 Thread Arlen
A, alias B) { } and you certainly can't do something like template Merge(AB...) { } Arlen  - Original Message -  From: Jonathan M Davis  Sent: 10/06/12 12:52 PM  To: digitalmars.D  Subject: Re: Preliminary submission - std.rational and std.typelist   On Saturday, October 06

Preliminary submission - std.rational and std.typelist

2012-10-06 Thread Arlen
So far the completion of the units library is contingent on the finalization of the design and implementation of the following two modules: std.rational, which is a small module for rational numbers. Source:  https://github.com/Arlen/phobos/blob/units/std/rational.d Docs:  http://arlen.githu