« first day (2487 days earlier)      last day (2358 days later) » 

12:02 AM
0
Q: Hand patterns in a card game

ngnA deck of cards is the Cartesian product of S suits and R ranks. Many, though not all, card games use S=4 and R∊{6,8,13}. A hand of H cards is dealt from the deck (H≤R). Its distribution, a.k.a. "hand pattern", is an array that describes how many cards you got from each suit, ignoring suit order ...

 
12:34 AM
also, interesting note that I think hasn't been exploited by the smallest chess board compression: you can simulate en passant by placing a king 1 square behind where the pawn is, if it would be possible to capture en passant
 
I keep having horrifying ideas as to how to make Funky more golfy, but I keep holding my tongue, as I'm not trying to make a golf language.
My latest is "Chaining Dyadic Operators"
 
1:24 AM
m=gets.to_i
p gets.split.map{|x|x.to_i%m}.sum
two lines: integer m, and then a line of space-separated integers -- is there a shorter way in ruby?
 
(I don't know enough Ruby for this)
 
1:40 AM
I've implemented combo operators, but I'm not sure how I feel about using -%1 to floor a number. Or how I feel about doing a-%=1 to set a to a floored.
a~~b returns b. This is really useful.
 
hello
would someone (or multiple people would be great :D) mind testing my preliminary chat client? it's actually semi-functional now :D
@ATaco wait is ~ a dyad and monad or is ~~ a dyad
 
@HyperNeutrino I will test it. if you want lots of feedback, send it to me tomorrow instead
 
~ is a dyad and a monad.
 
I don't need a ton of feedback mostly just making sure it works :D thx
@ATaco what does x ~ y mean
 
a~b is bitwise XOR.
 
1:47 AM
it's a terminal thing
@ATaco oh cool. did you make ^ exponentiation?
 
Yeah, Lua style.
 
cool
are you sure this works...?
 
I was going to make ** exponentiation and use ^ for bitwise xor, but my tokenizer wasn't really having it at the time.
a~~b is only working on my local branch right now.
 
so wait a~~b is equivalent to a^~b in python?
 
Because it's a pretty bad feature but doesn't really collide with anything.
Maybe?
 
1:49 AM
ok because 1^~2 is -4
 
Ah, then definitely not.
 
wait what is ~b
 
Actually, in the current build it is.
So this dyad-chaining collides with dyad-monad... Hmm...
~ as a monad is bitwise not.
 
ok expected
so ~~ isn't a special operator?
 
But what i'm working on is chaining dyads, which means a ~~ b = a ~ (a ~ b) which is obviously just b.
 
1:52 AM
oh huh weird
do you have bitwise shift?
also increment/decrement?
 
a -% 1 would be a - (a % 1) which would essentially floor a. But with this collision I'm not sure I want to implement it.
 
this looks confusing for a non-tacit language
 
increment decrement doesn't exist, but bitshifting does.
 
@HyperNeutrino I'm running windows; does this have to be in a linux shell? It's not running (missing imports)
 
@EricTressler oh huh. do you know what imports are missing?
and it's only tested fully on linux so far; it worked for xcoder on mac (?) but that was earlier on
 
1:53 AM
'requests' when I try to run client.py
 
oh hm you might not have that module
are you able to pip install it or something like that?
I might switch to something like httplib to make it more compatible with more systems
 
The best thing about dyad chaining is that a==========b is valid.
 
>> would conflict as bitshift / dyad-chaining greater-than
 
a == == == == == b
 
@HyperNeutrino no, I don't know how to do that quickly from windows.
 
1:54 AM
oh darn. ok
thanks anyway. I'll try to switch it to make it more compatible maybe
 
>> would default to bitshift, if you wanted to chain you'd have to do > >
 
Tomorrow I will load up a VM with ubuntu and try it there, probably.
 
But I'm not sure why you would ever need to.
 
or I could include the necessary non-distro/standard libraries in the thingy xD
ok thx :D
a > (a > b) doesn't look extremely useful :P
I guess that's a <= b and a >= 1 or a >= 2
@EricTressler I added the requests module into the repo; pull and run might work? :D thanks for trying regardless
 
I don't think I'll be hanging onto this new esoteric syntax, it doesn't fit what I'm aiming for with Funky, and it collides with dyad-monad...
 
2:03 AM
yeah it looks a bit weird for a non-tacit lang
and it might break
 
You can still however do a > = b which is equivalent to a = a > b
 
lol
oh I see how this works, for += the two symbols are individual tokens? :D
 
Yep.
 
hm cool
 
But because >= would collide, a space separates the tokens, so it matches the assignment thingy.
 
2:06 AM
ah ok
 
Infact, assignment is just defined as identifier operator? "=" expression
 
oh huh interesting
oh god
in python repl type print("\033[5m")
great things will happen
 
I don't remember what 5 does.
 
@HyperNeutrino it runs, but when I press n for new user and start typing, I get that error
 
 
2:25 AM
I am now officially the user with the most reviews in any single review category on PPCG (909 in VLQ, just passed Martin's 907 in First posts) \o/
Woot woot
 
@EricTressler hm I think I see the error. fixing
I think I fixed it; try again? :D
also the test chat room should be called test
(also all accounts and rooms get deleted every time I restart the server which I will eventually fix but isn't a big thing right now since the server's down half the time anyway)
 
 
ok then
should be fixed now xD
 
 
erm.... windows ANSI escape code problems
halp wat is this
does windows terminal not have ANSI stuff?
 
2:39 AM
Windows doesn't really allow fancy terminal formatting.
 
darn it
as indicated by fancy-text-chat, that is a slight problem
oh well might have to serve it over ssh
 
When I log in it spams HTML at me then returns to the menu.
 
lol rip
what's the HTML?
 
I'm behind a proxy, by the way.
 
access denied... what
the proxy might not like that the requests are going directly to an IP address
because ngrok rate-limits lol
does anyone here know how I would serve this over ssh or something like that
 
2:54 AM
Is oeis challenge rip?
Also hey @benzenering
 
eh next one isn't even that hard
might do it tomorrow when I'm bored in second period class
@HusnainRaza ಠ_ಠ
 
I've been in a rut
lately with programming stuff
Anyway challenge dies tommorrow so
 
rip
eh that challenge is quite old already
its death is soon to come anyway, the hype around it is gone
 
Although Im learning java in ap comp sci
no :(
So close to 300
 
3:05 AM
i might make a computer algebra system
 
we should have a question to model double pendulum
 
Pls don't let Oeis die tho
 
I'm trying to use this but I can't get the SSH server to start; any help?
ok nvm got it working just needed to forcefully delete and reinstall the whole thing xD
 
3:31 AM
There is currently one way to get a syntax error in Funky, and that is to have two qoutes with a newline in between.
 
Pls do Oeis :c
 
 
1 hour later…
5:02 AM
Oh yes, I forgot about OEIS.
But @ChristianSievers has an efficient algorithm which use g.f. (get from the paper), and I don't want to post a terribly-inefficient algorithm again. See the comments below the last post.
So... 11 hours and 58 minutes remaining.
 
@user202729 for?
 
@user202729 link?
 
^^
I also have the paper, but I'm not sure how to understand it. My mathematical background is not as good as ChristianSievers (in fact I don't even know what is Polya enumeration theorem).
 
@user202729 which is the sequence?
 
5:11 AM
Are you going to solve this one?
 
ill try
 
I have 2 conflicting feeling about the challenge. On one hand, I don't want people to not understand their formula/algorithm; on the other hand, I don't want algorithm to be slow.
 
@user202729 wait that does n mean in that context?
the number of points in the tree?
 
5:43 AM
Yes, the number of node. (with offset 7)
 
6:27 AM
Is there a pythonic way to condense a bunch of nested for loops?
Like put the loops here one one line and indent level:

for x in range(l):
	for y in range(w):
		for z in range(h):
			# do stuff
 
6:43 AM
uh....
not sure if there's an idiomatic way to do that in any language really?
 
I think there's something in itertools but meh
 
7:16 AM
I think you're looking for itertools.product, e.g.
for x, y, z in itertools.product(range(l), range(w), range(h)):
    # do stuff
 
@Challenger5 Yes! Thanks :D
 
You're welcome
 
2
Q: Find the password

Colera SuAn ordinary N-digit combination lock consists of N rotating discs. Each disc has digits 0-9 inscribed in order, and you need to turn them to the correct password to open it. Obviously, if you don't know the password, you will need to try at most 10N times before unlocking it. That's not interesti...

 
 
1 hour later…
8:47 AM
0
Q: Implement simplified kerning

ZgarbIntroduction Kerning means adjusting the spacing between the letters of a text. As an example, consider the word Top written with the following three glyphs: ##### ..... ..... ..#.. ..... ..... ..#.. ..##. .###. ..#.. .#..# .#..# ..#.. .#..# .#..# ..#.. ..##. .###. ..... ..... .#... ..... ........

 
9:43 AM
@user202729 Maybe you could upload the paper here?
I would also like to finally learn how to use a g.f. without a Mathematica built-in :P
 
10:00 AM
@NieDzejkob You means this one? (hopefully not 503 backend fetch failed) | Anyway use a g.f. without builtin is not hard; addition is addition, multiplication is convolution, division is... probably solve equation.
Actually my Jelly code (below one of your OEIS post) can be understood as using g.f. multiplication.
@Moderators If it is invalid to post this here I will delete the link. (from the source, because that pastebin allow link deletion)
----------------
Why is @HyperNeutrino still here? A bot or something?
 
10:34 AM
@user202729 Time to embed the paper in the blockchain ;) Thanks
 
Which "blockchain"?
 
@user202729 something along the lines of this: bitcoin.stackexchange.com/questions/39347/…
 
How is that related here?
@user202729 Remind me to learn Polya enumeration theorem.
 
11:39 AM
@user202729 like, in case sharing the paper is not ok, idk
 
12:37 PM
0
A: Print all integers

Marelou Malajacan LacasandileI’m Marelou Malajacan lacasandile I said I am I want annulment to print about myself I want annulment I want to married where’s I am now my single name Marelou cruzado Malajacan I’m going to married my single and to married and to have family to married to have biology stack exchange......I’m rig...

LMAO
"I’m going to married my single and to married and to have family to married to have biology stack exchange"
Alright
 
12:55 PM
How should it be flagged?
CMP: Should I write an answer to the one oeis after another challenge?
 
@user202729 I used NAA
 
I used spam.
 
It's not spam as per the definition though?
It does not promote any products
 
I guess the spam/rude/abusive flag is stronger. link
Hm, can the Community downvote multiple times?
 
1:10 PM
yes
 
^^ Weird, it doesn't work in the sandbox chat.
Probably because the [tag: is PPCG-specific. / How can I put backtick inside inline code?
 
@user202729 `\``
 
It doesn't work. How can I remove the \?
 
That's literally what you type to get it
 
^ (sorry I should use the sandbox)
 
1:30 PM
@user202729 I am secretly a robot :)
No just that I wasn't able to leave the room because my internet connection was already dead at the time.
also I just got a downvote because one of my programs times out on TIO ._. (well actually that's only what I think the downvote is because of - it came with a comment so I assume they're linked because fly-by downvotes on such a hidden answer are very unlikely)
oh OEIS was continued. thanks christian sievers :) :P
 
