« first day (3821 days earlier)      last day (99 days later) » 

12:01 AM
Q: Polyagony layout (mode 3/3,6)

BubblerBackground Polyagony is a family of hypothetical esolangs where the source code is laid out on a specifically shaped board before running it. It's similar to Hexagony, but various uniform tilings can be used instead of a simple hexagon. The shape of the board and the tiling used is defined by the "...

I'm about halfway into silver on meta. I might have already got it if I didn't delete all the sandbox posts :P
@Ausername considering the somewhat weak string manipulation abilities, and the fact that it's impossible to have unmatched parentheses, i'm fairly sure it's impossible to create a replacement for a, so that option's out the window
@UnrelatedString Oh true
i'm less sure you strictly need it but i'm having a hard time thinking of a way around it
Is there a way to halve a string/
12:06 AM
you can concatenate and you can eval
So no
i'll still throw something together that replaces its parens with square brackets for fun :P
12:08 AM
needless to say i have the standard quine memorized
(a(:^)*S):^ right?
maybe not the standard standard one
(:aSS):aSS :P
Oops wrong room
Moved it for you :)
maybe i should appoint the bot as an RO here and have it automatically pick up messages that are commands to it and throw them over there /s
12:13 AM
That doesn't work 'cos the makes it not a command.
well if it knows it's a command it can just run it, no?
@Bubbler Halfway there
Livin' on a prayer
Take my hand, we'll make it not square
the 0 case is gonna be annoying. or it won't. idk
12:28 AM
For some reason I thought you had to place it :p
oh heck yeah. no more cursed java!
instead, it'll be cursed c++
me when I'll be learning about linked lists, binary trees and other data structures
I personally consider c++ more cursed than java
Java is just verbosity hell. C++ is everything mixed up hell
12:40 AM
@Bubbler I'm using hyper's fork because mainstram Vyxal is completely broken. But hyper's fork generates permalinks for mainstram Vyxal.
Also I absolutely hate the fact that every single data structure textbook uses C or C++
Fixed now, check post.
@Bubbler why do you think this is so?
@Ausername Doesn't work for 0, 1, 4, 5, 10
I see what I did there
I forgot to recalculate some stuff
Ykw I'm just going to double the input and add three.
Fully functional, for real this time
12:48 AM
@lyxal 1) C and C++ are hard on their own 2) Ideally they should try to be language-agnostic (the theory shouldn't depend on the language), or at least there must be textbooks using other languages as well.
Or use python
Python is basically runnable pseudocode
i feel like some space should also be given specifically to functional data structures
Assembly is runnable pseudocode!
12:49 AM
I wish there was more literature on functional algorithms or array/parallel algorithms
I get that learning the inner workings is a good thing, but programming exercises in the same language must burn in fire
because often I wonder if there's some nice array lang way of doing something or a functional way but often it just won't even be covered
I always say Malbolge is the best language for the job.
Oh wait I can just go 2n+1
no 3 neede
...well i haven't ever taken a data structures class because i'm not exactly in college until next month
but i feel like there is an exclusive emphasis given to mutable structures and mutating operations on them
I haven't ever taken a data structures class because I really am not interested in that side of CS :P
12:52 AM
and mutating operations are important for obvious reasons but it would probably even ease people in better to also cover them from a functional perspective
Okay this is a bit of a stupid question, but I've never really understood the term "array language" to refer to APL/J/the rest in that category. Granted I don't know much about them, but what makes them array enough to be specifically called array languages?
part of it's probably that there;s a huge emphasis on arrays in the builtin set/core functionality
where array manipulation tends to be a bit of an afterthought otherwise
@UnrelatedString And the state-of-the-art algorithm research still has emphasis on imperative algorithms, maybe because it is how computers mainly work
Sandbox posts last active a week ago: Longest Zero Sum Sub-array
1:00 AM
@RedwolfPrograms The primary (and often the only) data structure is an array, and all the primitives automatically work on variously shaped arrays
it's kind of usually strictly better in terms of performance and there's not much point in algorithms research that isn't concerned with some aspect of performance
well that's fantastic. rain storm knocked out my internet in the middle of me teaching .-.
What are you teaching?
some pretty basic stuff for competitive programming (specifically for the ccc)
1:04 AM
not nice to no internet but nice to the teaching competitive programming
and since for whatever reason the organizer disabled participant screen sharing and needs to make me host at the start of each lesson
> All students must use the CCC Online Grader. The CCC Online Grader currently supports C, C++, Python (2.x and 3.x), Pascal, Java, Perl, and PHP.
and i guess didn't notice i went offline and came back
Booo, where's Jelly?
i can't even screensh- oh wait, she just gave me host, nvm we good
@cairdcoinheringaahing considering adding that to the DMOJ Modern Online Judge which supports a lot more languages :P
and yes, DMOJ stands for DMOJ Modern Online Judge
1:05 AM
Cool, a recursive acronym
> July 17th is World Emoji Day. On most platforms, the calendar emoji πŸ“… shows this date.
Like PHP (depending on who you ask)
Technically PHP doesn't stand for anything
But I've always heard PHP Hypertext Processor
also love how they just said python 2.x and 3.x
like does it actually allow you to select any version and if so what is the maximum python 3 version
PHP stands for nothing and nobody stands for or can stand PHP
....I always thought it just showed the date your device had for your birthday
1:06 AM
@hyper-neutrino -1, why isn't it EMOJ (or EMOJI)
is that your birthday?
@Bubbler gonna feature-request that brb /s
nice :P
lol nice
Is caird an emoji?
1:07 AM
Never realised that was the default date shown :P
it used to be Don Mills Online Judge but eventually they were like "wait we don't have any affiliation/association to Don Mills Collegiate Institute anymore"
@RedwolfPrograms πŸ•
Wow, DMOJ supports ARM assembly
oh there's an emoji contest (presumably where you saw that)? cool should write it (even tho it's unrated)
dmoj supports some languages i've never even heard of
Ooh, which ones?
1:10 AM
actually now that i think about it i think i've heard of all of these at least once. nvm lol
wait it supports INTERCAL lmao?
oh it also supports java, that's weird
INTERCAL is surprisingly common across OJs
prob for the memes
1:11 AM
Where's the list?
what the hell is GAS
@hyper-neutrino Let me guess this: one of Turing or SBCL?
Loud heated liquid
I definitely did not read too fast and mix up the first letters of "dart" and "fortran"
1:12 AM
@UnrelatedString GAS is GNU assembler
i don't recall knowing of Pike
SBCL tho, yeah, never heard of that
Haven't heard of that one
i'd imagine it's just a specific common list implementation
not zig i have no cule what zig is
1:13 AM
Zig has been around for some time, though it's not a big name yet
Ayy they have brainfuck support
No vyxal...
BF, also common across OJs
If you can do any of that in BF, you should automatically win.
1:14 AM
Time to plead OJs to include Martin Ender langs :P
i think if you set it up right and PR it and an admin is feeling nice you may be able to get things added
Ugh as soon as I don't have a laptop I can play Minecraft on for a few months, YT starts recommending a bunch of Minecraft videos >:|
a few months? what happened to the delivery being in august
It's been broken for a while already
Still should arrive in august if they don't delay it again
oh you meant from since when it broke
1:18 AM
i thought you meant now → delivery lol
No, hopefully not lol
I'm going to need it for school sometime around mid-august, so it better not get delayed again
1:46 AM
:o a YT video just referenced my favorite XKCD, instant like and subscribe :p
@RedwolfPrograms ; DROP TABLE Subscribers; -- :P
It's not that one :p
Bobby tables was the first XKCD I saw, though
Probably same for a lot of people :p
2:25 AM
@LuisMendo Sorry for the late reply, this all sounds good. I'm also interesting in thinking about generalizations. I probably won't do anything though until I'm home in a couple of weeks. Do you have an e-mail or something I can use to contact you?
2:45 AM
@Anush Yup, en.wikipedia.org/wiki/Aho%E2%80%93Corasick_algorithm + the other thing you mentioned
1 hour later…
3:57 AM
Ooh, I like how taking the \$n\$th derivative of \$sin(x)\$ gives you something that changes between four values, sort of like \$i\$ to the power of \$n\$
Is there some sort of obscure connection there?
Looks potentially interesting/relevant. It's organized by the ACM and I think it's free to attend. But it could just be since I have an ACM account, I'm not sure.
@RedwolfPrograms I think there might be in some way, since if you take \$(f(0), f(pi / 2))\$ where \$f\$ is the \$n\$th derivative of \$sin(x)\$ you get the coordinate pairs for all four cardinal directions
Sort of like how with the \$i\$ thing \$(real(f(x)), imag(f(x)))\$ does the same thing
4:13 AM
today I thought of a new competition type in cgcc
is it possible that we compete on a problem for minimal time complexity?
Already exists :p
4:25 AM
@hyper-neutrino > "borrows" but are you going to return it?
well the formula in the explanation appears wrong so i guess i'm even with them :p (not really)
Whoaaa taylor polynomials are so cool
4:36 AM
@RedwolfPrograms They're connected via e^ix = cos x + i sin x
That's seriously cool
derivative of e^nx is n e^nx for any n, so derivative of e^ix is i e^ix
which exactly cycles with the power of i
ah i had a feeling it had to do with that identity
That's so cool
5:07 AM
@m90 thanks!
5:33 AM
CMC: Calculate this (for numerical input x): sinh(x^3×cos(4x))
which is also 1/2 e^(1/2 (e^(-4 i x) + e^(4 i x)) x^3) - 1/2 e^(-1/2 (e^(-4 i x) + e^(4 i x)) x^3) :)
hard to imagine which language can compute e^(4 i x)) but can't compute sinh but they might exist
5:56 AM
^ whats wrong i am trying to solve this
yes its ungolfed; i will golf it later
first of all you need to add 32 in mode 0 to decode the ASCII character
second of all you need to divide n by 2 when decompressing in mode 1
third of all your OOP on line 24 is wrong
also FYI a, b = c // d, c % d is better written as a, b = divmod(c, d)
except that divmod is longer
@hyper-neutrino which onethis? if (f != 0 and s != '') or (f == 0 and s == ''):
divmod can be shorter if c or d is actually a longer expression
6:01 AM
@PyGamer0 n = n-1//2
if n is odd there's no point doing that anyway, n//2 works
unless i'm missing something it would break even in the case of c or d being even 2 long
any grep gurus? I have a text file dictionary with one word per line. Let's call it A. I have another text file, let's call it B. I want to find all the lines in B that has a word from A as a prefix
is that easy from the command line?
@hyper-neutrino Try it online!
looks right
@hyper-neutrino except it doesnt work
6:05 AM
is 47 not supposed to output Aah?
@hyper-neutrino but it doesnt work for 8609941742042387534416
well then you should've linked that case
@PyGamer0 Arble, 18 Bytes? sinh(x^3*cos(4*x))
I can't even google that
> string += " " + d[i] if d[i] != '' else ''
this line makes absolutely no sense
6:08 AM
is there a home page for arble?
found it
Nah, just a Github. It's a relatively simple Lua Extension
sad that no one likes command line questions here :(
@Anush It may be just that there are no linux/bash experts online right now
@Bubbler that is also a sad thought :)
@Anush Maybe you could construct the pattern from a file in the form of ^(word1|word2|...) and pass to grep
6:11 AM
@Bubbler it's a good idea but it has 10k words so I am not sure if that is doable
@Anush I mean, construct the pattern using another utility command
@Bubbler can grep cope with a pattern that long?
I feel it might go over a limit
@hyper-neutrino t
^ 1st 100
but if it has 10k words then it will probably take a very long time (even if it doesn't crash)
then grep is probably not the right tool for you
@Bubbler in theory it can be very fast using the tricks that grep already has. i.e. the aho corasick automaton (or similar)
I happy to use another tool of course
6:14 AM
Another tool being python script :P
@Bubbler In python how can you avoid having to look up every prefix of every word in a large set?
@PyGamer0 how would you do it with that?
@Anush grep clone in rust benchmark
> lines in B that has a word from A as a prefix
@Bubbler yes!
@PyGamer0 sorry I am not following. What would the command line be?
6:16 AM
So the word can appear anywhere in B and that word suffices to have a prefix in A, right?
@Anush let me be clear: i dont know as i dont use grep or ripgrep
@PyGamer0 ah :)
@Bubbler if A has apple, bob, cheese as its words and B is aple, bob123, ches then the output should be bob123
is that clearer?
Each line in B is also a single word?
Then it can be much easier: for each line in B, compute the set of prefixes and take the set intersection with A
easy python solution
6:18 AM
@Bubbler true. That works
I still want to know if you can do it from the command line though :)
there is grep -f which find whole words in A that match words in B
Yes: python -e :P
@Bubbler :) For fun, what is a golfed command line for this using python -e?
what does -e do?
python of course
it does not work
Oh no, it's -c
6:22 AM
oh i was wondering what you meant lmao
python -c 'a={*open("A").lines()};[print(l)for l in open("B").lines()if any(l[:i]in a for i in range(len(l)+1))]'
@Bubbler looks cool though!
how about..
grep -f <(sed 's|^|\^|' A) B ?
it is shorter, if it works :)
@Anush it works
woohoo! :)
6:27 AM
@Bubbler doesnt work
@PyGamer0 maybe my first ever golf success :)
@PyGamer0 cat a.txt - b.txt. I had never seen the - trick before
@Anush yes my brain worked
- means stdin
@PyGamer0 thanks for testing it!
7:05 AM
brainflak? :p
@hyper-neutrino catch: you can only do stack operations on the 2nd stack
a code bowling language :p
@hyper-neutrino wdym?
how does it become a code bowling language then?
wait do you mean the 2nd stack only supports stack ops
or that stack ops are only supported on the 2nd stack
7:21 AM
@hyper-neutrino 2nd stack only supports stack ops
cuz the way you worded it made it sound like you were going to require the 2nd stack to be used for stack ops which obviously makes everything like twice as long lol
7:33 AM
@PyGamer0 APL: 5β—‹*∘3×2β—‹4βˆ˜× Try it online!
@hyper-neutrino yes the second stack is now done.
1 hour later…
8:45 AM
CMQ: My language type checks and then performs operations if the types match; should i remove type checks?
@PyGamer0 What would the side effect of no type checking be? Undefined behaviour? Crashing? Erroring?
@ATaco error
See no reason not to. Especially if Explicit type checking is possible.
@ATaco wdym? so should i remove type checking or not?
You should be safe to remove the type checking if a user of the language can type check themselves.
8:48 AM
btw i have an extra command to explicitly type check
@ATaco ok then i will remove it.
s more golfy'
@Ausername yes i will but how
If it's in Python, you could cpy Vyxal's tricks:
def halve(item):
    return {
        Number: lambda: divide(item, 2),
        str: lambda: wrap(item, ceiling(len(item) / 2)),
    }.get(vy_type(item), lambda: vectorise(halve, item))()
