Re: matrix library

2016-05-23 Thread Edwin van Leeuwen via Digitalmars-d-announce
On Monday, 23 May 2016 at 23:08:46 UTC, Vlad Levenfeld wrote: Now I am thinking that the best way to orthogonalize (sorry) my efforts with respect to mir and scid.linalg is to use them as backend drivers, maintain this wrapper for the crowd that isn't as familiar with blas/lapack, or wants to

Re: DDT 1.0.0 released.

2016-05-23 Thread Vadim Lopatin via Digitalmars-d-announce
On Tuesday, 17 May 2016 at 14:04:04 UTC, Bruno Medeiros wrote: New DDT release out: dfmt support, performance improvements to semantic operations, more build command customization, fixes. Please see changelog for full list: https://github.com/DDT-IDE/DDT/releases/tag/v1.0.0 Since DDT has

Re: mago-mi: GDB/MI compatible frontend for Mago debugger

2016-05-23 Thread Vadim Lopatin via Digitalmars-d-announce
On Wednesday, 18 May 2016 at 18:02:12 UTC, Bruno Medeiros wrote: While DDT technically work oks with GDB (the GDB from mingw-w64 that is), you are right, there isn't a compiler on Windows that supplies debug info in the way GDB understands. See https://wiki.dlang.org/Debuggers. DMD produces

Re: std.conv.parse not accepting ByCodeUnitImpl

2016-05-23 Thread ag0aep6g via Digitalmars-d-learn
On 05/24/2016 03:59 AM, Jack Stouffer wrote: parse!int(splitValue.front); [...] std.conv.parse(Target, Source)(ref Source s) if ( isSomeChar!(ElementType!Source) && isIntegral!Target && !is(Target == enum)) You're missing that `parse`'s parameter is `ref`. `splitValue.front` is

Re: A language comparison (seeking productivity-enhancing, well-designed, and concise languages)

2016-05-23 Thread Bauss via Digitalmars-d-announce
On Monday, 23 May 2016 at 05:37:10 UTC, Ali Çehreli wrote: Found on Reddit: https://www.reddit.com/r/programming/comments/4kmfp6/the_best_quality_programming_languages/ The list:

[Issue 15568] Wrong contracts generated when compiled with -O

2016-05-23 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15568 --- Comment #4 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/585ab7d14146ec6bc45b41e2b0b344e06dbbe1ee test Issue 15568 - Wrong contracts generated when compiled

Re: foo => "bar" key/value literals in D!

2016-05-23 Thread Bauss via Digitalmars-d-announce
On Monday, 23 May 2016 at 19:00:40 UTC, Adam D. Ruppe wrote: Have I gone completely mad?!?! --- void main() { import std.stdio; writeln(obj!( foo => "bar", baz => 12 )); } --- [...] This is a pretty amazing find! It's like a better

Re: Is there a way to make a class variable visible but constant to outsiders, but changeable (mutable) to the class itself?

