« first day (2686 days earlier)      last day (2158 days later) » 

8:04 AM
@ASCII-only what
 
@ASCII-only Use "3×7≡1 (mod 10) ⇒ 3×7p≡p (mod 10p)`
 
@Cowsquack wait. no
 
Or sth like that.
 
@user202729 yeah that makes sense now
 
@user202729 @Cowsquack well it's actually divided by p (i'm just bad at reading) so i have no idea what i'm saying
hang on. what
i'm confusing myself. how did i even get that equation nvm
 
8:07 AM
wait I misread too
 
i'm just going to replace cool off my brain for a bit
 
@ASCII-only I forgot about this
 
so the latest correct equation appears to be d = (3-n³)÷(7p) (mod 10p) (i messed up here too) (well actually I'm pretty sure user202729's equation can actually apply here. so we have -n³÷p÷7 (mod 10p) and we want 7n³÷p (mod 10p)
 
@ASCII-only n=587;p=1000;((3-n**3)/(7*p))%(10*p) gives 1105 wat
 
@Cowsquack hang on. d is supposed to be from 1 to 9
idek what i'm even doing anymore
 
8:22 AM
@ASCII-only 0 to 9.
 
@user202729 oh yeah
@Cowsquack so actually it should be mod 10 since we already divided by p
 
which still doesn't work
it doesn't give 4
 
@Cowsquack Because....
 
@Cowsquack well actually. it's supposed to be modular division. so yeah vv should work. if it doesn't then i messed something up really bad
 
you're not supposed to divide by 7.
Multiply by 3 please.
 
8:28 AM
o_O
Mar 24 at 15:47, by user202729
(as F_p is a field, dividing 1 by 2 automatically produce the inverse of 2 modulo p, anyway...)
 
But Python is not a field.
 
^. python doesn't have modular division operator
 
Yes.
 
I am confused
 
@Cowsquack p is a prime greater than 5. i.e. p+1 is even
 
8:37 AM
oh so the division by 7 doesn't work because 7 ⌿ (3-n**3)/p
ah so that's also why you can divide by p
(even though there is no inverse of p mod 10p?)
 
Question: Do I need npm if I have pnpm?
 
@user202729 no
@user202729 pnpm is a drop-in replacement
pretty sure it uses the npm registry (unlike yarn)
 
What if something complains about "npm not found"?
(symlink npm to pnpm is an option but...)
 
@user202729 alias maybe?
but yeah symlink is probably the best idea
 
Anything requires -g also requires sudo, right?
 
8:53 AM
@user202729 pretty sure. since it installs things in /bin i think?
(does installing something in /usr/bin not require sudo)
 
Ok, sudo ln -s /usr/bin/pnpm /usr/bin/npm. Hopefully doesn't cause infinite loop or something.
> Other commands are passed through to npm
(from pnpm help)
Not sure if it's a good or bad idea. I'm just following tutorials that uses npm.
 
@user202729 :| rip
 
@ASCII-only I think when you divide by p, you also divide 10p by p (inside the mod) to get -n^3/7p (mod 10), then you can do modular inverse of 7 is 3, blah blah, and simplify it further to 7*n^3/p (mod 10)
that is how you end up with mod 10
(the above was a guess at my part)
 
@Cowsquack ah. makes sense
 
nice answer btw
 
9:02 AM
@Cowsquack if you're talking about what we were trying to figure out then i found it 100% by accident
 
@Cowsquack I guess (?) the reason you divide the 10p inside the mod by p is that you cannot simply divide by p as you said (no modular inverse for p mod 10p)
nice accident then :P
 
9:30 AM
0
Q: Invalid answers in the review queue, but OP hasn't had time to fix it

Stewie GriffinIt happens quite frequently that short answers (Title + Code) appear in the Low Quality review queue, due to the automatic flagging mechanisms. In most cases, the answer "Looks OK". However, there are cases where the answer was posted in good faith, but the output in some scenarios are incorrec...

 
So does pnpm need /lib/node_modules?
 
9:51 AM
It doesn't.
 
@betseg this... is ridiculously terrible
 
10:43 AM
0
Q: Find the 10-adic cube root of 3

Leaky NunI like to think of a 10-adic number as a number that goes infinitely to the left, or an integer modulo a very very large power of 10. Things carry infinitely to the left and vanish. To see what I mean, note that ...6667 * 3 = 1 in the 10-adic land, since the "2" that carries to the left goes to ...

 
@LeakyNun No time limit? ...
@ASCII-only You may want to post your Python solution.
 
@user202729 yep, doing now
 
Hm...
An easy one.
 
So perhaps I can use some esolangs.
 
10:52 AM
yeah
I wonder if it's possible to calculate the nth digit without using all digits before it
 
@ASCII-only input()-1 please
 
@user202729 oh. oops
 
...
Or just n%p.
Actually either way have the same bytecount.
With ~-.
 
@user202729 sorry, forgot
 
@ASCII-only Consider adding explanation?
 
10:56 AM
@user202729 i don't exactly know how it works still >_>
 
-,- I went to shower
do you guys
 
we do us
 
@ASCII-only But then... do you just randomly try formulas till they work or...?
 
@user202729 nah. i listed out n and n**3 until i found a pattern (same with the one before this)
 
11:19 AM
hi all
OT again.. but I can't work out how to compile github.com/cheind/inpaint and it is driving me crazy
 
What's the errors?
 
I think I might have worked it out.. 1) cmake .
this wasn't described anywhere
 
