« first day (4040 days earlier)      last day (804 days later) » 
00:00 - 15:0015:00 - 00:00

12:09 AM
@emanresuA
can i edit ur post cuz this post doesnt haev the tag code-golf?
idk lol
 
0
Q: Convert a string of ASCII characters to base-3 equivalents

sinvecTask similar to this one. Take a string of ASCII characters and convert it to base-3 equivalents separated by a space. For example: Hello, world! Should be converted to 02200 10202 11000 11000 11010 01122 01012 11102 11010 11020 11000 10201 01020 That's all. The shortest solution wins.

 
it was upvoted @Fmbalbuena
congrats to @WheatWizard for hitting 80k rep!!!
 
@DialFrost but see the vote count
 
oh
u got 1 vote from me tho :)
ppl always downvote answers there idk y
my vyxal answer got downvoted as well
 
12:19 AM
Jan 22 at 18:18, by hyper-neutrino
don't try to bribe me with votes, you're not gonna get anywhere with it, trust me
 
lmaooooo
i didnt bribe u
 
@Fmbalbuena ... they weren't
 
12:36 AM
I wish high rep users could edit stuff and then choose not to have it bumped. I've had to hold myself back from fixing a little grammar mistake too many times (or I've made some minor edit before realizing it pointlessly bumped my post)
 
i think that's been requested for a while and by many times lmao
but yeah, I totally agree
 
@user vandalisation though
 
@Fmbalbuena that quote doesn't make any sense here
 
@emanresuA Yeah, but only allowing it for high rep users should be safe
 
12:38 AM
high rep as in?
 
@hyper-neutrino Best to give them the benefit of the doubt and assume they somehow interpreted DialFrost as bribing them or something
@emanresuA 10566+ :P
 
Nice lol
 
That number has absolutely nothing to do with my own rep
 
Maybe those could show up on the mod dashboard or something? (No idea how that works though)
 
user image
3
 
12:41 AM
@user Most people use #2 :P
Waiit... I just realised Vyxal's transposition doesn't work for infinite lazy lists
 
The first time someone suggested using zip, I was absolutely mind blown
@emanresuA Oh noes
Not a huge deal tho
 
Yeah, if you're doing something with 2d lazylists you're probably doing something wrong
 
Not necessarily, but it is somewhat rare in a language like Vyxal. I'd expect it more in something like Husk
 
True
 
@emanresuA maybe minor edits could always go into the review queue, to ensure that they really are minor? Hmm, wait, that's potentially self-defeating...
 
12:47 AM
Yeah lol
 
@Neil I think that'd be fine on a site like this because only one reviewer would see them, not every single person visiting CGCC
 
@emanresuA do you mean for infinite lazy lists of finite lists, for a list of infinite lazy lists, for an infinite lazy list of infinite lazy lists, or for all of the above?
 
All of the above
But yeah, infinities are hard
 
1:00 AM
Sandbox posts last active a week ago: Uncountably long chain of subsets, Interpret Subleq code
 
1:16 AM
my sandbox posts haev so many downvotes
...
and yet no one comments on them
 
@Adám I still haven't received the packet in my inbox yet - I also checked my spam and promtional inbox and it wasn't there either.
Was it sent to lyxalcgcc {at} gmail {dot} com?
Because I know there's been issues with sending it to my Vivaldi email previously (which I don't use anymore because of the fact it was bouncing emails)
 
wait guys how do u do a rollback
 
1:33 AM
@DialFrost go to review history, then click rollback
 
review hist???
 
1:56 AM
Update: Halfwit appears to be fully functional.
CMC: Guess what's wrong with this code:
let vectorise = func => inner = (left, right) => {
  if (a(left) && a(right)) {
    if (left.length > right.length) [left, right] = [right, left]
    return right.map((val, index) => inner(left[index] ?? 0n, val))
  } else if (a(left)) {
    return left.map(val => inner(val, right))
  } else if (a(right)) {
    return right.map(val => inner(left, val))
  } else {
    return func(left, right)
  }
}
 
does it have something to do with non-commutative operators getting messed up by your length comparison flip
 
I did not think of that lol
No, that's not the intended issue, but thanks for pointing it out
 
how do i use numpy in 3.8
python
 
Um, import numpy?
 
sigh
it doesnt work
 
2:06 AM
pip install numpy
 
in tio.run???
 
ATO has numpy and 3.8, use that
 
wats ATO
oh wait nvrm
it does meh
wats the name
 
?
no wats the name of the lang
there only python and python2
 
2:08 AM
python = python 3 there
 
nvrm
 
Copilot in JS be like
 
@Fmbalbuena i golfed ur code in comments
 