2016-05-23 Thread dan via Digitalmars-d-learn
On Monday, 23 May 2016 at 07:03:08 UTC, chmike wrote: On Saturday, 21 May 2016 at 17:32:47 UTC, dan wrote: (This effect could be simulated by making my_var into a function, but i don't want to do that.) May I ask why you don't want to do that ? In D you can call a function without args

Re: Diamond - MVC / Template engine

2016-05-23 Thread Bauss via Digitalmars-d-announce
On Monday, 23 May 2016 at 16:15:08 UTC, Luís Marques wrote: On Saturday, 21 May 2016 at 08:20:00 UTC, Bauss wrote: For more information please view below. Dub repository: https://code.dlang.org/packages/diamond Github: https://github.com/bausshf/Diamond The dub repository seems to have a

Re: Idea: swap with multiple arguments

2016-05-23 Thread Observer via Digitalmars-d
On Monday, 23 May 2016 at 21:38:54 UTC, Jonathan M Davis wrote: One thing that screams out to me: this should be called rotate, not swap. That would probably be better. My immediate thought on reading Andrei's suggestion for swap was that it would be way too easy to forget what's actually

[Issue 15568] Wrong contracts generated when compiled with -O

2016-05-23 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15568 Walter Bright changed: What|Removed |Added Status|NEW |RESOLVED

std.conv.parse not accepting ByCodeUnitImpl

2016-05-23 Thread Jack Stouffer via Digitalmars-d-learn
Consider the following code - import std.range; import std.conv; import std.utf; import std.algorithm; auto test(R)(R s) { auto value = s.byCodeUnit; auto splitValue = value.splitter('.'); parse!int(splitValue.front); } void main() { test("1.8"); } - This fails

inner functions instead of scope

2016-05-23 Thread cy via Digitalmars-d
Someone was mentioning how in RAII you can't tell if there's an exception condition on destruction, but to the crazy degree that D inlines functions, I think something similarly concise is possible that solves the problem. The problem I'm talking about is when you want to clean up a resource,

Re: foo => "bar" key/value literals in D!

2016-05-23 Thread Adam D. Ruppe via Digitalmars-d-announce
On Tuesday, 24 May 2016 at 01:11:39 UTC, Meta wrote: Clever and terrible. Now just modify the code to generate a struct or class and you've invented new anonymous struct/object syntax. Indeed. Also, I think this has revealed a bug (or deficiency) in the compiler. If you put this inside the

Re: foo => "bar" key/value literals in D!

2016-05-23 Thread Adam D. Ruppe via Digitalmars-d-announce
On Monday, 23 May 2016 at 20:08:11 UTC, Daniel N wrote: This pull request just removes an intentional restriction and make this feature more easily accessible for meta-programming, so that not everyone has to reinvent the wheel in their own libraries. S I'm actually not entirely

Better Voldemort types

2016-05-23 Thread Steven Schveighoffer via Digitalmars-d-announce
Blog post on making Voldemort types without the disk-space issues: http://www.schveiguy.com/blog/2016/05/have-your-voldemort-types-and-keep-your-disk-space-too/ -Steve

[Issue 15568] Wrong contracts generated when compiled with -O

2016-05-23 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15568 Walter Bright changed: What|Removed |Added CC|

Re: Idea: swap with multiple arguments

2016-05-23 Thread Jonathan M Davis via Digitalmars-d
On Monday, May 23, 2016 18:10:02 Steven Schveighoffer via Digitalmars-d wrote: > On 5/23/16 5:47 PM, Ali Çehreli wrote: > > On 05/23/2016 01:27 PM, Steven Schveighoffer wrote: > >> On 5/23/16 4:01 PM, Andrei Alexandrescu wrote: > >>> So swap(a, b) swaps the contents of a and b. This could be

[Issue 15619] [REG 2.066] Floating-point x86_64 codegen regression, when involving array ops

2016-05-23 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15619 Walter Bright changed: What|Removed |Added CC|

Re: foo => "bar" key/value literals in D!

2016-05-23 Thread Meta via Digitalmars-d-announce
On Monday, 23 May 2016 at 19:00:40 UTC, Adam D. Ruppe wrote: Have I gone completely mad?!?! --- void main() { import std.stdio; writeln(obj!( foo => "bar", baz => 12 )); } --- Prints out: { foo: bar baz: 12 } A few

Re: foo => "bar" key/value literals in D!

2016-05-23 Thread Meta via Digitalmars-d-announce
On Tuesday, 24 May 2016 at 01:11:39 UTC, Meta wrote: Clever and terrible. Now just modify the code to generate a struct or class and you've invented new anonymous struct/object syntax. Also, I think this has revealed a bug (or deficiency) in the compiler. If you put this inside the foreach

[Issue 15907] Unjustified "is not visible from module" deprecation warning when using getMember trait

2016-05-23 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15907 Walter Bright changed: What|Removed |Added CC|

[Issue 15941] [REG v2.069] rbtree no longer supports classes

2016-05-23 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15941 Walter Bright changed: What|Removed |Added CC|

[Issue 15918] [2.070] Results from findSplit can no longer be assigned to each other

2016-05-23 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15918 Walter Bright changed: What|Removed |Added CC|

Re: Idea: swap with multiple arguments

2016-05-23 Thread H. S. Teoh via Digitalmars-d
On Mon, May 23, 2016 at 04:01:08PM -0400, Andrei Alexandrescu via Digitalmars-d wrote: > So swap(a, b) swaps the contents of a and b. This could be easily > generalized to multiple arguments such that swap(a1, a2, ..., an) > arranges things such that a1 gets an, a2 gets a1, a3 gets a2, etc. I >

[Issue 16031] [REG2.071] dmd internal error when compiling druntime with PIC=1

2016-05-23 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16031 Walter Bright changed: What|Removed |Added CC|

Re: Berlin D Meetup May 2016

2016-05-23 Thread Leandro Lucarella via Digitalmars-d-announce
On Friday, 20 May 2016 at 07:28:15 UTC, Stefan Koch wrote: Aww dammit, just missed my train. We started like one hour late because of some key issue, so next time you might want to join even if a bit later :)

Re: Need a Faster Compressor

2016-05-23 Thread Stefan Koch via Digitalmars-d
Just a heads up on the LZ4. I have spent roughly 3 hours optimizing my decompresser. And while I had stunning success, a speed-up of about 400%. I am still about 600x slower then the C variant. It is still a mystery to me why that is :) Since the generated code both smaller and works almost

Re: Idea: swap with multiple arguments