Well, I guess if you can't leave the room explicitly, you will not be marked as "seen ... ago"; and after 15 minutes you will left anyway. / Which one?
Wow there are so many variation of languages.
 
idk, I never closed the tab
I don't know how the mechanics of my internet connection getting cut off work exactly, or how SE works :P
 
1:48 PM
;'-( RIP oeis challenge
 
The next sequence is weird. Straightforward definition but I can't understand what it is used for.
 
> Bessel polynomial {y_n}''(1).
 
yeah I get bessel polynomials but like how is it helpful lol
@Mr.Xcoder that's not even too hard
I think I can do it in Enlist
 
> Table[Sum[(n+k+2)!/(2^(k+2)*(n-k-2)!*k!), {k, 0, n-2}], {n, 0, 20}] (* Vaclav Kotesovec, Jul 22 2015 *)
CMC: Do it in Enlist.
Is the TIO version the newest one?
 
1:49 PM
I think so
wait no it isn't; I fixed a critical bug a few days ago but didn't get a pull
 
@Mr.Xcoder I was getting ready to do it in Trefunge...
 
um I think I misunderstood the sequence
wait does the '' means double-derivative??
 
Yes.
 
oh darn
 
2:00 PM
How does the getnil (¤) works?
 
hm that adds a bit of difficulty to this
@user202729 it gets the last two links and then all links before it until it hits a nilad, and then it turns that whole thing into a link. works identically to jelly (theoretically)
 
