« first day (3141 days earlier)      last day (1790 days later) » 

12:04 AM
I mean those tanks under tomato plants look extremely suspicious ...
 
@TelKitty So smallpox isn't related to cowpox, and never affected humans. Oh wait...
@TelKitty Given the planting density they're talking about, there's little room for question that they need to do either hydroponic growing or heavy irrigation. Only question is exactly what's in the pipes.
 
12:56 AM
@JerryCoffin The pipes look more suspicious when you connect it with the lack of actual septic tanks on Flavorite Tomatoes' Site (judging by the pictures). I mean, if you look at other projects on the Worms Farm Waste System's website, most have some kind of tank or large hole on the ground.
Pictures could be misleading, but still ...
 
@TelKitty almost all of the world's tomatoes are grown indoors. I think in Sweden
 
@Rick We are talking about septic system, not tomato growing so ...
 
@TelKitty so you don't think tomatoes should have access to adequate septic systems?
 
Nope, we need to fatten them up, so everything in and nothing out ~_~
 
sounds like an unhealthy lifestyle, isn't that McDonalds tagline
 
1:09 AM
@Rick I believe their's is something about "I weigh more than any of the cows they ground up into hamburgers, and I'm lovin' it!"
 
Thanks, and now I have to clean all the snot water off my keyboard.
 
