Re: Request for Features/Ideas: A std.archive package

2015-05-20 Thread Kagamin via Digitalmars-d
On Tuesday, 19 May 2015 at 19:28:03 UTC, Liam McSherry wrote: On Tuesday, 19 May 2015 at 18:46:34 UTC, Jacob Carlborg wrote: Support for RAR archives would be nice. It would be nice, but there isn't a great deal of documentation (publicly, at least). The RAR developers provide code for extra

Re: 0 is not a power of 2

2015-05-20 Thread John Colvin via Digitalmars-d
On Tuesday, 19 May 2015 at 20:46:09 UTC, Matthias Bentrup wrote: I think you can make the over/underflow at zero work in your favor: bool isPowerOf2(uint x) { return (x & -x) > (x - 1); } Very nice

Re: 0 is not a power of 2

2015-05-20 Thread Temtaime via Digitalmars-d
First version isn't any slow. It's clear and can be optimized with gdc: http://goo.gl/Q7HKcU And if you matter about dmd - it generates shit all the time.

Re: 0 is not a power of 2

2015-05-20 Thread via Digitalmars-d
On Wednesday, 20 May 2015 at 09:49:06 UTC, Temtaime wrote: First version isn't any slow. It's clear and can be optimized with gdc: http://goo.gl/Q7HKcU Yes, and besides, if one cares about these minor performance issues, that most likely will disappear in the pipeline if you are a little bi

Re: Request for Features/Ideas: A std.archive package

2015-05-20 Thread Liam McSherry via Digitalmars-d
On Wednesday, 20 May 2015 at 08:26:11 UTC, Kagamin wrote: http://www.rarlab.com/rar/unrarsrc-5.2.7.tar.gz why do you need reverse engineering? UnRAR only extracts RAR archives, there's no facility to create them. If you wanted to create them, you would need to do some form of reverse engineer

LDC assembly online

2015-05-20 Thread Temtaime via Digitalmars-d
Hi all ! I've created a site with assembly of ldc. It uses now latest ldc 2.067 with latest llvm 3.7. I think i'll add gdc and dmd compilers in future. Go ahead and play with it ! http://goo.gl/0Cvfqq

Re: Request for Features/Ideas: A std.archive package

2015-05-20 Thread ketmar via Digitalmars-d
On Tue, 19 May 2015 20:46:33 +0200, Jacob Carlborg wrote: > Support for RAR archives would be nice. considering unrar's license... why, 7zip is better in all ways, and it's opensource. i will really like to see a module to work with 7z archives in Phobos. rar archives will die, almost like ace

Re: Request for Features/Ideas: A std.archive package

2015-05-20 Thread Kagamin via Digitalmars-d
On Wednesday, 20 May 2015 at 12:19:07 UTC, Liam McSherry wrote: On Wednesday, 20 May 2015 at 08:26:11 UTC, Kagamin wrote: http://www.rarlab.com/rar/unrarsrc-5.2.7.tar.gz why do you need reverse engineering? UnRAR only extracts RAR archives That's what all 3rd party archivers do. Only rarlab

shared libs for OSX

2015-05-20 Thread bitwise via Digitalmars-d
I tried using a shared library for OSX yesterday. I opened it with dlopen, retrieved my extern(C) function, and called it. All was well, and it seemed to work(wrote to the console with writeln). But, I got a message in the console saying shared libraries were not yet implemented for OSX. What

Re: Request for Features/Ideas: A std.archive package

2015-05-20 Thread Liam McSherry via Digitalmars-d
On Wednesday, 20 May 2015 at 14:43:17 UTC, Kagamin wrote: UnRAR only extracts RAR archives That's what all 3rd party archivers do. Only rarlab software can create rar archives. Which is one reason for not including RAR support, even if it would be nice. I just checked the RAR 5.0 technote

Re: 0 is not a power of 2

2015-05-20 Thread Andrei Alexandrescu via Digitalmars-d
On 5/19/15 1:46 PM, Matthias Bentrup wrote: I think you can make the over/underflow at zero work in your favor: bool isPowerOf2(uint x) { return (x & -x) > (x - 1); } Nice code with dmd and gdc. Thanks! https://github.com/andralex/phobos/commit/ec197ecd203b0ea25201acfeb4fbbb13b2fabb7f --

Re: LDC assembly online

