« first day (3893 days earlier)      last day (1040 days later) » 

1:16 AM
@StackedCrooked pneumonoultramicroscopicsilicovolcanokoniosis trya pronounce this
 
 
3 hours later…
3:48 AM
Anyone here experienced with SMTP relay?
(I am getting cozy with linux servers)
 
 
17 hours later…
8:25 PM
int_fast32_t wow I didn't know integers had speed :-)
 
8:47 PM
yeah, why don't we have int_slow32_t if we want to go through a school zone
 
9:21 PM
How to make the parameter an alias of the argument?
#include <iostream>
using namespace std;

template <size_t N>
void hoo(int (&p)[N])
{
    for (int i = 0; i < N; i++)
        cout << p[i] << endl;
    p[0] = 1000; // attempt to modify
}

int main()
{
    int data[]{1, 2, 3};
    hoo(data);
}
@PeterT: Hi peter!
 
what the heck does that code even do, and what do you want it to do?
 
Just a trivial example.
I want to pass an array that can be mutated inside the function.
 
consider passing an array? Although arrays are not paradigmatic
 
And I don't want pass the array length, that is why I use template
 
okay but thats a different question
 
9:24 PM
The same code
 
void hoot(int* p) should be fine
 
why?
What you probably want is a std::span, or just take a vector, container by reference
 
The constraint is the length of array must be observable from inside the function.
vector is another different question
 
okay, use an std::span or get lazy and pass the size as an argument, or once again pass a container by reference
or just keep the size as part of the function call and get made fun of. Ultimately, your signature can just take a pointer
 
9:26 PM
I will stick to the code above, because it is a quiz or puzzle for academic purposes.
 
++i would be faster
 
talking about vectors or other data structure is beyond the scope of my question. :-)
@Mikhail Really? I got surprised!
++C programming language.
 
Yeah, as we just mentioned with Peter, most developers would prefer to use std::int_fast32_t instead of regular int for the performance
 
Why didn't Bjarne Stroustoup call his language ++C instead of C++?
 
Hard to tell, he probably did something like auto C = C++;
 
10:09 PM
Also I wonder if macros support multiple VA_ARGS blocks, which seem to be the paradigmatic way to capture initializer lists...
 

« first day (3893 days earlier)      last day (1040 days later) »