My favorite example is glibc implementation of `putenv` function:
it first finds the '=' character and takes a temporary slice of
the variable name and then employs a tortured null terminated
string cope trying to allocate a string with alloca or malloc,
then copies the slice there and passes t
On Thursday, 21 July 2022 at 10:18:22 UTC, Christian Köstlin
wrote:
On a sidenote I am having problem downloading any 2.100.1 dmd
version from dlang.org.
A great moment, ldc is released before dmd :D
On Wednesday, 22 June 2022 at 20:48:13 UTC, Steven Schveighoffer
wrote:
Sometimes algorithms require manipulation of structure, such as
sorting arrays, or using linked lists, and sometimes it's nice
to be able to point at things on the stack, temporarily. This
is one of the things I was looking
On Friday, 5 November 2021 at 11:57:40 UTC, Mike Parker wrote:
`-preview=in` will not be killed. It needs to be changed such
that:
* `in` always means `const scope ref`; the compiler will not
attempt to pass by value based on platform-specific heuristics.
What about C functions? The ABI chan
On Tuesday, 24 August 2021 at 02:19:58 UTC, rushsteve1 wrote:
https://github.com/rushsteve1/trash-d
You marked all functions inline?
On Wednesday, 2 June 2021 at 14:02:29 UTC, Mike Parker wrote:
On Wednesday, 2 June 2021 at 11:10:36 UTC, Dukc wrote:
Phobos v2 is an official plan? That was news for me! Any
chance to get a glimpse of what's planned for it?
The overall goal is that it doesn't replace the current Phobos,
but
While we're at it, can I has SOCK_CLOEXEC and SOCK_NONBLOCK flags?
On Thursday, 4 March 2021 at 13:42:47 UTC, Imperatorn wrote:
https://filebin.net/19gupoeedfdjx5tx
One GIF is the behaviour in C# I would like to have in D as
well with static if, and the other is displaying typeid on
hover.
The second is a debug session. Visual Studio doesn't show type
info
On Tuesday, 13 October 2020 at 10:30:41 UTC, jmh530 wrote:
The difference is that MIT says you can use it without
restriction, including a few things, while Boost says you can
do some things. I only meant that MIT license was more
permissive in that if there are other things you want to do
wit
On Monday, 26 October 2020 at 07:14:55 UTC, Patrick Schluter
wrote:
You underestimate how spoiled windows developer are. Even these
simple step are completely out of character for most software
on the platform. 20 years ago it wasn't a problem, now on
Windows 10 it's a whole other story. How ma
On Tuesday, 20 October 2020 at 20:09:58 UTC, aberba wrote:
Supposing I'm new to D, I have previous experience with
LLVM-based compilers so I prefer to use LDC. How am I supposed
to know what to do? Where is the information on how to get it
on my system through visualD installer?
The LDC exper
Just found an old bug. Atomics modify immutable data:
---
import ldc.intrinsics;
void f(immutable int* a)
{
llvm_atomic_rmw_add(a,1);
}
---
On Friday, 13 March 2020 at 19:00:01 UTC, Mike Parker wrote:
Blog:
https://dlang.org/blog/2020/03/13/tracing-d-applications/
The term "production" there seemingly means "the developer that
wrote the program is also an administrator of all production
systems" :)
On Monday, 15 July 2019 at 19:20:27 UTC, Johannes Pfau wrote:
I wonder how you can advertise this as a good idea: You have to
manually keep declarations in sync, you have to be very careful
to get the attributes right, module constructor evaluation
order guarantees don't hold, no mangling (no t
From an earlier post:
In particular, nginx can do a scgi proxy with a unix socket and
this may be easier to use with your firewall and filesystem
permissions.
Oh, I tried it. First nginx didn't find the socket. Guess
why? Because nginx runs in a virtualized filesystem. Relocated
the sock
On Friday, 28 June 2019 at 07:22:56 UTC, Olivier FAURE wrote:
I'm particularly interested in flow analysis features, and I
think I have something to contribute, but I don't want to spend
a large amount of effort debating and suggesting alternatives
if I expect to be stonewalled.
It seems gene
On Thursday, 16 May 2019 at 05:22:42 UTC, Seb wrote:
Yes that sounds like the culprit. Btw as mentioned on DConf,
the dip1000 switch contains a few other breaking changes which
will make it even harder to adopt too.
Well, it's an inherent property of DIP1000 to not compile code
that previousl
On Wednesday, 15 May 2019 at 07:56:48 UTC, Walter Bright wrote:
Maybe the clock is not synchronized somewhere.
It's off by one hour.
On Sunday, 12 May 2019 at 06:27:21 UTC, Nick Sabalausky
(Abscissa) wrote:
All this effort strongly implies that there's no such thing as
a satisfactory bool type *in languages which conflate booleans
with integers*
FWIW I write C# for food and to me D bool is better than C# bool.
Didn't watch
On Tuesday, 26 February 2019 at 05:38:01 UTC, Manu wrote:
I'm talking about this DIP. Allowing a mutable copy argument
feels super weird.
The problem was out of place mutation, which can't happen with
copy constructor, because initialization from rvalue is a move,
so the copy constructor won'
On Friday, 1 February 2019 at 07:43:23 UTC, Petar Kirov
[ZombineDev] wrote:
So, assuming you have the MSVC C++ toolchain installed, just
build with dub by specifying either the --arch=x86_mscoff or
--arch=x86_64 flags.
But no one should ever need to modify their dmd installation,
in order to us
On Tuesday, 29 January 2019 at 11:52:40 UTC, Andrei Alexandrescu
wrote:
Where should the temporary go?
Doesn't D already specify allocation and lifetime of temporaries?
AIU the DIP doesn't invent the notion of a temporary.
On Friday, 25 January 2019 at 21:16:59 UTC, Ron Tarrant wrote:
My approach is to lay out a firm foundation for both imperative
and object-oriented paradigms, then build from there, taking
things one step at a time.
By OOP you mean user controls? Hmm... I'd say, user control is an
advanced top
On Monday, 17 December 2018 at 11:04:13 UTC, Atila Neves wrote:
Why @safe? Can't you just write "@safe:" on top and switch to
@system/@trusted as needed?
Not quite. It doesn't work the way most people expect for
member functions and causes problems for templates.
Don't templates infer attrib
On Tuesday, 18 December 2018 at 10:19:14 UTC, Russel Winder wrote:
Clojure is but you have to work hard for that, the initial
language is effectively pure.
https://ideone.com/y8KWja clearly it isn't, its site only claims
that most code happens to be pure, but it looks like it's not
checked in
On Tuesday, 18 December 2018 at 08:17:28 UTC, Russel Winder wrote:
Rust I feel has a pivotal role in all this. By emphasising the
ML view on mixed declarative and imperative programming, it has
found an interesting middle ground that seems to work very
well. Many of the C programmers who though
On Tuesday, 11 December 2018 at 12:57:03 UTC, Atila Neves wrote:
@property is useful for setters. Now, IMHO setters are a code
stink anyway but sometimes they're the way to go. I have no
idea what it's supposed to do for getters (nor am I interested
in learning or retaining that information) an
That's strange, I thought polysemous literals prefer default
type, not tightest type.
---
auto b=1;
static assert(is(typeof(b)==bool));
---
Error: static assert: is(int == bool) is false
On Saturday, 3 November 2018 at 16:33:36 UTC, kinke wrote:
I figured it'd be for a lot of Windows users. Why not
explicitly express your gratitude with a little 'thank you'
then? After all, that little bullet point in the release notes
easily took some 40 hours of my spare time, and some
appre
On Friday, 26 October 2018 at 02:38:08 UTC, Joakim wrote:
In the US maybe
Well yeah, online commerce is USA-centric because anything else
doesn't generate revenue.
On Saturday, 18 August 2018 at 16:51:18 UTC, Martin Nowak wrote:
Beta is 2 weeks sounds fine then. So please download and
install the beta, sth. you should always do ;).
The download should probably happen through Edge too: it runs
SmartScreen on the downloaded file.
OT: more news:
https://
On Saturday, 18 August 2018 at 16:51:18 UTC, Martin Nowak wrote:
I understand that common Windows users have a very different
thread
model than linux developers, hence the crappy Anti-Virus
rootkits.
I'd expect the Windows dev audience we're targeting with D to
be a bit
more capable than commo
On Friday, 13 July 2018 at 19:30:07 UTC, RhyS wrote:
If there is a language out there that gaps that C/Java/dynamic
fast and easy feel, and offers the ability to compile down with
ease. I have not seen it.
There's no silver bullet, you can choose from what exists or
create your own. Recently
On Friday, 6 July 2018 at 15:19:33 UTC, Ecstatic Coder wrote:
Actually you answer was right even if the point count was not
stored as an integer ;)
For C++, the answer is : never.
Two small memory blocks will have to be allocated from the
memory pool, which is not smart, obviously, but apart
What I had with actually modern C:
1) narrowing conversions
2) not only arrays decay to pointers, C happily allows the
opposite too, eww
3) looks like C code loves to have function arguments named `in`
and `out`
Also difficulties with transpiling to C don't look that big:
errno is the first g
On Sunday, 10 June 2018 at 00:29:04 UTC, bauss wrote:
And then Microsoft acquires both and everyone moves to
Bitbucket.
Endless cycle :)
Until people figure out decentralization. AIU scuttlebutt server
provides only discovery service, these proved to be able to run
at little cost. And as to
On Saturday, 9 June 2018 at 07:06:23 UTC, Nick Sabalausky
(Abscissa) wrote:
Whether web API or web scraping: Either way, you still have to
submit an HTTP request, parse the results according to the
format the server has chosen to spit out, and possibly follow
up with additional HTTP requests.
On Monday, 4 June 2018 at 20:00:45 UTC, Maksim Fomin wrote:
Just as rough estimate: to support $7.5 bl valuation Microsoft
must turn -$30 ml. net loss company into business generating
around $750 ml. for many years. There is no way to get these
money from the market. Alternatively, the project
On Monday, 4 June 2018 at 05:50:26 UTC, Anton Fediushin wrote:
I can think of hundreds of things what can go wrong including:
forcing users to use Microsoft accounts
That didn't happen to skype yet.
MS recently tries to mend its reputation, though the past will
linger for a while.
On Thursday, 10 May 2018 at 23:22:02 UTC, Steven Schveighoffer
wrote:
However, I am struggling to find a use case for this that
showcases why you would want to use it. While it does work, and
works beautifully, it doesn't show any measurable difference
vs. the array allocated buffer that copies
On Friday, 20 April 2018 at 08:45:45 UTC, Dejan Lekic wrote:
Jonathan, are the interfaces in the dom module generated from
the IDL code from W3C?
It's not W3C DOM :)
On Wednesday, 11 April 2018 at 20:45:15 UTC, Dmitry Olshansky
wrote:
* Templates kind of muddy the waters being conpiled with the
flags of caller (another reason why they are a mess). Meaning
they will work with contracts if caller choses to have debug
build.
Template can call user code, but
On Wednesday, 11 April 2018 at 09:45:07 UTC, Jonathan M Davis
wrote:
It's one thing for someone who is familiar with D to weigh the
options and decide that being tied to ldc is okay. It's quite
another to tell someone who isn't familiar with D that in order
to use D, they have to use a feature
On Wednesday, 11 April 2018 at 12:22:56 UTC, bachmeier wrote:
It also wouldn't work with GDC. Given that GDC has been added
to GCC, it would be a bad idea to tell people they need to use
LDC to work with C code.
Currently porting a project to linux, stuff is so severely
outdated, pretty much
On Monday, 9 April 2018 at 19:36:23 UTC, Atila Neves wrote:
If you add to all that "No, really, it's ok, there's this
project that forked one of the compilers. No, it's not the
reference compiler. There's just this bit of non-standard
syntax to learn that's neither C nor D", then the chances of
On Saturday, 31 March 2018 at 00:25:47 UTC, Seb wrote:
AFAICT Rust now has introduced the exactly same feature. It's
quite interesting to see that there was no outcry by the
community and it was universally liked:
https://blog.rust-lang.org/2018/03/29/Rust-1.25.html
https://github.com/rust-lan
Did they figure out how to pass data between threads?
On Friday, 16 March 2018 at 21:38:30 UTC, rumbu wrote:
Do you know anything else in the .net library than LINQ where
extension methods (somehow equivalent to UFCS) are abused? I
thought that something happened in the .net world while I was
asleep, that's why I just searched my local copy of .ne
On Friday, 16 March 2018 at 18:35:14 UTC, Tony wrote:
I thought C# was like Java and does not allow free procedures.
Can you give an example of C# procedural-style IO?
All methods of Console class.
On Thursday, 15 March 2018 at 16:03:14 UTC, rumbu wrote:
Are you sure that you are talking about phobos and not tango? :)
I'm eager to find how I'm uninformed.
Tango doesn't use UFCS, while phobos and .net framework are big
on extension methods. Also tango uses object oriented console IO,
whi
On Monday, 12 March 2018 at 03:31:36 UTC, Laeeth Isharc wrote:
C# slices look great.
Dunno, when I wanted a slice in C#, I wrote a prettier one. C#
could get stuff done 20 years ago already, ugly slices and native
compilation won't add anything to it.
If Phobos looks like a mess to C# progr
On Sunday, 11 March 2018 at 04:06:13 UTC, Nick Sabalausky
(Abscissa) wrote:
First of all, betterC is about far more than interfacing with
C. In fact, interop with C isn't really what betterC is about
at all - that's a separate aspect of the language. (And those
C/C++ users who still haven't com
On Monday, 5 March 2018 at 20:52:10 UTC, Russel Winder wrote:
I do not see your reasoning here. Has the core D computational
model changed? I think not.
Major number per semver increases when interface changes, D does
it pretty often, it is the fastest moving language I know.
Does D issue b
On Sunday, 4 March 2018 at 17:26:50 UTC, bauss wrote:
It's also very strict and probably have of the posts within
Learn here wouldn't be allowed there.
It's the most hilarious aspect. Apparently questions about design
don't belong there. As if the moderators don't even know about
the concept.
On Friday, 2 March 2018 at 12:01:33 UTC, Russel Winder wrote:
So having D2.999 is fine per se, but advertises a lack of
change and a lack of ambition since the language name is D not
D2.
D just doesn't follow semver. If it did, we would have D79 now,
nothing else even comes close to this. And
But seriously, Stack overflow is a reputation-based system, it
very hostile from the very start, when you don't have enough
reputation for pretty much everything, and SO vehemently nags you
about this on every possible occasion, even baiting you to use
functionality only to later tell that you
auto result = foo(), bar();
Doesn't look like it works.
---
int f(int a){ return a; }
int main()
{
int a=f(0),f(1); //doesn't compile
return 0;
}
---
int f(int a){ return a; }
int main()
{
int a;
a=f(0),f(1);
assert(a==1); //fails
return 0;
}
---
https://run.dlang.io/is/I
https://github.com/dlang/druntime/pull/1282
github shows me just two changes in makefiles and nothing else,
need to find where the code comes from.
On Friday, 23 February 2018 at 01:02:59 UTC, Martin Nowak wrote:
Also https://en.wikipedia.org/wiki/Law_of_triviality, because
this is certainly easier to grasp than
https://github.com/dlang/druntime/pull/1282
(https://forum.dlang.org/post/mjsma6$196h$1...@digitalmars.com)
If nobody opposes,
On Friday, 23 February 2018 at 00:05:59 UTC, Martin Nowak wrote:
The main use-case for craming multiple imports into a line is
not libraries but scripting, examples, and maybe unit tests.
Those are cases when selective imports shouldn't be used.
experimental.scripting was introduced to reduce
auto result = foo(), bar();
Does this compile? In variable declaration statement comma
already has meaning as separator of declarators. Does it apply to
enums too? This is difficult to parse.
On Tuesday, 20 February 2018 at 22:54:43 UTC, H. S. Teoh wrote:
Yeah, personally I'd avoid writing it that way too.
There's no other way to use this feature though.
On Tuesday, 20 February 2018 at 08:43:50 UTC, Martin Nowak wrote:
If you prefer java-like 50 lines import manifests, then by all
means keep using those.
Imports can be written on one line.
import std.stdio; import std.range;
It only needs one more word.
On Monday, 19 February 2018 at 18:50:47 UTC, Dukc wrote:
Huh? Did I understand right? Just add an empty object.d into
your project and --BetterC is now basically needless, plus the
executable is most likely even smaller?
And more functions to std.range, my favorite module, yes!
FWIW I used l
On Tuesday, 13 February 2018 at 22:29:27 UTC, H. S. Teoh wrote:
- provide some way of hooking into non-default entities so that
DTD-defined entities can be expanded by the DTD
implementation.
The parser now returns raw text, entity replacement can be done
by DTD processor without any modifi
On Tuesday, 13 February 2018 at 02:53:21 UTC, Nick Sabalausky
(Abscissa) wrote:
On 02/12/2018 11:15 AM, rikki cattermole wrote:
dxml 7.5k LOC
std.xml 3k LOC
dxml would make the situation a lot worse.
4.5k LOC == "a lot worse"?
Uuuuhhh...WAT?
And it's like 2k LOC of code and 5.5k LOC of te
On Monday, 12 February 2018 at 16:50:16 UTC, Jonathan M Davis
wrote:
The core problem is that entity references get replaced with
more XML that needs to be parsed. So, they can't simply be
passed on for post-processing. As I understand it, they have to
be replaced while the parsing is going on.
On Tuesday, 30 January 2018 at 19:57:39 UTC, aberba wrote:
now it seem abandoned after such an effort.
Can you confirm it for Ubuntu 17?
On Sunday, 10 December 2017 at 18:11:46 UTC, Suliman wrote:
Is it's possible to produce x64 binaries on Windows x64 without
installing Visual Studio? DMD do not have linker for x64.
Beside linker you will need C startup code. Where do you plan to
get it?
On Sunday, 1 October 2017 at 14:38:04 UTC, Ilya Yaroshenko wrote:
[1]
https://github.com/tamediadigital/asdf/tree/master/benchmarks/sajson
AFAIK, ldc translates dmd's -O option to llvm's -O3.
On Monday, 28 August 2017 at 22:45:01 UTC, Parke wrote:
When I write "hello world" in C, the executable is 8,519 bytes.
When I write "hello world" in D, the executable is 100 times
larger: 865,179 bytes.
Interestingly, "hello world" in C, compiled statically, yields
908,608 bytes. And "hell
On Wednesday, 30 August 2017 at 02:19:21 UTC, Michael V. Franklin
wrote:
As you can see it is not a polished experience and gets much
worse when you start employing more features of D. This could
be improved, and in fact, with GDC you need even less useless
boilerplate in object.d and may end
On Wednesday, 30 August 2017 at 00:29:19 UTC, Parke wrote:
But my original question was about what you (Kagamin) called
"intermediate D". I was trying to understand what
"intermediate D"
is, and whether or not I could use "intermediate D" (whatever
it is)
to
On Monday, 28 August 2017 at 22:45:01 UTC, Parke wrote:
When I write "hello world" in C, the executable is 8,519 bytes.
When I write "hello world" in D, the executable is 100 times
larger: 865,179 bytes.
You mean the examples from the blog post
https://dlang.org/blog/2017/08/23/d-as-a-better
On Friday, 25 August 2017 at 18:08:06 UTC, Parke wrote:
Is there any documentation on how to access and use the minimal
runtime?
Runtime implements language features like boundschecking, it's
not used explicitly in the code.
On Thursday, 24 August 2017 at 19:09:58 UTC, Parke wrote:
What is "intermediate D"?
D with minimal runtime.
On Wednesday, 23 August 2017 at 17:43:27 UTC, Steven
Schveighoffer wrote:
I thought "closure" means allocating the stack onto the heap so
you can return the delegate with its context intact.
I understood closure as capture of variables from external
context. They are divided into upward closur
On Wednesday, 23 August 2017 at 22:45:27 UTC, sarn wrote:
I haven't tried the latest iteration of betterC yet, but the
longstanding problem is that the compiler generates TypeInfo
instances for structs
LDC doesn't generate TypeInfo for structs until it's required for
some features like array
On Wednesday, 23 August 2017 at 14:00:34 UTC, Walter Bright wrote:
One of the reasons people use C is to get that small footprint.
This has been a large barrier to C programs making use of D.
Not a better C, but intermediate D has small footprint for me too.
7.5kb totext.exe (encodes stdin to b
On Wednesday, 12 July 2017 at 14:27:41 UTC, István wrote:
These are still centralized services which any time might
decide to change to censorship or forced to shut down, then you
lose access to your content the same way.
I saw 4 such cases and it was always easier to setup a replica.
And tho
On Wednesday, 12 July 2017 at 11:11:20 UTC, Steven Schveighoffer
wrote:
Have you heard of https://gab.ai ? They are doing something
similar (in terms of providing an uncensored platform).
Another one is dreamwidth.org, it started as a reaction to
tighter control too and has a permissive conten
On Wednesday, 12 July 2017 at 04:40:16 UTC, Vitor Rozsas wrote:
The server should be somewhat easy, afterall... it should
receive posts that are signed by the user, and store the post
(with signature) if the signature corresponds to post's message
and public key of the user.
From what I know
On Wednesday, 12 April 2017 at 13:32:36 UTC, Stanislav Blinov
wrote:
Syntax is not the core of the issue, it's not about just
marking a destructor as shared. Making RefCounted itself shared
would require implementing some form of synchronization of all
the 'dereference' operations, including as
Also
https://github.com/ldc-developers/druntime/blob/ldc/src/object.d#L48 may shed some light, but it sounds strange.
dmd -m64 -c amper.d
should work on 32-bit system too and compile to 64-bit code.
In case strings hash to the same value, the linkers (ld and ms)
have an option to detect discrepancy in content.
On Sunday, 19 February 2017 at 11:41:44 UTC, Eugene Wissner wrote:
realloc() can move memory and if an object of type A has
references to other objects in the array, the objects will be
corrupted. "A" should be a POD-type. Otherwise you have to
allocate new memory, initialize it, copy the objec
On Wednesday, 8 February 2017 at 15:18:34 UTC, Sönke Ludwig wrote:
The problem is that there are two affected call stacks - the
@system API function that registers the @system callback,
wrapping/casting it as @trusted, and the event handler that
later on actually calls the callback. The latter
On Friday, 3 February 2017 at 13:21:18 UTC, Sönke Ludwig wrote:
Keeping the system overloads would break the safety guarantees
at a relatively deep level and would render the whole effort
rather useless (this is the case for non-scope callbacks only,
so if you stumble over a deprecated function
On Friday, 27 January 2017 at 11:12:22 UTC, Dicebot wrote:
And also stuff like https://github.com/dlang/druntime/pull/1740
Why it would break code if `in` meant `scope`?
As to contracts without body we have
https://issues.dlang.org/show_bug.cgi?id=4720
On Wednesday, 23 November 2016 at 20:24:13 UTC, Timon Gehr wrote:
Technically, there is an ambiguity (technically, ambiguity
means that there are multiple grammar derivations resulting in
the same sentence).
Pragmatically, the greedy parse-the-body-if-possible-approach
will work.
I see no amb
Must be
T!( lots and lots of stuff ) f( lots and lots of
stuff )( lots and lots of stuff ) if ( lots
and lots of stuff )
int div(int a, int b)
in { assert(b != 0); }
do
{
return a / b;
}
On Tuesday, 22 November 2016 at 22:37:03 UTC, Timon Gehr wrote:
The more important point is that there is no precedent where
{...}{...} are two components of the same entity, it looks ugly
even with the space-wasting convention where '{' is put on its
own line. Not all contracts are one-liners
On Thursday, 17 November 2016 at 11:37:09 UTC, Dicebot wrote:
https://github.com/dlang/DIPs/blob/master/DIPs/DIP1002.md#review
We do exception tests like this: http://dpaste.com/0EAZQE4
On Wednesday, 25 May 2016 at 16:47:30 UTC, Nick Sabalausky wrote:
Drives me nuts when people count "Always uses GTK on Linux" as
"Native UI". It's like those programs that do everything
completely Ubuntu-centric whenever possible and then advertise
"Linux Support". I *really* wish GTK would jus
On Thursday, 10 November 2016 at 13:58:56 UTC, Steven
Schveighoffer wrote:
Only possibility is just to ignore ALL cycles, and print them
if any are detected.
Run the new detector and if it fails, run the old one, if it
succeeds, print a message.
On Wednesday, 26 October 2016 at 15:02:28 UTC, Stefam Koch wrote:
bLength = cast(uint)a.length;
Reads past the end of b if b is shorter than a.
On Monday, 22 August 2016 at 06:44:11 UTC, Jacob Carlborg wrote:
It would be nice to have the whole picture now, before
implementing DIP1000.
It can be reviewed after the spec is inferred from
implementation. But yes, it can be unclear how the implementation
can affect the review process.
Do
1 - 100 of 402 matches
Mail list logo