Re: Gary Willoughby: Why Go's design is a disservice to intelligent programmers

2015-03-30 Thread bearophile via Digitalmars-d-announce
of a next JavaScript update :-) Bye, bearophile

Re: Gary Willoughby: Why Go's design is a disservice to intelligent programmers

2015-03-25 Thread bearophile via Digitalmars-d-announce
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

Re: let (x,y) = ...

2015-02-19 Thread bearophile via Digitalmars-d-announce
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

Re: let (x,y) = ...

2015-02-19 Thread bearophile via Digitalmars-d-announce
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

Re: let (x,y) = ...

2015-02-19 Thread bearophile via Digitalmars-d-announce
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

Re: let (x,y) = ...

2015-02-19 Thread bearophile via Digitalmars-d-announce
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

Re: This Week in D: Issue #4

2015-02-11 Thread bearophile via Digitalmars-d-announce
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

Re: This Week in D, issue 1

2015-01-13 Thread bearophile via Digitalmars-d-announce
here: https://sergeytihon.wordpress.com/category/f-weekly/ Bye, bearophile

Re: D idioms list

2015-01-08 Thread bearophile via Digitalmars-d-announce
? The last way I've invented is: myTuple[].only.sum It's also @nogc. But it causes a little of template bloat. Bye, bearophile

Re: GCCJIT Bindings for D

2014-12-28 Thread bearophile via Digitalmars-d-announce
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

Re: GCCJIT Bindings for D

2014-12-28 Thread bearophile via Digitalmars-d-announce
, bearophile

Re: GCCJIT Bindings for D

2014-12-27 Thread bearophile via Digitalmars-d-announce
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

Re: bessel[IJKY] functions

2014-12-25 Thread bearophile via Digitalmars-d-announce
and spaces and seem messed up. Is gamma_cody better/worse than std.mathspecial.gamma? Bye, bearophile

Re: forum.dlang.org is now using DCaptcha

2014-12-02 Thread bearophile via Digitalmars-d-announce
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

Re: D is for Data Science

2014-11-28 Thread bearophile via Digitalmars-d-announce
Tomer Rosenschtein: Awesome article. Paper of the week is a modest word for this. The D code is not good. Bye, bearophile

Re: D is for Data Science

2014-11-28 Thread bearophile via Digitalmars-d-announce
, and I think this is good. Bye, bearophile

Re: D is for Data Science

2014-11-25 Thread bearophile via Digitalmars-d-announce
a warning if you use the built-in sort and reverse. Unfortunately the library reverse still needs to be fixed to return the array as the built-in reverse. Bye, bearophile

Re: D is for Data Science

2014-11-24 Thread bearophile via Digitalmars-d-announce
Dmitry Olshansky: Why is File.byLine so slow? Seems to be mostly fixed sometime ago. Really? I am not so sure. Bye, bearophile

Re: D is for Data Science

2014-11-24 Thread bearophile via Digitalmars-d-announce
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

Re: dfix 0.1.1

2014-10-28 Thread bearophile via Digitalmars-d-announce
Brian Schott: https://github.com/Hackerpilot/dfix Sounds like a very good start :-) Bye, bearophile

Re: DMD v2.066.1-rc2

2014-09-20 Thread bearophile via Digitalmars-d-announce
. Bye, bearophile

Re: Multiple alias this is coming.

2014-09-18 Thread bearophile via Digitalmars-d-announce
IgorStepanov: I've created pull request, which introduces multiple alias this. Can someone show one or more usage cases? Thank you, bye, bearophile

Re: Multiple alias this is coming.

2014-09-18 Thread bearophile via Digitalmars-d-announce
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

Re: Damncheck - a property-based testing library

2014-09-09 Thread bearophile via Digitalmars-d-announce
a QuickCheck-like library needs to become standard tool used to test most D projects. There are many other related ideas, like: http://www.cse.chalmers.se/~nicsma/quickspec.pdf Bye, bearophile

Re: D for the Win

2014-08-24 Thread bearophile via Digitalmars-d-announce
, bearophile

Re: Fix #2529: explicit protection package #3651

2014-08-22 Thread bearophile via Digitalmars-d-announce
busy with something (like finishing the 2.066 release and its regressions, or developing Warp for Facebook, or something else), so you have to wait some time for him to come back to the language development side, to receive a good answer and a good solution. Bye, bearophile

