« first day (3866 days earlier)      last day (1272 days later) » 

15:00
Okay there's no two byter in Ash AFAICT
Plenty of three byte ones though
Likely upward of a couple dozen
I can get 3 bytes in Jelly as well, but not 2
I can get 3 bytes in Vyxal as well, but not 2
what's the point of programming languages if they can't do such a simple task :P
what is the minimum for 65536?
@user41805 how do you do it in sed?
15:06
@Anush 2 bytes in Vyxal: k₴
@Wezl a and i give extra newlines, how do you do it without?
um
@Wezl could you show the sed line?
15:07
@Anush 2 bytes in Jelly: ⁹²
@Anush c65535
@pxeger got you
@Dudecoinheringaahing how on earth does that work?
gnu sed ig
@pxeger what is the full command line?
sed c65535 doesn't work
15:09
@Anush echo | sed c65535
@Dudecoinheringaahing nice
@pxeger If you make 92 smaller and higher, it's equal to 65536 :P
@Anush sed doesn't do anything unless it has at least one line of input
@pxeger thanks
( = 256, ² = squared)
15:09
@pxeger fussy tool :)
@Dudecoinheringaahing that's 65536
@pxeger yes it was an answer to my question
@Dudecoinheringaahing In Vyxal, 8^2 is 65536: Try it Online!
oh I'm dumb
15:11
does anyone have any suggestions for my CMQ?
ngn
ngn
@Anush "if I give you one million.." - such a good start :)
@ngn :)
depends on the currency
introducing my new currency, USD (US debt). Each USD is worth exactly -1 US Dollars.
VTC as dupe
I already asked about that in detail on worldbuilding :p
18
Q: A land where money is negative

Redwolf ProgramsFor a story I'm writing, there will be an industrial-revolution type city, with mildly powerful technology. They will be just discovering electricity, using steam power, and making all of their currency coins. However, this is a supposedly "Backwards" place, since their money is Negative. As an e...

@ngn there are BK-trees... who knows if they would help
15:16
> 26 Answers
> +27/-9
I thought I was sorting by votes, saw that there were 26 answers and that the top answer had a score of 1 and went "Oh boy". Turns out I was sorting by active :P
The downvotes were from a land where downvotes are negative
4
...so here? Downvotes are negative :P
good point lol
15:18
Do you mean a land where upvotes are negative? :P
> You can't build an economic system based on "Everyone's gonna be totally nice",
Welp, there go my plans for social revolution
lmao
Communism-minus-the-authoritarianism, basically
so, communism? sorry I won't go there
To show colleges I can be a good leader, I conquered half the world and ruled it as an authoritarian leader, killing anyone who disagreed
Sorry, we're going to have to reject you, that's not original enough of a portfolio, at least 20 other applicants have done the same
15:28
"Negative money" of sorts could actually work if all transactions occured through a computer
The blog post told me to come here and say hi.
Hi
@ngn do you think my CMQ could make a good challenge?
I would provide a list of 1 million binary strings in a gist and you score is the Hamming distance between the pair you find
lower score the better
ngn
ngn
@Anush i can't spend time on this but yeah, i think this would be one of the better challenges on cgcc
@AaronMiller Well, emanresuA's been doing it so much, I figured that was the norm from now on :P
15:43
@ngn cool that you think that but sad you won't be able to try it
0
Q: Find me vowels near you (not a hotel booking app)

Eternal StudentWrite a function that takes in a string and for each character, returns the distance to the nearest vowel in the string. If the character is a vowel itself, return 0. Vowels are : aeiou AEIOU For our case y is not a vowel Edge cases : You will be tested for empty string so : '' is a valid test t...