Let's see the code...
def getnil(fs):
    comp = []
    while fs[-1][0]:
        comp.append(fs.pop())
    comp.append(fs.pop())
    return (0, comp[::-1])
So the fs[-1][0] means "the arity of the last element is truthy (!= 0)", correct?
 
yes
I think I messed it up
it should be comp = [fs.pop()] lol
also I need to fix another atom that I screwed up. I'll need to ask for a pull again but probably in a while
 
Also what is the [::-1]?
(sorry I don't know Python)
 
wow, I don't have indexing commands
@user202729 that means "every -1th element" (so, reverse the list)
I could do reversed(comp) but that returns some sort of iterable object (I think it's literally a reversed class)
 
2:03 PM
Which is [<default>:<default>:-1]?
 
yes
it's list[start:end:step]
start is 0 by default. end is len(list) by default. step is 1 by default
 
Is there partial-line-comment in Python? #... is line comment, and """...""" is (almost) multiline comment.
 
no, there isn't
I wish it existed though
 
Huh? zoo is infinity in Python (Enlist)?
Something went wrong with the code r2 † +³ ! ÷ †²§ §€.
 
the one time I need that one obscure quick in jelly that nobody uses, and I didn't add it into enlist because it was too unused........
zoo is a sympy thing
 
2:11 PM
Which one?
Minimal example: 5+†²§.
 
um I think I might now where the error is
 
@HyperNeutrino May I ask which?
 
@Mr.Xcoder duplicate link (super-plus)
 
2:16 PM
-3
Q: code master challenge

muthukrishnanDhwani is a spy and she wants to encode a message using the following encoding scheme. The input is a one word string. You have to take each character of the string and find the sum of the digits of its ASCII value and add the sum to it which will give the new value and the character representi...

 
WAIT forgot to add all the OEIS challenge stuff
lol i forgot which challenge I was answering
51 isn't even a valid bytecount
 
@HyperNeutrino So what was the problem?
 
I don't actually know. I'd have to debug it and I'll do that in a bit or when I get home today
 
The next one is pretty similar to A000711, actually.
 
it does seem familiar to me
 
2:27 PM
My Jelly code:

ṬUṁ³
R;3R¤Ç€æcṁ³$¥/Ṫ

Direct adaptation of my last code. But this one is 1-indexing.
 
1-indexing is easy to fix
but cool, nice
 
@HyperNeutrino Yeah, really easy :P
 
hey I didn't notice that xD
but it only took like 16 extra bytes
 
Ah, how did your program works?
 
adding explanation rn
added explanation
 
2:39 PM
is this not the right way to print out a join of chars from a string s by indices?

puts gets.split.map(&:to_i).each{|i|s[i-1]}*""
(for a line of indices such as "5 3 1 4" etc)
 
What does:
> two kinds of 1, two kinds of 2 and two kinds of 3.
mean?
 
I had explained this once for the last sequence.
 
Link please?
 
Actually, you can see the example for more details. My explanation is pretty useless.
 
@user202729 I don't understand the example.
 
2:45 PM
(nvm I had to do puts gets.split.map{|k|s[k.to_i-1]}*"" but curious why the previous one didn't work)
I guess you have to join straight from the map rather than each
 
Look at the example: 3, 3', 2+1, 2+1', 2'+1, 2'+1', 1+1+1, 1+1+1', 1+1'+1' and 1'+1'+1'
 
@user202729 I do not understand it
 
You can see that:
* There are 10 expressions.
* The "numbers" appears are `3`, `3'` (two kinds of 3), ...
* Each of them evaluates to 3.
 
To be honest I have no idea what that is supposed to mean. Where did we get the two 3's from?
 
We just "define" them. Let 3 and 3' are two different 3s that both evaluates to 3. just like how we define in ordinal numbers
@HyperNeutrino Probably you can improve that part of Enlist (empty sum) by providing an initial value 0?
 
2:50 PM
Now I am feeling extremely dumb, I still don't understand
 
What part didn't you understand?
 
... wait I think I understood
 
I like to think about having a box with cubes with all natural numbers written on it, except ones, twos and threes have blue and red cubes which we consider different
 
@user202729 yes, that is on the todo list now
wait for the next sequence are you allowed to have 4 in a partition? so is it just the 6 numbers (1, 1', 2, 2', 3, 3') or is it just that those are the only duplicated ones?
 
@HyperNeutrino I know you don't have link duplication but why don't you just use ?
 
2:53 PM
because that doesn't exist either
 
3:08 PM
Does anyone here know much music theory?
 
I know a decent amount
 
What would you call a chord containing C, C♯, and D, both a semitone apart?
 
Anonymous
@LegionMammal978 Dissonant
 
@LegionMammal978 eugh
 
Anonymous
Alternatively "C-ouchmyears"
 
3:11 PM
@Mego Of course it's dissonant, I'm talking about that particular chord
 
probably a cluster
I don't think that's even a chord
 
@LegionMammal978 Gross
 
Hey, at least I'm not talking about the "piano toppling and hitting ground" chord (C, C♯, D, D♯, E, F, F♯, G, G♯, A, A♯, and B)
 
that shouldn't be a chord
 
> Chord may refer to:

Chord (music), an aggregate of musical pitches sounded simultaneously
 
3:13 PM
@LegionMammal978 From a music theory standpoint, I don't think you could call that a chord with a name
 
well then just a cluster
no name really, like dj said
 
@HyperNeutrino Thanks!
 
Bah I was just about to post my solution for the kernel challenge on Main, since it passed most of the test cases... Then I said, let's test it for the first test case... It failed... Passes all other tests
 
Oh yeah, tfw one test case makes you double your byte count
 
3:18 PM
yeah so annoying
 
3:50 PM
@LegionMammal978 almost a C#maj7sus(b9)/C
 
@flawr What's a C#maj7sus(b9)/C supposed to be?
 
@Pavel C, C#, E#, G#, B# I think
 
._. I don't see how that qualifies as almost C-C#-D
 
Oh whoops, I missed the sus(b9) part
@flawr What does sus(b9) mean?
 

« first day (2487 days earlier)      last day (2358 days later) »