Re: D for the Win

2014-08-20 Thread bearophile via Digitalmars-d-announce
= \x05hello.representation; Bye, bearophile

Re: D 2.066 is out. Enjoy!

2014-08-18 Thread bearophile via Digitalmars-d-announce
quicker. Bye, bearophile

Re: COFF support for Win32 merged

2014-08-17 Thread bearophile via Digitalmars-d-announce
, bearophile

Re: COFF support for Win32 merged

2014-08-17 Thread bearophile via Digitalmars-d-announce
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

Re: COFF support for Win32 merged

2014-08-17 Thread bearophile via Digitalmars-d-announce
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

Re: COFF support for Win32 merged

2014-08-17 Thread bearophile via Digitalmars-d-announce
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

Re: DConf 2014 Lightning Talks

2014-08-01 Thread bearophile via Digitalmars-d-announce
!(T[], 16), that specifies the assumption that a specific slice has its first item aligned to 16 bytes. This could be useful if you use SIMD instructions (time ago I have even suggested to put such array alignment inside the D type system, but I didn't raise much enthusiasm). Bye, bearophile

Re: DConf 2014 Keynote: High Performance Code Using D by Walter Bright

2014-07-22 Thread bearophile via Digitalmars-d-announce
, bearophile

Re: DConf 2014 Keynote: High Performance Code Using D by Walter Bright

2014-07-20 Thread bearophile via Digitalmars-d-announce
of Algebraic, Nullable and Expected is very different (and safer) if you use them through pattern matching. The point is not to ape the functional languages: currently in D Nullable is not much safer (and not more handy) than using a null pointer. Bye, bearophile

Re: DConf 2014 Keynote: High Performance Code Using D by Walter Bright

2014-07-16 Thread bearophile via Digitalmars-d-announce
some little examples of functional syntax for Rust: http://science.raphael.poss.name/rust-for-functional-programmers.html Bye, bearophile

Re: DConf 2014 Keynote: High Performance Code Using D by Walter Bright

2014-07-16 Thread bearophile via Digitalmars-d-announce
Despite Walter is Sorry, I meant to write, Now Walter is... Bye, bearophile

Re: DConf 2014 Day 2 Talk 7: Tiny, Ubiquitous Machines Powered by D by Michael D. Franklin

2014-07-15 Thread bearophile via Digitalmars-d-announce
language (or with small changes, but you can't tell before you have tried implementing them with the current language). So are those things a good addition to Phobos for your kind of programming? (additions to the language can be discussed later). Bye, bearophile

Re: DConf 2014 Day 2 Talk 7: Tiny, Ubiquitous Machines Powered by D by Michael D. Franklin

2014-07-15 Thread bearophile via Digitalmars-d-announce
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

Re: hap.random: a new random number library for D

2014-07-13 Thread bearophile via Digitalmars-d-announce
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

Re: hap.random: a new random number library for D

2014-07-13 Thread bearophile via Digitalmars-d-announce
destruction, you have to use RAII and perhaps RefCounted. You can allocate on the C heap manually, or on the stack, or you can allocate on the stack or C heap using one of Andrei's future allocators. Bye, bearophile

Re: core.checkedint added to druntime

2014-06-18 Thread bearophile via Digitalmars-d-announce
than using checkedints, but it also gives the correct results if some overflow has occurred :-) Bye, bearophile

Re: core.checkedint added to druntime

2014-06-18 Thread bearophile via Digitalmars-d-announce
type for the results. So I presume a future Phobos Safe math based on core.checkedint will need to check the ranges by itself, to allow checked assignments back to the same types: void main() { Safe!ubyte x = 100; Safe!ubyte y = 200; Safe!ubyte z = x + y; } Bye, bearophile

Re: DMD 2.066 Alpha

2014-06-13 Thread bearophile via Digitalmars-d-announce
is long, requires a cast and is not fully DRY (the 'x' name is repeated twice): import std.traits; void foo(in int x) { Unqual!(typeof(x)) y = x; y++; } !const is useful here (I assume !const to be the same as !immutable): void foo(in int x) { !const y = x; y++; } Bye, bearophile

Re: DConf 2014 Day 1 Talk 4: Inside the Regular Expressions in D by Dmitry Olshansky

2014-06-12 Thread bearophile via Digitalmars-d-announce
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

Re: K-Nearest Neighbor + pointger alignments

2014-06-10 Thread bearophile via Digitalmars-d-announce
) too could allow alignment annotations (perhaps ldc2 is already supporting this syntax): void main() { align(16) ubyte[60] ubs; } I discussed this topic another time in past: http://forum.dlang.org/thread/wldsugyllfpnzeksu...@forum.dlang.org Bye, bearophile

