« first day (2392 days earlier)      last day (2747 days later) » 

13:01
@Adám if you concat both inputs and add any character, you're safe
you only need to add a character to account for empty strings
,,,, 3 bytes: 'l#
@Mayube That wasn't the point. The point is that I used to make a new string instead of returning a list of two strings. But the default output of a list of two strings is identical to the new string generated by (the point of really).
CMC: Given two strings, output a third string of the length of either string that is different from both input strings
@StepHen Braingolf: {vmR+}# &@
0
Q: Is it OK to keep editing my entries?

Olivier GrégoireYesterday I answered something nice which gave me a daily cap. At first, my entry was around 350 bytes, and seemed pretty golfed. Today, my entry is only 182 bytes long (yeah Java!). To get there, I made around 20 edits (some with help, most without). Before submitting each edit, I think twice an...

13:05
@Mayube How does it work?
oh wait hold on that won't work nvm
@WheatWizard how do I make that take two strings?
Oh yeah
and this might be how I redeem my crappy challenge in Sandbox right now, if this is difficult enough
13:06
@StepHen Actually a really hard problem. Go main.
@Adám okey dok, cool
lambda x,y:[chr(ord(i)+ord(j))for i,j in zip(x,y)]?
@totallyhuman fail for null bytes :)
With an extra +1 it would probably work though
@totallyhuman that produces a shorter string if you go too deep into unicode
13:08
@BusinessCat still doesn't work if the resulting codepoint exceeds the unicode
@StepHen May we assume that at least one has minimum length 1 (else: what to return?)
@LeakyNun True
@Adám yeah, I'll edit my sandbox and have you guys look it over
@StepHen I'm not understanding the CMC
> Given two strings, output a third string that is not equal to either of the two inputs, but has the same length of either of the inputs. There is guaranteed to be at least one valid output.
13:11
What if both strings are empty?
@WheatWizard to make the challenge harder?
@WheatWizard then there's no valid output, and there's guaranteed to be a valid output
wait the strings don't only contain printable ascii
:P
@StepHen Oh I thought you were saying that it was guaranteed by maths.
@totallyhuman well, if you can output unicode but not input it, that's cheating :P
if thetre's only 1 input you can just increment the last character of the input
13:12
@Mayube almost, that fails for empty string
but if there's one empty string is invalid anyway
@StepHen How?
actually with the length changes empty string doesn't need to be part of the input
should this be "given a list of strings, output a string not in the list with the length of any string in the list" instead?
cc @Adám since you suggested something similar
@StepHen Both are good.
I don't think this challenge should go to main
would they be dupes or no?
13:16
Hello
@WheatWizard Why not?
ninja'd >.>
@WheatWizard it's going to Sandbox first
@totallyhuman Its not terribly hard. Feels much more like a CMC.
@WheatWizard ok, I'll make it a list then
13:17
I definitely think it's hard enough for a main challenge
@StepHen Arbitrary typed lists have problems
@WheatWizard ? it's just a list of strings
OH I see what you are saying
I thought you meant replacing the string with a list
although then it becomes "generate a random string of a random length in the list and output it if it's not in the list"
13:19
There has been a similar challenge
@StepHen yeah
But for one string
@StepHen just do 2 string inputs
I dunno I'll think about it
@Mayube ok
@StepHen 0/10 wait for NSP :P
13:27
@totallyhuman that's why I didn't onebox it
13:37
0
A: Sandbox for Proposed Challenges

Step HenThe Third String code-golf string Given two strings, output a third string that is not equal to either of the two inputs, but has the same length of either of the inputs. There is guaranteed to be at least one valid output. Test Cases Test cases are quoted to show they are strings. Outputs ar...

