Python and perl are very very similar. Python prioritises expressiveness over uniformity, perl is the opposite. Perl's original OO mechanism was stolen from pythons, but due to the greater flexibility it means that there's a lot of choice and perl's extended OO capabilities exceed that of python. Personally I hate the way that the python people keep bagging out perl when it's clear they know little about it.
I don't have preferences as such. My main problem is that over the past few years my perl skills have been in such high demand that I haven't had much time to do substantial other programming stuff (this is a class of problem you want to have). I have been playing with python's maths libraries (particularly sympy) lately, and along with jupyter it's pretty neat stuff.
This (signal) is the de-facto communication mechanism to notify a program that an unexpected event just occurred (typically, a SEGV). This mechanism needs to interrupt the normal program flow (because you can not restart an invalid access most of the time), possibly interrupting a C-library call (such as malloc, reason why malloc is not async-signal-safe generally). What would you do instead ? On Windows systems, there is a built-in "__try / __except" mechanism ("structured exception handling", SEH), which provides exception-like catch in plain C with proprietary extension to C. This is probably not such a better method.
It actually really, really is. At least from a technical perspective on x64. Having language-level lexical scoping of system-level exceptions is incredibly useful and once you've grokked how NT's trap handler, PE .xdata sections, prologues and epilogues all work in concert, signals just seem barbaric.
Here's an example trapping an access violation:
//
// Prefault the page.
//
TRY_MAPPED_MEMORY_OP {
TraceStore->Rtl->PrefaultPages(PrefaultMemoryMap->NextAddress, 1);
} CATCH_EXCEPTION_ACCESS_VIOLATION {
//
// This will happen if servicing the prefault off-core has taken longer
// for the originating core (the one that submitted the prefault work)
// to consume the entire memory map, then *another* memory map, which
// will retire the memory map backing this prefault address, which
// results in the address being invalidated, which results in an access
// violation when we try and read/prefault it from the thread pool.
//
TraceStore->Stats->AccessViolationsEncounteredDuringAsyncPrefault++;
}
Or a page fault that has occurred against a memory map backed file (because, say, the underlying network drive has been disconnected):
TRY_MAPPED_MEMORY_OP {
//
// Copy the caller's address range structure over.
//
__movsq((PDWORD64)NewAddressRange,
(PDWORD64)AddressRange,
sizeof(*NewAddressRange) >> 3);
//
// If there's an existing address range set, update its ValidTo
// timestamp.
//
if (TraceStore->AddressRange) {
TraceStore->AddressRange->Timestamp.ValidTo.QuadPart = (
Timestamp.QuadPart
);
}
//
// Update the trace store's address range pointer.
//
TraceStore->AddressRange = NewAddressRange;
} CATCH_STATUS_IN_PAGE_ERROR {
//
// We'll leak the address range we just allocated here, but a copy
// failure is indicative of much bigger issues (drive full, network
// map disappearing) than leaking ~32 bytes, so we don't attempt to
// roll back the allocation.
//
return FALSE;
}
Can you expand a little bit on your question? I'll answer the best I understand your question.
Being in industry with a large firm, feedback is very simple to get, I just go give a talk at an internal seminar.
Results of a model or an implementation? Repeated observations/out of sample analysis often help with validating models. Implementation depends on the project.
Sure. I was trying to understand how hard it is for economists to make progress fast. I would imagine an economic model takes months to years to validate. I'm used to getting instant feedback from a computer when writing a program.
Do you see the way economic models are built and tested improving or happening faster? Or is the main barrier not lack of diverse data points, but needing enough time to pass to stress the model.
Also, what do you prefer over Python?