Re: hap.random: a new random number library for D

2014-06-10 Thread bearophile via Digitalmars-d-announce
, bearophile

Re: hap.random: a new random number library for D

2014-06-10 Thread bearophile via Digitalmars-d-announce
Kagamin: Pass it by reference, I see no reason why MT can't be pure. I meant strongly pure :-) Bye, bearophile

Re: hap.random: a new random number library for D

2014-06-10 Thread bearophile via Digitalmars-d-announce
the function... If that's right, then is this simple strongly pure random generator worth adding to std.random2? Bye, bearophile

Re: DConf 2014 Day 1 Talk 4: Inside the Regular Expressions in D by Dmitry Olshansky

2014-06-10 Thread bearophile via Digitalmars-d-announce
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

Re: hap.random: a new random number library for D

2014-06-10 Thread bearophile via Digitalmars-d-announce
nightmare? For the strongly pure random generator we should choose a generator with a small internal state (let's say less than 5 CPU words, they get passed by immutable value). Bye, bearophile

Re: hap.random: a new random number library for D

2014-06-10 Thread bearophile via Digitalmars-d-announce
the functions, the data transfer overhead is removed, and most of the performance loss is restored (but I don't know if non-templated Phobos functions get inlined). Bye, bearophile

Re: Interview at Lang.NEXT

2014-06-07 Thread bearophile via Digitalmars-d-announce
tests are less needed). Bye, bearophile

Re: Chuck Allison's talk is up

2014-06-07 Thread bearophile via Digitalmars-d-announce
to do. The Deque struct methods should be in camelCase (and possibly fulfill the range protocol). Bye, bearophile

Re: Interview at Lang.NEXT

2014-06-05 Thread bearophile via Digitalmars-d-announce
have an average 2.5 lines of testing code or every 1 line of D code, probably thanks to the stronger typing of D (and I think my D/Python code is less buggy than Phobos). Bye, bearophile

Re: Interview at Lang.NEXT

2014-06-04 Thread bearophile via Digitalmars-d-announce
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

Re: Interview at Lang.NEXT

2014-06-04 Thread bearophile via Digitalmars-d-announce
of strong static typing you see in Ada language. Bye, bearophile

Re: Interview at Lang.NEXT

2014-06-04 Thread bearophile via Digitalmars-d-announce
to explain such differences in coding stile to people that are used to static typing. Bye, bearophile

Re: Real time captioning of D presentations

2014-06-01 Thread bearophile via Digitalmars-d-announce
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

Re: Video of my LDC talk @ FOSDEM'14

2014-05-27 Thread bearophile via Digitalmars-d-announce
of energy (expressed in pJ). The SPARK 2014: Hybrid Verification using Proofs and Tests talk is nice, but I have seen it already elsewhere. Bye, bearophile

Re: Video of my LDC talk @ FOSDEM'14

2014-05-26 Thread bearophile via Digitalmars-d-announce
Walter Bright: Sigh, Windows can't open that file type. Install this: http://www.videolan.org/vlc/index.html Bye, bearophile

Re: DScanner is ready for use

2014-04-24 Thread bearophile via Digitalmars-d-announce
suggest DScanner to support the half-C-declarations, because D compilers digests them just fine and they are very common in D code you will find in the wild. A code analyzer has to accept the real world code people write, otherwise it's much less useful :-) Bye, bearophile

Re: DScanner is ready for use

2014-04-24 Thread bearophile via Digitalmars-d-announce
report bugs to, but I don't sent patched to. Bye, bearophile

Re: DScanner is ready for use

2014-04-22 Thread bearophile via Digitalmars-d-announce
it has found three usages of the implicit string concatenation, and two of them are (the same) bug! Andrei Alexandrescu was very wrong to think that implicit string concatenation is a speck of dust. I am not going to close down that enhancement request. Bye, bearophile

Re: Z80 Emulation Engine

2014-04-20 Thread bearophile via Digitalmars-d-announce
of comment. And I suggest to use 4 spaces as indent unit. static __gshared ubyte parity_tbl[256]; Better to use the D syntax: static __gshared ubyte[256] parity_tbl; Bye, bearophile

Re: Bugzilla maintenance tonight

2014-04-11 Thread bearophile
I see some duplicated titles, like for Issue 12557, and 12556: http://forum.dlang.org/group/digitalmars.D.bugs Bye, bearophile

Re: Programming language made in D!

2014-04-11 Thread bearophile
Harpo: http://www.mediafire.com/download/cjae0pnxmjpl7au/HarpoScriptR2.tar.gz The hs suffix is used by Haskell source code. Bye, bearophile

Re: Interesting rant about Scala's issues

2014-04-06 Thread bearophile
that have fallen in this trap? Perhaps Ada? Bye, bearophile

Re: Interesting rant about Scala's issues

2014-04-04 Thread bearophile
suspect that in my D code most cast usage does not need casts if you replace them with stronger casts as the enum class of C++11, but I have no proof of this. Bye, bearophile

Re: Interesting rant about Scala's issues

2014-04-04 Thread bearophile
with stronger enums (like the enum class of C++11), but I have no proof of this. Bye, bearophile

Re: Interesting rant about Scala's issues

2014-04-04 Thread bearophile
is implemented with enums, then it contains casts, but again casts in Phobos are less dangerous than casts in user code. Bye, bearophile

Re: Interesting rant about Scala's issues

2014-04-04 Thread bearophile
changes to do to D, and they need priority over additive enhancements. Bye, bearophile

Re: Interesting rant about Scala's issues

2014-04-04 Thread bearophile
array[Succ!(Index.A)] = t; auto i = Index.A; array[i.succ] = t; And with enum precondition in the succ() function you can do both cases with a single function: array[Index.A.succ] = t; auto i = Index.A; array[i.succ] = t; Bye, bearophile

Re: Interesting rant about Scala's issues

2014-04-03 Thread bearophile
. In a little higher level language using a 3-value enum (as in Haskell, more or less) is still sufficiently efficient. And Ada language shows that often you can have both precise types (strong typing) and almost C-like efficiency. Bye, bearophile

Re: Interesting rant about Scala's issues

2014-04-03 Thread bearophile
several corners of weak typing (like a partial confusion between pointers and dynamic arrays) that later have being (painfully and slowly) fixed (and this despite D Zen is supposed to prefer a strict design first, followed by some relaxations later). Bye, bearophile

Re: Interesting rant about Scala's issues

2014-04-02 Thread bearophile
Andrei Alexandrescu: A lot of them could apply to us as well. https://www.youtube.com/watch?v=TS1lpKBMkgg The slides: http://www.slideshare.net/extempore/keynote-pnw-scala-2013 Bye, bearophile

Re: Interesting rant about Scala's issues

2014-04-02 Thread bearophile
Andrei Alexandrescu: A lot of them could apply to us as well. https://www.youtube.com/watch?v=TS1lpKBMkgg I agree that D language/compiler could improve its integration with versioning systems (slide 31). How to design this? Bye, bearophile

Re: warp: a fast C and C++ preprocessor

2014-03-31 Thread bearophile
Walter Bright: Since then, I've fixed a handful of bugs, but that didn't amount to much time. Have you kept a list of such bugs/mistakes of yours for warp? It is an interesting list. Bye, bearophile

Re: 1st draft of complete class-based std.random successor

2014-03-24 Thread bearophile
. Bye, bearophile

Re: 1st draft of complete class-based std.random successor

2014-03-23 Thread bearophile
Joseph Rushton Wakeling: int r = data[uniform![)(0, data.length)]; D also accepts: immutable r = data[uniform![)(0, $)]; Bye, bearophile

Re: 1st draft of complete class-based std.random successor

2014-03-23 Thread bearophile
. Are the ddocs produced by std.random2 online somewhere? Bye, bearophile

Re: 1st draft of complete class-based std.random successor

2014-03-22 Thread bearophile
practice from other languages? I'd like a permutations() range in std.range or std.combinatorics. permutation() sounds a bit too much close, despite it is inside another module. Bye, bearophile

Re: 1st draft of complete class-based std.random successor

2014-03-22 Thread bearophile
(the boolean template argument is to specify if it has to copy the buffer or not): [1, 2, 3].permutations!false.writeln; Bye, bearophile

Re: 1st draft of complete class-based std.random successor

2014-03-22 Thread bearophile
random generator: https://d.puremagic.com/issues/show_bug.cgi?id=5249 I hope a gaussian (normal distribution) generator is planned or present. Bye, bearophile

Re: Article: Functional image processing in D

2014-03-21 Thread bearophile
to equivalent regular foreach-based processing code in C/D. Bye, bearophile

Re: Article: Functional image processing in D

2014-03-21 Thread bearophile
Andrei Alexandrescu: http://www.reddit.com/r/programming/comments/2101ti/functional_image_processing_in_d/ But I have suggested some improvements of the article :-( Bye, bearophile

Re: 1st draft of complete class-based std.random successor

2014-03-21 Thread bearophile
Joseph Rushton Wakeling: I think the following patch should fix that for you: https://github.com/WebDrake/std.random2/commit/fb5429de77b3c1f7fe3968fd0bd92209c9021f31 I've also made shuffle composable as per your request. Looks good? :-) Seems good. Onward! :-) Bye, bearophile

Re: 1st draft of complete class-based std.random successor

2014-03-20 Thread bearophile
but very fast function that generates uniforms in [0.0, 1.0]? :-) AFAIK, the allocation issue is only for ranges? Here I was not talking about allocations: https://d.puremagic.com/issues/show_bug.cgi?id=5240 Bye, bearophile

