On Monday, 20 May 2024 at 11:47:25 UTC, Ferhat Kurtulmuş wrote:
I've been working on DCV for some years. Recently, DCV has
started to be used by some projects, such as etichetta[1]. Even
though it's still far from perfect, I think DCV deserves a new
version. Existing unit tests pass. New ones
Hello! I’m excited to announce the release of a new application
called “Etichetta”.
“Etichetta” is a straightforward program that allows you to label
images for AI training. I’ve always found existing programs to be
quite cumbersome, so I created one myself. Among its various
features is the
On Monday, 15 April 2024 at 01:04:40 UTC, aberba wrote:
Link to code sample?
https://github.com/trikko/serverino/tree/master/examples/06_websocket_noise_stream
Andrea
Hey Serverino enthusiasts!
Get ready to elevate your server game with the latest Serverino
0.7.0 release! ✨
What’s new in this update?
WebSockets are here! Now you can enjoy real-time bi-directional
communication.
Some example I've posted on twitter:
On Monday, 8 April 2024 at 01:38:20 UTC, Mike Shah wrote:
I'll be talking more about D (and modern C++) at the ACCU 2024
conference in Bristol (Abstract below -- talk is on April 19,
2024).
+1
On Tuesday, 26 March 2024 at 07:13:24 UTC, confuzzled wrote:
Hello all,
I have two scripts. I copied the first directly from the alpaca
website and massaged it with etc.c.curl until it compiled in D.
The result is that it creates the order and returns the result
to stdout. In the second
On Thursday, 21 March 2024 at 03:19:16 UTC, Salih Dincer wrote:
On Thursday, 21 March 2024 at 02:14:36 UTC, WebFreak001 wrote:
On Saturday, 2 March 2024 at 17:40:29 UTC, Iain Buclaw wrote:
.. since they drastically make things easier (hexstrings) or
even possible in the first place (magic
On Monday, 18 March 2024 at 11:11:03 UTC, Nick Treleaven wrote:
On Sunday, 10 March 2024 at 16:07:23 UTC, Mike Parker wrote:
The countdown is on! I'll kick off the DConf Online Livestream
at 14:55 UTC on March 16. You can find it here:
https://www.youtube.com/live/8GV_TuYk3lk
And if you
On Tuesday, 12 March 2024 at 19:12:03 UTC, H. S. Teoh wrote:
I don't know how CS programs are carried out these days, but
back when I was in university, the choice of language is
largely irrelevant, because the whole point of a programming
course isn't to teach you a specific language, but to
Thank you! Inline replies >>>
On Sunday, 10 March 2024 at 21:04:05 UTC, aberba wrote:
1) I'm not sure I like concat (~=)
style used on `Output output` and how it can determine the
order routes are invoked. I would expect that to be explicitly
defined by Dev using a catch-all route
Performance has been boosted once again, and those pesky little
bugs? Squashed! Plus, there are fresh examples to try out and
even a sleek new logo to admire!
Ready to dive in? Just spin up a new project using the provided
template:
```
dub init -t serverino my_wonderful_project
cd
On Wednesday, 6 March 2024 at 07:47:04 UTC, Adam Wilson wrote:
SecureD 3.0 has been released. This version was set in motion
by a Cedric Picard, a D community member with Cryptography
experience, reaching out and suggesting a number of
improvements to the Symmetric and KDF API's. This resulted
On Thursday, 2 November 2023 at 00:57:23 UTC, Iain Buclaw wrote:
Glad to announce the first beta for the 2.106.0 release, ♥ to
the 33 contributors.
http://dlang.org/download.html#dmd_beta
http://dlang.org/changelog/2.106.0.html
As usual please report any bugs at
https://issues.dlang.org
On Monday, 23 October 2023 at 19:02:46 UTC, Sönke Ludwig wrote:
I've written up an article that showcases how we use D in
production and how that benefits us in unique ways.
Nice article. I agree with you about the pros and cons of
language!
Andrea
On Wednesday, 11 October 2023 at 14:30:50 UTC, kinke wrote:
On Saturday, 7 October 2023 at 22:40:58 UTC, Andrea Fontana
wrote:
Question:
- Is there a way to compile curl statically with ldc for
windows? If I try (using -static), it throws a runtime error.
Yes; IIRC, you need to link
On Sunday, 8 October 2023 at 07:44:04 UTC, Andrea Fontana wrote:
```
int a,b,c;
"1,2,3"
.splitter(',')
.zip(only(, , ))
.each!(x => *x[1] = x[0].to!int);
writeln(a, b, c);
```
or:
```
int a,b,c;
only(, , )
.zip("1,2,3".splitter(','))
On Saturday, 7 October 2023 at 07:31:45 UTC, mw wrote:
https://stackoverflow.com/questions/47046850/is-there-any-way-to-assign-multiple-variable-at-once-with-dlang
How to do this Python code in D:
```
s = "1 2 3"
A,B,C = map(int, s.split(" "))
A,B,C
(1, 2, 3)
```
Is there a better way
On Wednesday, 4 October 2023 at 23:02:39 UTC, Andrea Fontana
wrote:
I've just released a simple tool for sharing files (similar to
WeTransfer) directly from the terminal.
News:
- Added support for encryption (if gpg is available)
- Added binaries built by github
- Improved UI
Question:
- Is
I've just released a simple tool for sharing files (similar to
WeTransfer) directly from the terminal.
Usage is incredibly straightforward:
Run ```dub build tshare``` to build the tool.
Use ```tshare /your/file``` to share your file, which will
generate a public link.
For additional
On Saturday, 11 February 2023 at 13:47:54 UTC, kinke wrote:
Glad to announce LDC 1.31.0. Major changes:
* Based on D 2.101.2.
* ImportC: The C preprocessor isn't invoked yet.
* mac/iOS arm64: Linking with `-g` is working again without
unaligned pointer warnings/errors.
* *Preliminary*
On Wednesday, 22 February 2023 at 15:00:56 UTC, WebFreak001 wrote:
I just first time used importC in a prototype project I just
worked on. I used it to just import `libevdev.h` on linux to
register a custom input device / make a simple userspace input
driver.
A suggestion: try tcc as
On Wednesday, 15 February 2023 at 17:32:33 UTC, Ferhat Kurtulmuş
wrote:
I heard you are not having fun enough with d today.
Do you know you can do things like this with dlang now? After
some fiddling with it, my last commits made this possible.
how it looks like:
On Friday, 27 January 2023 at 20:35:01 UTC, kinke wrote:
Glad to announce the first beta for LDC 1.31. Major changes:
* Based on D 2.101.2.
* ImportC: The C preprocessor isn't invoked yet.
* mac/iOS arm64: Linking with `-g` is working again without
unaligned pointer warnings/errors.
*
On Wednesday, 1 February 2023 at 20:01:13 UTC, Andrea Fontana
wrote:
do you have any plans to do some benchmarks or if you did,
please share the place to check it?
Here some results from may, but serverino went over a major arch
rework after that, so I'm not sure they are still valid.
On Wednesday, 1 February 2023 at 20:01:13 UTC, Andrea Fontana
wrote:
do you have any plans to do some benchmarks or if you did,
please share the place to check it?
Here some results from may, but serverino went over a major arch
rework after that, so I'm not sure they are still valid.
On Wednesday, 1 February 2023 at 19:49:40 UTC, psyscout wrote:
On Wednesday, 1 February 2023 at 17:36:07 UTC, Andrea Fontana
wrote:
Hi! I've just release a new version of serverino, my pure-D...
First of all, thanks for your effort!
For the second, I have a couple of simple web services
Hi! I've just release a new version of serverino, my pure-D
webserver without 3rd party dependencies, super-fast to compile.
This version is featuring a basic & easy way to add routing using
UDAs.
A big thank you to Ferhat Kurtulmuş that create a pull request
for this :)
Just create a
On Friday, 28 October 2022 at 09:25:11 UTC, Imperatorn wrote:
On Friday, 28 October 2022 at 07:42:26 UTC, Andrea Fontana
wrote:
On Thursday, 27 October 2022 at 19:46:47 UTC, Imperatorn wrote:
Nice, sometimes you just need some quick and dirty http
That's exactly one of the use cases :)
I'm
On Thursday, 27 October 2022 at 19:46:47 UTC, Imperatorn wrote:
Nice, sometimes you just need some quick and dirty http
That's exactly one of the use cases :)
On Saturday, 22 October 2022 at 22:14:26 UTC, Adam D Ruppe wrote:
On Saturday, 22 October 2022 at 21:58:54 UTC, Enjoys Math wrote:
Nice! So it's D's answer to Python's BeautifulSoup.
D has had a html tag soup parser since 2009 in my dom.d.
The parserino might be more html5 compliant
On Thursday, 20 October 2022 at 13:24:27 UTC, psyscout wrote:
Wow, it uses builtin browser. Cool! I have a coming project,
will try it out. Thank You for your effort!
You're welcome :)
Hello!
Finally I released the public version of parserino, a html5
parser for linux, macos and windows.
Link:
https://github.com/trikko/parserino
Hello there.
I've just released a new version of serverino, a simple and
ready-to-go http server with zero external dependencies (pure D!).
I changed a lot of things under the hood from the last version
and tests are welcome.
It works on linux, macos and windows. I use only linux, so I
On Tuesday, 31 May 2022 at 09:52:10 UTC, realhet wrote:
On Tuesday, 31 May 2022 at 09:35:30 UTC, Andrea Fontana wrote:
On Tuesday, 31 May 2022 at 08:51:45 UTC, realhet wrote:
Check if that string is init.
assert("", "cool");
assert("ehh", "cool");
assert(string.init, "Not cool");
I feel some
On Tuesday, 31 May 2022 at 08:51:45 UTC, realhet wrote:
Hi,
In my framework I just found a dozen of compile time error
handling like:
...else static assert("Invalid type");
This compiles without error. And it was useless for detecting
errors because I forgot the first "false" or "0"
On Monday, 30 May 2022 at 20:57:02 UTC, tchaloupka wrote:
On Sunday, 29 May 2022 at 06:22:43 UTC, Andrea Fontana wrote:
On Thursday, 26 May 2022 at 07:49:23 UTC, tchaloupka wrote:
I see there is a test where numbers are identical to arsd
ones, is it a typo or a coincidence?
Andrea
Hi
On Thursday, 26 May 2022 at 07:49:23 UTC, tchaloupka wrote:
Hi,
as there are two more HTTP server implementations:
*
[Serverino](https://forum.dlang.org/thread/bqsatbwjtoobpbzxd...@forum.dlang.org)
Thank you! Since it's just a young library that results sounds
promising.
I'm just working
On Sunday, 15 May 2022 at 06:37:08 UTC, frame wrote:
On Saturday, 14 May 2022 at 23:23:47 UTC, Andrea Fontana wrote:
Which kind of socket exception could be triggered by a client?
Andrea
It doesn't matter if triggered by a client or not, you need to
deal with the possibility. A
On Saturday, 14 May 2022 at 20:44:54 UTC, frame wrote:
Take care of socket exceptions - especially if you want to make
a port to Windows.
You should always expect one. It's not enough to test
`Socket.isAlive` - a client socket may be faulty and any
illegal socket operation throws and kills
On Thursday, 12 May 2022 at 11:46:05 UTC, Guillaume Piolat wrote:
On Thursday, 12 May 2022 at 11:33:07 UTC, Andrea Fontana wrote:
Does dmd/rdmd work? Serverino uses std.net.curl just for
running its unittests, so maybe that bug is not blocking.
Well tbh, the simple fact that I would have to
On Thursday, 12 May 2022 at 10:26:28 UTC, Guillaume Piolat wrote:
On Sunday, 8 May 2022 at 21:45:28 UTC, Andrea Fontana wrote:
If you can test it on windows with WSL, that would be
appreciated a lot!
I tried to test servrino on WSL, but dub doesn't run on WSL.
=>
On Wednesday, 11 May 2022 at 06:50:37 UTC, Orfeo wrote:
well done Andrea!
(forum begins to be too crowded with Italians :) )
---
Orfeo
We all miss the good old bearophile!
I think the most active italian in this forum.
Andrea
On Tuesday, 10 May 2022 at 21:24:46 UTC, Paolo Invernizzi wrote:
Here I am ... Milanese: https://www.deepglance.com/about
/Paolo
Ok it's me getting old!
Andrea
On Tuesday, 10 May 2022 at 20:13:45 UTC, Paolo Invernizzi wrote:
Sinceramente non ricordo di averlo scritto, ma alla mia eta ...
probabilmente dimentico qualcosa ... comunque piacere! E' bello
vedere altri italiani apprezzare questo magnifico linguaggio!
(Frankly speaking, I don't remember to
On Tuesday, 10 May 2022 at 19:50:08 UTC, Paolo Invernizzi wrote:
Concordo ... (I agree!)
:-P
Wait, you have always said you're not Italian. Have you changed
your mind?
Andrea
On Tuesday, 10 May 2022 at 18:33:18 UTC, Sebastiaan Koppe wrote:
On Tuesday, 10 May 2022 at 10:49:06 UTC, Andrea Fontana wrote:
On Tuesday, 10 May 2022 at 08:32:15 UTC, Sebastiaan Koppe
wrote:
The difference is that with the route uda you can *only* map
routes 1:1 exhaustively. With your
On Tuesday, 10 May 2022 at 16:47:13 UTC, Ola Fosheim Grøstad
wrote:
On Tuesday, 10 May 2022 at 16:05:11 UTC, Andrea Fontana wrote:
Oh, italian is full of suffixes. -ello means a slightly
different thing. It's small but sounds like a bit pejorative.
Oh, and I loved the sound of it… suggests
On Tuesday, 10 May 2022 at 15:35:35 UTC, Ola Fosheim Grøstad
wrote:
On Tuesday, 10 May 2022 at 15:27:48 UTC, Andrea Fontana wrote:
Indeed the "-ino" suffix in "serverino" stands for "small" in
italian. :)
Bambino > bambinello? So, the embedded-version could be
«serverinello»? :O)
Oh,
On Tuesday, 10 May 2022 at 15:16:22 UTC, Ola Fosheim Grøstad
wrote:
On Tuesday, 10 May 2022 at 15:00:06 UTC, Andrea Fontana wrote:
I work in the R and every single time I even have to write a
small api or a simple html interface to control some strange
machine I think "omg, I have to set nginx
On Tuesday, 10 May 2022 at 15:01:43 UTC, Adam Ruppe wrote:
On Monday, 9 May 2022 at 19:20:27 UTC, Andrea Fontana wrote:
Thank you. Looking forward to getting feedback, bug reports
and help :)
BTW I'm curious, what made you not want to use my cgi.d which
has similar capabilities?
I was
On Tuesday, 10 May 2022 at 13:15:38 UTC, Ola Fosheim Grøstad
wrote:
On Tuesday, 10 May 2022 at 12:52:01 UTC, Andrea Fontana wrote:
I'm running a whole website in D using fastcgi and we have no
problem at all, it's blazing fast. But it's not so easy to
setup as serverino :)
Easy setup is
On Tuesday, 10 May 2022 at 13:34:27 UTC, Adam D Ruppe wrote:
On Monday, 9 May 2022 at 20:37:50 UTC, Andrea Fontana wrote:
The same goes for cgi/fastcgi/scgi and so on.
Well, cgi does one process per request, so there is no worker
pool (it is the original "serverless" lol).
fastcgi is
On Tuesday, 10 May 2022 at 12:31:23 UTC, Ola Fosheim Grøstad
wrote:
On Tuesday, 10 May 2022 at 10:49:06 UTC, Andrea Fontana wrote:
And you can still handle 700k/views per hour with 20 workers!
Requests tend to come in bursts from the same client, thanks to
clunky javascript APIs and clutters
On Tuesday, 10 May 2022 at 08:32:15 UTC, Sebastiaan Koppe wrote:
On Monday, 9 May 2022 at 20:37:50 UTC, Andrea Fontana wrote:
On Monday, 9 May 2022 at 20:08:38 UTC, Sebastiaan Koppe wrote:
As an example, how many requests per second can you manage if
all requests have to wait 100 msecs?
For
On Monday, 9 May 2022 at 20:08:38 UTC, Sebastiaan Koppe wrote:
On Sunday, 8 May 2022 at 21:32:42 UTC, Andrea Fontana wrote:
Every request is processed by a worker running in an isolated
process, no fibers/threads, sorry (or thanks?)
I did some tests and the performance sounds good: on a local
On Monday, 9 May 2022 at 19:09:40 UTC, Guillaume Piolat wrote:
On Sunday, 8 May 2022 at 21:32:42 UTC, Andrea Fontana wrote:
Hello!
I've just released serverino. It's a small & ready-to-go
http/https server.
Dub package: https://code.dlang.org/packages/serverino
Andrea
Looks very useful,
On Sunday, 8 May 2022 at 22:09:37 UTC, Ali Çehreli wrote:
Congratulations! :) Looking forward to watching your
presentation at DConf... ;)
I wish I was able to speak publicly in English in front of an
audience :)
On 5/8/22 14:32, Andrea Fontana wrote:
> Every request is processed by a
On Sunday, 8 May 2022 at 21:32:42 UTC, Andrea Fontana wrote:
[...]
Andrea
Whoops, I forgot a couple of things. This was tested on linux
only and it should work fine on other posix systems (macOS
included!).
I don't have windows, but I think you need WSL to run it, since
I'm using a lot of
Hello!
I've just released serverino. It's a small & ready-to-go
http/https server.
Every request is processed by a worker running in an isolated
process, no fibers/threads, sorry (or thanks?)
I did some tests and the performance sounds good: on a local
machine it can handle more than
On Friday, 6 May 2022 at 11:57:47 UTC, Iain Buclaw wrote:
Hi,
I am proud to announce another major GCC release, 12.1.
[...]
Regards,
Iain.
Great!
On Wednesday, 27 April 2022 at 14:21:15 UTC, Claude wrote:
data.digits ~= parseDigit(str[0]);
Dynamic arrays are not supported using -betterC
Andrea
On Saturday, 23 April 2022 at 05:12:30 UTC, Steven Schveighoffer
wrote:
This is a huge huge update. I've never done anything like this
before, but I think it works as a drop-in replacement, while
allowing you to migrate any piece you wish from unsafe code to
safe code. Please let me know if
On Wednesday, 6 April 2022 at 08:55:43 UTC, BoQsc wrote:
I have a feeling that some parts of my code contains
unterminated strings and they do overflow into other string
that is to be combined. I'd like to take a look at strings,
analyse them manually and see if any of them end up terminated
On Saturday, 8 January 2022 at 13:23:52 UTC, Imperatorn wrote:
On Saturday, 8 January 2022 at 02:07:10 UTC, Ali Çehreli wrote:
1) After about three years, I finally added copy constructors:
http://ddili.org/ders/d.en/special_functions.html#ix_special_functions.copy%20constructor
[...]
On Wednesday, 6 October 2021 at 06:23:01 UTC, WebFreak001 wrote:
On Friday, 1 October 2021 at 12:32:20 UTC, Mike Parker wrote:
[...]
new slogan
[...]
want to generate controversial heat?
Do it in D (DIID)
(careful with there being a trademark for DiiD though)
You mean:
Just D it
On Tuesday, 8 June 2021 at 02:47:18 UTC, someone wrote:
https://dlang.org/articles/safed.html
https://dlang.org/dmd-linux.html#switches
http://ddili.org/ders/d.en/functions_more.html
Neither man dmd nor man dmd.conf appear to have a
related/switch setting.
Does it means safeD is achieved by
On Sunday, 6 June 2021 at 10:03:11 UTC, evilrat wrote:
## (oh my) gentool v0.4 is now out.
It is my fancy tool to generate extern(C++) stuff quicker, it
takes regular compiler flags that you usually pass to clang and
translates C/C++ code to D.
This release has one new feature: support
On Wednesday, 4 November 2020 at 07:45:46 UTC, Ferhat Kurtulmuş
wrote:
looks so funny. As if an alien material is trying to grow and
eat worlds.
Yes. But it's so relaxing, isn't it?
Hello.
I've just published a small toy/demo project.
I use D and raylib to create and render a blob in real time.
Here a video: https://www.youtube.com/watch?v=RIVDdXV6D-A
Here the source: https://github.com/trikko/BlobEditor
It runs fine on my 7yo laptop.
Andrea
On Monday, 2 November 2020 at 11:01:53 UTC, Mike Parker wrote:
I've finally gotten around to finishing up the port of
DerelictSFML2 to BindBC:
http://bindbc-sfml.dub.pm/
+1
Great job Mike!
On Tuesday, 4 August 2020 at 22:25:19 UTC, Vicente Eduardo Ferrer
Garcia wrote:
[...]
If someone is interested in the D port you can find the source
here: https://github.com/metacall/dlang-port
Nice! Maybe you can use a bit of syntax sugar for D. Check this
example:
On Friday, 31 July 2020 at 13:55:18 UTC, Martin Tschierschke
wrote:
What would be the idiomatic way to write a floating point
division
occuring inside a loop and handle the case of division by zero.
c = a/b; // b might be zero sometimes, than set c to an other
value (d).
(In the moment I
On Saturday, 20 June 2020 at 22:12:21 UTC, Walter Bright wrote:
On 6/20/2020 2:59 PM, Bill Baxter wrote:
Whoa! Page 23 -- a wild Bill Baxter appears! That was
unexpected. :-D
--bb
So many contributors - we tried hard to credit where things
came from.
Nice paper.
It would be nice to have
On Saturday, 29 February 2020 at 20:11:24 UTC, Steven
Schveighoffer wrote:
1. in is supposed to be O(lg(n)) or better. Generic code may
depend on this property. Searching an array is O(n).
Probably it should work if we're using a "SortedRange".
int[] a = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
auto
On Thursday, 27 February 2020 at 14:15:26 UTC, p.shkadzko wrote:
void main() {
int[][] m1 = rndMatrix(10, 2, 3);
int[][] m2 = rndMatrix(10, 2, 3);
auto c = m1[] + m2[];
}
I think you're trying to do this:
int[][] m1 = rndMatrix(10, 2, 3);
int[][] m2 = rndMatrix(10, 2, 3);
On Monday, 24 February 2020 at 20:28:20 UTC, Ben Jones wrote:
On Monday, 24 February 2020 at 19:15:13 UTC, JN wrote:
On Sunday, 23 February 2020 at 16:20:09 UTC, Ahmet Sait wrote:
Out of curiosity, why would you need to triangulate polygons
instead of using stencil buffer? I'm assuming you're
On Saturday, 15 February 2020 at 22:06:42 UTC, Tier wrote:
It might not change the world, but I'm going to try it
regardless. So thank you!
You're welcome :)
P.S. I know you made an scgi client. Do you plan on making a
fcgi one too?
I don't like fastcgi protocol that much. I think scgi is
I've just released [1] a simple single-file-library you can use
to build cgi-enabled app with d.
Not a big innovation, so I don't expect a lot of interest about
it.
Anyway it's small and light, so it's a fast (not so efficient)
way to run web-based scripts.
Check the basic example [2] and
On Monday, 3 February 2020 at 07:11:34 UTC, Dharmil Patel wrote:
On Monday, 3 February 2020 at 07:03:03 UTC, Dharmil Patel wrote:
In my code I am using regex like this:
auto rgxComma = regex(r",");
On compiling with dmd v2.076.1, it compiles successfully, but
on compiling with dmd
On Friday, 31 January 2020 at 08:45:55 UTC, bauss wrote:
On Friday, 31 January 2020 at 07:20:17 UTC, cc wrote:
char[4096] buf;
writeln(GC.stats.usedSize);
foreach (i; 0 .. 10) {
sformat(buf, "%f", 1.234f);
writeln(GC.stats.usedSize);
On Tuesday, 7 January 2020 at 11:12:09 UTC, JN wrote:
Loving the JSON getter :)
Did you give jsonwrap[1] a try?
[1] https://code.dlang.org/packages/jsonwrap
On Wednesday, 18 December 2019 at 09:29:50 UTC, John Colvin wrote:
This is still down for me, regardless of using the IP or
address. I don't think it's just me either:
https://stats.uptimerobot.com/6mQX4Crw2L/783838659
https://downforeveryoneorjustme.com/code.dlang.org
Connection timeout
On Wednesday, 18 December 2019 at 11:03:04 UTC, Andrea Fontana
wrote:
On Wednesday, 18 December 2019 at 09:29:50 UTC, John Colvin
wrote:
This is still down for me, regardless of using the IP or
address. I don't think it's just me either:
https://stats.uptimerobot.com/6mQX4Crw2L/783838659
On Friday, 6 December 2019 at 12:34:17 UTC, realhet wrote:
Hi,
I'm trying to use a popular function name "max", and extend it
for my special types:
For example:
module utils;
MyType max(in MyType a, in MyType a){...} //static function
struct V3f{
V3f max(in V2f b){...} //member function
On Thursday, 5 December 2019 at 11:28:51 UTC, Marcone wrote:
Simple example:
writeln("Hi\nHow are
you?\nGood".splitLines()[0][0..?lastIndexOf(r"\")]);
How to refer to this string in lastIndexOf() without create a
variable?
Thank you.
One solution:
writeln(
"Hello\nHow are
On Tuesday, 3 December 2019 at 09:48:39 UTC, Basile B. wrote:
You see what surprises me here is that we cannot express the
special type that is `TypeNull` and that can only have one
value (`null`) so instead we have to use `auto` or
`typeof(null)`.
You can still create an alias anyway :)
On Tuesday, 3 December 2019 at 07:24:31 UTC, Basile B. wrote:
A testA()
{
return alwaysReturnNull(); // Tnull can be implictly
converted to A
}
still nice tho.
Why not [1]?
[1] typeof(null) alwaysReturnNull() { ... }
Andrea
On Tuesday, 26 November 2019 at 10:24:00 UTC, Robert M. Münch
wrote:
How can I write something like this to check if any of a set of
specific versions is used?
static assert(!(version(a) | version(b) | version(c)):
The problem is that I can use version(a) like a test, and the
symbol a is not
On Tuesday, 26 November 2019 at 08:57:49 UTC, dangbinghoo wrote:
hi,
I just added a simple tutorial to running D betterC on the
popular ESP32/esp8266 IoT chip.
referenced with the Rust community's Rust on ESP32.
On Monday, 25 November 2019 at 16:35:21 UTC, ParticlePeter wrote:
I would like to auto convert c++ header to d module. Is there
some project aiming for this?
I know of VisualD c++ to d conversion wizzard [1] and LLVM
tooling based CPP2D [2], both of them aiming for whole cpp
conversion. But
On Monday, 25 November 2019 at 09:24:43 UTC, Jonathan M Davis
wrote:
On Monday, November 25, 2019 1:22:17 AM MST Andrej Mitrovic via
Digitalmars- d-learn wrote:
From:
https://github.com/dlang/phobos/blob/10b9174ddcadac52f6a1ea532deab3310d3a8 c03/std/concurrency.d#L1913-L1916:
-
///
final
On Thursday, 7 November 2019 at 16:37:56 UTC, Andrea Fontana
wrote:
On Sunday, 3 November 2019 at 13:35:36 UTC, Martin Nowak wrote:
Glad to announce D 2.089.0, ♥ to the 44 contributors.
This release comes with corrected extern(C) mangling in mixin
templates, atomicFetchAdd and atomicFetchSub
On Sunday, 3 November 2019 at 13:35:36 UTC, Martin Nowak wrote:
Glad to announce D 2.089.0, ♥ to the 44 contributors.
This release comes with corrected extern(C) mangling in mixin
templates, atomicFetchAdd and atomicFetchSub in core.atomic,
support for link driver arguments, better support of
On Friday, 18 October 2019 at 10:55:59 UTC, Martin Tschierschke
wrote:
Yes, it works as it is, but it is not the best solution to
share know how.
I agree. I think D.learn should be moved to stackoverflow and
D.general should stay here.
On Thursday, 17 October 2019 at 12:19:03 UTC, Vinay Sajip wrote:
Are arrays and objects part of a unified type system?
Specifically, if I do
void foo(Object x) {
if (typeid(x) == typeid(Object[])) {
auto a = cast(Object[]) x;
}
}
I get a compilation error:
onlineapp.d(3):
On Tuesday, 8 October 2019 at 08:56:26 UTC, zoujiaqing wrote:
[...]
So finally we have a working xml parser!
On Thursday, 3 October 2019 at 14:13:55 UTC, IGotD- wrote:
According to the GC documentation this code snippet
char* p = new char[10];
char* q = p + 6; // ok
q = p + 11; // error: undefined behavior
q = p - 1; // error: undefined behavior
suggests that char *p is really a "fat
On Thursday, 3 October 2019 at 05:33:04 UTC, mipri wrote:
void main() {
import std.range : iota;
foreach (x; iota(1, 10).withHistory)
writeln(x);
}
This doesn't work as expected, I think.
auto r = iota(1,10).withHistory;
writeln(r.front);
writeln(r.front);
On Friday, 20 September 2019 at 11:21:22 UTC, Ali Çehreli wrote:
tl;dr Instead of returning an object that uses local state,
return an object that uses member variables.
Really good to know tips!
On Friday, 20 September 2019 at 08:58:09 UTC, oleobal wrote:
I'm kind of out of ideas at this point. Would anyone have an
elegant solution to this problem?
Thanks !
Is this ok for you: https://run.dlang.io/is/VllpJk ?
Andrea
1 - 100 of 577 matches
Mail list logo