2016-05-23 Thread Steven Schveighoffer via Digitalmars-d
On 5/23/16 6:22 PM, Andrei Alexandrescu wrote: On 05/23/2016 04:27 PM, Steven Schveighoffer wrote: On 5/23/16 4:01 PM, Andrei Alexandrescu wrote: So swap(a, b) swaps the contents of a and b. This could be easily generalized to multiple arguments such that swap(a1, a2, ..., an) arranges things

Re: matrix library

2016-05-23 Thread Vlad Levenfeld via Digitalmars-d-announce
On Monday, 23 May 2016 at 20:56:54 UTC, Edwin van Leeuwen wrote: There is also mir, which is working towards being a full replacement for blas: https://github.com/libmir/mir It is still under development, but I think the goal is to become the ultimate matrix library :) I am sorely tempted

Re: Need a Faster Compressor

2016-05-23 Thread Walter Bright via Digitalmars-d
On 5/23/2016 2:17 PM, Timon Gehr wrote: Then don't do that. I.e. re-mangle recursively from scratch for each mangled name and allow sharing parts between unrelated components within that mangled name. How is that essentially different from running a compression pass? The only real problem

Re: Idea: swap with multiple arguments

2016-05-23 Thread Era Scarecrow via Digitalmars-d
On Monday, 23 May 2016 at 21:47:31 UTC, Ali Çehreli wrote: Yes, rotate(), but then I would never remember what direction it rotates. If we take a cue from assembly instructions, there's rol and ror (rotate left/right). These are other instructions are normally unreachable in languages;

Re: Idea: swap with multiple arguments

2016-05-23 Thread Andrei Alexandrescu via Digitalmars-d
On 05/23/2016 04:27 PM, Steven Schveighoffer wrote: On 5/23/16 4:01 PM, Andrei Alexandrescu wrote: So swap(a, b) swaps the contents of a and b. This could be easily generalized to multiple arguments such that swap(a1, a2, ..., an) arranges things such that a1 gets an, a2 gets a1, a3 gets a2,

Re: faster splitter

2016-05-23 Thread Andrei Alexandrescu via Digitalmars-d
On 05/23/2016 03:11 PM, qznc wrote: Actually, std find should be faster, since it could use the Boyer Moore algorithm instead of naive string matching. Conventional wisdom has it that find() is brute force and that's that, but probably it's time to destroy. Selectively using advanced

Re: Idea: swap with multiple arguments

2016-05-23 Thread Steven Schveighoffer via Digitalmars-d
On 5/23/16 5:47 PM, Ali Çehreli wrote: On 05/23/2016 01:27 PM, Steven Schveighoffer wrote: On 5/23/16 4:01 PM, Andrei Alexandrescu wrote: So swap(a, b) swaps the contents of a and b. This could be easily generalized to multiple arguments such that swap(a1, a2, ..., an) arranges things such

Re: Idea: swap with multiple arguments

2016-05-23 Thread Xinok via Digitalmars-d
On Monday, 23 May 2016 at 20:01:08 UTC, Andrei Alexandrescu wrote: So swap(a, b) swaps the contents of a and b. This could be easily generalized to multiple arguments such that swap(a1, a2, ..., an) arranges things such that a1 gets an, a2 gets a1, a3 gets a2, etc. I do know applications for

Re: Idea: swap with multiple arguments

2016-05-23 Thread Ali Çehreli via Digitalmars-d
On 05/23/2016 01:27 PM, Steven Schveighoffer wrote: On 5/23/16 4:01 PM, Andrei Alexandrescu wrote: So swap(a, b) swaps the contents of a and b. This could be easily generalized to multiple arguments such that swap(a1, a2, ..., an) arranges things such that a1 gets an, a2 gets a1, a3 gets a2,

Re: Idea: swap with multiple arguments

2016-05-23 Thread Jonathan M Davis via Digitalmars-d
On Monday, May 23, 2016 16:27:43 Steven Schveighoffer via Digitalmars-d wrote: > On 5/23/16 4:01 PM, Andrei Alexandrescu wrote: > > So swap(a, b) swaps the contents of a and b. This could be easily > > generalized to multiple arguments such that swap(a1, a2, ..., an) > > arranges things such that

Re: Idea: swap with multiple arguments

2016-05-23 Thread Q. Schroll via Digitalmars-d
On Monday, 23 May 2016 at 20:27:43 UTC, Steven Schveighoffer wrote: On 5/23/16 4:01 PM, Andrei Alexandrescu wrote: So swap(a, b) swaps the contents of a and b. This could be easily generalized to multiple arguments such that swap(a1, a2, ..., an) arranges things such that a1 gets an, a2 gets

Re: Need a Faster Compressor

