On Sunday, 3 December 2023 at 15:04:09 UTC, Siarhei Siamashka
wrote:
On Saturday, 2 December 2023 at 14:35:19 UTC, Sergey wrote:
Some other solutions that could be worth to check:
https://github.com/andrewlalis/AdventOfCode2023/blob/main/day_1/solution.d
On Sunday, 3 December 2023 at 18:56:32 UTC, Johannes Miesenhardt
wrote:
On Sunday, 3 December 2023 at 14:51:37 UTC, Siarhei Siamashka
wrote:
[...]
Thanks, this is super helpful. I have one other question, in
the solution you posted and also the one I posted in the
discord today. I was
On Monday, 4 December 2023 at 03:50:47 UTC, Siarhei Siamashka
wrote:
On Monday, 4 December 2023 at 03:07:07 UTC, matheus wrote:
import std.stdio;
import std.algorithm;
import std.array;
import std.format;
import std.conv;
import std.string;
...
Why do you do multiple imports instead of one
On Monday, 4 December 2023 at 03:07:07 UTC, matheus wrote:
import std.stdio;
import std.algorithm;
import std.array;
import std.format;
import std.conv;
import std.string;
...
Why do you do multiple imports instead of one import std;?
I means is there any difference in CT?
The code indeed
On Saturday, 2 December 2023 at 13:33:33 UTC, Johannes
Miesenhardt wrote:
On Friday, 1 December 2023 at 01:01:31 UTC, Siarhei Siamashka
wrote:
Advent of Code 2023 starts in a few hours from now. I suggest
to discuss D language solutions here.
But to avoid spoilers, it's best to do
On Sunday, 3 December 2023 at 23:44:43 UTC, Julian Fondren wrote:
```d
if (str[i..$].startsWith(key)) return value;
```
Corrected. The other doesn't compile, unless you never run it
with -version=Part2 ...
On Saturday, 2 December 2023 at 13:33:33 UTC, Johannes
Miesenhardt wrote:
I am a bloody beginner so if there are any things that are very
wrong with this please point them out.
The fact that I need a template for accepting both a string and
a char[] is very weird but I went with it. I am also
On Sunday, 3 December 2023 at 18:56:32 UTC, Johannes Miesenhardt
wrote:
On Sunday, 3 December 2023 at 14:51:37 UTC, Siarhei Siamashka
wrote:
[...]
Thanks, this is super helpful. I have one other question, in
the solution you posted and also the one I posted in the
discord today. I was
On Sunday, 3 December 2023 at 14:51:37 UTC, Siarhei Siamashka
wrote:
[...]
Thanks, this is super helpful. I have one other question, in the
solution you posted and also the one I posted in the discord
today. I was required to use byLineCopy. I first used byLine but
I for some reason that I
solutions on github, so I pushed
mine here:
https://github.com/ssvb/adventofcode/blob/main/2023/day01/trebuchet.d
Maybe later I'll also publish all my D solutions for older
puzzles from Advent of Code 2022, but that code needs a bit of
cleanup.
quot; is replaced by "two2two" and so on). And after
such search & replace is complete, the whole task becomes the
same as the already solved part1. Such approach makes the code
slower, but the code is simpler and faster to implement. A useful
tradeoff for the Advent of Code puzzles.
On Saturday, 2 December 2023 at 13:33:33 UTC, Johannes
Miesenhardt wrote:
Day 1 solution here, since I swap them out based on a runtime
argument.
In the Discord server we also have a topic about AoC2023. So feel
free to join it as well.
Some other solutions that could be worth to check:
On Friday, 1 December 2023 at 01:01:31 UTC, Siarhei Siamashka
wrote:
Advent of Code 2023 starts in a few hours from now. I suggest
to discuss D language solutions here.
But to avoid spoilers, it's best to do this with a 24h delay
after each puzzle is published.
Day 1 solution
```d
version
On Friday, 1 December 2023 at 01:01:31 UTC, Siarhei Siamashka
wrote:
Advent of Code 2023 starts in a few hours from now. I suggest
to discuss D language solutions here.
But to avoid spoilers, it's best to do this with a 24h delay
after each puzzle is published.
Hi Siarhei. Nice to see
On Saturday, 10 December 2022 at 20:49:03 UTC, Christian Köstlin
wrote:
Is anybody participating with dlang in the advent of code 22?
It would be interesting to discuss dlang specific things from
the puzzles.
Kind regards,
Christian
https://forum.dlang.org/thread/adkugbopvfbcycknx
On Saturday, 10 December 2022 at 20:49:03 UTC, Christian Köstlin
wrote:
Is anybody participating with dlang in the advent of code 22?
It would be interesting to discuss dlang specific things from
the puzzles.
Mine: https://github.com/schveiguy/adventofcode
-Steve
Is anybody participating with dlang in the advent of code 22?
It would be interesting to discuss dlang specific things from the puzzles.
Kind regards,
Christian
On Wednesday, 9 December 2015 at 02:48:31 UTC, Sean Campbell
wrote:
how is this D speek. it's far shorter and easier to read if you
use
writefln("floor %s",input.count('(') - input.count(')'));
Yes, I don't find chaining of methods all that easy to read
either, but you can do less work by
Thanks for suggesting this. This is fun! Although, I've taken on
quite a different challenge myself. I'm computing all of the
answers only by using my console in Firefox. I'm actually getting
through these pretty quickly. (It helps to know some ES5 and
ES6.) I can imagine the D code already,
On Wednesday, 2 December 2015 at 08:45:11 UTC, Adrian Matoga
wrote:
On Wednesday, 2 December 2015 at 03:50:20 UTC, Charles wrote:
(..)
auto input = "arbitrarily long string of '(' and ')'";
int floor;
foreach(movement; input)
floor += (movement == '(' ? 1 : -1);
On Wednesday, 2 December 2015 at 03:50:20 UTC, Charles wrote:
(..)
auto input = "arbitrarily long string of '(' and ')'";
int floor;
foreach(movement; input)
floor += (movement == '(' ? 1 : -1);
writeln(floor);
Speak D to me, please.
stdin.byLine.front.map!(a =>
On 12/01/2015 08:08 AM, Regan Heath wrote:
Hi all,
Long time since I read/posted here but I saw this and thought it might
be good PR for D:
http://adventofcode.com/
Should also be fun.
Ciao,
Regan
My visit was short due to this:
To play, please identify yourself via one of these
On 02.12.2015 06:50, Charles wrote:
On Tuesday, 1 December 2015 at 22:57:38 UTC, Ali Çehreli wrote:
My visit was short due to this:
To play, please identify yourself via one of these services:
[github] [google] [twitter] [reddit]
Ali
I was the same way earlier, but reddit doesn't need
On 12/01/2015 07:50 PM, Charles wrote:
> On Tuesday, 1 December 2015 at 22:57:38 UTC, Ali Çehreli wrote:
>> My visit was short due to this:
>>
>> To play, please identify yourself via one of these services:
>>
>> [github] [google] [twitter] [reddit]
>>
>> Ali
>
> I was the same way earlier, but
On Tuesday, 1 December 2015 at 22:57:38 UTC, Ali Çehreli wrote:
My visit was short due to this:
To play, please identify yourself via one of these services:
[github] [google] [twitter] [reddit]
Ali
I was the same way earlier, but reddit doesn't need personal
information, so you can just
Hi all,
Long time since I read/posted here but I saw this and thought it
might be good PR for D:
http://adventofcode.com/
Should also be fun.
Ciao,
Regan
26 matches
Mail list logo