2015-05-20 Thread Andrei Alexandrescu via Digitalmars-d
On 5/20/15 6:29 AM, Temtaime wrote: Hi all ! I've created a site with assembly of ldc. It uses now latest ldc 2.067 with latest llvm 3.7. I think i'll add gdc and dmd compilers in future. Go ahead and play with it ! http://goo.gl/0Cvfqq Nice! Want to work with Iain and Vladimir to add ldc to

Re: Dconf Video / Projector Information

2015-05-20 Thread Bastiaan Veelo via Digitalmars-d
Bummer. I was looking forward to the streams.

std.allocator: FreeList uses simple statistics to control number of items

2015-05-20 Thread Andrei Alexandrescu via Digitalmars-d
https://github.com/andralex/phobos/commit/90120fc290bc7840ffbee22766798518b3418e15 There is a bothersome issue with freelists fronting general-purpose allocators (https://en.wikipedia.org/wiki/Free_list): they can grow indefinitely. Because they keep memory allocated in their parent, they caus

Re: LDC assembly online

2015-05-20 Thread Temtaime via Digitalmars-d
I only edited few config files - i think they can do it by themselves.

Re: shared libs for OSX

2015-05-20 Thread Jacob Carlborg via Digitalmars-d
On 2015-05-20 16:44, bitwise wrote: I tried using a shared library for OSX yesterday. I opened it with dlopen, retrieved my extern(C) function, and called it. All was well, and it seemed to work(wrote to the console with writeln). But, I got a message in the console saying shared libraries were

Re: Request for Features/Ideas: A std.archive package

2015-05-20 Thread Jacob Carlborg via Digitalmars-d
On 2015-05-20 14:19, Liam McSherry wrote: On Wednesday, 20 May 2015 at 08:26:11 UTC, Kagamin wrote: http://www.rarlab.com/rar/unrarsrc-5.2.7.tar.gz why do you need reverse engineering? UnRAR only extracts RAR archives, there's no facility to create them. If you wanted to create them, you would

Re: Request for Features/Ideas: A std.archive package

2015-05-20 Thread Jacob Carlborg via Digitalmars-d
On 2015-05-20 15:46, ketmar wrote: considering unrar's license... why, 7zip is better in all ways, and it's opensource. Doesn't matter, it's still used. BTW, I'm only interested in extracting. -- /Jacob Carlborg

Re: Request for Features/Ideas: A std.archive package

2015-05-20 Thread Jacob Carlborg via Digitalmars-d
On 2015-05-19 21:28, Liam McSherry wrote: On Tuesday, 19 May 2015 at 18:46:34 UTC, Jacob Carlborg wrote: Support for RAR archives would be nice. It would be nice, but there isn't a great deal of documentation (publicly, at least). The RAR developers provide code for extracting it, but the lice

Re: Request for Features/Ideas: A std.archive package

2015-05-20 Thread Liam McSherry via Digitalmars-d
On Wednesday, 20 May 2015 at 18:55:11 UTC, Jacob Carlborg wrote: libarchive supports it, which has a BSD license. Yeah, I know that we most likely cannot use it. If RAR support is to be had, interfacing with libarchive is probably going to be the best/easiest way to do it, although it would p

Re: Request for Features/Ideas: A std.archive package

2015-05-20 Thread ketmar via Digitalmars-d
On Wed, 20 May 2015 20:57:32 +0200, Jacob Carlborg wrote: > On 2015-05-20 15:46, ketmar wrote: > >> considering unrar's license... why, 7zip is better in all ways, and >> it's opensource. > > Doesn't matter, it's still used. BTW, I'm only interested in extracting. `spawnProcess("unrar", "x", "u

Re: Request for Features/Ideas: A std.archive package

2015-05-20 Thread weaselcat via Digitalmars-d
On Wednesday, 20 May 2015 at 18:57:32 UTC, Jacob Carlborg wrote: On 2015-05-20 15:46, ketmar wrote: considering unrar's license... why, 7zip is better in all ways, and it's opensource. Doesn't matter, it's still used. BTW, I'm only interested in extracting. who still uses rar?

Re: Dconf Video / Projector Information

2015-05-20 Thread Dragos Carp via Digitalmars-d
On Wednesday, 20 May 2015 at 16:45:44 UTC, Bastiaan Veelo wrote: Bummer. I was looking forward to the streams. Maybe somebody in the first rows can live-stream the keynotes, at least. A low-quality video or even just audio would suffice. Last year a couple of colleagues watched the whole conf

Re: shared libs for OSX