@Anush but you can brute force it in a few minutes?
@thedefault. not (10^6*50)^2
unless you have a magic computer
if only we had mathjax here
@thedefault. are you thinking of a method other than comparing all pairs?
popcnt(a^b) should only take a few clock ticks, and my computer has multiple threads
@thedefault. sure... it's still a very large number. (What is a^b)?
15:47
bitwise xor (and no, it's not a large number; after doing a bit of math, I still think 'a few minutes' is a good estimate)
it's about 2^40 comparisons
maybe 2^39
one core can probably do 2^29 in a second
@thedefault. which language is this in?
I could change it to Levenshtein distance to make it harder
or 10 million strings
@thedefault. ^ is really overloaded
16:01
timed it, took 51 seconds. 100 times as much time still isn't a lot, and this was done on a CPU. The Levenshtein distance is painful to compute and probably even less likely to lead to any fast non-bruteforce approaches.
@thedefault. thanks for timing it! Was this 10^6 binary strings of length 50?
10^6 binary strings of length 64 (I didn't mask them)
@thedefault. when you say painful to compute, what do you mean?
requires more complicated code and is harder to reason about
@thedefault. the code isn't too complicated but it is slower
51 seconds is faster than I thought though so that is really helpful
which language?
here it is in 107 languages :) rosettacode.org/wiki/Levenshtein_distance
16:09
C++ with OpenMP (also, my CPU doesn't have AVX512, which seems to have vectorized popcnt, which would make this even faster)
is back the only word made up of a,b,c and k?
@thedefault. very nice
All four of those letters or just a subset?
aback uses them all
I meant the only four letter word. you can use a subset
Yeah. That's significantly more complicated.
@BrowncatPrograms the back question or the C++ code?
16:13
The levenshetein distance code
got you
it's at the freshman level I think
"count the ones in the bitwise xor" vs. "28 sloc of loops and conditions"
@BrowncatPrograms yes that is true
We're not saying it's difficult to understand, it's just way more complex of an operation
but still simple
sure
16:14
Define "simple"
easy for a programmer to understand
and quick to implement
That doesn't look very quick to implement, and I probably wouldn't instantly recognize levenshtein distance
@BrowncatPrograms we could have a timed coding competition for it :)
That sounds boring, and probably already exists
you mean the competition already exists?
16:17
13
Q: Can you calculate the average Levenshtein distance exactly?

user9207The Levenshtein distance between two strings is the minimum number of single character insertions, deletions, or substitutions to convert one string into the other one. The challenge is to compute the average Levenshtein distance between two independent and uniformly random chosen binary strings...

in fact, I think we don't have a jelly implementation
can anyone fix that?
@BrowncatPrograms that's a very different question
How?
It's levenshtein distance of binary strings, right?
@BrowncatPrograms it is asking about the average distance
which is a much harder question
in fact there's a faster-than-bruteforce solution for it
"The challenge is to compute the average Levenshtein distance between two independent and uniformly random chosen binary strings of length n each. "
16:19
Didn't notice that, yeah
@thedefault. yes. Its very clever and a little hard to understand
A challenge is not interesting just because the task is hard to understand
@BrowncatPrograms that is a fact
did anyone suggest otherwise?
Idk. I just don't think levenshtein distance is that interesting, especially for fastest code.
@BrowncatPrograms I think the opposite :)
16:28
CMQ: Other names for a generator function?
I like "iterator"
I'm looking for one without the letter "e" in it :p
gnrator function
16:42
posted on August 30, 2021 by Mark Giraffe

This challenge is currently in the beta. If given enough positivity, this challenge will remain here. If not, feel free to make changes and clear out misinformation in the

@CodidactPosts Is the "This challenge is currently in beta..." message an automated part when moving from the sandbox on codidact?
17:02
@BrowncatPrograms multi-val function
Or multi-output
@BrowncatPrograms List.
@BrowncatPrograms do you mean generator, or generator function?
so you just want to replace the word generator in those two phrases?
Mostly, yeah
17:07
Why does it need to not contain e? lol
I don't like e
uh ok
function*?
(à la JS)
What do you mean by generator?
Is it not just a lazy list?
kind of
Basically, yeah
17:09
but in languages where list is an existing separate type with non-lazy semantics (e.g .Python), relating it too strongly to a list might be confusing
I think function* has a worse version of this problem.
@BrowncatPrograms Synesthesia?
@WheatWizard well function* is, on its own, a terrible name in many ways
@Dudecoinheringaahing Yep :p
but since JS already uses it, it might be a good suggestion
17:12
@pxeger The intended syntax isn't function* name, it's function *name. It's not much better, but still.
> Yeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeep
FTFY
I'd say by default if JS does something it's probably a bad idea.
I was about to reply to that but I'm actually struggling to find a good counterexample
@BrowncatPrograms why on earth? That makes no sense to me lol
@BrowncatPrograms JS exists, but I wouldn't say existing is necessarily a bad idea (unless you have to coexist with JS)
@WheatWizard JS allows you to add 1+1 :P
17:14
There's a lot of obvious things JS has that are good, it's bad wherever it tries to be unique
I think that's the only counterexample, everything goes downhill from there :P
JS is sort of a nice example of a prototyping language.
I like how new Boolean(false) is truthy but still == false, that's a good thing about it :p
Why does Array have .keys but not Object...
Why would you need the .keys of an Array
for tersely constructing a range in code golf? lol
That's like the only use for it lol
Array.prototype[Symbol.iterator] = Array.prototype.keys; is fun
[...[].values.call({0: "a", 1: "b", 2: "c", length: 3})] is very cool
x => [...[].values.call(x)] takes an object with a length and turns it into an array
17:20
You've reminded me of my favorite python code:

a=[1,2,3]
a[-1]+=a.pop()
print(a)
That's [1,5], right?
...
I could see it being [1, 2, 6]
Can you spoiler tag in chat?
You cannot.
Boo. It's [1, 6]
Which makes sense if it's evaluated as a[-1] = a[-1] + a.pop()
In JS (with a[a.length - 1]) it's [1, 2, 6]
@BrowncatPrograms I think it's for parity with Set and Map, which both have .keys(), .values(), and .entries()
@WheatWizard Generators can often also have values piped back into them
 