Re: 1st draft of complete class-based std.random successor

2014-03-19 Thread bearophile
, bearophile

Re: 1st draft of complete class-based std.random successor

2014-03-19 Thread bearophile
in the available allocation strategies. We will probably have the nice Andrei's allocators in Phobos, but not in a short time. So I suggest to not rely on them for std.random2. Bye, bearophile

Re: 1st draft of complete class-based std.random successor

2014-03-19 Thread bearophile
addressed in the current (or planned) std.random2. Another random one that was just commented by Infiltrator: https://d.puremagic.com/issues/show_bug.cgi?id=5901 Bye, bearophile

Re: My D book is now officially coming soon

2014-03-03 Thread bearophile
among the printed books about D there's Andrei book, the book about Tango, and your one. Plus there's Ali Çehreli online book, and probably more. Compared to other new languages like Scala there are far less books about D, but the situation is improving :-) Bye, bearophile

Re: Facebook open sources flint, a C++ linter written in D

2014-02-25 Thread bearophile
. Clang shows that you can add lot of lint-like tests to the compiler. I'd like some more tests in the D compiler. Bye, bearophile

Re: Facebook open sources flint, a C++ linter written in D

2014-02-25 Thread bearophile
it. Bye, bearophile

Re: Facebook open sources flint, a C++ linter written in D