@DJMcMayhem you know... you can create a throwaway account that's not associated with your main account :P
14:02
@StepHen If a list, then you must state that input will always allow at least one solution. Otherwise exhaustive lists of strings of combinations of all Unicode chars block any solution. (That is a lot of strings, though.)
Does anyone know how the hell one can install a rust libarary? I just want to run an esolang and I can't find any results on SO.
@Adám I'm already stating that, but I decided against a list - it's too easy do "generate a random string with a length equal to a random string in the list until it's not in the list"
@StepHen Yeah, but I was lazy.
And I don't need it to be totally anonymous, it's just... A little weird? Idk
@DJMcMayhem well it was hilarious when I was like "why does this random user have 33k PPCG rep"
Haha
@StepHen That's why it's totally not a throwaway account :P
Plus if I'm being honest, I like the rep lol
The partial anonymity is enough
14:14
@DJMcMayhem yeah it's fun to have a post on HNQ that gets big (cough cough MDXF's github post)
That was stupid
@StepHen It's also fun to recognize people from HNQ. I answered wheatwizard's question on infosec, then it got huge and I got like 40 points for an easy answer
Does anyone know how to compile rust? I think I installed all the dependencies but I'm not sure how one compiles rust.
You need some oxygen and iron
and some time
Can someone please resuscitate the Brachylog's chat room?
14:23
@Fatalize Done
Thanks!
I'm wondering if perhaps the project I'm trying to build has a problem
Try to compile a hello world thingy first
I am able to compile pure rust, I have tried that but the project has some dependencies that need to be installed
Cargo is telling me I have them but rustc is erroring when I run
14:41
Just found this line in a legacy project int numberOfDays = Convert.ToInt32(5);
@TheLethalCoder Maybe 5 is a variable name
@AdmBorkBork In C# variable names can't start with a number.
Didn't know it was C#. Could have been Bumfooblestein.
brb, making language called Bumfooblestein.
8
Haha, I should have said really...
It's just like C# except variables can start with a number.
14:46
I like the idea
Bumfooblestein#?
Sounds like a lot of work, though
aw, my post from aug 9 got knocked off the starboard finally
haha
-6
Q: Real base conversion, for ℝeal

ceased to turn counterclockwisWe've had a few challenges for base conversion, but all of them seem to apply to integer or finite-precision float values. Let's do it with real numbers! The challenge Inputs: A real positive number x, expressed in base 10 as an ordinary decimal fraction (no exponents). This can be taken as a...

@NewMainPosts Why does this have so many downvotes?
It is nearly identical to another question
15:00
@TheLethalCoder does C# have multiple candidates for integer literal? i.e. int8 = 1; int64 =1 all work
@Downgoat You have System.Int16(short), System.Int32(int) and System.Int64(long) but a constant 5 is always an int unless specified otherwise i.e. long five = 5l;
@Downgoat Essentially the above line is equivalent to int numberOfDays = 5;
@NewMainPosts omy this is Sihanouk blatant ripoff wow
@DJMcMayhem Copy paste of another challenge, down to the test cases, with "plus deal with infinite decimal places" tacked on without specifying how that will work
I think it has the potential to be an interesting question, but needs a fair bit of work first
they have a good idea that was definitely not executed well
pushing the question to the last page sorting by votes
One of those many cases where "interesting" also means "difficult to specify well"
Lack of effort and blaming the critics for not reading the bold parts doesn't help
15:14
@totallyhuman counting deleted or not?
@HyperNeutrino you can't see deleted posts using the page :P
@Poke it was off the starboard earlier, but I guess it came back after a few new low-star posts faded
interesting how that works
someone should find the formula that puts stars on the starboard and make a post of it
@totallyhuman o :P
hi does anyone know of a good PEG parser in Python
15:25
What's PEG?
or how to make one. I'm fine with making my own (which I'm doing right now but I don't know how :P)
CMC: Given a list divide the sum of the list by each element
[1,2,3,4,5] -> [15, 7.5, 5, 3.75, 3]
Jelly:
15:30
Ouch...
Python 3: lambda l:map(sum(l).__div__,l)
Python 2: lambda l:map(sum(l).__truediv__,l)
@totallyhuman that doesn't give a list
iterables are fine i think
Shorter and fixed: lambda l:[sum(l)/x for x in l]
C#: using System.Linq;a=>a.Select(n=>a.Sum()/n)
15:32
lambda l:map(sum(l).__div__,l)
lambda l:[sum(l)/x for x in l]
lol
5 bytes: (pyth) mcsQd
Proton: a=>map(sum(a)&(/),a) brb o/
@Mr.Xcoder PowerShell, 34 bytes param($a)$a|%{($a-join'+'|iex)/$_}
@totallyhuman Hence the strikethorugh
@HyperNeutrino Any recommended CMC for Proton?
Also, did you fix %?
ye i just thought it's funny how they have the same length
@Mr.Xcoder yes
15:34
searches for user:me (%)
There's been a car alarm going off outside for the past five minutes ... :-/
oh thank goodness it stopped
@AdmBorkBork oh oops sorry
@Mr.Xcoder Pyke, 5 bytes: FQsR/
@StepHen lol and O.o simultaneously
@muddyfish Nice, haven't seen anyone use Pyke in a while except for me ... Now I have seen the creator of the language
15:36
O.o
@totallyhuman ?
@totallyhuman that's a big chin
that's a mouth
2 mins ago, by AdmBorkBork
@StepHen lol and O.o simultaneously
Shhh you may get kicked
@Mr.Xcoder kick magnet
15:38
I got kicked yesterday, be careful
@totallyhuman How about lO.ol ?
actually... there is a literal smile character: ⌣
O.o
 ⌣