1 hour later…
18:30
Ooh nice, it looks like the mod/staff badges have a darker border now
I feel ambivolent about this.
It fixes this report of mine, so I'm happy :P
18:58
@emanresuA :(
19:09
Rule 104 makes some pretty cool shapes
19:23
@Dudecoinheringaahing I was really confused about what you were talking about, then I remembered that I replaced the badges via userscript. Then I was still really confused what you were talking about, then I remembered that I was using dark mode, which made the borders lighter instead of darker. :P
19:35
ugh, that answer took far too long to write :-(
Well, good job, and it's probably going to amass +5 within a few days.
20:27
Looks really messy imo, but ¯\_(⍨)/¯
Personally, I think the best design is to just have diamonds and some icon that means "employee", rather than these text markers. But, if you're going to stick with those style markers, I think the current design works well
Three different contrasts between background and outline, though.
@Dudecoinheringaahing *cough*
Somehow, it looks as if there's less horizontal margin on "Staff" than OP.
⬢_⬢
20:31
Mod has more air too, so Staff looks super squished.
@emanresuA How CMs look whenever we suggest some batsh*t crazy feature :P
I want to make a SEDE query to see if more of my Vyxal stuff is my own answers or golfs of other people's answers, but I spend my time Vyxaling instead of SQLing, so I don't know how. :/
Write a SQL query in Vyxal then
ಠ_ಠ
@AaronMiller It's a shame there isn't an SO logo character in Unicode
Hexagons are a bit bleh
*Uses amogus character instead*
20:36
They need to just add a single character font, it can't seriously have more impact on the server than hundreds of kilobytes of CSS
😳 when the CMs are sus
2
Just put the SO logo in a PUA
@Dudecoinheringaahing ≡̦_≡̦
Meh.
I think I've figured out why chat isn't being mantained
@Dudecoinheringaahing Turn your head 30 degrees clockwise: ⪜
20:40
CMC: Golf the chat source code
@Adám About which axis?
@emanresuA What is it?
@Dudecoinheringaahing caird.is_owner = false
@WheatWizard See above image
What in the image?
@Dudecoinheringaahing The one going through head and centre of screen.
@emanresuA -6 bytes: caird.is_owner=0 :P
20:42
caird.is_bad=1
caird[5]=1
CMQ: If I were to replace the "staff" character used in my userscript, what should I replace it with?
@emanresuA It's basically impossible to see anything in minified output like that. Especially since a lot of it is cropped out.
This SVG image
@WheatWizard I'd imagine that if that's the source code for chat, it'd be very difficult to maintain
It is definitely not the source code.
master-chat.js
I'd say it's the source code
20:45
It's a minified version.
If you were to actually use the source code it would drive up the load time for the page to an absurd level.
CMC compute the Levenshtein distance in Jelly
This isn't too shabby:
<span style="display:inline-block;transform:rotate(-30deg)skew(-30deg);font-size:1000%">⪜</span>
Removing the -s makes it look better
Otherwise, it's upside down
No, I meant the SE logo.
20:50
Hmm, not sure
Bit too "minimal" for me
SO's should be doable with ⚞ plus ⌴ and some CSS.
I still think this SVG image is better
Image of what that's meant to look like plz
20:53
System fonts :p
@Dudecoinheringaahing I like this too, so I think I'm going to change it to that.
21:11
@pxeger I'd say existing is a bad idea :P
@BrowncatPrograms Lazylist
(I promise you I'm not going to make a bunch of random replies)
@pxeger Found the Red! /s (isn't that socialism though)
@emanresuA Pretty sure it was simply minified using uglify or something
Ugh, I'm doing it again
So our first LYAL4GG event is coming right up! Have we decided what language we'll be learning? (The voting is currently tied, BTW.)
Let it be known that I am removing my vote for Quipu (sorry, DLosc) so that it is now at 10
Actually, wait, Quipu looks more interesting, I'm removing my vote for ><> instead
If it does end up being Quipu, I'll try to give myself a crash course in it tonight.
Also, does anyone here know Scala well enough to make the reference implementation runnable on TIO?
I can try
21:26
Cool, thanks :)
@DLosc I'd like it to be any of Quipu, ><> or BQN tbh
Cascade looks interesting, but those 3 more so
Maybe use a URL shortener? :P
Sure
Any free URL shorteners?
Bitly wants me to make an account :(
Plus it fails on links that are too long :/
21:32
Odd, Bitly doesn't let me sign up
Imma just make a gist
That works :P
21:46
Here's a (much) shorter link, but it might be a bit uglier (and I think you'll need to escape backslashes)
@user Hm. I'm getting errors:
.code.tio:1: error: ';' expected but 'catch' found.
object Main extends App{try{Interpreter(Parser(io.Source.stdin))catch{case pe: ParserException => println("Parser error: " + pe.getMessage)
                                                                ^
.code.tio:5: error: Missing closing brace `}' assumed here
}
^
two errors found
No such file or class on classpath: Main
Aha--adding a } before catch fixed it
Did you try the new TIO link?
I broke it while I was trying to golf it
Yeah, that was probably the original link. Let me try the new one...
Nice :D
How do I give input to the Quipu program, since the program itself is read from stdin?
Hmm, I guess the Quipu program itself could be a variable in the code then
Gimme a minute
Lol, the 99 Bottles of Beer example program has a typo in the output. ^_^ Should be an easy enough fix once I get home.

« first day (3866 days earlier)      last day (1272 days later) »