On Thursday, 15 June 2023 at 02:21:16 UTC, Steven Schveighoffer
wrote:
Not in as short code. You could write a helper though:
```d
auto deepIn(V, K, Keys...)(V[K] aa, Keys keys) if (Keys.length
> 0)
{
auto v = keys[0] in aa;
static if(keys.length == 1)
return v;
else
return v
Hi there, I want to call a C function that upcases a string. I
have something working, I just want to check in here to see if
there's a better approach that I'm missing. I ask because
`std.string.toStringZ()` returns an `immutable char *`.
As far as I can tell, I have two options:
1. Make the
On 6/14/23 9:47 PM, Paul wrote:
I found I can check for key membership in a multi-D aa...
```d
byte zKey = someval;
byte[byte][byte][byte] cubelist;
foreach(byte xK, yzcubelist; cubelist) {
foreach(byte yK, zcubelist; yzcubelist) {
foreach(byte zK, val; zcubelist) {
```
with this express
On Thursday, 15 June 2023 at 01:47:45 UTC, Paul wrote:
I found I can check for key membership in a multi-D aa...
```d
byte zKey = someval;
byte[byte][byte][byte] cubelist;
foreach(byte xK, yzcubelist; cubelist) {
foreach(byte yK, zcubelist; yzcubelist) {
foreach(byte zK, val; zcubelist) {
I found I can check for key membership in a multi-D aa...
```d
byte zKey = someval;
byte[byte][byte][byte] cubelist;
foreach(byte xK, yzcubelist; cubelist) {
foreach(byte yK, zcubelist; yzcubelist) {
foreach(byte zK, val; zcubelist) {
```
with this expression...
```d
if(zKey in cubelist
On Thursday, 15 June 2023 at 01:20:50 UTC, H. S. Teoh wrote:
On Thu, Jun 15, 2023 at 12:49:30AM +, mw via
Digitalmars-d-learn wrote:
Hi,
Recently encountered a similar problem, ultimately the cause
was that my library paths turned out to be wrongly set, so it
was picking up the wrong vers
On Thu, Jun 15, 2023 at 12:49:30AM +, mw via Digitalmars-d-learn wrote:
> Hi,
>
> I switched to a different machine to build my project, suddenly I got
> lots of link errors. (It builds fine on the old machine, and my
> software version are the same on both machines LDC - the LLVM D
> compiler
On Wednesday, 14 June 2023 at 22:44:41 UTC, Ali Çehreli wrote:
By the way, the string that bitfields() generates can be
visualized by simply printing it:
const code =
bitfields!(
ubyte, "A", 1,
ubyte, "B", 1,
ubyte, "C", 1,
ubyte, "pad
Hi,
I switched to a different machine to build my project, suddenly I
got lots of link errors. (It builds fine on the old machine, and
my software version are the same on both machines LDC - the LLVM
D compiler (1.32.2))
e.g.:
```
...
/usr/bin/ld:
/home//.dub/cache/cachetools/0.3.1/build/li
On 6/14/23 15:04, Paul wrote:
> Question: Why do you say "may be slower than necessary"? Do you mean
> compile or runtime or both?
Definitely at compile time because the string that gets mixed-in first
needs to be generated from your specification. For that, the bitfields()
function must be c
On Wednesday, 14 June 2023 at 14:43:58 UTC, Ali Çehreli wrote:
D's string mixin syntax may not be the best, the implementation
may be slower than necessary, and the concept may be strange
(not macros but very similar) but I still find phobos's
bifields to be brilliant.
https://dlang.org/pho
On Wednesday, 14 June 2023 at 19:50:21 UTC, Danico wrote:
que significa los ultimos numeros de 192.168.0.13:50732 ,
cuando hago un remoteAddress() y en un servidor socket?
On Wednesday, 14 June 2023 at 19:50:21 UTC, Danico wrote:
Thanks everyone, it was an ephemeral ports, are automatically
a
On Wednesday, 14 June 2023 at 19:50:21 UTC, Danico wrote:
que significa los ultimos numeros de 192.168.0.13:50732 ,
cuando hago un remoteAddress() y en un servidor socket?
Es un numero de puerto. No estoy seguro que preguntar en un
idioma otra que ingles es un buena idea aqui. Lee esto por fav
On 6/14/23 3:50 PM, Danico wrote:
que significa los ultimos numeros de 192.168.0.13:50732 , cuando hago un
remoteAddress() y en un servidor socket?
Those last numbers are the port on the remote machine.
It's how the system knows which socket to forward the connection to (any
system can have t
On Wednesday, 14 June 2023 at 19:28:20 UTC, Steven Schveighoffer
wrote:
On 6/14/23 3:11 PM, Danico wrote:
auto clientAddress = client.peerAddress();
remoteAddress, not peerAddress:
https://dlang.org/phobos/std_socket.html#.Socket.remoteAddress
-Steve
I guess just should replace the word, n
On Wednesday, 14 June 2023 at 19:28:20 UTC, Steven Schveighoffer
wrote:
-Steve
Thanks :D it works
On 6/14/23 3:11 PM, Danico wrote:
auto clientAddress = client.peerAddress();
remoteAddress, not peerAddress:
https://dlang.org/phobos/std_socket.html#.Socket.remoteAddress
-Steve
Hola gente, tengo un problema, nose como hacer par poder obtener
la ip del cliente que se conecta a mi servidor, aqui esta la
funcion de mi servidor:
`
alias print = writeln;
void main() {
auto server = new Socket(AddressFamily.INET,
SocketType.STREAM);
print(" [-] Nuevo serv
On 6/14/23 2:21 PM, glowiak wrote:
Hello.
I am trying to get a window open using BincBC-SFML.
Sadly the compiler gives me an error:
`` Starting Performing "debug" build using /usr/bin/dmd for x86_64.
`` Up-to-date bindbc-sfml 1.0.2: target for configuration [staticBC] is
up to date.
``
Hello.
I am trying to get a window open using BincBC-SFML.
Sadly the compiler gives me an error:
``Starting Performing "debug" build using /usr/bin/dmd for
x86_64.
`` Up-to-date bindbc-sfml 1.0.2: target for configuration
[staticBC] is up to date.
``Building tdvcraft ~master: buildin
On 6/13/23 17:59, Paul wrote:
> I would like to have labeled bits in a union with a ubyte. Something
> like this:
> ```d
> struct MyStruct {
> union {
> ubyte status;
> bit A, B, C…etc
> }
> }
> ```
> Is something like this possible?
>
> Thanks
D's string mixin syntax
On Wednesday, 14 June 2023 at 08:51:19 UTC, Rene Zwanenburg wrote:
You can do something like this if you don't mind compiling with
-preview=bitfields:
That doesn't do what you think it does. There's no guarantee the
bits will actually line up with the status byte.
The best way to do what the
I’m thinking that I might had to end up writing a partial, rather
rough parser for parts of the D language. Could I get some
suggestions for help that I might find in the way of software
components? D has a very powerful regex module, I believe.
I have been writing inline asm library routines
On Wednesday, 14 June 2023 at 00:59:30 UTC, Paul wrote:
I would like to have labeled bits in a union with a ubyte.
Something like this:
```d
struct MyStruct {
union {
ubyte status;
bit A, B, C…etc
}
}
```
Is something like this possible?
Thanks
You can do something li
24 matches
Mail list logo