3:14 AM
can anyone check my sandbox posts?
 
3:25 AM
TIL from a random YTP that the time the minions were in an ice cave just happened to line up in a way that prevented them from being nazis
 
is sandbox rly helpful?
 
Yes, very
 
i mean yes ppl do comment on challenges which is gd
but for me, i have 4 posts with negative score
and no comments whatsoever
and are 1 week old
2 challenges 1 week old, 2 slightly newer
 
Well, if you'd posted them to main, they'd have been downvoted and closed there instead
 
i havent posted to main yet
thats why
and i think sandbox shld make it clearly to explain downvotes and that users should clear their posts after posting to main
 
3:30 AM
> When you think your challenge is ready for the public, go ahead and post it, and replace the post here with a link to the challenge and delete the sandbox post.
And that last part is in bold
 
ah thats kinda the problem (which is hard to fix)
ppl never read the description of the sandbox (including me)
so i missed that as well when i joined 2 months ago
 
yep, the problem of people not reading can't really be fixed because you can't just write something to fix that if it's not read lol
 
People misusing the sandbox is still a lot better than them not using it at all, though
I'd much rather have it littered with undeleted, posted questions, than have main littered with closed and downvoted ones
So it's not a huge issue
 
is there any mention of commenting on why the person downvoted?
^ in sandbox i mea
mean*
 
3:50 AM
Well, back from the YT comment section with more fun stories
So, there were the normal onlyfans spam bots in replies, and someone was reminding everyone to report them and not click the links, saying it could lead to your account being stolen. Someone else replied saying they were a professional web dev, and clarified that clicking the link wasn't the issue, it was phishing attacks, and gave a brief warning about entering your password on an untrusted site. (1/2)
Then someone replied something along the lines of "wow, this 'professional web dev' (whatever that means) seriously doesn't know clicking on links will steal your account?"
I just love the quotes around "professional web dev", as that's some made up career that nobody's ever heard of
Or is it like, an implication that web development is inherently unprofessional :p
 
would they be wrong
 
I really think the majority of attempts to teach people about basic online security go about it all wrong. Instead of simple rules like "don't click links in emails", "don't use passwords with just letters", etc., concepts like what a browser does sandboxing-wise and how phishing, password brute forcing, and so on actually work would do a lot better of a job at teaching people what to actually be careful of
 
yeah, I think the oversimplification is an issue cuz people don't really understand what the primary issues are and just remember some key "bad actions" (which are hard to remember with zero understanding anyway, on top of not being extendable to other things meaning the phisher will always be one step ahead with every new scam)
 
It's like how a bad teacher just tells you what to do to pass the test, while a good one gives you an understanding of why it works and that sort of thing
 
4:45 AM
how to write flax answers: just port jelly lol
0
A: Fibonacci function or sequence

PyGamer0flax, 3 bytes +ⁿ1 Port of the Jelly answer. Takes input from stdin. Works similarly to the Jelly answer.

 
5:07 AM
Ugh 2FA is a pain sometimes
@RadvylfPrograms probably intentional
 
Something tells me Illumination wouldn't get very good feedback if they started marketing minion merchandise with swastika armbands
 
Hm, Pundit. Idk what I got that for
Yeah lol
 
what
 
5:38 AM
Should reverse, reverse the range or reverse the digits if applied to an integer argument?
 
both are useful; reverse digits probably more so but not by much
 
ok im adding a diagraph
to 123321
 
if you have a vectorizing and non-vectorizing reverse then you could have one do each
 
Vyxal... reverses each digit with vectorising reverse on numbers
Such useful
 
do i have a vectorising and non vectorising reverse
its a diagraph
@UnrelatedString U vectorises in Jelly?
 
5:46 AM
ye
 
ill rewrite the vectorising functions
 
@emanresuA *all the time
 
dyadic_vectorise(fn, x, y, rfull=True, lfull=True)
now i need to figure out how to implement that
 
