« first day (2259 days earlier)   

12:00 AM
@JerryCoffin Why is Rust compilation so bad?
 
you know what else I've heard compiles badly
swift
on large projects it chokes bad enough to crash often
I don't think a compiler ever crashed on me
but that's life in C# land :P
ez code ez life
 
@Mysticial Partly because the compiler is basically doing lots of proofs on what you've done, to ensure you haven't broken any of its memory usage rules and such. Some of it is probably also just lack of optimization--for most of its history they've been working much more at completing the language than optimizing the compiler.
@AlexM. If you start with an easy language, it's pretty easy to ensure a compiler never crashes (e.g., I've never crashed a Pascal compiler, and I have a hard time even imagining how one would get to a state that led to an ICE or anything similar).
 
nwp
@RobertHarvey it confuses me greatly that you follow what the lounge says
 
@AlexM. I've had the displeasure of having to use Swift, and I have to say that the lack of decent tooling is only part of the problem; a big part is that the language they're tooling is shit.
 
@Mysticial Keep in mind that this is the same person who said things like:
Jun 8 at 20:27, by rightfold
PHP 7 is great and far more fun to work with than C++.
 
12:10 AM
@JerryCoffin I presume that makes it impossible to implement stuff like memory pools?
@JerryCoffin shhhh I know. :P
 
@Mysticial Umm....not sure. I've never delved into it nearly that deeply, but my immediate guess is that if it's possible at all, you'd have to jump through a lot of hoops.
 
I get this strange feeling that the priority of most new languages now is idiot-proofing. (which isn't wrong, but there's a cost to it)
 
@Mysticial Keep in mind that this is the same person who said things like:
Oct 7 '15 at 17:49, by elyse
@Ell I like my chicken farms like I like my men: with big cocks.
 
@Mysticial I'd tend to agree, but at least in the case of Rust it strikes me as being a little like a car that's putting immense amounts of effort into an AI to ensure that you don't back up across tire rippers and shred your tires. On one hand, it's absolutely true that getting your tires shredded isn't good. On the other hand, it also arises so rarely that effort on preventing it is almost certain to be wasted.
 
Ell
@Mysticial I think you can turn the borrow checker off for blocks of code
So you get safe and unsafe bits
 
12:21 AM
btw there's a discussion on rust going on here about an article news.ycombinator.com/item?id=13230551
 
TBH, when I started this new job, I was quite amazed at the lack of idiot proofing in virtually the entire system. (except for basic fat-finger protection on manual trades and properly controlled production release system)
 
@Xeo fireworks is so much better than bow for flying
 
There are no code reviews, you can do whatever you want.
IOW, you really have to know what the fuck you're doing.
Whereas while I was at Google, it was the complete opposite.
@JerryCoffin The other thing, is that no matter how idiot-proof you make something, there will always be bigger idiots. Something I still run into a lot for users of my pi program. Even when I put in technical protections to prevent the user from doing something stupid, they always find a way to do it. And they blame the program. It's almost hilarious.
I put a massive red warning that says, "YOU DO NOT HAVE ENOUGH FUCKING MEMORY TO DO THIS? DOING SO WILL FREEZE YOUR COMPUTER. ARE YOU SURE YOU WANT TO DO IT?" They always say yes and they complain why their computer freezes.
 
12:39 AM
@Mysticial When you have a system that needs to run 24/7 and hire brand new graduates at a rate of thousands per year, that seems nearly inevitable.
@Mysticial Sounds oddly familiar. Years ago (pre-SO) I pointed out to somebody that under Windows NT a thread running at time critical priority took priority over everything else (even memory refresh). Was told that was impossible, so I wrote some code specifically to demonstrate exactly that--and was promptly told that I had no clue what I was doing because running the code crashed the computer (exactly like it warned them it would)...
 
@JerryCoffin Wow. Wait, memory refreshes were controlled by the OS at the time?
It's one thing to do stupid things just to see what happens. It's another to do it and be, "what the fuck" at what happens.
 
@Mysticial More or less, anyway. Refresh was initiated in response to an interrupt, and the OS controls the interrupts.
@Mysticial Depends. If you're exploring unknown areas, there are certainly times you get unexpected results. But yeah, when the results are known and you've been told what to expect, then get upset when exactly that happens. In this case, I think it was pretty much just trying to distract from the fact that he'd been proven clearly wrong.
 
This code must run as fast as possible -- Yet you use new[] that calls the allocator for no reason. — PaulMcKenzie 1 min ago
 
12:54 AM
lack of QA's presence always make me feeling unsafe
users will use your system in the most unimaginable ways
 
1:25 AM
@Borgleader needs more boost::pool
the C++ friendly way to leak resources
@JerryCoffin Do you happen to have the code for that lying around. It would make a good blog post, for the HN audience.
 
@Mikhail I'm not sure. This was 20 years ago or so. I'm pretty sure it won't work on modern hardware anyway (refresh now normally handled entirely by the memory controller--no CPU participation needed).
 
