On Saturday, 10 January 2015 at 23:23:52 UTC, Ali Çehreli wrote:
On 01/10/2015 08:21 AM, Bauss wrote:
Is there a way to get all functions within a module using
traits? I
tried "allMembers" and it seem to work, but I can't use
"getFunctionAttributes" with it and if I use "getAttributes"
then it
On Saturday, 10 January 2015 at 20:55:05 UTC, Laeeth Isharc wrote:
Hi Aldanor.
I wrote a slightly longer reply, but mislaid the file somewhere.
I guess your question might relate to wrapping the HDF5 library
- something that I have already done in a basic way, although I
welcome your project,
Laeeth Isharc:
In D there is a feature that allows a function to accept both
an array of items and items,
yes - it is funny there is not an overloading that accepts
arrays
I meant this D feature:
void foo(T)(T[] items...) {
import std.stdio;
items.writeln;
}
void main() {
foo(
On 01/10/2015 08:21 AM, Bauss wrote:
Is there a way to get all functions within a module using traits? I
tried "allMembers" and it seem to work, but I can't use
"getFunctionAttributes" with it and if I use "getAttributes" then it
won't find any applied attributes.
What I do is having a package m
Take a look at your error messages:
std.algorithm.endsWith(alias pred = "a == b", Range,
Needles...)(Range doesThisEnd, Needles withOneOfThese)
Needles is not an array type, it's a type tuple, so
withOneOfThese doesn't accept an array of strings.
ahhh.. thank you so much for this.
In D the
On 2015-01-10 at 21:58, bearophile wrote:
Needles is not an array type, it's a type tuple, so withOneOfThese doesn't
accept an array of strings. [...]
So if you really want to pack the strings in some kind of unity, you can do
this as workaround: [...]
I would suggest create a function that d
Hi Aldanor.
I wrote a slightly longer reply, but mislaid the file somewhere.
I guess your question might relate to wrapping the HDF5 library -
something that I have already done in a basic way, although I
welcome your project, as no doubt we will get to a higher quality
eventual solution that
Laeeth Isharc:
I understand from previous discussion there is some difficulty
over immutability. I did not quite figure out what the
solution was in this case:
import std.array;
import std.string;
import std.stdio;
void main(string[] args)
{
string[] test=["1","two","three!"];
On Saturday, 10 January 2015 at 19:17:22 UTC, Ola Fosheim Grøstad
wrote:
Nice and clean code; does it expand html entities ("&")?
Of course. It does it both ways:
a &
span.innerText == "a &"
span.innerText = "a \" b";
assert(span.innerHTML == "a " b");
parseGarbage also tries to fix broken
I understand from previous discussion there is some difficulty
over immutability. I did not quite figure out what the solution
was in this case:
import std.array;
import std.string;
import std.stdio;
void main(string[] args)
{
string[] test=["1","two","three!"];
auto a="arghtwo
Small recommendation (apart from the reserved word issue which
you fixed): it's generally considered good D style to give
structs and classes names that start with capital letters,
JustLikeThis. So, I suggest Node rather than node.
Very minor point, and of course, your code is yours to style
On Saturday, 10 January 2015 at 17:39:17 UTC, Adam D. Ruppe wrote:
Though, that's still a library thing rather than a language
thing.
It is a language-library-platform thing, things like how
composable the eco system is would be interesting to compare. But
it would be unfair to require a mini
On Saturday, 10 January 2015 at 14:56:09 UTC, Adam D. Ruppe wrote:
On Saturday, 10 January 2015 at 13:22:57 UTC, Nordlöw wrote:
on dmd git master. Ideas anyone?
Don't use git master :P
Do use git master. The more people do, the fewer regressions will
slip into the final release.
You can u
On Friday, 9 January 2015 at 13:50:29 UTC, eles wrote:
https://codegolf.stackexchange.com/questions/44278/debunking-stroustrups-debunking-of-the-myth-c-is-for-large-complicated-pro
From the link: "Let's show Stroustrup what small and readable
program actually is."
Alright, there are a lot a
On Saturday, 10 January 2015 at 17:23:31 UTC, Ola Fosheim Grøstad
wrote:
For the challenge to make sense it would entail parsing all
legal HTML5 documents, extracting all resource links,
converting them into absolute form and printing them one per
line. With no hickups.
Though, that's still a
On Saturday, 10 January 2015 at 15:52:21 UTC, Tobias Pankrath
wrote:
I think he's wrong, because it spoils the comparison. Every
answer should delegate those tasks to a library that
Stroustroup used as well, e.g. regex matching, string to number
conversion and some kind of TCP sockets. But it m
On Saturday, 10 January 2015 at 15:52:21 UTC, Tobias Pankrath
wrote:
...
The thing is, in languages like Perl, Python, Ruby (to name a
few), reusing
someone else's code is not only easy, but it is how most
people actually write code most of the time.
I think he's wrong, because it spoils the
Is there a way to get all functions within a module using traits?
I tried "allMembers" and it seem to work, but I can't use
"getFunctionAttributes" with it and if I use "getAttributes" then
it won't find any applied attributes.
What I do is having a package module with a staic constructor
whi
On Saturday, 10 January 2015 at 15:52:21 UTC, Tobias Pankrath
wrote:
But it must do the same work that he's solution does: Create
and parse HTML header and extract the html links, probably
using regex, but I wouldn't mind another solution.
Yeah, that would be best. BTW interesting line here:
On Saturday, 10 January 2015 at 15:13:27 UTC, Adam D. Ruppe wrote:
On Saturday, 10 January 2015 at 12:34:42 UTC, Tobias Pankrath
wrote:
Since it is a comparison of languages it's okay to match the
original behaviour.
I don't think this is really a great comparison of languages
either though b
Vladimir Panteleev via Digitalmars-d-learn píše v So 10. 01. 2015 v
07:42 +:
> On Saturday, 10 January 2015 at 02:10:04 UTC, Jesse Phillips
> wrote:
> > On Friday, 9 January 2015 at 13:50:29 UTC, eles wrote:
> >> https://codegolf.stackexchange.com/questions/44278/debunking-stroustrups-debunkin
On Saturday, 10 January 2015 at 15:24:45 UTC, bearophile wrote:
Is the issue in Bugzilla?
https://issues.dlang.org/show_bug.cgi?id=13966
On Saturday, 10 January 2015 at 15:24:45 UTC, bearophile wrote:
Is the issue in Bugzilla?
I don't know, bugzilla is extremely difficult to search.
I guess I'll post it again and worst case it will be closed as a
duplicate.
On Saturday, 10 January 2015 at 12:16:24 UTC, ref2401 wrote:
I learned how 'atomicOp' and 'cas' work and why i need them
from the following sources:
http://ddili.org/ders/d.en/concurrency_shared.html (Ali's book)
http://www.informit.com/articles/article.aspx?p=1609144
(Andrei's book)
Can anyb
Adam D. Ruppe:
Don't use git master :P
Is the issue in Bugzilla?
Bye,
bearophile
On Saturday, 10 January 2015 at 12:34:42 UTC, Tobias Pankrath
wrote:
Since it is a comparison of languages it's okay to match the
original behaviour.
I don't think this is really a great comparison of languages
either though because it is gluing together a couple library
tasks. Only a few bit
On Saturday, 10 January 2015 at 13:22:57 UTC, Nordlöw wrote:
on dmd git master. Ideas anyone?
Don't use git master :P
Definitely another regression. That line was just pushed to git
like two weeks ago and the failing assertion is pretty obviously
a pure dmd code bug, it doesn't know the leng
On Friday, 9 January 2015 at 17:15:43 UTC, Adam D. Ruppe wrote:
import arsd.dom;
import std.net.curl;
import std.stdio, std.algorithm;
void main() {
auto document = new Document(cast(string)
get("http://www.stroustrup.com/C++.html";));
writeln(document.querySelectorAll("a[href]").map!
On Friday, 9 January 2015 at 17:18:43 UTC, Adam D. Ruppe wrote:
Huh, looking at the answers on the website, they're mostly
using regular expressions. Weaksauce. And wrong - they don't
find ALL the links, they find the absolute HTTP urls!
Since it is a comparison of languages it's okay to match
On Friday, 9 January 2015 at 17:18:43 UTC, Adam D. Ruppe wrote:
Huh, looking at the answers on the website, they're mostly
using regular expressions. Weaksauce. And wrong - they don't
find ALL the links, they find the absolute HTTP urls!
Yeah... Surprising, since languages like python includes
I learned how 'atomicOp' and 'cas' work and why i need them from
the following sources:
http://ddili.org/ders/d.en/concurrency_shared.html (Ali's book)
http://www.informit.com/articles/article.aspx?p=1609144 (Andrei's
book)
Can anybody tell me how 'atomicFence', 'atomicLoad' and
'atomicStore'
31 matches
Mail list logo