@emanresuA better than Charcoal, which tries to reverse floats but fails (fortunately I've never needed to reverse floats)
 
4 hours ago, by emanresu A
let vectorise = func => inner = (left, right) => {
  if (a(left) && a(right)) {
    if (left.length > right.length) [left, right] = [right, left]
    return right.map((val, index) => inner(left[index] ?? 0n, val))
  } else if (a(left)) {
    return left.map(val => inner(val, right))
  } else if (a(right)) {
    return right.map(val => inner(left, val))
  } else {
    return func(left, right)
  }
}
BTW, the bug is that inner is a global variable, so vectorise isn't reusable.
 
5:58 AM
i came up with:
def dyadic_vectorise(fn, x, y, rfull=True, lfull=True):
    dx = depth(x)
    dy = depth(y)

    if rfull and lfull:
        if dx == dy:
            if dx != 0:
                return [dyadic_vectorise(fn, a, b) for a, b in zip(x, y)]
            else:
                return fn(x, y)
        else:
            if dx < dy:
                return [dyadic_vectorise(fn, x, b) for b in y]
            else:
                return [dyadic_vectorise(fn, a, y) for a in x]
    elif (not rfull) and lfull:
long, yes. works, idk.
@emanresuA ^ will that work
      VD(lambda x,y:y in x, [1, 3, 6, 7, 8], list(range(10)), lfull=False)
[False, True, False, True, False, False, True, True, True, False]
seems to be working
yeah it works
      h
> 1095794895
> [3, 4, 5]
[[1 0 9] [1 0 9 5] [1 0 9 5 7]]
^ ha works like a charm
 
6:32 AM
Yes, but you don't need to do depth checks - you can just do isarray which is more efficient
Wait what's rfull and lfull?
 
 
1 hour later…
7:38 AM
@emanresuA use the right reverse element then
Also, what do you expect from a vectorising reverse on numbers? Reversing each digit is the most logical thing to do
 
reversed range is a possibility which wouldn't be totally illogical
but probably not as useful
 
7:57 AM
@lyxal I know, but it's not the most useful.
 
@emanresuA fully vectorise on left or right argument
so if lfull is false it doesnt vectorise on the left argument
 
im back
 
def reshape(x, y):
    x = it.cycle(flatten(x))
    y = flatten(iterable(y))

    if len(y) == 1:
        return [next(x) for _ in range(y[0])]
    else:
        return [reshape(x, y[1:]) for _ in range(y[0])]
gets stuck in a loop ^^
 
8:13 AM
Okay, fibonacci in Halfwit is n><?(:}+
(5.5 bytes)
 
does anyone here have a challenge for me for CG
im bored
like one that hasnt be answered e.g. idk
 
n        Push the context variable n, 1 in global scope
 ><      Push an empty compressed integer = 0
   ?(    Input times...
         Example with stack = [2, 3]
     :   Duplicate [2, 3, 3]
      }  Rotate stack right [3, 2, 3]
       + Add [3, 5]
         And the next pair is now on the stack
         The last one is implicitly output
 
Wordle 246 4/6

🟨⬛🟨⬛⬛
⬛🟩🟨🟩⬛
⬛🟩⬛🟩🟩
🟩🟩🟩🟩🟩
I get your joke
 
Wordle 246 3/6

⬛⬛⬛🟩🟨
⬛🟩🟨⬛⬛
🟩🟩🟩🟩🟩
So do I
 
def reshape(x, y):
    x = flatten(iterable(x))
    y = flatten(iterable(y))

    if len(y) == 1:
        return [(x := x[1:] + [x[0]]) and x[-1] for _ in range(y[0])]
    else:
        return [reshape(x, y[1:]) for _ in range(y[0])]
argh
doesnt work
 
8:27 AM
¯\_(ツ)_/¯ Steal from Jelly
 
lol
 
@emanresuA "reshape not found"
 
a lot of atoms' implementations are just lambdas in the attrdicts
 
@UnrelatedString jelly only has mold
 
that is what the builtin is called
 
8:31 AM
X ,olleH is definitely Hello, World!
 
@pxeger I have achieved comedy
 
@UnrelatedString wha
@UnrelatedString doesnt do the thing i want ato.pxeger.com/…
 
@emanresuA haha vyxal v3 is shorter: k≈Ṣ+
 
But Vyxal v2 is longer
(By half a byte tho)
HW is 15 bytes in theory (bugs)
Oh I see, there's a bug with my compression alg
 
8:54 AM
@emanresuA I'm disappointed in myself, because I thought of spoiler after guess #2, but I thought it was too uncommon to be the real answer, so I guessed spoiler for my 3rd. If I'd remembered @lyxal's joke from yesterday I would have got it immediately :/
 
15 byte HW in Halfwit - >JM?M;J*?f?*M[?JN;k+Jkk;$<5b. Not bad for a lang with no concept of strings!
@pxeger I guessed spoiler for my first two and then just ruled out everything else
 
9:20 AM
Damnit, caching
 
9:32 AM
@emanresuA Thank you for reminding me to play Wordle.
 
0
A: "Hello, World!"

emanresu AHalfwit -A, 15 bytes >JM?M;J*?f?*M[?JN;k+Jkk;$<5b Try It Online! Halfwit is an experimental golfing language that fits most commands in half a byte. It only uses lists and integers, so the -A flag allows it to output characters. This approach is pretty simple. The bit between > and < is a compre...

 
That's the first time I've seen the Hello, World! feed.
 
@emanresuA why doesnt halfwit support strings
 
0
Q: Leetcode 1675 - Minimize Deviation in Array

Anirban AcharyaI was solving the problem on Leetcode given here. I noticed everyone is solving it in one particular way i.e., Traverse the vector and double all the odd vector elements. This nullifies the requirement for the 2nd operation. Now, decrease the largest vector element while it’s even. To store th...

 
9:57 AM
@NewPosts VTD?
 
oh like an apl reshape
hmm
 
10:24 AM
@emanresuA is there a way to print numbers in halfwit without the n at the end?
 
10:34 AM
0
Q: Convert to base i - 1

xiver77i being the square root of -1, a base-(i - 1) binary number N with n binary digits from d(0) to d(n - 1) satisfies the following equation. $$N = d(n - 1) (i - 1) ^ {n - 1} + d(n - 2) (i - 1) ^ {n - 2} + ... + d(1) (i - 1) + d(0)$$ For example, a decimal number 15 is 100011101 in base-(i - 1) sinc...

 
@UnrelatedString and i already have implemented mold (m)
 
len: 182
unused ascii: "$/:;?@_abkqvwx
remaining space: 74
actually no i used ()
 
can anyone check the following?
0
A: Sandbox for Proposed Challenges

DialFrostKnight mover Your task is to move a chess knight between the points B and E. A chess knight moves in an L shaped pattern, like so: .X.X. X...X ..B.. X...X .X.X. The Xs mark where the knight in position B can move. There may be other chess pieces on the board, blocking the knight's movement, but ...

-1
A: Sandbox for Proposed Challenges

DialFrostZhiwei Sun Squares Given a positive integer n, find the number of ordered tuples (a, b, c, d, e) over non-negative integers for which a² + b² + c² + d² = n and b + 3c + 5d = e². Note: A conjecture by 孙智伟 (Sūn, Zhìwěi) states that this count is always at least 1. For example, if n is 9, there are ...

-1
A: Sandbox for Proposed Challenges

DialFrostThe travelling sales man problem The travelling salesman problem (TSP) asks the following question: "Given a list of cities and the distances between each pair of cities, what is the shortest possible route that visits each city exactly once and returns to the origin city?" In this puzzle not nec...

i plan to delete/post them soon
 
in flax, 2 mins ago, by PyGamer0
CMQ: What should I do with "$/:;?@_abkqvwx?
 
10:43 AM
aside from superscripts for whatever you call the modifiers is there any particular theme to respect
 
@UnrelatedString no, just that the quicks are superscript
in flax, 3 mins ago, by PyGamer0
anyways i guess they should be atoms (except ")
 
if you weren't already using jelly's digraph starters i'd have half a mind to recommend : and _ for them lmao
 
@UnrelatedString so diagraphs will be :a
?
actually thats not a bad idea
 
although i guess it would be weird to have : and not .
would confuse the fuck out of anyone who knows j lmao
 
lol
 
10:47 AM
_ having some kind of special function does seem appropriate though
being completely under the rest of everything
 
i guess _ for niladic diagraphs, ; for monadic diagraphs and : for dyadic diagraphs is not a bad idea
 
anyone?
 
@UnrelatedString like?
 
not really sure lol
niladic digraph starter could work
 
10:51 AM
yeah i like that idea
 
does space do anything? maybe underscore could do something related
 
(and it saves code page space)
@UnrelatedString i mean space does nothing except separating tokens in certain cases
 
i've been sort of thinking space could be a good monad-starting chain separator, so then underscore could be dyadic or something
 
i mean then how i separate 1 2 without spaces
 
10:54 AM
@PyGamer0 the beauty of it is it'll Almost Never come up
in the odd cases where it does you can usually use an otherwise extraneous chain separator, grouping quick, etc.
identity function
 
@UnrelatedString but ....... space show separate the tokens, not the chains
thats what space means, it separates words, it doesnt start a new sentence.
 
so in Jelly you can often do 1¹2
 
or 1¤2
 
@pxeger that would be 1O2 in flax
 
10:56 AM
the only time i can remember ever using space in jelly was with converting UDLR or whatever to complex numbers and there was absolutely no reason i couldn't have used ¹ instead
the space was just an aesthetic choice because you almost never can use it
 
annnyoneee?
 
specifically it was like O%6 ı* or something
 
but i want to write {I} ⍝ Hey look a comment
 
Jelly's @ (APL ) currently breaks on nilads, so you could just overload that
 
i think he has it already overloaded on monads for i forget what but yeah that could be good for doing it on nilads
 
10:58 AM
@pxeger i have ˜ which does nothing to monads and nilads
    "˜": attrdict(
        condition=lambda links: links,
        qlink=lambda links, outer_links, i: [
            attrdict(
                arity=links[0].arity,
                call=lambda x=None, y=None: variadic_link(links[0], x, y, commute=True),
            )
        ],
    ),
 
Ah frick just realised I deleted my virutalenv files for Vyxal without realising it
 
just poetry install
 
and I've emptied my recycling bin since doing so
@pxeger no I mean I needed them for running the flask app locally
 
guys can anyone check my posts (sandbox)
thx
 
11:00 AM
@lyxal but doesnt ATO now have vyxal
 
hey wait I don't need virtualenv for flask apps
this is fricking news to me
@PyGamer0 I need to do local testing
 
 
and the flask app is easy for testing
anyhow all this time I've been going into the scripts folder and running the activate script when I never needed to do so
 
@lyxal why why
 
idfk
 
11:02 AM
but...
Even if you've installed flask locally, vyxal needs other modules, right?
 
which do u think i can get first: electorate or fanatic? :P
 
@mathcat poetry install those and it takes care of it apparently
 
@DialFrost langmaker :P
 
ah nice
 
don't ask me - this is just as much shocking to me as it is to you
a whole year I've been doing things in a more complicated way than I ever needed to
 
11:04 AM
@DialFrost theoretically one can get Electorate in only 15 days
if you use the maximum votes per day
 
lol
im too lazy tho
although tdy i used all my votes
and im at 213/600 currently
 
11:18 AM
can anyone check my sandbox posts
er guys
how do u make an equation again
 
@DialFrost \$ 1 + 2 = 3 \$
 
thx pxeger
 
0
A: Sandbox for Proposed Challenges

DialFrostThe Balanced Centrifuge Problem A Centrifuge is a piece of equipment that puts multiple test tubes in rotation at very high speeds. It consists of a cylindrical rotor with holes situated evenly along the circumference of the rotor. Because the device is operating at high speeds, the center of mas...

 
how do u use a times operator again
like the x math operator
 
\times
 
11:29 AM
thx
 
 
3 hours later…
2:06 PM
0
A: Sandbox for Proposed Challenges

AnttiPIs it a tower permutation? A tower is made out of layers, each one being one unit shorter than the one below it. Every layer is completely on top of the previous layer. For example, here is a tower along with it's height map: # ## ### #### ##### 14532 Because the lengths of the layers are t...

 
in flax, Feb 10 at 13:24, by PyGamer0
if anyone wants anything added to flax, then feel free to open an issue
 
hello!
 
2:23 PM
o/
 
0
Q: Draw a ASCII pencil

sinvecTask is pretty simple. Your program should take a number N from 1 to 20 and draw the following ASCII art. For N=1: _____ | | | | | | | | | | | | | | | | | | | | | |_|_| \ / \-/ v For N=2: _______ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ...

 
2:46 PM
I am using WSL for the first time. It is cool but grep is confusing me. If I want to find lines in a text file with names in them I would normally do grep ^[[:upper:]][[:lower:]]*$ but that doesn't work in WSL. Anyone know what the WSL equivalent is?
 
You need to be more specific than "that doesn't work"
 
What does it do in WSL if it doesn’t work? Which distro are you using?
 
Do you get an error? Or does it give the wrong output?
 
^^^
 
it returns no lines. Windows 10
 
2:52 PM
which WSL distro? uname -a
 
uname -a
Linux IT073585 4.4.0-19041-Microsoft #1237-Microsoft Sat Sep 11 14:32:00 PST 2021 x86_64 x86_64 x86_64 GNU/Linux
 
cat /etc/lsb-release?
and grep --version
 
DISTRIB_DESCRIPTION="Ubuntu 20.04.2 LTS"
 
and env | grep '^L' (copy the relevant ones about "locale", "language" ,"LC_ALL" and similar)
 
grep (GNU grep) 3.4
LANG=C.UTF-8
the problem is now the $ it seems
 
2:56 PM
run export LANG=en_US.UTF-8 and then try grep again?
 
it works without it although obviously it then isn't matching the right thing
 
try grep -x [[:upper:]][[:lower:]]*?
without ^ and $
 
also fails.. I tried cat -A and I see
1111^M$
which I guess is the problem
silly windows
 
ah, you'll need to use dos2unix or similar then
 
:(
but thanks
 
2:59 PM
tr -d '\r' might be enough
 
00:00 - 15:0015:00 - 00:00

« first day (4040 days earlier)      last day (804 days later) »