@Anush what?
 
2) realise you need to do sudo apt-get install libopencv-dev
@ASCII-only you need to run cmake first it seems
ah no.. still fails :)
 
> To build Inpaint from source you need the following prerequisites

CMake - for generating cross plattform build files
OpenCV - for image processing related functions
...
it says you need opencv
 
11:22 AM
right but what do I actually type on the command line once I have those
 
should just be cmake or something
@Anush how exactly does it fail
 
Try reading the documentation of cmake?
 
@ASCII-only cmake on its own doesn't work. I did "cmake ." which seems to work
then I did "make"
/home/user/inpaint/tests/patch_match.cpp: In function ‘void ____C_A_T_C_H____T_E_S_T____48()’:
/home/user/inpaint/tests/patch_match.cpp:55:43: error: ‘FILLED’ is not a member of ‘cv’
cv::rectangle(mask, r, cv::Scalar(0), cv::FILLED);
^
CMakeFiles/inpaint_tests.dir/build.make:182: recipe for target 'CMakeFiles/inpaint_tests.dir/tests/patch_match.cpp.o' failed
and it fails with
 
What?
But it...
 
that's the error message from make
 
11:25 AM
read cv docs
cv or cv2?
Hm...
Probably you need a suitable version of cv.
 
hmm
I feel a whole new sort of challenge.. how quickly can you compile this piece of open source code :)
 
compiling open source stuff is really hard
for mortals like us
 
Oops too many tabs opened
but how can cv::FILLED undefined, it's right here in the docs...
 
if anyone has linux here, maybe they can help ?
 
Linux, but not Ubuntu.
Different package managers, different package names.
(I suppose)
But why...
What's your CV version?
(opencv)
 
11:36 AM
@BoraCalim usually it isn't
just make
 
@user202729 I did sudo apt-get install libopencv-dev
 
@Anush Also next time if you post code/data/something you can Ctrl+K to format multiline code.
 
that's nice
 
@user202729 ctrl+a isn't needed
 
11:40 AM
@user202729 pkg-config --modversion opencv
2.4.9.1
I had no idea about that command!
 
@Anush I have no idea too, but well... just google it.
Hm...
Looks like there are 2 (branch?), 2 and 3. (similar to Python?)
So looks like that you need version 3.1.
According to one of the link (far) above, the version installed by apt-get is 2.something.
Looks like you have to build opencv from source too.
@Anush Detailed instruction above.
Inpaint should just say that they requires at least cv 3. Users are not supposed to figure out that.
 
12:08 PM
(info: You can view the content of your own deleted messages)
 
:O
@user202729 added explanation although there's a very high chance it's oncirrect
 
2
A: Find the 10-adic cube root of 3