2016-05-23 Thread Timon Gehr via Digitalmars-d
On 23.05.2016 22:34, Walter Bright wrote: On 5/23/2016 12:32 PM, Timon Gehr wrote: Instead, compression should be performed while generating the mangled string. The trouble with that is the mangled string is formed from component pieces. Then don't do that. I.e. re-mangle recursively from

Re: Idea: swap with multiple arguments

2016-05-23 Thread Tourist via Digitalmars-d
On Monday, 23 May 2016 at 20:27:43 UTC, Steven Schveighoffer wrote: On 5/23/16 4:01 PM, Andrei Alexandrescu wrote: So swap(a, b) swaps the contents of a and b. This could be easily generalized to multiple arguments such that swap(a1, a2, ..., an) arranges things such that a1 gets an, a2 gets

Re: matrix library

2016-05-23 Thread Edwin van Leeuwen via Digitalmars-d-announce
On Monday, 23 May 2016 at 20:27:54 UTC, Vlad Levenfeld wrote: On Monday, 23 May 2016 at 20:11:22 UTC, Vlad Levenfeld wrote: ... On first glance it looks like https://github.com/DlangScience/scid/blob/master/source/scid/matrix.d has most of what my matrix implementation is missing. Not sure

Re: Could forum.dlang.org remember how many captchas I filled out?

2016-05-23 Thread cy via Digitalmars-d
On Monday, 23 May 2016 at 18:54:47 UTC, Joakim wrote: Hmm, I almost never get that CAPTCHA, and I don't log in to the forum. Could be something else about your profile that Akismet flags: have you tried taking it up with them? I login here, not with them. They can't tell who I'm logged in

Re: Need a Faster Compressor

2016-05-23 Thread Walter Bright via Digitalmars-d
On 5/23/2016 9:00 AM, Stefan Koch wrote: On Monday, 23 May 2016 at 15:33:45 UTC, Walter Bright wrote: Also, the LZ4 compressor posted here has a 64K string limit, which won't work for D because there are reported 8Mb identifier strings. This is only partially true. The 64k limit does not

Re: Interest in Boston area D meetups?

2016-05-23 Thread Steven Schveighoffer via Digitalmars-d
On 5/23/16 2:50 PM, Steven Schveighoffer wrote: I think there is enough interest, well, at least a foursome. I will try and figure out something. Related: does anyone have a location preferably public transport accessible that would be good to host this? Email me (schvei...@yahoo.com)

Re: Need a Faster Compressor

2016-05-23 Thread Walter Bright via Digitalmars-d
On 5/23/2016 12:32 PM, Timon Gehr wrote: Instead, compression should be performed while generating the mangled string. The trouble with that is the mangled string is formed from component pieces. Those component pieces may have common substrings with each other, which won't be detected until

Re: DMD producing huge binaries

2016-05-23 Thread Steven Schveighoffer via Digitalmars-d
On 5/23/16 4:25 PM, Walter Bright wrote: On 5/23/2016 12:03 PM, Steven Schveighoffer wrote: Indeed, D does not overload based on return type ever. It does factor into type matching when a function pointer is used, for example. Yes, that may be the only time return type is factored in, but

Re: Idea: swap with multiple arguments

2016-05-23 Thread Steven Schveighoffer via Digitalmars-d
On 5/23/16 4:01 PM, Andrei Alexandrescu wrote: So swap(a, b) swaps the contents of a and b. This could be easily generalized to multiple arguments such that swap(a1, a2, ..., an) arranges things such that a1 gets an, a2 gets a1, a3 gets a2, etc. I do know applications for three arguments.

Re: DMD producing huge binaries

2016-05-23 Thread Walter Bright via Digitalmars-d
On 5/23/2016 12:03 PM, Steven Schveighoffer wrote: Indeed, D does not overload based on return type ever. It does factor into type matching when a function pointer is used, for example.

Re: matrix library

2016-05-23 Thread Vlad Levenfeld via Digitalmars-d-announce
On Monday, 23 May 2016 at 20:11:22 UTC, Vlad Levenfeld wrote: ... On first glance it looks like https://github.com/DlangScience/scid/blob/master/source/scid/matrix.d has most of what my matrix implementation is missing. Not sure how to put them together yet.

Re: Could forum.dlang.org remember how many captchas I filled out?

2016-05-23 Thread jmh530 via Digitalmars-d
On Monday, 23 May 2016 at 17:56:17 UTC, cy wrote: I've filled out one of these for every post I've made here. I often get a CAPTCHA when I'm using a VPN at home.

Re: matrix library

2016-05-23 Thread Vlad Levenfeld via Digitalmars-d-announce
On Monday, 23 May 2016 at 18:10:40 UTC, Carl Vogel wrote: How does what you're doing compare to what's in https://github.com/DlangScience/scid/blob/master/source/scid/linalg.d ? Basically, I have made a matrix structure and wrapped some basic arithmetic, while scid.linalg provides functions

