>>> ctypes.cast(id(2), ctypes.POINTER(ctypes.c_int))[6] = 3
>>> 3
3
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
OSError: raw write() returned invalid length 3 (should have been between 0 and 2)
3
>>> 2
3
3
how setting 2 to 3 doesn't instantaneously cause a segmentation fault amazes me
Wait, wat:
>>> a = 3 + 2
6
>>> a
6
6
>>> a
6
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
OSError: raw write() returned invalid length 3 (should have been between 0 and 2)
6
Basically with npm. I can only distribute one version for all node versions. That means I have to compile features that like node v5 has, which adds a LOT of overhead
@quartata I mean like polyfilled classes. A loop like in prime generator will probably create 50 or so classes. Each has runtime checks and all adding huge overheads
@Dennis sorry if this is not my place to say this but there are two types of equality--strict and approximate. == is approximate equality. There is method to the madness. You may not be doing this intentionally but you are comiting a strawman fallacy. By saying == is the equality operator, sure, JS sounds like a bunch of BS.
nonono don't get me wrong. I don't care that you hate JS. No one can love every language, especially JS. What I do care about is misrepresenting an already very misunderstood language. If you look at a language in relation to other languages, you're bound to go wrong somewhere.
Python 3, 776 bytes
This is a REPL on stdin/stdout. Expects every line to be a full statement or empty. eval is used to shorten the implementation, but is otherwise not necessary for logic.
import re,sys;S=re.sub
P=lambda l:eval(S("NIL","()",S("([A-Z0-9][A-Z0-9 ]*)",r"' '.join('\1'.strip().spli...
tfw you have an appointment at 11 but stay up til 5 am to write a lisp interpreter
@ConorO'Brien Well, there's no guarantee that the ages people claim to be are their real ages, and the fact that the age field is optional subjects it to all sorts of bias as well.
@Dennis should I not have voted to re-open that? I did edit a test-case too, which seemed to be incorrect. The issues in the comments seem to be addressed though.
@Dennis true. I don't know if you saw my explanation, but I opened that question because I was lacking knowledge concerning what makes a good fastest-code question and lacking incentive to find out what that consisted of. I do apologize for that again.
> Actively participate in a community during the winter solstice. For the purposes of this hat the winter solstice begins when the first time zone has locally started Dec 21st and then continues until all timezones have locally ended Dec 21st (10:00 UTC Dec 20 ⇒ 11:59:59 UTC Dec 22).
@ConorO'Brien Thanks! Oh okay perfect, how do you think that answer could be improved? In particular, I think it's very wordy, and difficult to follow, but I'm not sure ...
I've been trying to find a format that's nice to follow for ><> and *><> (which is the same format more-or less...)
Honestly I think the best thing you can do is identify different sections of the program then explain how each relates to each other and more importantly what each does
@ConorO'Brien @ATaco Okay thanks! That's what I tried to do, was that ineffective? What I did was label each section in the Explanation code, then separate each into it's own header and explanation box.
@ASCII-only btw, whenever you get on break or something, can continue develop VSL? Cheddar is very slow so I think it's time for another language that works better.
By which method does one 'remove most characters'? I still feel like I could inflate a code infinitely with arbitrary character removals of any size not giving the same effect.
meaning. If I add ///////////// or .valueOf().valueOf() to my code in JS. those are redudnant charcaters and will be removed by "most characters removed as possible"
actually..that's an interesting math problem. Given a set of characters C, and set of strings S, find the maximal length string N of characters C such that none of the strings in S can be found in N (with deletions)
Positional Awareness
Your task is to generate a program that, for every permutation of its characters (which includes the original program), outputs the positions of every character relative to the original program.
If your program is
Derp
you must output
[0, 1, 2, 3]
(or some equivalent)...
The question is to find the sum of Digit XOR till N.
For eg:-
Digit XOR of a number 112
112 => 1 xor 1 xor 2 = 2
So we need to find
int digit_xor_sum=0
for(i=1;i<=N;i++){
digit_xor_sum+= digit_xor(i);
}
return digit_xor_sum
My Solution Approach was as follows,
int digit_xor(int n)...
Shortest self-destruction loop
Your task is to write a full program or function that takes no input and runs any type of loop (while, for, foreach, do, do-while, do-loop, goto, etc) that will end in causing an error.
Rules:
This is code-golf so the shortest code wins.
The loop must produce at...
Task
Your task is to write a program that will take input, and then output the lyrics to We Are Number One, changing specific words. The input will contain both the words to be changed, and the replacement word.
Input
The input will be in the following format:
one, two\n
net, villain\n
(\n ...
Stackylogic is a logic-based programming language I made up that take in 0's and 1's for input and outputs a single 0 or 1 upon completion.
A Stackylogic program consists of lines that can only contain the three characters 01? as well as exactly one < at the end of one of the lines. Lines may no...