« first day (1825 days earlier)      last day (3133 days later) » 

10:00 PM
now try to analyze what you can parallelize and what not
Using a functional language with side-effect tracking sure makes analysis easier via some guarantees, but it still is hard.
 
@bwoebi Ah, I don't think parallelization projects are quite as ambitious ;)
 
There have been languages that have been designed to make auto-parallelization easy but they never seem to catch on.
 
It's more about mathsy stuff than auto-parallelising the entire PHP runtime ^^
 
Maybe now that we have more and more cores they might by sheer demand.
 
@NikiC I guessed so. Just saying that even these languages have their limits.
 
10:03 PM
C and C++ have some really weird behavior. I'd hate to make any tool that reasons about C and C++ program behaviors.
 
@LeviMorrison Does C?
 
Yeah.
 
how? except that it allows unrestricted pointer manipulations?
 
@bwoebi (char*)(((int *)&someFloatingPointNumber) + 3)
 
@bwoebi You say that like it's a small thing :D
 
10:05 PM
"Arrays being like pointers except…" <- there are a lot of such statements even in C.
 
Though to be fair, the strict aliasing rules do give you some guarantees
 
C++ makes some of them worse.
 
yeah well, don't start with C++ now.
 
C++ has like a gajillion ways to initialize a struct/object.
Finally in C++11 (or maybe 14) there is one way that is guaranteed to work (but the others aren't deprecated so…)
 
@LeviMorrison right, but they're all just semantic things about the language… you actually can trivialize this down in some intermediary representation.
 
10:08 PM
@LeviMorrison iirc that one way doesn't cover everything either ^^
 
I'm actually putting together slides on various parts of C++ for the course I am making.
Right now I am working on slides for arrays.
I've asked myself "Should I even mention this behavior?" a lot :D
For instance, the first slide says:
> Arrays in C++ are essentially a pointer to the start of the array with some compile-time information about the size of the array.
I think you could probably prove that all of that is false.
But… logically that's what they are. Sort of.
 
@LeviMorrison lol, I was just going to say :D
 
What arrays? Literal arrays in C++ are the same than in C…
 
C programmers don't take it so seriously, but C++ programmers would probably start a long rant about how very different arrays and pointers are and how the implicit conversion sucks so much
 
This class is aimed at general scientists, not programmers or computer scientists.
So… I'm okay with even wild lies if it helps them conceptually understand things.
 
10:13 PM
I really like about PHP that it has one universal arrays and not 10 different ways to do things... Also nice that C has only it's normal array…
 
@bwoebi eh
It kinda sucks that you don't even have a map in C
 
The one missing piece in C/C++ is standardized arrays of sizes only known at runtime.
You can build the stuff yourself but nothing is standardized.
 
@LeviMorrison You mean fixed-size arrays?
 
I'm hopeful that array_view in the newly made GSL will help that.
@NikiC Yes.
 
@NikiC At the point where you need maps, it's often apt to use higher level languages though.
 
10:14 PM
k
@bwoebi Imho not at all
It's common for low-level code to need maps
Unless by higher-level you mean C++/Rust
 
For me personally the decision to use C or C++ on a new project pretty much goes like this:
Does it need a stable, formalized ABI? If yes, use C. Otherwise use C++.
 
@LeviMorrison That seems like a good heuristic
Currently I'm generally using C, simply because I'm out of practice with C++
anyway, good night
(void)
 
@NikiC No, I mean when you need standard maps. Most low-level code usually needs some sort of specialized map
@NikiC s/void/null/ .
 
function() : nirvana {}
 
:-)
 
10:18 PM
Here, I've found us a compromise
It has both an n and a v
 
I like nirvana too, but I think others will disagree :-D
 
@bwoebi Don't start naming things like the guys who developed Phabricator ;-)
 
Do not try and return the void, that's impossible. Instead, only try to realize the truth...there is no function. Then you will see it is not the function that returns, it is only yourself.
 
@kelunik like DiffusionDoorkeeperCommitFeedStoryPublisher.php ? :-D
 
10:21 PM
Diffusion, Herald, ... I just know what Herald does without looking it up.
@Trowski Nope. ;-)
 
gn8
 
 
1 hour later…
11:55 PM
Just to confirm the least evil way that I can think of: I want to provide a library for WebSocket traffic. I want them to send a message off, but I don't want an object of the Message class to have a send() method, because of separation of concerns. Instead, have a factory object that will pass back another object that I can use for sending. Yes?
For example: $injectedFactory->getSendQueue()->send($myMessage);
(Factory may or may not be an injected dependency, haven't gotten to that point of design yet)
Actually, thinking a bit more, factory shouldn't be injected, because I'm writing a library; I shouldn't be dictating what capabilities the library consumer has, just the interface so that they can dictate what capabilities they want me to provide.
 

« first day (1825 days earlier)      last day (3133 days later) »