everything. Multiple platforms, multiple hypervisors, multiple
hosts platforms etc.
--
/Jacob Carlborg
for that.
/Jacob Carlborg
# Cross-Platform GitHub Action 0.3.0
I would like to announce a new release of [Cross-Platform GitHub
Action](https://github.com/marketplace/actions/cross-platform-action), [0.3.0](https://github.com/cross-platform-actions/action/releases/tag/v0.3.0).
For those not familiar with this project,
On Thursday, 14 October 2021 at 16:14:17 UTC, Brian wrote:
Awesome! I will spend some time soon figuring it out.
Here are two real world examples:
https://github.com/jacob-carlborg/lime/blob/master/.github/workflows/ci.yml
https://github.com/jacob-carlborg/dlp/blob/master/.github/workflows
-action.
--
/Jacob Carlborg
symlinks. When invoking the compiler it's the
actual executable that's invoked directly
* DVM provides a built-in command to install itself and do any
setup
--
/Jacob Carlborg
Actions that will setup MySQL:
https://github.com/marketplace?type=actions=mysql
--
/Jacob Carlborg
nBSD image for ARM64.
--
/Jacob Carlborg
env | sort
```
I've been using this action for one of my own projects
([DLP](https://github.com/jacob-carlborg/dlp/runs/2759807903))
for now close to a week and it works fine. It's mostly FreeBSD
that has been tested.
If you're interested in how the sausage is made, read on. Also
see
++ API where
the C API is not sufficient.
--
/Jacob Carlborg
that and it fully
written in D. Although DStep cannot create bindings for C++ yet so I
cannot guarantee that using only libclang will work for C++ code.
[1] https://github.com/jacob-carlborg/dstep
--
/Jacob Carlborg
On 2021-04-10 15:50, kinke wrote:
Thanks Jacob, I'm sure this was quite a bit of work, and opening up
proprietary SDKs for non-native systems is always welcome. Thumbs up!
Thanks.
--
/Jacob Carlborg
& EVFILT_READ);
```
The `filter` field of an event is not a flag/bit field. It's just a
plain value, you should use `==` to check if it's a read event.
I'm not sure if fixing these things will solve your issue. But at least
some problems I noticed.
--
/Jacob Carlborg
/v0.0.1
--
/Jacob Carlborg
World
```
For more information and examples, see the readme [1].
[1] https://github.com/d-cross-compiler/docker-ldc-darwin
--
/Jacob Carlborg
On 2021-04-06 21:57, Alain De Vos wrote:
Can we say tk ang gtk toolkits are alive.
But wxwidgets , fox an fltk are dead ?
Do you mean these libraries in general or D bindings to these libraries?
--
/Jacob Carlborg
in the learn forum or on the DStep specific discussions section
(which I just enabled) on GitHub [2]. I'll do my best to help you.
[1] https://github.com/jacob-carlborg/dstep
[2] https://github.com/jacob-carlborg/dstep/discussions
--
/Jacob Carlborg
On Wednesday, 17 March 2021 at 15:16:36 UTC, Jacob Carlborg wrote:
macOS doesn't support static linking.
The proper way to solve this is to bundle the dynamic libraries
with the application. If it's a GUI application it can be located
in the application bundle. It seems like David already
On Wednesday, 17 March 2021 at 13:52:48 UTC, Guillaume Piolat
wrote:
On Sunday, 14 March 2021 at 11:33:00 UTC, David wrote:
Anyone else done this? Pointers welcome.
Sorry for delay.
Just add "dflags-osx-ldc": ["-static"],
macOS doesn't support static linking.
--
/Jacob Carlborg
of `lockstep`.
--
/Jacob Carlborg
On 2021-02-23 16:34, Decabytes wrote:
ldc2 is the winner thank you! I'd like to get gdc and dmd up and running
to at some point
Unfortunately, DMD doesn't support ARM.
--
/Jacob Carlborg
On 2021-02-24 17:32, Imperatorn wrote:
What happened to utiliD? Broken link to gh
I think Mike gave up on D.
--
/Jacob Carlborg
loser to your original example:
// add this to the Foo struct
static Proxy attributes()
{
return Proxy();
}
struct Proxy
{
string opDispatch(string name)()
{
return __traits(getAttributes, mixin("Foo.", name))[0].value;
}
}
void main()
{
writeln(Foo.attributes.a);
}
--
/Jacob Carlborg
be possible to create a separate tool that will
perform some semantic checks on these UDAs.
--
/Jacob Carlborg
}
Due to language consistency it should behave the same for all
types.
In the above example, `c` is typed as `const(Foo)[]`. Although, I
wonder why in your example the concatenation is typed as `char[]`
instead of `const(char)[]`. Perhaps that's a bug.
--
/Jacob Carlborg
for numeric values, strings, characters
and similar values. Why waste extra space on a variable if it's
not needed?
If you don't want a new instance, then don't use `enum`. Use
`immutable` instead.
--
/Jacob Carlborg
On Sunday, 31 January 2021 at 20:36:43 UTC, aberba wrote:
It's finally out!
https://opensource.com/article/21/1/d-scripting
FYI, the code will compile faster if you use `dmd -run` instead
of `rdmd`. If you have multiple files that need to be compiled
you can use `dmd -i -run`.
--
/Jacob
g
`typeid(base).initializer.length`.
Base base = new Derived;
assert(__traits(classInstanceSize, Derived) ==
typeid(base).initializer.length);
--
/Jacob Carlborg
on the Cocoa side.
Apple has a tendency to, not necessarily break APIs but change things
that might cause problems. Especially if applications are not
implemented the way that Apple thinks they should be implemented. Like
dark mode. They do deprecate APIs as well.
--
/Jacob Carlborg
files#diff-0b75a0e079a2a997c1c32e5da529db020232a8d4e7686591d0c710085c4e26d3
--
/Jacob Carlborg
ntributors, fundings
or similar.
--
/Jacob Carlborg
to best handle this if only Linux is going to
be updated.
[1] https://github.com/d-widget-toolkit/jport
--
/Jacob Carlborg
--
/Jacob Carlborg
On 2021-01-06 03:30, Walter Bright wrote:
The baseline Linux target does not have SSE.
What about this changelog entry:
https://dlang.org/changelog/2.087.0.html#xmm-linux-changelog ?
--
/Jacob Carlborg
reference types.
They consist of a context pointer and a function pointer. Function
pointer are, as the name suggest, already pointers.
--
/Jacob Carlborg
.
But interestingly, the occurrence of this is much more seldom than
checking the return value after each function.
It's claimed that exceptions are not zero cost, even when an exception
is not thrown. Because the compiler cannot optimize functions that may
throw as well as those that cannot throw.
--
/Jacob
a static exception (and vice versa); each is translated to the
other automatically by default or you can do it explicitly if you prefer."
But perhaps you're proposing something different for D?
--
/Jacob Carlborg
` to solve this issue [1].
[1] https://dlang.org/phobos/std_array.html#.staticArray
--
/Jacob Carlborg
On 2021-01-05 03:02, kdevel wrote:
expected output: none. The compiler should have rejected the code after
the duplicate definition def #2. dmd 2.093.1 ignores both definitions
instead. Is this a bug or a bug?
DMD 2.095.0 now reports an error for this.
--
/Jacob Carlborg
On 2021-01-06 03:30, Walter Bright wrote:
The baseline Linux target does not have SSE.
Other compilers solve this by having a flag to specify the minimum
target CPU.
--
/Jacob Carlborg
On 2021-01-02 22:21, H. S. Teoh wrote:
Nope. Reverse-engineering is a thing. There's even tools out there to
automate this stuff.
Or you can try to prevent reverse engineering. This is both an
interesting and fun talk [1].
[1] https://www.youtube.com/watch?v=HlUe0TUHOIc
--
/Jacob
ell to store different values of
different types. But then everything need to be known at compile
time. That is, the index, in your case.
--
/Jacob Carlborg
] and I'll take a look at it.
[1] https://github.com/jacob-carlborg/dlp/issues/7
--
/Jacob Carlborg
, see [1].
[1] https://github.com/jacob-carlborg/dlp/releases/tag/v0.3.0
--
/Jacob Carlborg
On 2020-12-16 16:18, Dave P. wrote:
Is this a bug in the spec or in the implementation?
Yeah, that's a good question. That's always problematic with D. The spec
is incomplete.
How do we get this fixed?
The simplest would be to change the spec.
--
/Jacob Carlborg
tion needs to have C calling convention. But to avoid
any conflicts with other `extern(C)` functions I wanted to keep
the D mangling.
https://github.com/dlang/druntime/blob/master/src/core/memory.d#L212-L232
--
/Jacob Carlborg
is passed,
on some it doesn't.
--
/Jacob Carlborg
same name
as the C function
void foo(int a, int b); // D calling convention
void main()
{
foo(1, 2);
}
$ clang -o foo.o foo.c -c
$ dmd main.d foo.o
$ ./main
a=2 b=1
LDC behaves the same way as DMD and, IIRC, GDC follows how GCC
passes the arguments.
--
/Jacob Carlborg
parser with the same
properties in D, that's even better.
--
/Jacob Carlborg
!
Or you can call it `rgba`. It seems to be what Wikipedia prefers
[1].
[1] https://en.wikipedia.org/wiki/RGBA_color_model
--
/Jacob Carlborg
/core_runtime.html#.rt_term
--
/Jacob Carlborg
or another file) is to mangle the function name
the same way as a D function.
You can either use `extern(C) char*[] hldr` to make only `hldr`
have C linkage. Use `extern(C) {}` to group several symbols which
should have C linkage or rearrange the code so that `static this`
is above `extern(C):`.
--
/Jacob Carlborg
as the compiler is using. Here's an example on how to
use DMD to parse some code [1]. Here's some more advance usages [2].
[1]
https://github.com/dlang/dmd/blob/b35572b07a6994385b6459a430674d32e9a97279/test/dub_package/frontend.d#L10-L24
[2]
https://github.com/jacob-carlborg/dlp/blob/master/source
<= 255) // assert that the value is
within bounds
{
hex = (hex & 0x00) | value;
}
string toString()
{
return format!"Color(red: %s, green: %s, blue: %s)"(red,
green, blue);
}
}
void main()
{
Color color;
color.red = 255;
color.green = 143;
color.blue = 89;
writeln(color);
}
--
/Jacob Carlborg
On Monday, 23 November 2020 at 13:34:14 UTC, Petar Kirov
[ZombineDev] wrote:
Thanks, I've just added the gsoc2020 label for these issues. I
will ping someone to give you permissions for the repo ;)
Shouldn't it be gsoc2021? We're already past GSoC 2020 ;)
--
/Jacob Carlborg
rt(color.red == 255);
}
[1] https://en.wikipedia.org/wiki/Property_(programming)
--
/Jacob Carlborg
;
this( )
{
}
// rest of class
}
It gets executed at compile time. All instances of `DebuggerSession`
will share the same single instance of `BreakState`.
--
/Jacob Carlborg
a;
}
void printA(Foo foo)
{
writeln(foo.a);
}
foo.printA();
printA(foo);
The two above lines are exactly the same.
[1] https://dlang.org/spec/function.html#pseudo-member
--
/Jacob Carlborg
On 2020-11-08 13:39, Kagamin wrote:
Surrogate pairs are used in rules because java strings are utf-16
encoded, it doesn't make much sense for other encodings.
D supports the UTF-16 encoding as well. The compiler doesn't accept the
surrogate pairs even for UTF-16 strings.
--
/Jacob Carlborg
, can encode these code points" [1].
"... the standard states that such arrangements should be treated
as encoding errors" [1].
Perhaps they need to be combined with other code points to form a
valid character.
[1] https://en.wikipedia.org/wiki/UTF-16#U+D800_to_U+DFFF
--
/Jacob Carlborg
GC does for
efficiency, even if `free` is called. Otherwise it would be not
much point in using over the syscalls like `mmap` or `sbrk` (and
whatever the corresponding calls are on Windows).
--
/Jacob Carlborg
is **not** passed, it will
produce one executable and one single object file.
--
/Jacob Carlborg
On 2020-11-01 11:13, Sönke Ludwig wrote:
ddb marks the vibe-d dependency as optional, so it *should* not trigger
a download by itself.
It does not trigger a download. The downside is that user of the library
needs to manually add vibe.d as a dependency.
--
/Jacob Carlborg
--
/Jacob Carlborg
for `TemplateArgsOf` [1] ?
[1] https://dlang.org/phobos/std_traits.html#TemplateArgsOf
--
/Jacob Carlborg
]. Here's a Dub
package [2].
[1] http://mustache.github.io/mustache.5.html
[2] https://code.dlang.org/packages/mustache-d
--
/Jacob Carlborg
argument in Variant
The advantage of using the type safe variadic function is that
all the arguments are bundle into one array, make it easier to
work with.
--
/Jacob Carlborg
/function.html#d_style_variadic_functions
[2]
https://dlang.org/spec/function.html#typesafe_variadic_functions
--
/Jacob Carlborg
GC memory I think.
If you pass the delegate as a template parameter/alias parameter,
it's more likely to be inlined:
auto myStuff(alias fn)() {
try return fn();
catch (Exception e) { }
}
myStuff!( { /* some code */ } );
--
/Jacob Carlborg
On Sunday, 25 October 2020 at 16:50:09 UTC, Jack wrote:
Which build tool are you refering to? an existing one or build
one oneself to do this job?
It should work with any build tool that has hooks to execute
arbitrary commands.
--
/Jacob Carlborg
the ABI for passing D arrays and this would break. If
fact, the ABI documentation [1] doesn't mention how a D array is passed.
A different compiler could choose to pass it differently.
[1] https://dlang.org/spec/abi.html#arrays
--
/Jacob Carlborg
and read one of the smaller files with the import expression.
--
/Jacob Carlborg
[2] https://dlang.org/spec/class.html#synchronized-classes
[3] https://dlang.org/spec/statement.html#synchronized-statement
--
/Jacob Carlborg
On 2020-09-19 21:50, Per Nordlöw wrote:
On Saturday, 19 September 2020 at 18:48:31 UTC, Jacob Carlborg wrote:
A nested class seems to be able to escape the `this` reference:
Ahh, thanks.
I just realized that it can escape into other parameters without the
`scope` qualifier?
This
class
is just another argument passed to the function.
In the struct and class case?
A nested class seems to be able to escape the `this` reference:
class Foo
{
Bar b;
class Bar
{
void bar() pure
{
b = this;
}
}
}
--
/Jacob Carlborg
a common
interface that is used by the rest of the project.
* Ocean [3]. This one is quite large as well.
[1] https://github.com/d-widget-toolkit/dwt
[2] https://github.com/weka-io/mecca
[3] https://github.com/sociomantic-tsunami/ocean
--
/Jacob Carlborg
files and output a simple index.html file.
[1]
https://github.com/rejectedsoftware/ddox#generating-offline-documentation
--
/Jacob Carlborg
and Ddoc are the best things that have happened since sliced
bread. But if you compare with C or C++ the bar isn't very high.
--
/Jacob Carlborg
in advance for your time!
You should compile both files. I'm guessing LDC might be doing some form
of optimization to figure out that it doesn't need those symbols.
PS: I hope this is the right sub-forum for asking this sort of question!
Yes.
--
/Jacob Carlborg
to the
`main` function.
--
/Jacob Carlborg
to the generated documentation.
There's no built-in support for that. You might want to look at some
other doc generating tool if those support that.
--
/Jacob Carlborg
On 2020-09-18 23:14, John Colvin wrote:
I know. But it should be.
dub.selections.json wasn't available in the initial version. I don't
remember if branches were deprecated before or after dub.selections.json
was added.
--
/Jacob Carlborg
t; writeln(index, ":", value));
https://dlang.org/phobos/std_algorithm_iteration.html#.each
--
/Jacob Carlborg
On 2020-09-16 21:04, Vladimirs Nordholm wrote:
Ah, I guess it boils down to this then. Doesn't really make it "neater",
but thank you for the tip!
You only need to declare the enums ones.
--
/Jacob Carlborg
On 2020-09-17 12:10, John Colvin wrote:
I personally think it's not so bad as long as the commit gets written to
the dub.selections.json
It doesn't.
--
/Jacob Carlborg
;
else
enum windows = false;
static if (!windows)
{
// ... my code
}
--
/Jacob Carlborg
ble builds.
--
/Jacob Carlborg
control of the
(de)serialization of a specific type.
Thirdly, you can do the same thing with pointer arithmetic. Although
this is not allowed if @safe code.
[1] https://github.com/jacob-carlborg/orange
--
/Jacob Carlborg
ialization and, as you can see in your example, for
debugging as well. `writeln` will print the values of the fields in a
struct, even for private fields.
--
/Jacob Carlborg
]. Or if you have executables depending on only one
source file, you can use single-file packages [2].
Here are some real-world examples [3][4].
[1] https://dub.pm/package-format-sdl.html#configurations
[2] https://dub.pm/advanced_usage.html
[3] https://github.com/jacob-carlborg/dstep/blob/master
o override the
source directory. To override the output directory you can use
`targetPath` build setting. They are documented here [1][2].
[1] For the SDL format:
https://dub.pm/package-format-sdl.html#build-settings
[2] For the JSON format:
https://dub.pm/package-format-json.html#build-settings
On Thursday, 3 September 2020 at 08:40:32 UTC, aberba wrote:
The slack I have no ideas how people get in. I know there's a
number of members in there too.
Unfortunately you need to be invited. Anyone can do it, if you're
interested. We just need an email address.
--
/Jacob Carlborg
hashing really the most pressing
issue with Dub?
--
/Jacob Carlborg
On Friday, 28 August 2020 at 05:38:59 UTC, novice3 wrote:
DMD x86 on Windows have no dependencies, just unpack .zip and
use.
It's a pitty, that DMD x64 depend on VS :(
It does not. If VS is not installed the MinGW provided libraries,
which are bundled, will be used.
--
/Jacob Carlborg
of duplicating the work.
Although I've given up on the DMD upstream project and instead,
I've forked it [2] to be able to do the necessary changes.
[1]
https://dlang.org/blog/2020/08/23/symmetry-autumn-of-code-2020-projects-and-participants
[2] https://github.com/jacob-carlborg/ddc
--
/Jacob
. Little binary bloat
and high performance.
--
/Jacob Carlborg
st likely the reason why Java generic types
don't accept primitive types. They need to be boxed, i.e. `int` need to
be wrapped in an object of type `Integer`.
--
/Jacob Carlborg
start with that at least.
--
/Jacob Carlborg
on't think the first thing to try is to replace the
Rust main function with a D main function.
--
/Jacob Carlborg
[2] https://dlang.org/phobos/core_runtime.html#.rt_term
--
/Jacob Carlborg
1 - 100 of 11082 matches
Mail list logo