alephalphaWolfram Language (Mathematica), 21 bytes PowerMod[3,1/3,10^#]& Try it online!

what sorcery is this
 
@LeakyNun i just saw this lol
i was going to post "mfw there's a Mathematica builtin"
 
guys
any of you moved from github?
 
12:24 PM
@LeakyNun if you don't mind you might want to look over the explanation as well because there's a really high chance 1. people might not even be able to read it and/or 2. i made a mistake really early on (or at all) so it's invalid
 
well just lost 50 rep because of OP failing to get their question right the first time they posted it ._.
 
@HyperNeutrino :|
 
@BoraCalim ngn did.
 
who is ngn
 
how do you add filler text for SE's 30-character limit thing
 
12:27 PM
@BoraCalim the guy who made ngn/APL and ngn/k :P
@HyperNeutrino I try to pretend I didn't see that (i.e. add in random waffle)
(well, actually I never see the 30-char limit because every post with a link is >30 chars, and comments have 15-char minimum)
 
@HyperNeutrino Did you set a bounty that disappeared or something? I'm confuzzled.
 
@AdmBorkBork No, I deleted 3 newly invalidated answers with +2/-0 +2/-0 +1/-0
 
Oh bummer
 
12:37 PM
also I got an email to my outward correspondence email from a random person that found my SO profile :D
 
@HyperNeutrino you... wait wat
 
@ASCII-only some person emailed me asking how they should start off with CS/programming
 
@HyperNeutrino weird. why you specifically :P
 
No idea :P
It's not like I'm particularly active on SO or have any decently significant contributions
wait how do I have an SO gold badge?
oh right 10k question view badge
 
12:56 PM
@HyperNeutrino ???
 
20 mins ago, by HyperNeutrino
@AdmBorkBork No, I deleted 3 newly invalidated answers with +2/-0 +2/-0 +1/-0
minus the "no"
 
Well and that's why some users don't like answer questions by 1rep users...
But...
Can you rollback?
 
rollback what
 
@HyperNeutrino Add explanations.
 
@user202729 no I was trying to edit my three posts into "don't edit" "questions after" "answers are posted"
 
1:00 PM
 
no, PPCG
 
Which posts?
Then don't call they questions. Incorrect terminology :/
 
my answers that I deleted
 
Of course I can't find it.
 
@HyperNeutrino problem solved: "don't edit questions after answers are posted" <metalink1> <metalink2>
 
1:02 PM
Old answers, I suppose?
Use &#8203;.
 
they were from yesterday...
 
Well there are more activity on PPCG than I thought.
Definitely because me being inactive.
But... I don't really want to read and understand problem statements.
@ASCII-only FYI, SE has <sup> and <sub>.
Which can be used in <code> tag.
 
@user202729 :| but code tag isn't nice
 
But the result is nicer...
 
i guess it works though
*pre
 
1:12 PM
I made a minor edit.
I think it should be more correct but...
Er...
Both versions are wrong.
should be like this.
should be correct now.
 
@user202729 am i not seeing it because grace period?
 
Yes.
 
so this is final right
       x ≡ 7      (mod 10)
      x² ≡ 49     (mod 10)
         ≡ 9      (mod 10)
  x²×10ᵏ ≡ 9×10ᵏ  (mod 10ᵏ⁺¹)
3×x²×10ᵏ ≡ 27×10ᵏ (mod 10ᵏ⁺¹)
         ≡ 7×10ᵏ  (mod 10ᵏ⁺¹)
 
Yes.
 
1:38 PM
Does npm start use local ./node_modules/.bin?
 
@user202729 probably?
 
(can somebody try it?)
good thing ASCII-only is not named somebody
Because (1) I don't have npm installed (2) I'm trying to run an app X from a package A.
I already installed A globally, but it has some dependencies.
Which is only installed locally.
Or at least I think so.
 
Another question. Does it seem like we've been getting more of those lately, or just me?
 
@AdmBorkBork I think it's just you. Actually because we don't have stat.
Can't say anything for sure.
 
Is using inspect a bad thing?
 
1:44 PM
@Zacharý Inspect what? Browser?
 
@user202729 Python...
 
-2
Q: How to get the lCM of 3 numbers in Python

Srijon kumarHi please answer my question. Answer it on python.

 
@NewMainPosts Sometimes NMP is just very fast.
Never heard of it before.
 
@NewMainPosts how can a person be this much unspecific and rude and ignorant at the same time?
 
@Zacharý I don't know.
 
1:46 PM
> Be Nice
 
Obviously the only way to have NMP's messages deleted after 2 minutes is to have a mod/RO involved, which is not a good idea.
 
@user202729 anymore, you mean
 
i think there should be something which alerts users with less than X reps that this is not SO when posting a question
 
This only prints the last 11 digits for n=12 and n=13. — Emigna 6 mins ago
this is interesting
 
@user202729 if you npm i -g'd it then it works anywhere (i.e. deps are wherever they're supposed to be)
 
1:48 PM
this is because the 12th and 13th digits are 0
what should I do about this?
 
well. crap
 
