« first day (2677 days earlier)      last day (2497 days later) » 

00:00
Sorry, I've obviously been exposed to a little too much click-bait...
nwp
nwp
Is it cats getting pregnant?
@nwp I dunno. I've been exposed to click-bait, but clicking through...not so much.
Any program should be designed like human brain - always run at least 2 threads: conscious & sub-conscious threads
00:31
And here I thought the ghost of coding past was all those repos I haven't updated in years. Guess it's really @Mikhail though...
00:49
why don't we have nuclear rockets/spaceships?
They don't generate enough momentum, but there exist small thrusts that might be considered nuclear, etc.
nwp
nwp
Nuclear reactors are big and heavy. Bad for things that must fly.
@nwp wrong, blame the EU
nwp
nwp
:(
RTG are a very effective strategy but blame the EU, for bullshit environmental concerns.
The Systems Nuclear Auxiliary Power (SNAP) program was a program of experimental radioisotope thermoelectric generators (RTGs) and space nuclear reactors flown during the 1960s by NASA. == Odd-numbered SNAPs: radioisotope thermoelectric generators == === SNAP-1 === SNAP-1 was not deployed, but was designed to use cerium-144 in a Rankine cycle, with mercury as the heat transfer fluid; it operated for 2500 hours successfully. === SNAP-3 === SNAP-3 : In 1961, the first RTG used in a space mission was launched aboard a U.S. Navy Transit 4A and 4B navigation satellites. The electrical powe...
01:01
for small rockets/spaceships, nuclear system might be too heavy, but if we want to build gigantic manned ships and heading to other planets, nuclear system is an idea option
it doesn't provide inertia, also its not too heavy, fuck you people
You can use nuclear to heat for example, but still no inertia. As heat is typically not the limitation for distance, the whole nuclear rocket thing didn't have an obvious advantage.
In summation, NASA's current reasoning is that a NPR can be developed that would be twice as efficient as its chemical counterpart, though it is likely such an engine would only be used beyond the Earth's atmosphere.
01:22
what inertia?
also
The explosive yield of a nuclear weapon is the amount of energy released when that particular nuclear weapon is detonated, usually expressed as a TNT equivalent (the standardized equivalent mass of trinitrotoluene which, if detonated, would produce the same energy discharge), either in kilotons (kt—thousands of tons of TNT), in megatons (Mt—millions of tons of TNT), or sometimes in terajoules (TJ). An explosive yield of one terajoule is 0.239 kt of TNT. Because the accuracy of any measurement of the energy released by TNT has always been problematic, the conventional definition is that one kiloton...
using the heat generated to propel air in a controlled environment
01:49
@LucDanton does it involve fingers & butts
Just checking whether pingul discussed his Book Guide and List rollback here before he made it.
And it doesn't look like it. Restoring Jerry's edit.
@RobertTroipartrois unlikely
02:19
in that case go ahead
as a warning it’s a long and meandering story
my seat is comfortable and I just made milk tea
@Mikhail In fact, for the power provided, some of the reactors were basically tiny and quite light: "The SNAP 8 Developmental Reactor had a reactor core measuring 9.5 by 33 inches (24 by 84 cm), contained a total of 18 pounds (8.2 kg) of fuel, had a power rating of 1 MWt."
@RobertTroipartrois I’m going for a coffee myself
anyhoo I’m sure you’ve used languages with GC before
and one obvious strength of GC is that you can construct a bunch of interrelated objects, have them refer to one another as they need, and return that to a caller
then it doesn’t matter whether the clients has all the objects or only has one end of the dependency graph, the GC takes care of that
@TelautonomousKitty Most of the size and weight o a nuclear reactor stems from the need for shielding--but on an unmanned mission, that's generally unnecessary. The fuel is dramatically lighter: 1 pound of uranium is equivalent to around 6000 barrels of oil.
02:26
@LucDanton I have written a fair bit of C# yes (and some OCaml) (many years ago when I was still young and untainted by C++)
without a GC you have a choice of coping mechanisms, starting with the naïve translation of having every object smart point to what they need
if the dependency is more or less tree-like you can also have a big mother object holding everything together (let's call that it a scope object) as subobjects (as members or bases, the difference doesn’t matter)
the second approach takes care of lifetime very nicely and appropriately but it’s not obvious how the interrelated objects (now subobjects) refer to one another
if you go with pointers/references (once again a naïve translation) then the scope object can’t move in memory or else everything is invalidated
so far I'm following which is quite exceptional
the simplest thing is to have every object take their dependencies as explicit arguments everywhere in the member functions, not the constructors and give up on storing these references altogether
then the client has to handle that when calling the member functions etc., plumbing the dependencies
in fact that’s been the whole pattern from the start relative to the GC approach: make the hidden things not-so-hidden, giving the client more flexibility (i.e. get to control the lifetimes) but also more responsibility (i.e. plumb the dependencies)
@RobertTroipartrois so that all makes sense right?
so far so good
well, on a somewhat abstract level the pain point of unGCing that kind of object graph is that we can't really have absolute references
what if we had relative references, e.g. relative to the scope object?
02:35
Doesn't that exist already?
@RobertTroipartrois on an abstract level you can think of everything
e.g Boost IPC has pointers relative to their allocation arena
@RobertTroipartrois yes indeed, that’s the sort of stuff
so the dark secret technique of eternal torment is that if you squint you can do that in the C++ object model via upcasting *this, i.e. going from subobject (aka object graph nodes in our problem) to parent object (aka the scope object)—then once you have the scope you can access the dependencies
I think Sutter implemented something like that, sans the relative pointers
@JerryCoffin Rockets usually uses hydrogen as fuel though, energy density is roughly 3 times as oil. But nuclear can be half a million to a million times more.
02:41
@RobertTroipartrois doesn’t ring a bell; how do you refer to things?
so it makes sense to propel a very large spaceship using nuclear propelling system
Energy density is the amount of energy stored in a given system or region of space per unit volume. Colloquially it may also be used for energy per unit mass, though the accurate term for this is specific energy. Often only the useful or extractable energy is measured, which is to say that inaccessible energy (such as rest mass energy) is ignored. In cosmological and other general relativistic contexts, however, the energy densities considered are those that correspond to the elements of the stress–energy tensor and therefore do include mass energy as well as energy densities associated with the...
just to make clear: C++ has no relative pointers/references per se, it’s just how *this + casting across a hierarchy works out de facto
@RobertTroipartrois oh right, that’s topical—I forgot how it works though
deferred_heap* myheap;
void* p;
sure
In his implementation the pointers to objects also point to the owning heap
Yeah I was typing that!
@RobertTroipartrois which means it has to be fixed in memory or the base has to be updated across moves/returns/what have you, right?
02:45
Actual C++ being discussed in the Lounge? What the shit...
if you hold an absolute base + an offset it’s not really an improvement over holding an absolute target :þ
Yeah, I think that solution makes compaction impossible for example
It just keeps on putting garbage on until destruction
@RobertTroipartrois anyhoo the approach I’m talking about really is relative aka works for returning
do you need an example? I foolishly didn’t prepare one
I think I understand your concept p well
which is surprisingly unusual
okay so I have to wonder: how would you rate the usability of such a thing? how risky do you figure it is, i.e. how wrong can it go for the user?
02:49
is it possible to make it work for types whose definition I can't change?
@RobertTroipartrois it’s possible to adapt, aka if you a client c; c.do_some_work(my_dependency); then you can write something that holds a client and has its own .do_some_work() which fetches the dep from the scope and pass it on
alright
@LucDanton tbh I am not sure I've ever needed GC in my C++ so I dunno
presently wishing I had a time machine to prevent rrsprintf.h (aka stb_sprintf.h) from ever being created
but really it’s for closely interconnected objects where globbing them into one giant class (which the scope is) is not enough, you also have to have the separate functionality delineated into subobjects (e.g. maybe someone else needs to accept client& somewhere)
@RobertTroipartrois I can tell you one obvious thing that stands out: if the (sub)objects are upcasting to a scope then you don’t want to allow a client to copy them nilly-willy: what if they put a copy outside of a scope object?
that can probably be detected at runtime, can it not
02:55
@RobertTroipartrois and that’s awful!
less awful than UB
we can do better
In C++, I am not sure
you can seal (some of) the demons of the dark secret technique of eternal torment with the power of friendship and private destructors (or just protected destructors and assume the user is not Machiavellian)
with an inaccessible destructor that will catch accidents of the form auto inadvertent_copy = the_scope.a_client();
but that will not prevent referring to the objects, or moving/returning the scope object
@RobertTroipartrois I don’t know how well you can follow along without a PoC
Person of Color? Oh come on
(I am following)
03:02
good, then we have cleared all the meanders
I was trying to use the technique but I ran into an annoyance, I essentially wanted one of the objects to be a my::tuple<my_thing, my_other_thing>
where my::tuple was meant to be a dumb, almost tuple-like holder—i.e. it’s not specific to the scope and useful elsewhere
the snag is that e.g. my_thing can’t just friend my::tuple, because then any client can create a my::tuple<my_thing, …> and subvert the relative reference
the obvious thing to do is to specialize my::tuple<my_thing, my_other_thing> specifically, making that destructor private and friending the scope as well
which doesn’t feel right
because I really want this type to be as dumb as possible, and that includes forbidding client specializations
person of no colour? who is transparent??
well you're kinda painting yourself into a corner no matter what, I guess
maybe just tell the user they're not supposed to construct stuff on their own
there are massive amount of people of any colour, mass implies cheap, we are all cheap
I personally wouldn't try idiot-proofing things too much because it's unfeasible in general
just state your contract and let live, I would say
@RobertTroipartrois oh sure, it’s the usual Machiavelli vs Murphy thing
but inadvertent copying is a really easy accident to run into, so it matters a lot
in the end I’m contemplating a policy-based design with a partial spec—but not one that the user writes
03:15
@LucDanton that's kinda cool
which is still a WiP because I have to think how to go from subobject to holder
@RobertTroipartrois tl;dr there wouldn’t be as many hoops with a general purpose offsetof cos that’s also a relative reference, but it’s too limited in use-case
@RobertTroipartrois the technique put to use, from an older thing of mine
clang optimizes that away entirely, p nice
gcc is almost there yet not quite
03:31
@RobertTroipartrois I haven’t checked since then but at the time there was a couple things you could wiggle to prod the compilers into doing the right thing
did you know I have this Q&A as favorite :tear:
I think that came up previously yeah
03:54
@RobertTroipartrois it’s starting to be boilerplate-heavy for a PoC, but the constexpr-friendly reinterpret_casts of GCC is always funny
how do I know dementia has not set in early for me ... feeling dumb lately and it's not because it's that time of the month (2nd day) or having a hang over (coz not touched alcohol)
I mean if I was dumb to start with, I would have been used to it now
@LucDanton Is that a bug or implementation choice
bug, constant expressions can be detected
although I’m not super up-to-date on reinterpret_cast
obv. you can just ditch constexpr and be fine
04:32
IIRC C++20 proposed bit_cast is constexpr tho
I’m not sure that would help
are you thinking of a double bit cast between pointer types?
my mistake, I thought it was for reading the bytes
A single bitcast from *this to your member& thing
Although I forget how it works
@RobertTroipartrois it’s surprisingly extremely lenient
> Note that this doesn’t prevent constexpr versions of bit_cast: the implementation is allowed to error out on bit_cast of pointer.
dang, although that’s a 2016 proposal
That sentence is still in the R2 from november 2017
more recent, no constexpr fiddling of pointers
> but there’s also some desire (by the same implementers) to have those features available in order to support things like constexpr instances of std::variant.
how would it help?
04:40
um, good question
for added fun std::variant is already sprinkled with constexpr
> The return type is the common type of all possible INVOKE expressions of the Effects: element.
tangent, but what’s the common type
it’s not in the index and I doubt it’s the common comparison type
@LucDanton Top :hap:
I have been watching funny trailers, and this one is called: Piranhaconda
@RobertTroipartrois lattice not go down that road
> The common type of two time_point types is a time_point with the same clock as the two types and the common type of their two durations.
the only other instance of 'common type' that is (possibly) not about the usual arithmetic conversions
I,m so confused right now
Maybe variant<all, possible, return, types, ...>
04:52
I like that you think so highly of the SC
libstdc++ interprets this as 'all invocations shall have a common return type'
why am I getting lost in all this nonsense ._.
 
1 hour later…
06:38
Was excited to do some C++ today, instead spent most of my time on Imgur waiting for stuff to compile
I keep changing this header that ~150 files depend on, and its killing me
spent the day working on elevation plans and feeling depressed about being bad at spatial rotation ...
almost done though
Looking forward to seeing gains by replacing std::map with std::unordered_map, who thought maps were supposed to be ordered anyways?
07:14
(gdb) python print(gdb.history(0)['value'].type)
std::remove_cv_t
that’s… interesting
gdb.history(0)['value'].type.template_argument(0) results in RuntimeError: Type is not a template. ._.
oh, for an alias like that I can strip_typedefs()
 
1 hour later…
08:54
@TelautonomousKitty Maybe you actually got smarter which enabled you to realize you are dumb a la getting out of Dunning-Kruger effect ignorance.
what am I actually doing here?
@JerryCoffin well, I don't give a rats ass how they are working internally... I care about the observable functionality... But I think I'm just going to stick to diagrams that use BJTs.... I think BJTs are what I actually want to use, plus I think they tend to be cheaper for similar sized packages
'yarr don't give 'e rats assssss.
@thecoshman (don't mind me butting in..) for what?
09:14
@thecoshman quora.com/…
They don't seem to be exactly the same.
@ABuckau what do you mean exactly?
obligatory III-V will save us
What are you using it for.
09:30
@ABuckau looking to make a very simple pooter (at some stage)
@thecoshman to what extent?
Ven
Ven
Hi
@thecoshman is that a British expression, to 'give a rats ass'?
@benardier It's an expression I use... not sure if it's a British one or not
Hi Ven.
09:42
@benardier still not sure :P
'does not immediately catch fire on boot', everything else can be a stretch goal
I think getting to the point where you can consider it 'booting' would be quite impressive :P
plus you can always catch fire later
I would start with can add 2 numbers and do conditional jumps
aka make it turing complete for a start
09:59
@thecoshman ah. I assume you understand how to construct logic gates from bjts? ..if so, isn't very big jump to using FETs. I haven't looked, but bjt are probably cheaper... 1000pcs 2n3904 ~11 USD.
The main thing seems to be the RAM... SRAM using FETs can be done with only about 6T, but I can't work out if I could just swap with BJT and get the same result
For the most part though, BJT logic gates compared to FET logic gates are more or less the same, just BJTs tend to use pull ups. And I think FETs are 'easier' for high Z output
10:12
-1
Q: Does boost shared memory library work with processes on 2 different machines

Nishant SharmaDoes boost shared memory library work with processes on 2 different machines like on a distributed network ?

what
Ven
Ven
@sehe what's subtle?
@sehe Boost.Cloud
10:28
On the subject of how III-V will save us, for work I'm probably going to get a GaAs IR camera: the QE on that bastard is like 4% (compare to 63%+ for visible, cameras)
@Ven White Powder
Ven
Ven
@sehe not very subtle
someone has tweeted about it
@Ven That was the joke
I doubt the screenshot is legit. Funny anyhow
Ven
Ven
I'll call those "sehisms"
Ven
Ven
10:40
@sehe Rightfold can have their own. I have my own
10:58
What that shows is that you use the word far too little in useful contexts :)
nwp
nwp
@StackedCrooked Can you let programs read /proc/cpuinfo and /proc/self/maps (and probably some others)? It would be really great if sanitizers worked on coliru.
(also behold my mad C++ skillz)
Ven
Ven
@nwp can't you force -march etc?
@nwp +1
@Ven irrelevant
nwp
nwp
@Ven I thought that was only to specify the target platform, not the host platform.
Ven
Ven
Whichever options it tries to get from /proc/cpuinfo.
11:12
It doesn't (AFAICT). Anyhoops, asan/ubsan not working is a runtime issue
Coliru can compile with asan/ubsan fine AFAIR, but running is a dead end
nwp
nwp
11:24
Also in my opinion clang should default to clang-5.0, not clang-3.8 on coliru.
 
2 hours later…
13:24
Let it go
Why can't I type "Let it go" a second time
SO your chat spam system is stupid
Ven
Ven
@RickAstley Double-free are disallowed.
@Ven And what if I free and then delete?
@Ven Or delete the free men roaming this world?
@sehe I once used IPC to call nuclear_core_shutdown() on a system in Korea.
@RickAstley it was you all along! dang it!
nwp
nwp
@RickAstley Well, it did it's job on at least 1 message.
@RickAstley for which humanity thanks you profusely (PS you're no longer welcome in the US)
 
4 hours later…
17:50
Religious war going on here:
164
Q: Is there still a reason to use `int` in C++ code?

InsideLoopMany style guides such as the Google one recommend to use int as a default integer, when indexing arrays for instance. With the rise of 64-bit platforms where, most of the time an int is only 32 bits which is not the natural width of the platform. As a consequence, I see no reason, apart from the...

The chat looks so weird on a slightly bigger monitor than I had.
So much empty space.
18:39
I've never read the Google style guide - I be afeared of it or, more accurately, it's likely effect on my blood pressure. — Martin James 2 days ago
Vintage Martin
 
2 hours later…
21:06
@Mysticial use auto
 for (auto i = 0; i < size; i++){
    really_big_array[i] = ...
}
Not sure that's gonna work.
why not?
@Puppy size > 2^31
ah yeha
This is arguably a case for a range-based for-loop. But you can't do that everywhere.
21:11
auto i = static_cast<size_t>(0)
Its more of a case for auto i = 0 to be size_t
@Mikhail size_t i = 0; is clearly better than that mess.
static analyzer wants me to use auto, I am but a slave to ReSharper C++
@Mikhail If it prefers that, it's obviously broken and should be replaced or ignored.
@Mikhail Sounds like it's as bad as the Google style guide.
auto i = 0z
21:13
@Mikhail Should be handled by taking more context into account. In a for loop, it should really take not only the initializer, but also the comparison expression into account in determining the type for auto (but yes, I realize that's not a trivial change).
@Morwenn If you need to explicitly encode the type you want into the initializer to get auto to do the right thing, you're probably better off without auto (IMO).
@Mysticial Definitely the case.
i = 0z; <- auto assumed
@JerryCoffin Personally, if I'm trying to find an excuse to use auto, I probably shouldn't be using it at all.
Install ReSharper, run code analysis, it wants auto everywhere. Also everything is lower case because the USSR is a poor country and can't afford shift keys.
@JerryCoffin so no auto foo = std::vector<int>{{1, 2, 3}};?
@Mikhail odd I thought they used to not be able to afford lower case, or was that just in the Soviet Union?
21:19
can't you drop the <int> part now that we live in a civilized world? :p
there is a "In Soviet Russia" joke here somewhere...
nope
@Morwenn I think that's in C++20? might have made it into C++17
deduction guides are C++17
A good idea to avoid confusion is to declare each variable separately. Saving characters were possibly good for K&R having a 10 characters/second interface for their Teletype terminal. — Bo Persson 21 mins ago
21:35
0
Q: Who makes standards in a programming language such as C++?

Xaibu GemiDo the conventions in a programming language such as in C++ (such as extraction operator >> ) can be changed by a developer? Or is it restricted?

I really wanted to answer "The standards committee"
but the >> operator can be changed
lol Jerry's comment xD
@Borgleader Some days the evil just needs to come out.
22:18
During a meeting today, I found myself saying that, of course, you can't upload a root certificate to a toothbrush and it actually contributed to the conversation.
@Morwenn If you're blind, you could have had guide deductions every year for years
@Mikhail I'm part amused, part annoyed by all the complaints you so easily have. "it wants auto"? You tell it what to "want". And, don't sweat the cringlies. Actually, just disable them globally (the style hints). It'll be faster as well.
22:33
@JerryCoffin so, NAND gate has a pull up resistor, then two transistors (collector emitter) in series from +ve to 0. Am I right in thinking that you cant just move that pull up to the other side of the transistors for a AND. ie from 5v, R, output, T, T, 0v to 5v, T, T, output, R, 0v.
wait... no you can do what I described
which is good, because I've planned out a good bit based on that assumption
23:03
depends on if you want push or pull of current (or both)
> 3-4+ mesmer teams are now consistently winning automated tournaments
@RobertTroipartrois our new overlords

« first day (2677 days earlier)      last day (2497 days later) »