Similar thing with tuples for dyads
or triads
@Ausername but my language isnt transiplied
That's fine
That's part of a function
Just rename it to whatever you want
and run when necessary
9:02 AM
def halve(obj):
    if obj.type == number:
        obj.value /= 2
    elif obj.type == array:
        obj = split_into_2(obj)
    return obj
@Ausername something like that ^?
But for dyads, it's easier to do the same thing with tuples:
def divide(lhs, rhs):
    types = vy_type(lhs), vy_type(rhs)

    def handle_numbers(lhs, rhs):
        if rhs == 0:
            return 0
        normal, int_div = lhs / rhs, lhs // rhs
        return [normal, int_div][normal == int_div]

    return {
        (Number, Number): lambda: handle_numbers(lhs, rhs),
        (str, str): lambda: split(lhs, rhs),
        (str, Number): lambda: wrap(lhs, len(lhs) // rhs),
        (Number, str): lambda: wrap(rhs, len(rhs) // lhs),
        (list, types[1]): lambda: [divide(item, rhs) for item in lhs],
It looks a bit chunky but it's much shorter than the alternative...
9:24 AM
Brownie points if you can beat 38
@Ausername hey wait a minute I've seen that somewhere before
That's because it's (presumably) your code
Funny about that
@Ausername actually, my highscore is now 40
Make that 42
9:59 AM
No clue.
A: Flatten the CUBE

caird coinheringaahingPython 3, 1558 1553 1419 1417 1347 1258 1106 bytes L=list M=map Q=len m=~0 G,H,J,K,Y,I=[0,1],[0,m],[1,0],[m,0],[m,1],[1,m] z=lambda p,u:L(M(sum,zip(p,u))) def f(a): def U(p,c,u,a,d): try:u=[J,I,Y,H,G,I,K][d.index(p)] except:0 return F+c*a,z(p,u),u a=L(M(L,a.split('\n')));p=0,0;n=a[0] fo...

anyway, it's time for yet another shameless CnR self-promotion:
You know I don't understand regular python, let alone python coded entirely to confuse me...
I kinda wanna try because I'm 100 rep away from 10k...
The only reason I know about compile is because Lyxal told pygamer not to call their compiler function it to avoid namespace complications.
I have hints prepared for this one btw
> assert"Not for the faint of heart"in c.__doc__
10:05 AM
I noticed.
yes good luck with that lmfao
So you're not stupid
As soon as I try to write something other than if 1:, everything starts seqfaulting again...
Time to pull out the docs...
I wonder what all those programmers on SO are thinking as they read this...
oh it's HNQ
10:14 AM
What does co_code even do?
Try using compile on some existing Python code, and explore the object's attributes
Actually I should goto sleep.
ha, now you're still here
goto pxeger
's house
Q: Possible numbers on a broken screen

l4m2A screen consisted of some LED segments like such: \$ \begin{matrix}|\\|\\\end{matrix} \begin{matrix}-\\-\\-\\\end{matrix} \begin{matrix}|\\|\\\end{matrix} \begin{matrix}-\\-\\-\\\end{matrix} \begin{matrix}|\\|\\\end{matrix}\cdots \begin{matrix}-\\-\\-\\\end{matrix} \begin{matrix}|\\|\\\end{matri...

10:33 AM
@NewPosts Is this extra big and kind of broken for anyone else?
@Ausername Someone started a +50 bounty, then wasn't able to award it when the bounty expired. My answer was the only answer, so the system auto-awarded half of it
@cairdcoinheringaahing yes, I suggested switching to just using code blocks in the comments because this is such a horrible abuse of mathjax
All Mathjax is a horrible abuse!
10:48 AM
@xnor Yes, you can find my email in this link (it's a Dropbox link but you don't need an account to see it). Let me know when you have taken note so I can delete the file
@Shaggy I think when used appropriately, it's good. It's when we (ab)use it for weird stuff that it can get bad :P
The MONKE question seems cool
is there a way to check if two ranges of lines (say 2-5 and 12-5) are the exact same? in vim
@PyGamer0 Use regex?
@N3buchadnezzar i dont know how to use regex
10:55 AM
learn it then
A: How to search for selected text in Vim?

glennslThe following sequence will do what you want, given an already selected block of text: y (yank the selected text, into the " register by default) / (enter search mode) (\ V) (optional, enter "very no magic" mode*) Ctrl+r " (insert text from " register) Enter (Engage!) (*) "very no magic" mode...

Oops, was not meant to be a big block of text
@cairdcoinheringaahing My big issue with it is when it's used as the only means of providing the spec for a challenge; specs need to be provided in plain English too.
@Shaggy If old challenges have taught me anything, that'll happen with or without Mathjax
Mathjax just makes it nicer to read when they do happen :P
sorry, wrong room
@Ausername what's the object? I don't see any instructions :-(
@PyGamer0 Although valid, it's better to use character ranges within character classes for better readability and, also, because there are quite a few people who don't know that it can be done that way. so, in your example, that would be [0-9a-f].
11:39 AM
@Shaggy \d is sometimes better actually because it can match Unicode digits like ¹
but here, for hex, I think 0-9 is better
@pxeger Something else a lot of people don't realise, as it's not in all RegEx flavours.
@Shaggy Hey, remember you tried to help me with regex and it was not working?
Like, I know my way around it. But nothing was working so I asked here ^^ After 3 painstakingly long hours I figured out that vimscript only parses regex if it is surrounded by ' not "
why has Bram Moolenaar forsaken us so
@N3buchadnezzar oof
@N3buchadnezzar Vim sounds awkward!
11:55 AM
It is!
One of the top suggestions on google for Bram Moolenaar is "... net worth"
So naturally, I clicked
> His net worth has been growing significantly in 2020-2021. So, how much is Bram Moolenaar worth at the age of 60 years old? Bram Moolenaar’s income source is mostly from being a successful Computer.
[sic] [emphasis mine]
@pxeger I mean Bram is a very successful computer
Thank god nvim is using Lua, that is at least a language I can use. It still sucks for unicode, but its usuable at least.

« first day (3821 days earlier)      last day (99 days later) »