@JerryCoffin I've also played with Windows priorities a lot but never had anything crash on me... What did you do? Elevate the priority and then _sleep(10000)?
We're not talking about Windows 3 are we?
 
@Mikhail No--NT (3.5 or 3.51, if memory serves). The OS knows that a Sleep blocks the thread, so it lets other threads run. I just wrote an infinite spin loop.
 
I want to believe
 
1:41 AM
To put the time frame in perspective, the conversation arose because somebody proudly proclaimed that with the wonderful new Windows NT, it was impossible to do anything in user-mode code that would crash the OS.
 
Well it should be impossible, modern version actually require you to have some kind of super user permissions to elevate thread priorities.
Also NT > DOS
 
yes, it uses more memory
fatter OS
 
brb, binding r-value to l-value reference
 
Woman arrested after 93-year-old grandma bashed in 'feral' attack
that head line
 
1:56 AM
yo wassuuuuuup
 
@Telkitty an excellent and adorable picture indeed
 
 
1 hour later…
3:31 AM
Hi
5
 
3:52 AM
@MarkGarcia oh my god I almost cried
 
I'll wait for the update when the contraption is laser-cut.
 
are all her posts as hilarious?
 
I think I've seen the blog crop up from time to time. I don't follow it though.
 
no, but they all look interesting.
Looks like she typically just goes through her projects step by step with helpful tips and such
 
4:41 AM
So, I frequently deal with DLL that do terrible shit like divide by zero, especially when the hardware that they control is removed. I'm wondering how one could implement a hypothetical language feature that solves this problem...
Maybe some kind of mechanism that does function calls in a different process space?
 
@Mikhail The programming language could require the programmer to prove that no such action will occur
Similar to Rust requiring lifetime annotations.
You could also use an interpreter to deal with these issuse.
 
That is a good idea when you have have the source, but I don't think its applicable to binary blobs
also that is a terrible idea
 
@Mikhail You can still do it if you want (with a properly crafted virtual machine).
 
Your separate process idea is interesting. You would have to use some IPC to shuttle all DLL calls and results back and forth.
 
Yeah, it needs IPC, but I'm wondering if this kind of IPC is possible with C++ template magic. Maybe something like std::async
The real problem I guess is pooling the IPC, don't want to be making a new process every function call...
 
4:49 AM
The way I would do it is to create a program which creates a wrapper DLL.
 
Browsers somehow do these kinds of tricks.
 
Read the symbol table of the DLL you are trying to wrap and "manually" do code generation for the wrapper.
 
The key thing is the process space isolation
 
@MarkGarcia Yeah, by using an interpreted language.
 
So, back when the earth was without form, and void, people used COM
6
 
4:52 AM
@Mikhail Leads to a false sense of security and COMplacency.
 
@Mikhail There's no void. Only HRESULT.
 
@Mikhail How about just an easy way to catch the exception thrown by the hardware on the (we hope) fairly rare occasion that it happens?
 
Its hard to throw across MSVC RTs, but divide by zero, specifically isn't a catch-able exception.
I'm just here to muse about language features we should have :-)
 
5:13 AM
@Mikhail Making it a catchable exception strikes me as a fairly reasonable language feature.
 
What would Admiral Ackbar say?
Although, if we returned division objects instead of doing actual division we could check for it in _DEBUG builds.
 
5:29 AM
Admiral Allahu Ackbar
 
6:18 AM
@Rapptz ( ͡° ͜ʖ ͡°)
 
Also somebody send me a free copy of PVS studio
 
best xmas present it must be ...
 
Also Hex-Rays
We love to develop software and do it well. Read more...
 
looks like I am maintaining my windows app next
 
Lets play "identify that video game"
 
6:32 AM
do abused cats bite human more, I would think so
 
@Mikhail why, that’s the quite famous wp-content
 
WordPress?
 
sorry, I meant uploads: the game
 
good, now you ask one, and we're keep this going until my code compiles
 
6:39 AM
oh, wasn't prepared for this
I'm on mobile which makes things difficult
 
damn I knew I was close
 
@Mikhail you could watch the review in the meantime
 
I have the game :-/
 
6:53 AM
 & Publisher
(biz name)
Not interested in receiving occasional updates about (biz name)? Opt
out of our mailing list.
 
 
sent that using a script in dos mode?
or from linux shell
 
7:14 AM
Cats bite their owners to demonstrate affection, colloquially known as a love bite, but also to warn that they are becoming over-stimulated and want to be left alone. Some cats are also more physically sensitive than others, becoming agitated from too much petting.
not sure first link on google results should always be trusted ...
 
morning
 
morning ... noming nom nom
 
7:28 AM
@LucDanton that's what she said
Raté mon RER à ~20 secondes prêt. Quelques minutes plus tard, annonce : "suite à un mouvement social, les trains sur la ligne B sont retardés de 20 minutes". /cc @Rerito
Je suis bien en France
 