@AdmBorkBork absolute value of O.o?
O.o
| TTT
@officialaimm braces...
15:39
Really, you should stop cc ROs
@StepHen teeth actually .. :D
@StepHen CMC: Output the absolute value of the input. Input could be a float or an integer.
@AdmBorkBork Pyth, 2 bytes: .a
,,,, 1 byte: a
i think
i forget
@AdmBorkBork cQuents 0: #|1:aA
15:40
Python, 3 bytes: abs
Pyke, 3 bytes: 0.a
IDK of any shorter approach
#|1: will be one byte in cQuents 1
I think this is the shortest in PowerShell -- [math]::abs("$args")
Jelly is A with a dot on top methinks
@AdmBorkBork I never understand Powershell, why is $args quoted
15:41
@totallyhuman Youthinks right
nope it's just regular A
CMC: absolute difference of two input numbers
@totallyhuman Yep, 1 byte: A
@StepHen $args is an array, which can't be directly cast to an [int]. By stringifying it, though, the string can be cast to an [int].
@StepHen Gaia: D
15:42
@AdmBorkBork what
@StepHen Jelly, 1 byte:
@AdmBorkBork so casting a string to an int gets the value of the variable with that name?
you stringify to numberify?
Right.
$args is always an array, even if there's only one argument passed in
how do you get the literal string "$args"
15:43
single quote
Python: lambda x,y:abs(x-y)
oh hm that's cool
@StepHen Proton: (a,b)=>abs(a-b)
Double quote will expand variables and expressions in the string, single quote is literal.
@Mr.Xcoder does Proton have currying? a=>b=>abs(a-b)
15:44
IDK, it's hyper's language
@StepHen i don't think proton does
@Mr.Xcoder sorry your avatars are the same color
@Stephen Recursiva, 11 bytes: >ab:-ab!-ba
ok, just solved it :)
currying saves a byte when you have exactly 2 args
15:44
oh it does
nice
a=>b=>abs(a-b)
@totallyhuman and call like f(a)(b) right?
@StepHen yup
Oh yeah
Sorry
15:45
same thing as lambda a:lambda b:abs(a-b)
Anyway, the real reason to stringify to numberfy is because "$args" is one byte shorter than $args[0]
mmhm
...i should've done some kind of env for all of these python versions
@StepHen Pyth, 2 bytes: aE. Takes input in reverse order: b \n a.
i can't keep track of anything
@StepHen Pyke, 2 bytes: .a (Try it here!)
@muddyfish Is there a shorter way for the absolute value of a given number than 0.a
?
15:51
JS (any version) CMC: Convert all key names (on all levels) of an object to lowercase.
Example?
{CamelCase: 'Hello'} to {camelcase: 'Hello'} , OR {{CamelCase: 'Hello'}} to {{camelcase: 'Hello'}}, OR {lowercase: 'Hello', BIG: 5} to {lowercase: 'Hello', big: 5}
@mınxomaτ should the uppercase versions be deleted, or can they stay?
Convert, so replace. The new object has the same keys, but only the lowercase variants.
i might know enough JS for this... then again, nobody really knows JS :P
15:55
@mınxomaτ modify or return the object?
Either is fine.
brb making a meme with One does not simply know JS
if I return, do I need to keep all of the previously lowercased keys?
@StepHen Valid PowerShell --> @(1|%{}|?{})[@()]
Yes, the object has the same keys.
15:57
...i thought Object.keys() is a thing
@AdmBorkBork Wow •…•
where'd that go
@totallyhuman that's python
oh nvm i'm dumb
Kinda looks like a b*f* variant
15:57
lel i thought i could do a.keys()
@totallyhuman You can do Object.keys(a);
In ES5 at least
or this:
@mınxomaτ {{CamelCase: 'Hello'}} isn't valid JS though
keys = $.map(foo, function(v, i){
  return i;
});
16:03
a=>(r={})&&Object.keys(a).map(i=>r[i.toLowerCase()]=a[i])
...eh...
...not on all levels...?
hmm?
oh
recursively??
@totallyhuman it has to apply to all nested objects
{lowercase: 'Hello', BIG: {lowercase: '1', BIG: 2}} -> {lowercase: 'Hello', big: {lowercase: '1', big: 2}}
16:05
> Convert all key names (on all levels) of an object to lowercase.
ok look i'm proud i got that working
:P
@totallyhuman I had something a lot longer, I'm not good at thinking like a functional programmer
Gtg o/
@Mr.Xcoder it calls a function multiple times on something iirc
and then there's every, all, some, etc
lambda d:{i.lower():j for i,j in d.items()} :P
16:13
@totallyhuman but that doesn't do nested either: Try it online!
i'm not trying to do that
then again you can do f=lambda d:{i.lower():f(j) for i,j in d.items()} provided every value is a dict
f=(a,o={})=>(Object.keys(a).map(c=>o[c.toLowerCase()]=a[c]instanceof Object?f(a[c]):a[c]),o)
woo i was close
16:28
@StepHen I know what map is lol
Thank goodness for closures
i am currently uninstallin a bunch of python versions ;-;
CMC: Given a list of two integers or a tuple, return the result of their subtraction, addition, multiplication and division, in any order
a simple make uninstall didn't work ;-;
@Mr.Xcoder can I take two integers, not in a list/tuple?
16:33
@StepHen Of course
@totallyhuman what distro
SOGL, 7 bytes: -O+O/O*
but i installed versions like 0.9.1 and 2.0
straight from source
they weren't packaged
@Mr.Xcoder JavaScript: x=>y=>[x+y,x-y,x*y,x/y]
16:35
a=>b=>[a-b,a+b,a/b,a*b];
@StepHen Haha, I did that too in JS :)
lambda x,y:[x+y,x-y,x*y,x/y]
@Mr.Xcoder cQuents: #|4::A+B,A-B,AB,A/B
Lol, lambda a,b :))
@Mr.Xcoder ; is extraneous :P
@Mr.Xcoder Gaia, 6 bytes: +×÷⁻„]
16:36
Proton: a=>b=>[a-b,a+b,a/b,a*b]
@Mr.Xcoder proton is JS confirmed
@StepHen really? No need for that in js or I can do (a=>b=>[a-b,a+b,a/b,a*b])(4)(2)?
oh man my computer's about to die
@Mr.Xcoder yes and yes
I believe
JS adds ; when you newline at the end of statements
didn't help that i had the spotify web app open
16:37
*usually
Swift (dang): {[$0+$1,$0-$1,$0*$1,$0/$1]}
Swift No. #2: {a,b in[a+b,a-b,a*b,a/b]}
yay
Positron: function{[$1+$2,$1-$2,$1*$2,$1/$2]}
@totallyhuman why did you learn Positron
@totallyhuman ooo
16:39
i didn't..?
for example, do you consider doing ctrl+f on a commands page learning it?
SOOO long in Pyth, 13 12 bytes: +QKE-QKcQK*K
i never learnt ohm either
@totallyhuman For Positron, I consider it a waste of time :P
16:41
Proton is cool tho
>.> i dunno how to explain
i looked at it once and i looked at positron code once
i know the function{} syntax and i know you can use $1
that's all i know
@totallyhuman Basically Swift
> Syllables in a Number
@Mr.Xcoder that's OEIS right?
@StepHen New main challenge
Random question: What is it called when you have to wait after entering in your password wrong too many times?
16:44
but... it was crashing and burning in the sandbox
@DJMcMayhem it's called "we have good security" /s
But what is the name for it?
@DJMcMayhem waiting?
@Mr.Xcoder I promise you there's a Mathematica builtin
There's a Swift one too, in fact
16:45
I thought it had a more specific name. I could be wrong though
Another main challenge (2)
@DJMcMayhem probably does, in the security field
@DJMcMayhem timeout/locked/disabled?
for phones at least
> Object oriented languages ONLY. So none of those golf optimized languages.
Turns out recursiva would take 18 bytes for the recent CMC... [provided I added an operator to convert integer to list... :D] +++A+abA-abA*abA/ab I have made a horrible language..
Don't tell me what to golf in!
16:49
ok take back the downvotes he fixed it :P
@officialaimm yes you have
@DJMcMayhem I just call it locked out, I don't know if there's a jargon for it
@Mr.Xcoder why not an OO golflang
@ASCII-only Name one.
16:50
Meh
@Mr.Xcoder most of them, if you count eval :P
But.
An OO golflang is a good idea, maybe I should try making one
@Mr.Xcoder Jelly with Python eval
@totallyhuman ?
16:52
Or Japt with JS eval
@Mr.Xcoder stop being so scathingly rude to a newbie :P
Yeah it would be much golfier in the transpiled langs I think
-1
Q: Syllables in a Number