@BoraCalim there are many things ppcg users would like to have so this place wouldn't be so flooded with off-topic stuff, but were stuck by SE's system
 
@BoraCalim Obviously SE doesn't care about us. But that's not the problem.
People just want to have their question posted.
 
then why not post to SO
 
For me, just leave a close vote, a down vote and a delete vote.
 
1:50 PM
i do not have down votes
 
With 5 such people the question will be deleted.
 
@LeakyNun Is there a way to output as a string instead of as a number?
 
The good thing is, there are only very few questions here (per day) so they should be deleted very quickly.
 
is there a thing which makes people flag at most 10 posts a day?
 
@BoraCalim Yes.
The more helpful flags you have, the larger the limit is.
 
1:52 PM
i hope ppcg will not get big
 
Now I have 16.
 
i dont want ot posts
 
> most blatantly OT questions are closed in under 5 minutes, and frequently deleted within the same day.
 
btw, i have a nice hello world program in my language which is wip rn:

91+91+*c349**c349**6+c349**3+c99*6+c84*c349**3+c349**cd91+91+*1+c89*c++++++++++
nice huh?
i think it could be golfed much more but i will do so after finishing the language
 
@BoraCalim The only way to completely prevent off topic posts is to read every posts before they're posted on the main page.
The only thing prevents that is we don't build PPCG.
(btw: See PPCG v2 -- Axtell)
 
1:57 PM
why not build another site for golfing then
 
guys
0
Q: Math Operations with Strings

Luis felipe De jesus MunozChallenge Inspired in Alphabet Position Finder Given an string [a-zA-Z] and a mathematical operator [+, -] as an input, your task is to return the operation of each alphabet position from the string. Example Input: ["Hello World", "+"] => "Hello World" = [8 5 12 12 15 23 15 18 12 4] => sum al...

what exactly does "-" do in this question
 
@BoraCalim Avoid onebox please
Which -?
For the one in [a-zA-Z] that's regex syntax.
 
the subtraction symbol, like how is ["hello","-"] computed
 
Good question.
 
2:06 PM
Is taking 1 second for 1+2 bad?
 
oh nevermind it just negates the value of the + thing
 
@Zacharý Very Bad.
people these days don't care about performance
 
Do we need to print leading zeros as well? Most answers (including my Java answer) are currently failing for those. i.e. n=12 outputting 87895134587 instead of 087895134587. Personally I would make it optional, since it would invalidate almost all answers.. — Kevin Cruijssen 12 mins ago
I don't know what to do
@AdmBorkBork I don't understand what you mean
 
you posted the cmc :D
 
@Zacharý well the asymptotic performance is what counts
 
2:09 PM
@LeakyNun "Everything are O(1)"
 
@user202729 what is the point of having the functionality if you're not going to use it
 
CMM: Should I edit old questions with new leaderboard, assume it doesn't bump too much?
@Poke I didn't implement it. If I did I would make the onebox take much less space.
 
@user202729 well don't shame others for using it
 
@user202729 s/are/is/ btw
 
@LeakyNun I don't know enough Python or Java to know if it's onerous to output with leading zeros, or if it's even possible. Hence my question. If it is possible, and it's not too onerous, then I think leading zeros should be required since that's what the challenge is asking for.
 
2:11 PM
and get a bigger monitor
 
Jun 1 at 8:49, by ASCII-only
that is actually tiny
 
@AdmBorkBork is it too zerorous?
 
you don't find it ironic that you just oneboxed that?
 
...
Right...
 
that isn't irony
 
2:13 PM
Well chat message onebox is much larger than comment onebox, for some reasons.
 
it absolutely is
 
Anyway. Ignore it.
 
@LeakyNun Har-de-ha-ha
 
OP no longer improve the question, VTD?
 
say what
someone did it in 13 bytes with leading zeroes
 
2:16 PM
Can anyone explain why can't I just use a Ʋ? — user202729 3 hours ago
 
now I don't know if I should allow people not to print leading zeroes anymore
 
0
Q: Math Operations with Strings

Luis felipe De jesus MunozChallenge Inspired in Alphabet Position Finder Given an string [a-zA-Z] and a mathematical operator [+, -] as an input, your task is to return the operation of each alphabet position from the string. Example Input: ["Hello World", "+"] => "Hello World" = [8 5 12 12 15 23 15 18 12 4] => sum al...

 
@LeakyNun well that's because 05ab1e makes numbers == strings which is very helpful there
 
