You can use this to make x == x false, which would be way more fun if NaN didn't exist
Something about old technology that's just charming. Reminds me of a colleague who loves telling the story of how they used to do normalized numerical integration by cutting the curve out of a chart plotter sheet and weighing the area of paper under it. — J...59 mins ago
Wonder what my Calculus BC teacher would do if I showed up with a roll of paper, some scissors, and a hyper-accurate-scale on exam day
@RedwolfPrograms Brachylog v1 is basically a failed attempt at making Brachylog a thing, Brachylog v2 is the "successfull" attempt
Although the basic ideas are the same
(One of the major reasons why Brachylog v2 is infinitely better is that it's all written directly in Prolog, whereas Brachylog v1 had a Java transpiler that transformed Brachylog code to Prolog code)
tl;dr Brachylog v1 is completely useless and irrelevant
Yeah, but if anyone downvoted for the built-in or multithreading bans specifically, which I wouldn't be surprised by, can't hurt to let people know it's been updated
The fizzbuzz version worked so well because fizzbuzz is inherently based on the patterns in the natural numbers. Primes, famously, have no pattern to exploit, so a prime based version was never going to work
@RedwolfPrograms oh yeah, I 100% get why you brought it up, Imm just using that to rant ;)
The only differences are that the input is fixed in the newer one (which is basically meaningless), and that it's outputting a count, rather than a list
The fundamental task - "identify the primes in a range as fast as possible" - is the same
The task:
Given an integer n, find the next number that follows the following requirements
The next greater number's digits have to be greater or equal to the next digit
e.g. 1455
1<4
4<5
5<=5
The next greater number has to be bigger than n
This is code-golf, so shortest code wins!
@Fmbalbuena Where a challenge appears to be about one thing, but is really about another
For example, if a challenge was "Do X. Shortest code wins. If you can't do X for a large input in under 10 seconds, you're disqualified" it appears to be a code golf challenge, but it really a fastest code challenge
Hey all, quick question: is taking input as a list of digits always acceptable when a problem specifies integer input? I feel like I've seen conflicting information surrounding this
And when I hadn't learned trig so I just guessed which buttons to press on my calculator
And thinking of school memories has reminded me of all the times I climbed through the windows of locked classrooms to open the door for everyone before the teacher arrived
And there was also this one door you could open by sliding your id card between the door and the lock
Opening it when it was locked became a "party trick" of mine lol
Have I told y'all about the time I was called to go to the IT office with the principal because a teacher saw me mucking around with developer tools and changing the text of websites and thought I was hacking?
Python has the most answers of any language on the site at around 13250, followed by JS with around 9300, then, as far as I can tell, Jelly's third place with about 5300. After that it gets pretty close.
ok my friend just dm'ed me one day, saying bro, am i safe from hacking. I am like, who is trying to hack you and how? He said, bro i have enabled 2fa on my gmail and discord do i need to worry? I said no, and then he proceeds to say that my classmate is threatening him that he will hack his computer using Notepad++
ok so i contributed to 2 termux tools ok now my explore is filled with hacking stuff and people who are following other hacking acocunts are also following mine
@user The hack I used for this is, to easily call Python functions from C, is to assume that the Python function is stored in the sys module, and get it using PySys_GetObject("attr")
PyObject *compose = PySys_GetObject("y_compose");
if (compose != NULL) {
PyObject *result = PyObject_CallFunctionObjArgs(compose, o, key);
if (result != NULL) {
return result;
}
}
TIL Python has a built-in range syntax! https://ato.pxeger.com/run?1=PY5BasMwEEX3PoXIaqaoIlkUioOz7Am8C0Eo9kg12JIZTQIm5CTdZNNeoWfptiep3YYuPh_e58-ft49xktcUb1_fLXlVg9cPFstC-cQqqi5CKCtvvA19Oro-YxkaE0gskyemKBl8n5wYa9uuEWtxvz7s46GSaSSIGlBfVtYuDbsqezccW6dafdZSsouBoIsCZ9Rh7uAVAQvFJCeOqi66YUwsKjQ6T3k7y2QSYdcQ1Lh9qRayXPbsBoKZzG_-xjaNTWop639SbXZrXb-fxD8-f7Kq1FMx8jLdd1lgYwwj_qW3u939Bw
@pxeger yeah, I'm not even sure how useful it is in day to day, but basically, my understanding is that the lvalue flag means the returned variable can be set as well as read. I don't know how much real world use it has, I haven't done any real Perl in years now! I thought it was interesting that technically you could have bareword vars in Perl if you wanted! Perl's quirks are many!
Yeah, which is annoying if you want to replicate a bareword! I guess they just needed to choose something non-mathematical to prevent confusion when using numbers in strings? The symbol variables still blow my mind, after all this time using it!
I have an answer for the fibonacci series problem in hexagony that is only 61 bytes, but code.golf rejects my answer
))')).............../{\/{\)))/=.(\=.+\\*{/..==..\>{;"!<.({("/
https://hexagony.net/#lzN4Igxg9gJgpiBcICUSDkKB0Xs9wemAB1CDiUk8BeDACmOoGpjiAqYPLS6jYgPmADchEAEIAPLWB0QeEABoQASwB2ABwCuA...
w = -1
m = n = input ()
for i
in[1] * len (n):
for i
in m[::-1]:
if w
== -1:m = "";
w = int (i);
continue
if int (i)
>
w:
m = i + m
else
:m = str (w) + m
print (i + m)
...honestly i'm tempted to say that calling 0-argument functions without parentheses is actually more worrying than being able to do something funky with properties of a global object unless you have sufficient laziness that that doesn't stop you from passing 0-argument functions into other functions to be called conditionally
@emanresuA Well, sort of. Once the final stage of manual review is finished, I still have to add the actual language ranking part, and I still need to do a lot more work since the code for stage 2 and final one are both very messy