J843136028Syllables in a Number Make a program/function which takes in an integer from 0 to 999999999999 (inclusive) as input and returns how many syllables it has when spoken in English. Make your code short. Specification A billion is a thousand million, a trillion is a million million, etc. A millio...

0
Q: Walkers Join! - Alan Walker's logo

DatYou might know Alan Walker from his ever popular song Faded. Now his "followers" are called Walkers and they have a logo, here is a simplified version: \\ \\ //\\ \\ // \\ \\ // \\ // \\ // \\ // \\ // ...

So like CJam and Japt
@StepHen No thanks. Those blahblah golf optimized annoyed me a lot. - Will remove the comments
16:54
You must PRINT the logo. - Another terrible requirement. Functions are allowed by our standard rules. why call it terrible? He's probably never read our meta posts
maybe we should ask them to move it to sandbox
@totallyhuman nah it's fine, he just doesn't know the terminology we use
It just has to be visible in some way - Still restricts functions.
@StepHen it's not terminology
they don't know how specific challenges must be
and they don't know the usual standards
@totallyhuman as I said, they just haven't read our meta posts
16:56
right but it's not terminology
the sandbox would really help
Don't tell me what to listen... I removed my dv and comments
@Mr.Xcoder that was not necessary :P
Another challenge
@Mr.Xcoder not what he means, that's just so he can test
We would provide printing anyway
16:58
@Mr.Xcoder not everyone does
Of course, Mathematica users / new users don't.
yes but it shouldn't be a requirement...
@totallyhuman why not? anything can be a requirement

« first day (2392 days earlier)      last day (2747 days later) »