2014-02-25 Thread bearophile
Dicebot: It should be other way around - remove all such arguable warnings from compiler to dedicated lint tool and never add any single one to compiler. What are the advantages and disadvantages of doing as you say? Bye, bearophile

Re: Facebook open sources flint, a C++ linter written in D

2014-02-25 Thread bearophile
Paulo Pinto: End result being a portable macro assembler, as safe as, writing in pure assembly. I'd even like warnings active on default in D, plus a compiler switch to disable them. Lot of people in D.learn don't even activate warnings. Bye, bearophile

Re: Facebook open sources flint, a C++ linter written in D

2014-02-25 Thread bearophile
Dicebot: Those warning that _can_ be activated by default, should be just turned into errors. Same crap as with C. Programming is not a black/white thing (http://en.wiktionary.org/wiki/Manichaean#Adjective ) :-) Bye, bearophile

Re: Facebook open sources flint, a C++ linter written in D

2014-02-25 Thread bearophile
Andrei Alexandrescu: Ironically that's for the obsoleted C++ program. The D program is trivial to build. Oh, I didn't know/understand that. Sorry for the noise. Bye, bearophile

Re: Facebook open sources flint, a C++ linter written in D

2014-02-24 Thread bearophile
(MyArr x) {} void main() {} Bye, bearophile

Re: COMPO - 2.064

2014-01-29 Thread bearophile
, and making them available (with DUB or on GitHub). This allows other projects to re-use those modules and reduce their size. Bye, bearophile

  1   2   3   4   5   6   >