Sunday, June 24, 2018

Digest for comp.lang.c++@googlegroups.com - 4 updates in 3 topics

bitrex <user@example.net>: Jun 23 02:49PM -0400

On 06/23/2018 01:59 PM, Christian Gollwitzer wrote:
> electromagnetism to be the same in that case or even other forces or
> particles to be the same? Survivor bias.
 
>     Christian
 
Applying "statistical arguments" at the level of the whole cosmos as
arguments for or against anything is IMO currently exercise in futility.
Look there's a lot of more basic shit we ain't even know before we can
start debating why the fundamental constants are precisely what they are.
 
We don't know if the particular Universe we find ourselves in is even
topologically finite or infinite or not, if conservation of energy holds
on the scale of the whole Universe (related question), or if the
fundamental constants are indeed even constant over large distances or
timescales.
 
"survivor bias" or what's called the anthropic principle is a fine
argument for "why things are" as far as it goes but it feels a bit
disappointing and unsatisfactory and like it's not really science, it's
a "theory" that doesn't really have any predictive power, it can only
predict the past.
bitrex <user@example.net>: Jun 24 03:04AM -0400

On 06/03/2018 09:49 AM, Daniel wrote:
> test passes.
 
> Best regards,
> Daniel
 
It sounds like the equivalent of telling your manager you're going to
use test-driven development to design a traffic light system to control
traffic at an intersection but the contractor installs the red where the
green is supposed to be and vice versa. and you tell your manager "ugh
I'm sorry sir but the system has failed the lights are all fucked-up test."
bitrex <user@example.net>: Jun 24 03:05AM -0400

On 06/24/2018 03:04 AM, bitrex wrote:
> traffic at an intersection but the contractor installs the red where the
> green is supposed to be and vice versa. and you tell your manager "ugh
> I'm sorry sir but the system has failed the lights are all fucked-up test."
 
the "lights _aren't_ all fucked-up test", rather.
"Alf P. Steinbach" <alf.p.steinbach+usenet@gmail.com>: Jun 24 07:39AM +0200

I can't recall having seen this approach, so posting it here:
 
 
void cppmain()
{
using namespace std;
 
class With_faux_text
{
istringstream faux_input{ some_text() };
const ptr_<streambuf> original_buffer = cin.rdbuf();
public:
const char _{ '-' };
~With_faux_text() { cin.rdbuf( original_buffer ); }
With_faux_text() { cin.rdbuf( faux_input.rdbuf() ); }
};
 
class With_stream_detection
{
public:
const char _{ '-' };
With_stream_detection()
{
using namespace sys::io;
if( not is_connected( Stream_id::in ) ) { cin.setstate(
ios::failbit ); }
}
};
 
stdlib::ext::process::Command_line_args args;
(args[1] == "--faux-text"? With_faux_text{}._ :
With_stream_detection{}._), app::run();
}
 
 
Cheers!,
 
- Alf
You received this digest because you're subscribed to updates for this group. You can change your settings on the group membership page.
To unsubscribe from this group and stop receiving emails from it send an email to comp.lang.c+++unsubscribe@googlegroups.com.

No comments: