« first day (3659 days earlier)      last day (1183 days later) » 

12:00 AM
Oh wait ofc it doesn't
Ah
 
Well see, I want it to stop after the length of the generated string equals the length of the input string
 
I guess you're supposed to be using itertools then
 
So it seems I am after powerset then
 
itertools.product does that
 
12:06 AM
You know how to do base n, though, right? Can't you just do that and then index into the list with each digit?
 
Well, there are many ways to solve it, which is true for any task
 
12:20 AM
Agreed
 
12:30 AM
Any feedback on this?
 
12:49 AM
0
Q: Fibonacci trees

BubblerBackground Fibonacci trees \$T_n\$ are a sequence of rooted binary trees of height \$n-1\$. They are defined as follows: \$T_0\$ has no nodes. \$T_1\$ has a single node (the root). The root node of \$T_{n+2}\$ has \$T_{n+1}\$ as its left subtree and \$T_n\$ as its right subtree. T0 T1 T2 ...

0
Q: The Rod Cutting problem

EliteDaMythGiven a rod of length n inches and a list of prices that contains prices of all pieces of size smaller than n. Determine the maximum value obtainable by cutting up the rod and selling the pieces. For example, if length of the rod is 8 and the values of different pieces are given as following, the...

 
1:01 AM
Any ideas for what less than, greater than, etc. should do on arrays? I did have them doing includes and indexOf, but I realized I already have operators that can do that.
 
Of course a lexicographic comparison.
APL suffers often from the lack of it
 
That'd work for strings, what about arrays?
 
@RedwolfPrograms strings are arrays of characters
so think about how it works for arrays of characters, and how you could generalise it to arrays of other types
 
[1, 2, 3] > [1, 2, 2], [1, 2, -999] > [1, 2]
 
Thanks!
 
1:09 AM
Lexicographic ordering is a general concept, which works with any list where their elements are comparable
Or if you want to go funky, you could implement shortlex order instead
 
Is there a name for addition, but you flip the sign of the second number if the first is negative? Like 4 + 2 = 6, 4 + -2 = 2, -4 + 2 = -6, -4 + -2 = -2?
 
What does it do if the first number is 0?
 
Hmm, not sure. Maybe just stay 0?
 
No idea. \$a+b*sign(a)\$.
 
If you use mathematical sign, 0 + any number would be 0
 
1:23 AM
0
Q: What to count in assembly?

SketchySketchYes, I've checked this post (How are bytes counted in assembly), but I'm asking a different question. I'm asking, if I have an .asm file, an .obj file and an .exe file, which one should I submit? Which part in the code should I submit? Especially for .obj files and .exe files -- I have no idea wh...

 
2:21 AM
@RedwolfPrograms ever considered vectorising?
It'd be a lot cooler if you did
 
2:37 AM
vectorizing is
quite useful
if you don't want to then if you're not set on them being binary you could have them check increasing/decreasing
probably not particularly worth it but an idea
because you can easily check increasing/decreasing with a simple invariant-under-sorting and it's not a particularly common thing to need
so if you don't want to vectorize then lexicographic ordering is probably the play
 
I vectorize some things, but I think the two bytes it costs to map an operator over an array is fine in most cases.
 
3:25 AM
@Lyxal And they retracted the bounty.
 
 
5 hours later…
8:43 AM
0
A: Sandbox for Proposed Challenges

BubblerCount unrooted, unlabeled binary trees of n nodes code-golf combinatorics sequence binary-tree An unrooted binary tree is an unrooted tree where each vertex has exactly one or three neighbors. It is used in bioinformatics to show evolutionary relationships between species. If such a tree has \$n\...

 
 
3 hours later…
11:38 AM
if I do ord('é') I get 233. Which table of characters does this refer to?
 
unicode presumably
 
is there a table for this that shows it as 233?
 
thanks!
 
11:55 AM
1
Q: Implement bottom (encode)

OrangutanChallenge The challenge is to implement the bottom encoding (only encoding, not decoding). There is a wide variety of existing implementations in the bottom-software-foundation org. Bottom is a text encoding where each character is separated into multiple emoji. Unicode escape(s) Character Va...

 
12:46 PM
0
Q: Permutation Coefficient

EliteDaMythWhat is Permutation Coefficient Permutation refers to the process of arranging all the members of a given set to form a sequence. The number of permutations on a set of n elements is given by n! , where “!” represents factorial. The Permutation Coefficient represented by P(n, k) is used to repres...

 
 
2 hours later…
2:22 PM
There are surprisingly many single word domain names with rather popular endings available
 
Something else...
Surely someone made an userscript to add leaderboard stack snippets to every questions (load on request)?
It's loaded client-side anyway.
 
Graduation userscript has leaderboards
 
And it would make sure that the userscript is up-to-date.
 
@RedwolfPrograms where's that from
 
@Razetime (definitely on meta.)
 
2:31 PM
It changes a bunch of other stuff too, though
 
wow this script looks sick
Hope it doesn't mess with random question
it doesn't!
this is so neat
 
 
1 hour later…
3:58 PM
0
A: Sandbox for Proposed Challenges

xnorGinormous number code-golf kolmogorov-complexity number Output this 1364-digit base-10 number: 1034606317538277595498321496528894235185361253638203466390593510146122206054819577408494150412777902779548471104874628926909551302791043849890675122564819776659006445796546131413014994215254507471207400...

 
 
1 hour later…
5:10 PM
CMC: Given a 2-dimensional vector (x, y), return its "cross product" (-y, x). You can take input in any convenient form e.g. complex number
 
So like (x,y)=>[-y,x]?
 
0
A: Sandbox for Proposed Challenges

jmizvIs the Skat null game safe? [WIP] For everyone who knows the card game Skat. Did you ever wondered when playing a null game: is this really safe to win regardless the other player cards? Well, let's try to solve this question with code. The Skat game Skat is card game with 32 cards. There are fou...

 
5:50 PM
@Neil How do you find the cross product of 2d vectors? I thought it was only for 3d vectors or something.
 
It's a cross product with (0,0,1)
 
@JohnDvorak Oh ok
 
x86 assembly, courtesy of RustC:
.LCPI0_0:
        .quad   0x8000000000000000
        .quad   0x8000000000000000
example::cp:
        movaps  xmm2, xmm0
        xorps   xmm1, xmmword ptr [rip + .LCPI0_0]
        movaps  xmm0, xmm1
        movaps  xmm1, xmm2
        ret
 
Actually, I'm still not sure I understand. Is the z implicitly 0?
 
or the 32-bit integer version:
example::cp:
        mov     eax, esi
        neg     eax
        mov     edx, edi
        ret
 
6:13 PM
Hmm, now I'm thinking about switching Ash back to prfix, since it turns out stack based adds more bytes for functions and mapping over arrays, and the main benefit for golfing that I thought it'd add is shorter with prfix anyway
 
@RedwolfPrograms What's prfix?
 
in Ash, Jan 28 at 8:41, by 2x-1
So, you can say "Look guys! My language uses the revolutionary prfix!" when in reality, the language actually uses prefix.
 
Oh, just prefix, then.
 
But without the letter e because it's ugly and yellow
 
@RedwolfPrograms Do you have synesthesia?
 
6:16 PM
yes :p
 
Oh cool
So you see faces for letters and numbers and stuff?
 
Colors for most letters and a few numbers, and occasionally shapes for music.
 
me: faces for letters would be terrifying. ö
 
@JohnDvorak What about personalities for letters?
 
how do diacritics affect synesthesis?
 
6:24 PM
@JohnDvorak For me, at least, it's pretty much the same as a normal o.
 
í čáň šťíčk áččéňťš óň móšť ľéťťéřš júšt bý hóľďíňg áľť
2
ďóéš ťháť héľp?
 
Nice
⍳ ∩⍺⊤⍕~ ⌈~⍳∩' ⍺∩∩∊⊤~⌈ ○⊤ |○⌈~ ⎕∊~~∊⍴⌈ ∘↓⌈~ ⊥↑ ∆○⎕⌊⍳⊤∇ ⍺⎕~
 
6:48 PM
@user the cross product in n dimensions takes n-1 vectors as arguments
 
@Neil Oh, ok. I really need to research this more
 
7:39 PM
3
A: Permutation Coefficient

TFeldPython 3.8 (pre-release), 51 23 21 bytes from math import perm Try it online! No builtins: Python 3.8 (pre-release), 31 bytes f=lambda n,k:k<1or n*f(n-1,k-1) Try it online!

how normal is the first code? shouldn't it be written as from math import perm;f=perm?
 
 
1 hour later…
8:42 PM
37
Q: Fibonacci-orial

Leaky NunDefinition Fibonacci sequence F(n), on the positive integers, are defined as such: 1. F(1) = 1 2. F(2) = 1 3. F(n) = F(n-1) + F(n-2), where n is an integer and n > 2 The Fibonacci-orial of a positive integer is the product of [F(1), F(2), ..., F(n)]. Task Given positive integer n, find the ...

 
codegolf.stackexchange.com/questions/218576/… imo the challenge linked is a lot stricter with input and this new one is not a duplicate
And it disallows builtins, so this is absolutely not a duplicate in my mind
 
9:17 PM
Anyone else get confused when you bounty a question and get notifications for every new answer on it?
Oh hi Lyxal
 
<insert phrase I usually say at this local time of the day>
<insert question regarding the status of everyone here>
 
lol
 
TIL my stupid school district blocks any sites with HSTS preload TLDs
 
@RedwolfPrograms wait so you don't need syntax highlighting then?
 
Actually no, because five years of using the same IDE has trained my synesthesia to those colors
 
9:21 PM
Also, while I'm thinking about it,
eeeeeeeeeeeeeeeeeee
3
Heh
 
Also Ash is no longer stack based
 
Oh
 
I realized the main benefit was something I wasn't actually using in the first place, and implicitly converting operators into functions is way easier with prfix
 
Prfix
...
 
3 hours ago, by Redwolf Programs
in Ash, Jan 28 at 8:41, by 2x-1
So, you can say "Look guys! My language uses the revolutionary prfix!" when in reality, the language actually uses prefix.
 
9:28 PM
It starts off simple... You start using funny little misspellings here and there
Then next thing you know, you find yourself in a chat room full of silliness
 
Ew now your message with the es is starred and the stars are yellow
4
 
:)
That's the intention
 
It really sucks how my school district blocks websites with games and/or good security practice, since mine has both.
 
How does it detect games?
 
Probably a combination of automated heuristic stuff and manual review for popular sites.
My server's already been IP banned though
 
9:35 PM
Getting around the good security stuff is easy
 
@RedwolfPrograms Why?
 
Getting around the game detection is hard
 
I made a chat program and half my middle school started using it.
 
Oh ok
 
@RedwolfPrograms use a different server
Duh
 
9:37 PM
If you don't want the teachers finding out about it because it's too popular, make it really bad so no one uses it.
 
Pythonanywhere.com let's you host stuff for free and uses http not https
 
Yeah, but my newest game is going to have accounts/login stuff
They're fine with HTTPS, but it's the HSTS preload they either don't like or don't understand (my money's on option 2)
 
Yeah, but it also gives you local storage, databases and so on
@RedwolfPrograms does it block cmg?
 
9:49 PM
Coolmathgames
 
Recently yes, but i remember playing it at school in elementary school
 
@RedwolfPrograms I pity you
You poor poor child
Cmg was thankfully unblocked for us
@user I have a better idea...
Okay so this is speaking from personal experience here
Make a few sites that rickroll people when they visit
Then, when people see the link to the actual stuff, they won't trust the link
 
I've managed to trick them for now by registering a fake school-related domain and routing some stuff through there, but it won't work for anything requiring security
 
github.io is blocked here too :/
 
9:53 PM
@Lyxal You don't even need to make any sites, just consistently put links to rickroll people in every chat you're in
 
@user no the point is that people won't trust redwolfs websites, consequently letting the real cool stuff fly under the radar
 
@RedwolfPrograms Here's an idea: Graduate from high school, become a board member or something, and unblock sites.
 
See I play the long game
 
@Lyxal The one I just suggested is even longer
It's also completely useless :P
`Huh, what just happened to the font?
 
I did
I happened to the font
 
9:58 PM
I have no idea, something happened and there was an option for "fixed font" to the side. I clicked it and now it looks like code.
@Lyxal ...
 
@user someone put a newline in their message...
 
Oh, ok
 
Just as I suspected
 
I'm considering a way to go around the school's filter while on their network
I know how it would work in theory but it'd require a lot of time to implement
 
How to: Get the sysadmin to unblock your site:
1. Find them
2. Give them synesthesia
3. e
4. Profit
 
10:09 PM
Because it's a synthesizer, right?
 
I was thinking more to do with the colouring of notes
 
I always thought it was because you synthesized sound.
 
So did I
but now I think otherwise
 
Or synthesised sound, since you're not American.
Maybe a bit of both?
 
@user probably
 
11:07 PM
@Danis A built-in submission can be simply the name of the built-in, plus any imports needed
so from math import*<newline>perm is valid
but not from math import perm
 
import math\nmath.perm is 1 char less
 
11:21 PM
Yeah, that works too
 

« first day (3659 days earlier)      last day (1183 days later) »