why 05ab1e has "take last digit" builtin...
Oh...
then it can't vectorize by default.
 
@user202729 it's probably the "take last character" built-in
 
2:18 PM
For all languages there exists a challenge where it has advantage.
Also Jelly doesn't have for loops.
The closest Jelly have is ƒ. Currently at 17 bytes.
 
how does jelly exist without loops
 
@ASCII-only nice answer and explanation, is there any particular reason why you use pypy?
 
@BoraCalim Corrected...
@Cowsquack Because it's on TIO.
 
Well TIO just have too many languages, you can choose any.
There is "repeat n times", "while" "repeat until loop" etc.
 
2:20 PM
I was wondering if pypy was faster, or something else
 
For such simple programs performance isn't very important.
 
20 secs ago, by user202729
5 mins ago, by user202729
Can anyone explain why can't I just use a Ʋ? — user202729 3 hours ago
 
@user202729 Isn't a for loop?
 
@LeakyNun Uh...
@Adám ... probably.
 
@Adám no, it's applying the function to each argument in the input
 
2:23 PM
But it's not as "convenient" as other languages.
 
@Adám That's like saying ¨ is a for loop.
 
@LeakyNun In other words, it is running the function for each argument…
@Zacharý It is.
 
@LeakyNun Technically you can do ...©ṛ 5Rµ...µ€
 
@user202729 isn't for loop just a sugar-coated while loop / repeat n times / fold over a range / applying function for each argument?
@Adám I see
 
Basically...
 
2:24 PM
but you have all of that
 
Because Jelly is tacit.
It can only handle 1 value at once.
(with exceptions)
With for-loop, the value has to be the iteration counter.
 
should it handle 1.5 values at once?
 
Then you can't really get any meaningful result out of the loop.
 
@Zacharý Compare :For i :In ⍳n ⋄ foo i ⋄ :EndFor with {foo ⍵}¨⍳n (or just foo¨⍳n)
 
@Adám But APL has variables. Jelly (almost) doesn't.
 
2:26 PM
the ⍳n looks like chet-vav
 
@LeakyNun Heh, it does a bit: חו
 
does it mean anything?
 
@user202729 almost
 
@LeakyNun No.
 
I said "almost" because using ® and © is almost always suboptimal in Jelly.
NMP is at +3/-3.
 
2:28 PM
Which is faster: set(map(lambda x: x.type, S)), or set(x.type for x in S)?
 
@Zacharý time it yourself
 
@Zacharý time it yourself
 
@user202729 Wait, you edited your message so that it became ninja'd?
 
Intentional.
 
2:41 PM
@user202729 re: My downvote is because the requirement to handle non-alphabetical characters is just fluff and I think that the specification is extremely unclear. If there were no examples, I wouldn't be able to understand the task. And our meta policy says that all challenges should be clear on their own without test cases/examples.
 
There are 5 VTC, so the DV are understandable.
Probably.
At least there are comments explaining what is unclear.
 
 
2 hours later…
4:48 PM
@user202729 Did you overlook/forget about this?
 
@Riker nice :)
(sorry, I'm too tired to come up with a pun)
 
Yeah, a pun would be too convoluted
 
And I thought I am the one who makes the bad puns =P
 
Nah, Zachary is the king of bad puns :P
 
0
Q: Golf A Parentheses Matching Algorithm

gnu-nobodyYou will be given a string s. It is guaranteed that the string has equal and at least one [s and ]s. It is also guaranteed that the brackets are balanced. The string can also have other characters. The objective is to output/return a list of tuples or a list of lists containing indices of each [...

 
4:58 PM
hey this is my question :))
 
0
A: Sandbox for Proposed Challenges

Francisco HahnI forgot towel day As you may know, may 25 is well known as Towel Day, because of the many uses a towel can have. A simple extract if the book "The Hitchhiker's Guide to the Galaxy" (personally i took this book as an "everyday guide") states: "A towel is about the most massively useful thi...

 
5:09 PM
... Right, I upvoted the comment but somehow forgot to implement it.
 
@dzaima ಠ_____ಠ
 
0
Q: Floating Point Input

12Me21In this challenge: rounding numbers. Most answers use floating point numbers, which means that many potential input values are impossible due to the limited precision. For example, the inputs .02675 and 4. In this challenge, that would mean rounding .02675 to 4 decimal places, which should resu...

 

« first day (2686 days earlier)      last day (2158 days later) »