2015-05-20 Thread bitwise via Digitalmars-d
On Wednesday, 20 May 2015 at 18:53:30 UTC, Jacob Carlborg wrote: On 2015-05-20 16:44, bitwise wrote: I tried using a shared library for OSX yesterday. I opened it with dlopen, retrieved my extern(C) function, and called it. All was well, and it seemed to work(wrote to the console with writeln)

Re: [dlang website] Up Arrow in library

2015-05-20 Thread rumbu via Digitalmars-d
And what do you use on touch screen devices? The up arrow (on duckduckgo for example) is very convenient. It's one of those little things that are not _strictly_ necessary but often come in handy. I agree that a "back to top" link under every function would be kinda stupid. But a little arrow

Re: Dconf Video / Projector Information

2015-05-20 Thread Adam D. Ruppe via Digitalmars-d
Also, when are the videos going to be released this time? I'd like it on youtube as soon as possible.

Re: Request for Features/Ideas: A std.archive package

2015-05-20 Thread Walter Bright via Digitalmars-d
On 5/20/2015 11:56 AM, Jacob Carlborg wrote: interested in extracting RAR archives. There are many tools that can extract a lot of different archives but only create a couple of them. That's fine, as long as the licensing issue can be worked out, i.e. we can do a Boost implementation. Otherwi

Re: Request for Features/Ideas: A std.archive package

2015-05-20 Thread Walter Bright via Digitalmars-d
On 5/20/2015 12:40 PM, Liam McSherry wrote: On Wednesday, 20 May 2015 at 18:55:11 UTC, Jacob Carlborg wrote: libarchive supports it, which has a BSD license. Yeah, I know that we most likely cannot use it. If RAR support is to be had, interfacing with libarchive is probably going to be the bes

Re: shared libs for OSX

2015-05-20 Thread bitwise via Digitalmars-d
On Wed, 20 May 2015 17:35:37 -0400, bitwise wrote: On Wednesday, 20 May 2015 at 18:53:30 UTC, Jacob Carlborg wrote: On 2015-05-20 16:44, bitwise wrote: I tried using a shared library for OSX yesterday. I opened it with dlopen, retrieved my extern(C) function, and called it. All was well, and

dmd on centos 6.6

2015-05-20 Thread Andrei Alexandrescu via Digitalmars-d
Hi folks, I just cloned the latest dmd from github on a Centos 6.6 machine. It has a dmd 2.065 installed. Cloning and building dmd succeeded, then so did druntime. Then after I cloned Phobos I got: std/math.d(2759): Error: number '0x1p-1024' is not representable std/math.d(2762): Error: nu

Re: dmd on centos 6.6

2015-05-20 Thread weaselcat via Digitalmars-d
On Thursday, 21 May 2015 at 02:23:55 UTC, Andrei Alexandrescu wrote: Hi folks, I just cloned the latest dmd from github on a Centos 6.6 machine. It has a dmd 2.065 installed. Cloning and building dmd succeeded, then so did druntime. Then after I cloned Phobos I got: std/math.d(2759): Erro

Re: std.allocator: FreeList uses simple statistics to control number of items

2015-05-20 Thread Etienne Cimon via Digitalmars-d
What you could do is calculate the average allocation size and std deviantions in a moving window, and the z-score for each freelist and use this lookup table: https://www.stat.tamu.edu/~lzhou/stat302/standardnormaltable.pdf If P < 0.10 (maybe use this as a setting) this means the probability

Re: shared libs for OSX

2015-05-20 Thread Joakim via Digitalmars-d
On Wednesday, 20 May 2015 at 21:35:38 UTC, bitwise wrote: On Wednesday, 20 May 2015 at 18:53:30 UTC, Jacob Carlborg wrote: On 2015-05-20 16:44, bitwise wrote: I tried using a shared library for OSX yesterday. I opened it with dlopen, retrieved my extern(C) function, and called it. All was well

Re: std.allocator: FreeList uses simple statistics to control number of items

2015-05-20 Thread Morbid.Obesity via Digitalmars-d
On Wednesday, 20 May 2015 at 17:28:50 UTC, Andrei Alexandrescu wrote: https://github.com/andralex/phobos/commit/90120fc290bc7840ffbee22766798518b3418e15 There is a bothersome issue with freelists fronting general-purpose allocators (https://en.wikipedia.org/wiki/Free_list): they can grow inde

Re: Dconf Video / Projector Information

2015-05-20 Thread Bastiaan Veelo via Digitalmars-d
On Wednesday, 20 May 2015 at 22:14:56 UTC, Adam D. Ruppe wrote: Also, when are the videos going to be released this time? I'd like it on youtube as soon as possible. +1