ketmar:
sorry, it uses GDC @attribute(forceinline) feature, so you
need latest GDC to build it. it's not strictly necessary though
(speed optimizations?
Have you performed a benchmark with and without that attribute?
http://repo.or.cz/w/zymosis.d.git
In this kind of code computed gotos
Brian Schott:
DScanner is a tool for analyzing D source code. It has the
following features:
...
https://github.com/Hackerpilot/Dscanner
I have just compiled it on Windows32 and tried it.
The compilation using the given bat has failed to link:
OPTLINK (R) for Win32 Release 8.00.15
Brian Schott:
This is not valid. DMD and the grammar spec both do not allow
this.
This was changed weeks ago. Now D accepts that code.
int items[5];
I don't support C-style declarations. DMD doesn't really
support them either.
(https://issues.dlang.org/show_bug.cgi?id=953)
Then I
Brian Schott:
You want tooling to support language features that aren't
released?
I think it's nice for a language tool to try to follow closely
the improvements in the language. But you are right, the update
rhythms of DScanner are left to you.
Several people have indicated that they
Walter Bright:
Sigh, Windows can't open that file type.
Install this:
http://www.videolan.org/vlc/index.html
Bye,
bearophile
Kai Nacke:
In the same folder are also the videos of the other LLVM
related talk.
I have appreciated the An approach for energy consumption
analysis of programs using LLVM talk, they even have an
annotation that statically enforces a certain function to consume
less than a specified amount
Walter Bright:
what do you guys think?
The caption I'd like to see is the name of the speaker during the
live transmissions.
Bye,
bearophile
Meta:
and there's always std.variant.Variant when you don't want to
bother with them.
How many good usages of D Variant do you know?
Bye,
bearophile
Adam D. Ruppe:
Of course, sometimes the type still matters,
Haskell programmers have a very different attitude toward types.
They do a kind of type-driven programming, even in small
programs. They lay down the data types (like the algebraic data
types that describe the data structures of
Nick Sabalausky:
In my experience, using heavy dynamic typing throughout a
program creates far more work (mainly debugging) than it
avoids. Even in tiny ~100 line programs, I've spent large
amounts of time tracking down bugs a sane compiler would have
immediately pointed out with a
Nick Sabalausky:
to three lines of tests for every one line of real code is
considered rapid development,
My Python development is just development, it's not meant to be
particularly rapid :-)
And I don't think a 3:1 ratio is too much. Among the testing code
I also count the doctests, the
Burp:
Do you also have so much testing code in haskell?
I am still a newbie in Haskell, so my Haskell usage patterns are
not significant (but if you still want an answer: from what I've
seen so far I need so much time and thinking to craft every
single line of Haskell code that later
Andrei Alexandrescu:
http://www.reddit.com/r/programming/comments/27e5d7/dconf_day_1_talk_3_a_real_d_in_programming/
The built-in can be deprecated. And the compromise solution is to
return the result from the reverse() of Phobos. Sometimes
breaking your the rules a little is the best thing
Ali Cehreli:
I wonder what bearophile's response will be. ;)
Despite looking like a silly sequence of optimizations, I do have
some general comments on that text. Thanks to Kenji
(https://github.com/D-Programming-Language/dmd/pull/3650 ) this
code is now valid:
void foo(size_t N)(ref
Joseph Rushton Wakeling:
Thanks in advance for all testing and feedback.
I have appreciated to use this generator (but I am not yet sure
how much good it is. I have seen it's fast and sufficiently good
for some of my simpler purposes):
http://en.literateprograms.org/R250/521_%28C%29
Kagamin:
Pass it by reference, I see no reason why MT can't be pure.
I meant strongly pure :-)
Bye,
bearophile
Joseph Rushton Wakeling:
However, I don't see any reason why one couldn't have a
strongly pure function that purely transforms state, which
could be wrapped by an RNG class
So can you can generate random values in strongly pure functions
with this? You can allocate the RNG class inside the
At about 40.42 in the Thoughts on static regex there is written
even compile-time printf would be awesome. There is a patch
about __ctWrite in GitHug, it should be fixed and merged.
Bye,
bearophile
Joseph Rushton Wakeling:
Forgive me if I'm missing something obvious, but as it stands I
don't see how the R250/521 algorithm you pointed me to can be
strongly pure.
Sorry, the R250/521 idea and the strongly pure idea are unrelated
to each other.
but wouldn't that be a memory allocation
Joseph Rushton Wakeling:
I'll implement R250/521 for you, though.
Please stop, I am not worth that, and I don't even know how much
good that generator is. So for you it's better to focus on more
important matters of the new random module. Extra generators can
be added later if needed.
Dmitry Olshansky:
Unless things improve dramatically CTFE code generation +
An alternative and much faster JITter for LLVM, something like
this could make CTFE on LDC2 very quick:
http://llvm.org/devmtg/2014-04/PDFs/LightningTalks/fast-jit-code-generation.pdf
Bye,
bearophile
Steven Schveighoffer:
To that end, I thought we were moving towards a more scalable
solution: like !final or final!false or final(false), which
could be nice for metaprogramming.
This is a small problem:
void foo(in int x) {
auto y = x;
y++; // error
}
The current solution is
Walter Bright:
https://github.com/D-Programming-Language/druntime/pull/839
Why aren't functions with ubyte/byte/short/ushort arguments
included?
--
Here Lionello Lunesu has suggested a __traits(valueRange,
expression) for built-in values:
Walter Bright:
Because there is no ubyte/byte/short/ushort math in C, C++ or
D. There is only int/long math.
A little of ubyte math is present, perhaps for this you add
uinc, sinc, udec, sdec functions to core.checkedint that
support ubyte/byte/short/ushort types too:
void main() {
Joseph Rushton Wakeling:
Anyway, here's my thinking behind the opCall idea. One of the
major shifts of the move to classes is that, suddenly, all of
these entities have to be explicitly allocated.
So creating a random number generator can't be @nogc?
Bye,
bearophile
Joseph Rushton Wakeling:
What really matters to me is stuff like Sample and Cover, where
we can readily expect that they may be called in inner loops of
the program, and so having lots of allocations via new would
be a big problem. So, it follows that the current helper
functions (sample,
The talk was nice, and it's the chance I was waiting to ask a
question to the speaker.
I've read a very nice paper (+ slides) about using some
specialized but simple type system rules to make less bug-prone
the bit-twiddling kind of code, Bit-Level Types for High-Level
Reasoning by Ranjit
So are those things a good addition to Phobos for your kind of
programming? (additions to the language can be discussed later).
You can look at the slides for a quicker overview, or you can ask
me here for a summary, if necessary.
Bye,
bearophile
Andrei Alexandrescu:
http://www.reddit.com/r/programming/comments/2aruaf/dconf_2014_keynote_high_performance_code_using_d/
Despite Walter is used to pipeline programming, so the next
step is to also handle failures and off-band messages in a
functional way (without exceptions and global
Despite Walter is
Sorry, I meant to write, Now Walter is...
Bye,
bearophile
Andrei Alexandrescu:
Just read the slides, very interesting.
There are many papers, books and articles around that explain the
same things, but that explanation is easy to understand even for
people not used to functional programming (as I still partially
am).
I think it would be
Don:
I think that approach is more convincing for functional
languages than for D, especially if you are limited to a single
return type.
Hopefully someday we'll have good enough tuples in D (including
their destructuring), this is similar to having multiple return
values.
Bye,
Ali Çehreli:
Ali Çehreli's (first speaker) slides are at
http://acehreli.org/AliCehreli_assumptions.pdf
It's a nice slides pack. Now in Phobos there's also assumeUTF
(https://d.puremagic.com/issues/show_bug.cgi?id=10162 ).
See also:
https://issues.dlang.org/show_bug.cgi?id=9682
It
Jacob Carlborg:
A pull request [1] by Rainer Schuetze which adds COFF support
for Win32 has recently been merged by Walter. It seems to be
enabled using the -m32mscoff flag.
I have just recompiled dmd, but I don't see that new compiler
switch (dmd 2.067).
I am compiling in a wrong way?
ketmar:
are you sure that you compiled dmd for 32-bit windows? other
versions seems to not have this flag.
Yes, I am using a 32 bit Windows.
Bye,
bearophile
ketmar:
are you sure that you have latest git then? yes, i know that
this is very silly question, but sometimes... ;-)
OK, -m32mscoff works (probably I was using a wrongly written
switch), but I don't see it listed among the other compiler
switches.
Bye,
bearophile
Andrei Alexandrescu:
schwartzSort comes to mind -- Andrei
forgot the smiley :o) -- Andrei
Yeah that's an infamous example. Standard libraries should avoid
too much hard to write identifiers.
Bye,
bearophile
Vladimir Panteleev:
I agree, I am also surprised that 2.066 was released despite
the regressions.
There is an apparently endless stream of regressions, I have
found another today
(https://issues.dlang.org/show_bug.cgi?id=13321 ). I think D is
not yet at the stage of its development where
Andrei:
http://tomerfiliba.com/blog/dlang/
struct PascalString {
Field!ubyte length;
Also see if UDAs plus compile-time introspection is helpful.
auto stream = cast(ubyte[])\x05hello.dup;
Perhaps this is enough, and avoids one allocation:
immutable stream =
Dicebot:
All I want is that whatever decision Walter makes to happen
sooner than in few years from now.
There are other pending patches, like the support for the nice
[$] syntax by Kenji.
I keep thinking there's gotta be a way to do this without
language changes. or I keep thinking there
Mike:
Then I add change only #6 above, and remove the excessive
function attributes,
Maybe I'll make a pull request for it. I don't think users
should have to decorate their code like a Christmas tree
I don't agree, function attributes are not excessive, they are
idiomatic in D.
Bye,
George:
I was hoping to get some feedback from the community regarding
the quality of the code and if something can be written the
D-way. I have also written a blog post about the process
(http://blog.zakhour.me/post/d/damncheck-on-building-a-property-based-testing-library-for-d/)
Eventually
IgorStepanov:
I've created pull request, which introduces multiple alias this.
Can someone show one or more usage cases?
Thank you,
bye,
bearophile
IgorStepanov:
Do you ask about alias this or about it multiple usage.
Multiple usage is similar to single, but multiple:)
I meant the multiple usage. And none of your examples here are
use cases :-( I'd like to see one use case, or more.
Bye,
bearophile
Andrew Edwards:
The second release candidate for v2.066.1 is now available for
testing. Binaries may be obtained at
http://wiki.dlang.org/Beta_Testing/. Happy testing.
In the site there is a link named DMD v2.067.0-b1. Perhaps it
should be named DMD v2.067.0-a1 because it's an alpha
Brian Schott:
https://github.com/Hackerpilot/dfix
Sounds like a very good start :-)
Bye,
bearophile
Dmitry Olshansky:
Why is File.byLine so slow?
Seems to be mostly fixed sometime ago.
Really? I am not so sure.
Bye,
bearophile
Dmitry Olshansky:
Which is 1:1 parity. Another myth busted? ;)
There is still an open bug report:
https://issues.dlang.org/show_bug.cgi?id=11810
Do you want also to benchmark that byLineFast that for me is
usually significantly faster than the byLine?
Bye,
bearophile
weaselcat:
I see array.sort is planned for future deprecation, what does
future fall under?
For us that activate warnings in dmd (because for a design
mistake they are disabled on default, but hopefully this will be
fixed in future) in the latest github version of the compiler it
gives a
Tomer Rosenschtein:
Awesome article.
Paper of the week is a modest word for this.
The D code is not good.
Bye,
bearophile
CraigDillabaugh:
Maybe not good by the standards of this group, but it does
represent the efforts of someone doing 'real work', so I think
it is worthwhile.
Perhaps part of the cause of the low quality of the code in that
blog post is the design of D language is not bondage enough.
This
Vladimir Panteleev:
http://wiki.dlang.org/extensions/DCaptcha/demo.php
Very nice, we can help spammers learn some D and become some day
valid D developers :-)
Bye,
bearophile
Ilya Yaroshenko:
Ported from r-project:
http://code.dlang.org/packages/bessel
If you like to write the full path like std.math.isNaN, then
you can also use static imports.
Perhaps it's worth adding pre/post-conditions to the functions.
The indentations probably have a mix of tabs and
Iain Buclaw:
For a more practical example, I've added an example jit
compiled brainf*** interpreter.
https://github.com/ibuclaw/gccjitd/blob/master/tests/brainf.d
Here I have put a little program you can use as performance
benchmark:
http://codepad.org/hogVnlIS
Bye,
bearophile
Iain Buclaw:
Sure, what is that supposed to do?
Iain.
To print a classic image of the Mandelbrot Set (but Codepad seems
down currently).
Bye,
bearophile
Iain Buclaw:
1.086s: bfgccjitd-runtime-O2
1.139s: bfgccjitd-runtime-O1
2.759s: bfgccjitd-O1
3.646s: bfgccjitd-O2
4.959s: bff-O2
Five times faster than bff is a lot :-)
My best timings are usually around two times faster than bff. I
guess gccjit is not an average JIT-tter.
Bye,
Kagamin:
Doesn't let normally declare a new variable?
You are right, yours is a valid point... So tie could be a
better name after all.
Bye,
bearophile
Ola Fosheim Grøstad:
Maybe change the name to tie:
http://www.cplusplus.com/reference/tuple/tie/
?
I prefer let, it's much more traditional and descriptive. C++
standard library is often a bad example to follow...
Bye,
bearophile
Mengu:
that's a great example to show d's strength. thank you.
It's also a great way to show what's missing in D syntax.
Bye,
bearophile
Kagamin:
Or even more obvious (VBA,TSQL):
set (x,y,z) = [1,2,3];
I prefer to use set as in Python, to define sets:
s = set([1, 2, 3])
2 in s
True
Bye,
bearophile
Adam D. Ruppe:
I've started writing a weekly D newsletter. Here's the first
issue, any feedback welcome!
http://arsdnet.net/this-week-in-d/jan-12.html
Seems good.
Major Changes = They are weekly, so perhaps Changes is
enough.
If you can, add two or three little images to the page, like
It it a good idea to keep a weekly rhythm? Perhaps one issue
every two, three or even four weeks is better at this stage of
the D life.
Bye,
bearophile
ponce:
I'm not familiar with the terse, range-heavy, UFCS style that
has emerged from Phobos
In Rosettacode I have inserted tons of examples of that coding
style.
An example, given a tuple of arbitrary length, with items all of
the same type, how do you compute the total of its items?
Ola Fosheim Grøstad:
Downplaying other languages makes the D crowd look desperate...
That kind of articles are bad for the image of the D community
(and the D code shown in that article is not the best).
Bye,
bearophile
Ola Fosheim Grøstad:
So, it will just fade way in the sea of JavaScript wannabe
replacements.
Maybe, but Google is using it for Google Ads. Which is their
primary business? Still, a bit early to say what happens next.
Perhaps next some kind of blend of Typescript and Dart will
become part
65 matches
Mail list logo