1:32 AM
anyone ever use spaceEngine
it's my new addiction
 
 
3 hours later…
4:34 AM
I am spending sometime investigating septic system. As the land we are buying for the future solar farm is located in rural area with no sewage.
Currently there is only a portaloo there.
Also we are starting small. Currently only using my parents capital, without even loans from any financial institution or fund from any relative.
Why do I have this thrill thinking about all the hardwork? Why can't I be normal. Long hours & hard physical labour work on the solar farm excites me. It would be like building that 2nd dwelling house again, but this time, on a bigger piece of land with more work.
Overseas holiday or luxury goods don't excite me nearly as much. Life treats me so good, always something challenging, always something new.
Although that means you might have to do without me for days at a time in the next year or two (to some people's delight).
 
 
2 hours later…
6:41 AM
So I need to make a set of items where structs are unique based on a enum member. Is there some paradigmatic way to do this? Probably have an std::map?
38
Q: How to update an existing element of std::set?

FrankI have a std::set<Foo>, and I'd like to update some value of an existing element therein. Note that the value I'm updating does not change the order in the set: #include <iostream> #include <set> #include <utility> struct Foo { Foo(int i, int j) : id(i), val(j) {} int id; int val; bool ...

^ This question looks like a non-paradigmatic implementation.
 
 
3 hours later…
 
3 hours later…
user7659542
12:46 PM
Can we agree on the fact that API functions shouldn't be calling each other
 
user7659542
or am I crazy?
 
Never heard of such a rule.
 
@traducerad in what sense?
 
user7659542
simplified example:
 
user7659542
    /* API.c*/

    void foo(void)
    {
         //do something
     	foo2();
     	//continue doing something

    }


    void foo2(void)
    {
        int a = 5 + 6;
    }
 
user7659542
12:47 PM
should become:
 
user7659542
static void bar(void)
{
    int a = 5 + 6;
}

void foo(void)
{
    //do something
	bar();
	//continue doing something
}

void foo2(void)
{
    bar();
}
 
@traducerad that's fine, what's generally not fine is when you're crossing layer boundaries to create tight coupling into deep methods
 
user7659542
doesn t the alternative I suggest make much more sense to you?
 
Windows (still) has this problem, where various libraries were calling into NTDLL directly or deeper inappropriately
 
user7659542
imo API functions should never call each other if you have a lot of common code hide that inside a common static function which is not exposed directly
 
12:50 PM
@traducerad if foo2 and bar are functionally identical no
if they are functionally different then yes
 
user7659542
@Mgetz my bad there is some stuff going on before calling bar inside foo2
 
user7659542
i pulled that example out of my a**
 
user7659542
just to prove my point
 
So for example on most platforms it's common to implement simpler signatures in terms of the more complicated ones
 
user7659542
I hope you at least only expose the easier signature not the complex one and make the complex one static
 
12:57 PM
no, the point is to offer simpler signatures when something doesn't need to be complex
Not everybody wants ReadFileEx sometimes they just want a synchronous ReadFile
 
user7659542
@Mgetz they are identical, replied too quickly. I really sorry but I truly feel like API functions shouldn't be calling each other, they shouldn't be "linked" implicitely behind the scenes
 
user7659542
IMO a static is the way to go here
 
user7659542
if tomorrow you were to expand foo2's functionality you can totally do that by adding code before and after the call to ``bar()` without breaking foo's implementation which also calls bar
 
user7659542
if you were to not use the static function bar and wanted to add more code to foo2, you may impact foo
 
@traducerad first rule of interfaces: Once they are published they are sealed
you can add new flags, but any combination of prior flags must produce the exact same externally visible side effects
if you need new behavior export a new method
 
user7659542
1:07 PM
what if in foo2 you used to connect to a cerver over TCP
 
user7659542
but now due to some obscure reason you first need to do some encryption or whatsoever before connecting?
 
user7659542
now every function which uses foo2 will have all that encryption
 
@traducerad does it change the externally visible side effects?
not talking about the connection here btw
just the relationship between the caller and the method
 
user7659542
depends... function signature and so on doesn't change, but you will take 1-2s seconds extra before connecting now
 
you shouldn't unless you have a super slow computer and server
 
user7659542
1:10 PM
you shouldnt do what?
 
but no it doesn't change anything, and you can consider adding fallback behavior if necessary. Or expose foo3 that allows them to set options
 
user7659542
shouldn t have a delay of 1 or 2 secs?
 
yes
 
user7659542
but now everybody who uses your function and implemented it when it didn't have encryption gets a 2s delay out of the blue
 
user7659542
@Mgetz agreed with this, you may use a foo3. But now you are duplicating code
 
user7659542
1:12 PM
foo2 and foo3 both conenct to the server but foo3 uses an extra encryption or whatsoever
 
user7659542
meaning the code to connect is common and you could have put it in a static function
 
@traducerad no the backend implementation is irrelevant to the caller, more than likely if you introduce a foo3 you'll implement foo and foo2 in terms of foo3
 
user7659542
@Mgetz it is actuallty more than just an implementation detail, you are modifying the behaviour of your function. You are adding some encryption
 
@traducerad if that is transparent to the caller they don't care
 
user7659542
and modifying the performance eventually
 
1:15 PM
it's a little different if you're doing something like an HTTP api
but if you're connecting to a proprietary service, then the caller doesn't care
 
user7659542
1:30 PM
No matter how I think about it, I think functions of a same API calling each other is not clean and makes the backend less modular
 
user7659542
An API isn't an API to itself but to the user
 
Qt API uses itself massively.
 
user7659542
@StackedCrooked there is a difference between qSocket calling functions from qSerialize (if that esists)
 
user7659542
and
 
user7659542
qSocket API functions calling other qSocket API functions
 
user7659542
1:36 PM
the former is totally OK IMO, the latter not
 
@traducerad I'm going to 100% disagree insofar as interface stability is good
You should never be changing an interface which seems to be the core of your argument, your counter example was very special case and probably wouldn't affect the caller in any way that they care about
 
user7659542
@Mgetz Seems like you assume the software architecture you adopt in the beginning is perfect and will be perfect for all the upcoming varying projects. In an upcoming project you may have to vary you i/f slightly
 
user7659542
ideally not at all, except that s not how things turn out
 
@traducerad no I assume that if I'm supporting other teams I need to not be an ass
if it's internal code that they can't see that's MINE
 
user7659542
I have the feeling you don't disagree with using static function, you would rather have your api functions call each other in stead of using a static function
 
user7659542
1:50 PM
the fact that I use a static function is not visible to the API user neither
 
@traducerad having a static or anonymous namedspaced method that does the EXACT SAME THING as the most complicated method is a waste of time
and call stack
 
 
3 hours later…
4:41 PM
@traducerad I can't speak for him, but it's certainly true in my case. I am a god, so if my assumptions seem to be wrong in ways that, for example, violate the laws of physics, then clearly the laws of physics (at least you know them) are what's wrong.
@StackedCrooked To the point that it's a bit like public masturbation in places...
 
@JerryCoffin to the point their own developers have put in rules to discourage it in new APIs
 
5:11 PM
@Mgetz That sounds much too professional. My description was much more fitting for the Lounge! :-)
 
5:22 PM
You guys ever had this problem? Basically, to avoid deep copies but also avoid pointer ownership problems I keep passing increasingly nested lambdas to my functions. For example, load_data(data& data,write_data_functor....
This solves the code correctness problems but somehow inverts the structure of the code.
I've also had 2 hours of sleep, so I can't come up with any solutions. Maybe my load data function should return a mutex :-)
So basically I can't write a get data function without deep copying in the load data method.
What if every function has an optional functor called "next step"? If I wrap it in std::functional junk? idioms.thefreedictionary.com/polishing+a+turd
 