bienviendu
 
gesundheit
 
arbeit mach frei
Probably the first open-source motto when you think about it
 
7:46 AM
huh. I don't follow. Also, I don't think it's anti-capitalist, so it should just be Arbeit
> dos mode
 
On a Microsoft Windows computer, DOS Mode is a true MS-DOS environment. For example, early versions of Windows, such as Windows 95 allowed the user to exit from Windows and run the computer from MS-DOS. Doing this allowed older programs written before Windows or computers with limited resources to run a program.
 
Try TRES Mode, its 50% faster
 
who needs more fast needs to download more ram, trollololo
 
huh, maybe calling that function difference(ctx, a, b) when it’s an equivalent of b - a wasn’t the right thing to do
 
std::minus
 
8:06 AM
oh right, an std::vector<T> takes std::initializer_list<T> exactly ._.
 
2
Q: Check if std::function is std::plus or std::minus

Tips48I have a function: bool basicArithmetic(std::function<int(int, int)> func) { } It should return true if func is an instance of std::plus or std::minus but I have no idea how to check. I can't use dynamic_cast because it's not a pointer.

lol
 
@Mikhail ...seriously
3
Q: For loop appears to be practically infinite

Michael BullockI'm debugging some code at the moment and I've come across this line for (std::size_t j = M; j <= M; --j) (Written by my boss, who's on holiday). It looks really odd to me. Can anyone shed any light on what does? To me it looks like an infinite loop.

> Written by my boss, who's on holiday
 
Bullocks
 
good job, boss. you probably don't do code reviews either
 
> Maybe it should be called Professor Quinn’s Fantastic Patented Cat Confabulator.
lel
> Boss replaced by lazy-web
@Mikhail Next question: "Where does that smell come from when I open my code base?"
Please don't add "thank you" as an answer. Instead, accept the answer that you found most helpful. - From Reviewmorgul 7 hours ago
@morgul This is that answer. — sehe 49 secs ago
 
8:36 AM
I don’t know if there’s still time for inclusion or if it’s even on the agenda, but as usual the standard library will lag behind with respect to some language features: no guide for std::array (cc @MarkGarcia you asked for cool things to do with guides, here’s not one of them)
 
Xeo
@MarkGarcia That's just beautiful.
 
@rodgertq @mclow @zygoloid because of Richard, I now add a caveat to "no one is a C++ expert".
 
@CheukKinSing Lol, le classique "mouvement social" de Noel
C'est tellement cliché, tous les ans c'est la même :')
 
@sehe Fair enough.
 
> error: cannot deduce template arguments for 'annex::optional<T>', as it has no deduction guides or user-declared constructors
huh, taking that a face value that would mean inheriting constructors are even more second class—but I’m not double-checking that
 
9:03 AM
In CEdit MFC. When i add * is always on left side?
 
9:14 AM
So, GCC7 only lacks variadic using to fully support the core language part of C++17.
 
@Mikhail bad code
 
@Morwenn Did they fix the lambda pack bug? :P
(I'd've known if they did, since I'm CC'd on it :D)
 
@Griwes No idea, I don't use lambdas as much as you do, and I don't follow bugs.
 
@sehe wow that's some overzealous moderating
 
@LucDanton oooh that looks awesome to me.
 
9:26 AM
@Morwenn My point being, without that fixed it's hardly "full support".
 
@Griwes Full buggy support.
 
9:57 AM
> Complexity: Makes only N calls to the copy constructor of T […]
spec for the range constructor of std::vector<T>
it’s curiously out of date, taking e.g. std::move_iterator into consideration
 
It will probably be reworded when ranges make their way into the collections.
 
10:16 AM
$ file annex-range/include/annex/range/consumer/fold.hpp
annex-range/include/annex/range/consumer/fold.hpp: C source, UTF-8 Unicode text
I couldn’t resist putting an ellipsis (…) into the comments, GCC’s pretty cool with it
 
@TutorEugen Definitely disgusting. Those are right-to-left scripts. This is typesetting terror.
 
Anyone here familiar with linear algebra libs in C++?
 
typeupsetting
 
Ell
11:09 AM
@Rerito I've only ever used glm to do opengl related matrices stuff :V
I think eigen is the goto otherwise
 
@Rerito What sort of linear algebra applications?
 
why do you have to ask, put 2 and 2 together
 
11:35 AM
Alright here we go: a first peek at annex-range documentation. I may or may not be considering a 0.1.0 release targeting GCC 7.1 depending on things, some of which I haven’t even begun to think about. So no promises.
I’m mostly interested in knowing whether the reference is readable at all. The rest is a long-winded WIP.
I wish I could showcase the rtd theme but it borks up, bad. I can generate other themes (+ google for third parties) on request.
cc @Rapptz come see my Sphinx skills
oh yeah and don’t go around sharing URLs, I haven’t decided on a proper home for these so it’s all in a /tmp black hole
 

« first day (2259 days earlier)