« first day (513 days earlier)      last day (34 days later) » 

1:04 AM
@DannyuNDos surely you can simply take any NP complete problem, (3SAT, eg), turn the input language into a base-(N+1) number list (N = # of input symbols, + 1 for terminator), then just have the digits after 0. be the enumeration of every possible input, then terminator, then 0/1 for whether a solution exists or not
therefore most of the digits are easily precalculatable, but all of those solution bits are NP complete, so the whole thing is
1:39 AM
oh well actually you'd have to list the solution, not just the existence of one, but same difference
 
3 hours later…
4:11 AM
0
Q: How are CFG and BNF different?

JoeI've been learning about formal languages and grammars, and I came across two terms while studying my textbook: Context-Free Grammar (CFG) and Backus-Naur Form (BNF). They both seem to be related to defining the syntax of programming languages, but I'm not entirely sure how they differ from one a...

5:08 AM
0
Q: How is grammar used for recognizers?

JoeI'm hoping to further understand how grammars are used in building recognizers for languages. Specifically, I know that a grammar defines the syntax of a language, but I'm confused about how this applies to recognizers. How does a recognizer use grammar to determine whether a string belongs to a...

6:05 AM
@AlexisKing: As I understand it, the memory safety is in the language preventing you from doing something with the Null Pointer without getting an exception - like if you were to take a null instance of an object and call its method. That is, memory unsafe languages allow that, memory safe languages explicitly throw that exception instead? — Alexander The 1st 43 mins ago
@AlexanderThe1st Comments are not really a great place to have this sort of discussion, so I’m responding to you in chat instead. I think the spirit of your comment is largely correct, though in practice, just about every language traps on a null pointer dereference these days (you just tend to get segfaults rather than a nice error). But languages like C and C++ tend to make dereferencing a null pointer undefined behavior, which is an entirely separate can of worms.
Out of bounds reads and writes tend to be a better example than null pointer dereference, since those really will just clobber memory rather than trap in memory unsafe languages.
3

« first day (513 days earlier)      last day (34 days later) »