5:40 PM
@Mikhail Haven't really run into it in C++, but sounds suspiciously similar to some Lisp I've written...
@Mikhail Congratulations, you've just re-invented call with current continuation (sort of).
(and no, that isn't sarcastic--call with current continuation is pretty cool).
 
@JerryCoffin but this is a terrible idea because you can't see the structure of the code
Fuck. All my code is functional programing shit.
 
@Mikhail get sleep first, then reason about code
 
Continuations are fucking goto statements :-/
I can't sleep my professor is angry at me for not doing enough work, despite having all performance indicators above my peers. Apparently I need to spend more time training people. So I have to wait a few hours until these kids show up.
 
@Mikhail yes but without the lifetime issues
 
@Mikhail This is one of those areas where one person sees it as a truly horrible hack, and another as the soul of beauty and elegance.
 
5:49 PM
@JerryCoffin you have to read the code to figure out what it's doing. This is a halting problem.
 
@Mikhail give up and just move to haskell?
 
I can't become one of those technical incompetent, and otherwise meak programmers that only know how code in abstract terms.
Fuck if only software engineering was a real engineering discipline, like my hero Alan Kay thins it should be
Also you're not a real programmer unless you write your own LISP interpreter for each project, and the internet is poorly organized and will live for a years max
 
@Mikhail you need sleep... and a lawyer
 
@Mgetz they keep-trying to sue me for IP reasons
Its cheaper to agree with a cease and desist order
 
 
2 hours later…
8:12 PM
and onebox fail
yep still fail
 
8:32 PM
4
A: Need clarifications in C-style, reinterpret, and const casts

Jerry CoffinNo. A C cast can do the equivalent of a const_cast, a static_cast, a reinterpret_cast, or a combination thereof. In case that wasn't quite enough, it can also do at least one minor trick that no combination of the newer casts can do at all! You can use const_cast with defined results if the orig...

 
8:46 PM
@JerryCoffin I've always thought of a C style cast as a drunken cast that was a bit three sheets to the wind
"Don't you tell me what I can't cast... I'm the best cast that ever was!... HIC"
 
8:57 PM
@Mgetz Hmm...that'd be an interesting trivia question: what kind of rigging does a boat need to (literally) be three sheets to the wind?
@Mgetz I think of it as much more: "how do we squeeze the compiler into a machine that can only address 64 Kilobytes of RAM?"
 
@JerryCoffin technically any rigging with five lines to a sail can be three sheets to the wind... as in sailing parlance a 'sheet' is a line.
technically four would work too
 
@JerryCoffin You can at least 3647 pins:
^^ /cc @Mikhail
 
@Mysticial you have a higher rez image of that? and does that socket have SOC voltage? because if it does... yikes... a five phase VRM
That's going to be running on the bare edge of disaster at all times
 
Love the concept though.
I remember when everyone was excited to see the mini-ITX X299 board.
Nobody ever thought we'd see an even bigger socket on mITX.
 
9:12 PM
six phase VRM.... for that socket... they are NUTS
even if you get top of the line powerstages... you'll be running them flat out at current limit
that said... potentially interesting for N2 overclocking some of the lower core count unlocked SKUs
 
Unfortunately, I don't an RGB header on that mobo. Therefore it's trash. :)
3
 
Go get yourself the ROG Maximus I believe... which has the 10 phase 20 powerstage VRM
it can only deliver almost 2k+ to the CPU
 
9:47 PM
@Mikhail er... smart pointers? returning a task/future?
 
10:14 PM
@Mysticial TR4 has 4094 pins (well--contacts). Can't imagine what's wrong with them, coming that close, and not making it a nice, even 4096 pins though.
 
10:45 PM
@Mysticial don't worry they started making ECC backed RGB RAM
 
@Mikhail I increasingly nest data structures, which is another way of doing the same as you
 
11:05 PM
@LucDanton Can you give a more specific example?
 
@Mikhail riffing on your example, load_data would be returning an object that the downward code (in your case, that in the closure) uses; which code might very well be returning an object which incorporates the data object etc. for downwarder code to use and so on
 
So something like: A = task1(); B=task2(A); C=task3(B)?
 
yes, with moving/forwarding
 
I see, so basically you can't touch A or B because they've been moved?
 
@Mikhail you get the content of A in B, and later the content of B which has the content of A in C
 
11:17 PM
That sounds hard and strange. Also sounds like it would be harder to implement conditions.
 
if you’ve ever returned a unique or shared pointer, it’s like that
 
Okay well I'm finally done working with these children. Now I can focus on what really counts, making other people money.
peace
Also interested in what the code looks like
 

« first day (3141 days earlier)      last day (1790 days later) »