Re: Persistent object discussion

2016-05-23 Thread Basile B. via Digitalmars-d
On Wednesday, 11 May 2016 at 01:25:39 UTC, Sergei Degtiarev wrote: I want to suggest an addition to standard library [...] The code is here: https://github.com/D-Programming-Language/phobos/pull/3625 , "perpetual" is the name of that novel you'll show to your literature teacher at Yale, but

Re: faster splitter

2016-05-23 Thread Andrei Alexandrescu via Digitalmars-d
On 05/23/2016 03:11 PM, Jack Stouffer wrote: (I think it's a micro optimization at best) splitter in the stdlib is likely to be very frequently useful, any bit of speedup we put in it is likely to pay off immensely. -- Andrei

Re: foo => "bar" key/value literals in D!

2016-05-23 Thread Daniel N via Digitalmars-d-announce
On Monday, 23 May 2016 at 19:00:40 UTC, Adam D. Ruppe wrote: Have I gone completely mad?!?! That makes two of us, I also use similar techniques. Please help argue in favour of pulling this: https://github.com/dlang/phobos/pull/3620/files https://issues.dlang.org/show_bug.cgi?id=13780 This

Re: Preprocessing CSS

2016-05-23 Thread Andrei Alexandrescu via Digitalmars-d
On 05/23/2016 02:15 PM, Dmitry Olshansky wrote: On 23-May-2016 19:04, Andrei Alexandrescu wrote: Found this on reddit: http://blog.00null.net/post/144763147991/using-gnu-m4-as-a-css-pre-processor. I found it interesting because I found it useful to preprocess our style.css on dlang.org with

Idea: swap with multiple arguments

2016-05-23 Thread Andrei Alexandrescu via Digitalmars-d
So swap(a, b) swaps the contents of a and b. This could be easily generalized to multiple arguments such that swap(a1, a2, ..., an) arranges things such that a1 gets an, a2 gets a1, a3 gets a2, etc. I do know applications for three arguments. Thoughts? -- Andrei

Re: Is NullableRef checked at compile time?

2016-05-23 Thread ag0aep6g via Digitalmars-d-learn
On 05/23/2016 08:10 PM, cy wrote: I was squinting at the std.typecons.NullableRef code and it _looks_ like isNull is only checked at runtime (and not checked at all in release mode!) but D has surprised me before in its ability to pre-calculate stuff during compilation. NullableRef is little

Struct literals and AA literals

2016-05-23 Thread Lodovico Giaretta via Digitalmars-d-learn
Hi, Today I stumbled upon this weird error: struct ConfigContainer { Config[string] configs; } struct Config { string foo; string bar; } enum ConfigContainer cc = { configs: [// error: not an associative array

Re: DMD producing huge binaries

2016-05-23 Thread Steven Schveighoffer via Digitalmars-d
On 5/23/16 3:03 PM, Steven Schveighoffer wrote: On 5/22/16 5:42 PM, Andrei Alexandrescu wrote: On 05/21/2016 03:13 PM, Kagamin wrote: On Saturday, 21 May 2016 at 18:18:21 UTC, Andrei Alexandrescu wrote: He said that that won't happen any longer, the growth was because of the return type. Is

Re: Is NullableRef checked at compile time?

2016-05-23 Thread Levi Maclean via Digitalmars-d-learn
On Monday, 23 May 2016 at 18:10:14 UTC, cy wrote: I was squinting at the std.typecons.NullableRef code and it _looks_ like isNull is only checked at runtime (and not checked at all in release mode!) but D has surprised me before in its ability to pre-calculate stuff during compilation. [...]

Re: Need a Faster Compressor

2016-05-23 Thread Timon Gehr via Digitalmars-d
On 22.05.2016 00:07, Walter Bright wrote: On 5/21/2016 2:37 PM, Timon Gehr wrote: Why is longest_match Ω(nm) instead of O(n+m) (e.g. KMP)? I don't understand the terms you use, but as to the "why" it is based on what I knew about LZ77 compression. I don't pretend to be an expert on

Re: DMD producing huge binaries

2016-05-23 Thread Steven Schveighoffer via Digitalmars-d
On 5/23/16 3:03 PM, Steven Schveighoffer wrote: In fact, this may be a reason to NOT shortcut the return mangle (if you had compiled against foo one day, and foo's internal voldemort type changes the next, it would still link, even though the type may have changed). Actually, this is not

Re: Hide input string from stdin

2016-05-23 Thread Steven Schveighoffer via Digitalmars-d
On 5/22/16 10:12 PM, Era Scarecrow wrote: On Sunday, 22 May 2016 at 22:38:46 UTC, Michael Chen wrote: I tried to write a small program that receive string as password. However, I didn't find available library for hide input string, even in core library. Any suggestion? Hmmm if you don't

Re: faster splitter

2016-05-23 Thread qznc via Digitalmars-d
On Sunday, 22 May 2016 at 18:56:30 UTC, qznc wrote: On Monday, 4 March 2013 at 19:11:17 UTC, Steven Schveighoffer wrote: On Mon, 04 Mar 2013 12:35:23 -0500, Andrei Alexandrescu wrote: That's comparable, please file an enh request.

Re: faster splitter

2016-05-23 Thread Jack Stouffer via Digitalmars-d
On Monday, 23 May 2016 at 14:47:22 UTC, qznc wrote: I see three options: 1. Remove dead bookkeeping code 2. Implement back() and popBack() 3. Use alternative splitter implementation (and implement back() and popBack()) The third one would be the best, if it is really faster. If the

Re: DMD producing huge binaries

2016-05-23 Thread Steven Schveighoffer via Digitalmars-d
On 5/22/16 5:42 PM, Andrei Alexandrescu wrote: On 05/21/2016 03:13 PM, Kagamin wrote: On Saturday, 21 May 2016 at 18:18:21 UTC, Andrei Alexandrescu wrote: He said that that won't happen any longer, the growth was because of the return type. Is that correct?

foo => "bar" key/value literals in D!

2016-05-23 Thread Adam D. Ruppe via Digitalmars-d-announce
Have I gone completely mad?!?! --- void main() { import std.stdio; writeln(obj!( foo => "bar", baz => 12 )); } --- Prints out: { foo: bar baz: 12 } A few tweaks would make a whole loose typed hash thing more akin to

Re: Could forum.dlang.org remember how many captchas I filled out?

2016-05-23 Thread Joakim via Digitalmars-d
On Monday, 23 May 2016 at 17:56:17 UTC, cy wrote: [...] I've filled out one of these for every post I've made here. Yet I'm logged in, with a persistent state on the server side. Could something be implemented along the lines of: [...] Hmm, I almost never get that CAPTCHA, and I don't

Re: DMD producing huge binaries

2016-05-23 Thread Steven Schveighoffer via Digitalmars-d
On 5/19/16 6:17 PM, Walter Bright wrote: On 5/19/2016 8:39 AM, Steven Schveighoffer wrote: template(T) foo if (someConstraints) { struct Result { T t; } auto foo(T t) { return Result(t); } } This solution works awesomely, actually. It even produces

Re: Interest in Boston area D meetups?

2016-05-23 Thread Steven Schveighoffer via Digitalmars-d
On 5/22/16 5:00 PM, Sameer Pradhan wrote: On Tuesday, 17 May 2016 at 13:17:35 UTC, Steven Schveighoffer wrote: Is anyone interested in having D meetups in Boston area? I'm not familiar with really any other locals (well, there is one person I know of :) -Steve I would love to be part of the

Re: Chat with Stefan Koch about CTFE reimplementation

2016-05-23 Thread Joakim via Digitalmars-d
On Monday, 23 May 2016 at 16:32:30 UTC, deadalnix wrote: On Monday, 23 May 2016 at 15:57:42 UTC, rikki cattermole wrote: Hello! [...] Call me party pooper or something but this whole things seems to get way out of control. In order to asses the quality of the new design, one need to

Re: missing data with parallel and stdin

2016-05-23 Thread Era Scarecrow via Digitalmars-d-learn
On Monday, 23 May 2016 at 15:53:23 UTC, moechofe wrote: On Monday, 23 May 2016 at 14:16:13 UTC, Jack Stouffer wrote: Sounds like a data race problem. Use a lock on the file write operation and see if that helps. That didn't solve anything. What I observe is: when the process is slower, more

Re: Preprocessing CSS

2016-05-23 Thread Dmitry Olshansky via Digitalmars-d
On 23-May-2016 19:04, Andrei Alexandrescu wrote: Found this on reddit: http://blog.00null.net/post/144763147991/using-gnu-m4-as-a-css-pre-processor. I found it interesting because I found it useful to preprocess our style.css on dlang.org with ddoc. Somehow that got lost a while ago. How can I

[Issue 16065] Provide digitally signed binaries for Windows

2016-05-23 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16065 James King <1...@lwshost.com> changed: What|Removed |Added CC||1...@lwshost.com --

[Issue 16065] New: Provide digitally signed binaries for Windows

2016-05-23 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16065 Issue ID: 16065 Summary: Provide digitally signed binaries for Windows Product: D Version: D2 Hardware: All OS: Windows Status: NEW Severity: enhancement

Is NullableRef checked at compile time?

2016-05-23 Thread cy via Digitalmars-d-learn
I was squinting at the std.typecons.NullableRef code and it _looks_ like isNull is only checked at runtime (and not checked at all in release mode!) but D has surprised me before in its ability to pre-calculate stuff during compilation. I was thinking of using something like this:

Re: matrix library

2016-05-23 Thread Carl Vogel via Digitalmars-d-announce
On Monday, 23 May 2016 at 07:28:20 UTC, Vlad Levenfeld wrote: https://github.com/evenex/linalg I've some heard people (including me) asking about matrix libraries for D, and while there is gl3n it only goes to 4x4 matrices and was written before all the multidimensional indexing stuff. So

Could forum.dlang.org remember how many captchas I filled out?

2016-05-23 Thread cy via Digitalmars-d
Akismet thinks your post looks like spam. Please solve a CAPTCHA to continue. I've filled out one of these for every post I've made here. Yet I'm logged in, with a persistent state on the server side. Could something be implemented along the lines of: ALTER TABLE users ADD COLUMN

Re: Speed up `dub`.

2016-05-23 Thread cy via Digitalmars-d-learn
On Thursday, 19 May 2016 at 17:50:44 UTC, ciechowoj wrote: dub build --nodeps I tried it, doesn't seem to do anything, maybe something is broken. Perhaps you didn't complete "dub build" without --nodeps beforehand? You have to do that once, and it's still as annoyingly inefficient as

Re: aliasing expressions and identifiers

2016-05-23 Thread deed via Digitalmars-d
On Monday, 23 May 2016 at 15:18:51 UTC, Nick Treleaven wrote: If we had local refs, we could use this instead: ref m = matrix.rawArr; The difference is m is already computed, it is not recomputed each time m is read, unlike M(). I think the reason D doesn't support local refs is because it

Re: Release DUB 0.9.25, new logo and updated website design

2016-05-23 Thread Sönke Ludwig via Digitalmars-d-announce
Am 23.05.2016 um 17:55 schrieb Luís Marques: On Sunday, 22 May 2016 at 19:36:39 UTC, Sönke Ludwig wrote: In preparation to that, it also received a thorough optical overhaul. The newly designed logo (which has appeared in some other spots already) has been integrated on the package registry,

Re: aliasing expressions and identifiers

2016-05-23 Thread Marc Schütz via Digitalmars-d
On Monday, 23 May 2016 at 15:18:51 UTC, Nick Treleaven wrote: On Monday, 23 May 2016 at 14:05:43 UTC, deed wrote: Some thoughts about extending the with-statement were brought up here earlier: http://forum.dlang.org/post/txpifmwpmmhsvcpbc...@forum.dlang.org I don't care much whether it would

Re: Chat with Stefan Koch about CTFE reimplementation

2016-05-23 Thread Stefan Koch via Digitalmars-d
On Monday, 23 May 2016 at 16:32:30 UTC, deadalnix wrote: It is like we have a car with square wheels, and you guys a reinventing a whole new car without even trying to maybe put round wheel on the existing one and see how it goes. I this particular model of car. The bolts of the wheels are

Re: Chat with Stefan Koch about CTFE reimplementation

2016-05-23 Thread Stefan Koch via Digitalmars-d
On Monday, 23 May 2016 at 16:32:30 UTC, deadalnix wrote: On Monday, 23 May 2016 at 15:57:42 UTC, rikki cattermole wrote: Hello! [...] Call me party pooper or something but this whole things seems to get way out of control. In order to asses the quality of the new design, one need to

Re: Need a Faster Compressor

2016-05-23 Thread Marco Leise via Digitalmars-d
Am Mon, 23 May 2016 12:04:48 + schrieb Stefan Koch : > The method for archiving perfect compression it outlined here: > https://github.com/Cyan4973/lz4/issues/183 Nice, if it can keep the compression speed up. -- Marco

Re: Release DUB 0.9.25, new logo and updated website design

2016-05-23 Thread Russel Winder via Digitalmars-d-announce
On Mon, 2016-05-23 at 17:40 +0200, Sönke Ludwig via Digitalmars-d- announce wrote: > > Oh, okay, misunderstood that. The basic protocol is very simple: My fault, I rushed my original email and didn't set out the problem properly. > GET /packages/index.json > Yields a JSON array with all

Re: Need a Faster Compressor

2016-05-23 Thread deadalnix via Digitalmars-d
On Monday, 23 May 2016 at 16:00:20 UTC, Stefan Koch wrote: On Monday, 23 May 2016 at 15:33:45 UTC, Walter Bright wrote: Also, the LZ4 compressor posted here has a 64K string limit, which won't work for D because there are reported 8Mb identifier strings. This is only partially true. The

Re: Chat with Stefan Koch about CTFE reimplementation

2016-05-23 Thread deadalnix via Digitalmars-d
On Monday, 23 May 2016 at 15:57:42 UTC, rikki cattermole wrote: Hello! [...] Call me party pooper or something but this whole things seems to get way out of control. In order to asses the quality of the new design, one need to compare it to a baseline (aka the existing design) or one is

Re: Diamond - MVC / Template engine

2016-05-23 Thread Luís Marques via Digitalmars-d-announce
On Saturday, 21 May 2016 at 08:20:00 UTC, Bauss wrote: For more information please view below. Dub repository: https://code.dlang.org/packages/diamond Github: https://github.com/bausshf/Diamond The dub repository seems to have a problem properly escaping your example template. Could you

Preprocessing CSS

2016-05-23 Thread Andrei Alexandrescu via Digitalmars-d
Found this on reddit: http://blog.00null.net/post/144763147991/using-gnu-m4-as-a-css-pre-processor. I found it interesting because I found it useful to preprocess our style.css on dlang.org with ddoc. Somehow that got lost a while ago. How can I find the rename style.css -> style.css.dd and

Re: Hide input string from stdin

2016-05-23 Thread Nemanja Boric via Digitalmars-d
On Monday, 23 May 2016 at 15:56:14 UTC, Wyatt wrote: On Sunday, 22 May 2016 at 22:38:46 UTC, Michael Chen wrote: I tried to write a small program that receive string as password. However, I didn't find available library for hide input string, even in core library. Any suggestion? For

Re: Need a Faster Compressor

2016-05-23 Thread Stefan Koch via Digitalmars-d
On Monday, 23 May 2016 at 15:33:45 UTC, Walter Bright wrote: Also, the LZ4 compressor posted here has a 64K string limit, which won't work for D because there are reported 8Mb identifier strings. This is only partially true. The 64k limit does not apply to the input string. It does only

Chat with Stefan Koch about CTFE reimplementation

2016-05-23 Thread rikki cattermole via Digitalmars-d
Hello! So on today's stream[0] I had a chat with Stefan and worked through a few problems regarding reimplementation of dmd's CTFE. So a TLDR for those who do not wish to watch the video. - ddmd.dinterpret will have only two public free-functions (ctfeInterpret and

Re: Hide input string from stdin

2016-05-23 Thread Wyatt via Digitalmars-d
On Sunday, 22 May 2016 at 22:38:46 UTC, Michael Chen wrote: I tried to write a small program that receive string as password. However, I didn't find available library for hide input string, even in core library. Any suggestion? For Linux, I think you could just use getpass() from

Re: Release DUB 0.9.25, new logo and updated website design

2016-05-23 Thread Luís Marques via Digitalmars-d-announce
On Sunday, 22 May 2016 at 19:36:39 UTC, Sönke Ludwig wrote: In preparation to that, it also received a thorough optical overhaul. The newly designed logo (which has appeared in some other spots already) has been integrated on the package registry, and the site style has been adjusted to fit

Re: missing data with parallel and stdin

2016-05-23 Thread moechofe via Digitalmars-d-learn
On Monday, 23 May 2016 at 14:16:13 UTC, Jack Stouffer wrote: Sounds like a data race problem. Use a lock on the file write operation and see if that helps. Like this?: synchronized(mutex) copy(source,dest); That didn't solve anything. What I observe is: when the process is slower, more

Re: Release DUB 0.9.25, new logo and updated website design

2016-05-23 Thread Sönke Ludwig via Digitalmars-d-announce
Am 23.05.2016 um 17:31 schrieb Dicebot: On Monday, 23 May 2016 at 15:13:56 UTC, Russel Winder wrote: My need is two write a Python program that queries the running Dub repository. So I am guessing this is an HTTP-based protocol. I guess I will have to read the Dub code and deduce/infer/guess

Re: Release DUB 0.9.25, new logo and updated website design

2016-05-23 Thread Sönke Ludwig via Digitalmars-d-announce
Am 23.05.2016 um 17:13 schrieb Russel Winder via Digitalmars-d-announce: On Mon, 2016-05-23 at 15:19 +0200, Sönke Ludwig via Digitalmars-d- announce wrote: Am 23.05.2016 um 15:01 schrieb Russel Winder via Digitalmars-d- announce: Hi, Is the Dub API published anywhere. I propose to write a

Re: Need a Faster Compressor

2016-05-23 Thread Walter Bright via Digitalmars-d
On 5/23/2016 5:04 AM, Stefan Koch wrote: Am Sun, 22 May 2016 23:42:33 -0700 schrieb Walter Bright : The file format: http://cyan4973.github.io/lz4/lz4_Block_format.html It doesn't look too difficult. If we implement our own LZ4 compressor based on that, from

  1   2   >