« first day (2499 days earlier)      last day (2336 days later) » 

12:19 AM
@Challenger5 I think weave.rb does
 
12:33 AM
hello
waiting the challenge I posted in the sandbox just now falls here in the chat
 
0
A: Sandbox for Proposed Challenges

sergiol2 factors factorization Given a natural number n write a program or function to get a list of all the possible two factors multiplications that can be used to achieve n. To understand better what is pretended you can go to http://factornumber.com/?page=16777216 to see when n is 16777216 we get t...

 
12:49 AM
@sergiol You may want to change pretended by wanted, sought, or The purpose here is...
 
Who summoned Pseudohuman?
I think for my Advent Challenge Series maybe I should've made the first one slightly easier :P
 
@Potato44 Cool. Thanks!
 
 
7 hours later…
8:21 AM
0
Q: There's no such thing as a "half empty glass"

Jonathan S.You probably know the rhetorical question of whether a glass is half full or half empty. I'm getting a little tired of the phrase, so I decided that it's time to eliminate this confusion about glass fullness or emptiness programmatically. Your task is to write a program that takes an ASCII art r...

 
 
2 hours later…
10:20 AM
Does anyone know what this is supposed to mean?
Mark My Mail, Mark Hamill! (No, it doesn't make any sense. I just wanted to say that.) — Arnauld 4 mins ago
 
 
2 hours later…
12:33 PM
0
Q: Itsy Bitsy Coins — (Golf Bitcoin Private Keys)

Albert RenshawCodeGolf Challenge Bitcoin private keys are easy to generate but typically are done with libraries and numerous lines of code and lots of imports, though they don't need to be. Given that the currency has 'bit' in its name, let's see who can generate private keys (and public pairs) using the lea...

 
1:11 PM
Can a==0||b==0 be shortened in Ruby?
 
Does Ruby has bitwise or or auto int->bool (or bitwise not in 1 byte)?
 
@SimplyBeautifulArt a*b but may not work for your use case. Also I don't know ruby
 
Oh, a is guaranteed to be integer, but b may be an array
 
How can an array == 0???
 
Ruby isn't strongly typed
 
1:14 PM
It may be an array.
 
b = []
b = 0
both valid
 
But it may be an integer.
If it's b is an array, then b==0 will return false.
 
So not sure how. If both are integers !(a&b) or a*b==0 should work. Otherwise probably !(a!=0!=b) if Ruby supports chained comparison. (this isn't shorter, actually)
 
tio.run/##KypNqvz/P9HWkCvJNjqWq0BDUSNR0dZA0TZJU8HeyMpA8/9/AA I'm going to go with "Ruby doesn't support chained comparison"
 
It does, but it will evaluate a!=0!=b as a!=(0!=b)
 
1:17 PM
So it doesn't.
 
Okay, then it doesn't :P
We could try checking if 0 is in [a,b]
But that's probably not shorter
 
1:54 PM
@HyperNeutrino I think that was me, about 3 weeks ago :P
Yep, here we go:
in Sandbox, Nov 23 at 14:45, by caird coinheringaahing
~$joinroom 240
 
@cairdcoinheringaahing I just made it leave
 
@Mr.Xcoder Yeah, just saw :P
 
 
2 hours later…
3:37 PM
"KEYWORD hard" for the next sequence :( — Giuseppe 22 hours ago
Is it supposed to mean "hard to implement"?
 
4:21 PM
@user202729 Maybe hard to calculate, which would imply hard to implement
 
4:44 PM
0
A: Sandbox for Proposed Challenges

Erik the OutgolferParenthesize APL trains code-golf apl balanced-string In APL, you can write tacit functions, called trains. How they work is irrelevant for this challenge. Here are the different ways they can be grouped, using ⍴ as the function: -> ⍴ -> ⍴ ⍴⍴ -> ⍴⍴ ⍴⍴⍴ -> ⍴⍴⍴ ⍴⍴⍴⍴ -> ⍴(⍴⍴⍴...

 
Quick question: Given two lists, what's the most Pythonic way to get values present in both lists?
 
@NieDzejkob If order doesn't matter, lambda a, b: set(a).intersection(set(b))
Whoops, wrong set command
 
@cairdcoinheringaahing thanks!
 
@cairdcoinheringaahing and for golfing you can do set.__and__ or lambda a,b:set(a)&set(b)
 
4:59 PM
uh, any idea what 2 || integer_variable is supposed to mean?
 
what language?
python doesn't have ||
 
uh, it's Proton, but it seems to be the same as Python's or...
 
ask Hyper :p
 
Yeah, but 0||<value> isn't a syntax error, but 0or<value> is
Plus, I'm guessing that and is &&, so it's fitting with that theme
 
5:01 PM
@HyperNeutrino you should know :P
 
@cairdcoinheringaahing 0o is the octal prefix.
 
@Mr.Xcoder Yeah, so 0or is invalid syntax IIRC
 
Indeed. You must do 0 or
 
So having or as || makes sense for golfing
@NieDzejkob I wouldn't bet on it :P
@Mr.Xcoder JHTBot can now run Jelly :P
 
Really? That's incredible
brb
 
@NieDzejkob x divides y is a good builtin
 
@NieDzejkob calm down ;)
 
how is || supposed to mean divide?
 
It comes from APL/J IIRC
@NieDzejkob The worse problem is the use of _ as a main function name :P
 
@NieDzejkob How's the OEIS one going?
I might use Gaia / Ohm / Actually next
 
5:11 PM
@Mr.Xcoder I've almost finished my Python "draft"
 
@NieDzejkob In mathematics, x|y means, x divides into y
 
@Sherlock9 oh, I'm used to my teacher writing it more as a /
 
Since | is already taken, I will happily accept that modification of mathematical notation for a good builtin
Fair enough, but my philosophy is that strangeness almost never warrants all caps
I do forget this when I spot what I think is a typo, instead of just something new to me
 
@NieDzejkob / is divides, | is divides into
x|y means that x%y == 0
(or y%x == 0, idr)
 
The latter (y%x == 0).
 
5:21 PM
(thanks)
 
Wow, no CMC in 24 hours
 
@Riker how is that different?
 
CMC: Fix JHTBot :P
 
CMC: Given (the integers) X and Y, return [Y, X, Y]
(note: very biased towards Jelly and 05AB1E)
 
@Mr.Xcoder Python 3: lambda x,y:[y,x,y]
 
5:24 PM
@Mr.Xcoder Jelly, 3 bytes: ,U;
 
@Mr.Xcoder Forth: TUCK (for some definitions of a list)
 
05AB1E: (outputs as a string)
 
@Mr.Xcoder Jelly, 2 bytes: ŒB. Takes input as [Y, X]
 
@Mr.Xcoder SOGL, 2 bytes: ⁴⁰
 
MY, 6 bytes: αωα;;←
 
5:27 PM
if the output can be separate items on the stack, is enough
 
Ok, let's get something a bit harder. CMC: Return all the elements of an array of integers which are different than both their neighbours if they are in the middle, or different than their only neighbour in case it's the last/first element
 
That would make a nice challenge, wouldn't it?
 
@LuisMendo Really?
 
@LuisMendo looks somewhat dupe-ish to me
 
^^ I think so, yes. At least, I like that kind of challenges
 
5:32 PM
@NieDzejkob it's a bool, not a float
it's not really an "operator", any more than "==" is an operator
 
Ah, maybe too similar, yes
 
this is simpler, but I don't think it is different enough
 
@Riker so a | b is b % a == 0, but is a / b in math the same as a / b in e.g. Python?
 
@NieDzejkob Yes
 
5:36 PM
@cairdcoinheringaahing wasn't : division?
 
It is, but most of the mathematicians and Physicists use fractions
 
@NieDzejkob In Jelly
Don't know about anything else :P
 
heh
 
@cairdcoinheringaahing I guess different countries have different standards
 
What does Jelly have to do with countries :P
 
5:37 PM
and my teacher is always talking about how universal the math notation is
 
@Mr.Xcoder I think tdThTGPdPh*g) (MATL) does the job
 
Nice. I'll try Pyth
 
@Mr.Xcoder Poland uses a : b as division and if you try to use /... no one even tries
 
@LuisMendo MATL is very powerful when it comes to arrays/matrices isn't it? :P
 
@NieDzejkob We never use /
 
5:39 PM
We use either use ÷ or /
 
@NieDzejkob Well, Poland is home to some weird notations.
 
@Zacharý for example?
 
@cairdcoinheringaahing Not sure how powerful, but most operations are array-oriented, which may give an advantage sometimes. For example, + applied to two arrays adds matching entries, or applies broadcast like Numpy's arrays
 
@NieDzejkob Polish reverse notation... Like 2 5+
 
@Mr.Xcoder s/reverse//
 
5:40 PM
nah
 
Polish notation without parentheses, I mean
@Mr.Xcoder That is not that weird, but (2 5 +) would be sorta weird
 
@Mr.Xcoder it's called that because a Polish mathematician invented it (for his own amusement IIRC), but I didn't even know about it until I saw the computerphile video about postscript
 
@Zacharý sort of
 
@Zacharý you are a step away from reinventing Lisp
 
Circumfix notation for everything +2 5+
 
5:43 PM
Please, no, no... no Circumfix
 
@NieDzejkob The reason I didn't say (+ 1 2) is weird is because of Lisp.
@Mr.Xcoder Some circumfix, of course: |a+2|.
 
;-; awful
 
@Zacharý also, parenthesis
 
@NieDzejkob Technically yes.
Hey, we're reinventing Perl operator overloading here! (And Fortress)
 
perl isn't the only one to have overloading I don't think
 
5:48 PM
@Riker Overloading like Perl does, the only other thing that comes to mind is Fortress, honestly. What other language lets you create prefix, postfix, infix, circumfix, postcircumfix, and precircumfix operators?
 
@Zacharý precircumfix? postcircumfix?
 
||a+2| and |a+2|| :P
 
@Zacharý R
 
Precircumfix: F[A,B], postcircumfix [A,B]F. Might have misremembered which ones are which
@Riker Example?
 
can't right now, don't have R installed
just google R operator precedence definitions or something
 
5:53 PM
Response to CMC: Dyalog APL, 25 bytes: {⍵/⍨{(⊢≡∪)⍺↓⍵}⌺ 3⊢⍵}
 
@Zacharý 25
you need a space before the 3 in Classic
 
@EriktheOutgolfer That's a poor design choice, honestly: just add a space when transliterating
 
@Zacharý not in Unicode :p
but in classic it would appear like this
{⍵/⍨{(⊢≡∪)⍺↓⍵}⎕U90183⊢⍵}
obviously you can't make out that the 3 is separate
 
Okay, I think I get it now.
 
note that in Unicode, since that clashing won't happen ( isn't an identifier char), you don't need the space
 
5:59 PM
Wait, does it transliterate like that inside of strings too?
 
well
Classic can still read Unicode chars and it transliterates them automatically
but no, it's not transliterated in strings
 
That ... seems reasonable.
 
@EriktheOutgolfer but in Unicode almost every char is 2 bytes
 
@Uriel that's why we use Classic instead ;)
 
Yep.
 
6:19 PM
@Mr.Xcoder APL (Dyalog), 3 bytes: ⊢,,
 
65000 characters better Unicode char 16 bit
 
@EriktheOutgolfer Yes it does. While it may mess things up, the alternative is TRANSLATION ERROR.
 
@Adám Wait ... what?!
 
 
@Adám sick
 
6:25 PM
@EriktheOutgolfer If by sick you mean diseased.
 
@EriktheOutgolfer now tha'ts an expression I haven't heard in a loonng time
 
Don't you mean ulong? (Okay, I'll stop)
 
@EriktheOutgolfer What would you rather it should do? It will work in most cases. E.g. old school ⍎Bool/'fn⍤2⊢array'
 
@Adám well, I'd rather it shouldn't transliterate in strings, while should do the job instead
 
@EriktheOutgolfer Uh, how? What exactly would you expect to receive as argument?
 
6:28 PM
@Adám the string itself
 
@EriktheOutgolfer How do you expect the interpreter to store in 8 bits?
 
^
 
@Adám oh it must store it in 8 bits? hm
 
@EriktheOutgolfer Isn't that like the whole point of Classic?
 
@Adám Yep
 
6:30 PM
@Adám hm, I thought it only used the encoding for the code, not strings
and since it can read Unicode chars, then maybe that would represent a string literal as-is without transliteration
 
@EriktheOutgolfer The code is tokenised. It is exactly the characters which are 8 bits each. However, if you try to load a Unicode file, we do the best we can.
@EriktheOutgolfer You mean garble?
 
0
Q: Calculate the lowest number where the sum of the sequence of numbers exceeds a given value

Oliver AtkinsonGiven you have an infinite sequence of numbers defined as follows: 1: 1 = 1 2: 1 + 2 = 3 3: 1 + 3 = 4 4: 1 + 2, 4 = 7 5: 1 + 5 = 6 6: 1 + 2 + 3 + 6 = 12 7: 1 + 7 = 8 ... The sequence is the divisors of n, including n. Calculate the lowest number (n) which will produce a result of over x Test...

 
@Adám Mojibake, maybe?
 
@Zacharý Not really. That's when Unicode encoding/decoding is done twice, iirc.
@Zacharý You can get the raw 8-bit chars with ⎕NREAD.
 
@Adám IIRC, then it's when it tries to read it as a different character encoding than it actually is.
 
6:38 PM
@Zacharý You can do that with ⎕NGET by overriding its heuristic.
 
@HyperNeutrino in Proton, is some_list[int1, int2] equivalent to (some_list[int1], some_list[int2])?
 
Or some_list[int1][int2]
 
@Zacharý context says this is unlikely
 
What context is this you speak of>
 
6:54 PM
@Zacharý I'm trying to understand a proton program
@Zacharý "contextual clues" might be clearer
 
Which program?
If you posted a link earlier, I think it is now lost in the transcript
 
Wait, how many Adám-ic atomic theory based languages does he have now
@NieDzejkob I understood what you meant, but where is the context? Where is the code?
 
HyperNeutrino's solution to A000109:
https://tio.run/##tVdNb@M2ED1bv2KAHpaqFcOWdy/pusAee9lTb4IOjMzItGxKlqhGbje/PZ0hKUqWHadAWyCxxfme4XsUXdWlLtXb20/w@042oMuygKOAUyu1AA4vO3kQKIWXGgW/gHwGqT81uCxVHkF1ELxBvTgcyIurLfz2CZ91fSanZ9mhObxIvStbDdmOq1yqHPROwNMZE2Rlq/RiEQSVqI@t5lqWqoENdLD5Ff4KZpjuIBTrQthsYAm10G2tIIF0olp5VYeqWjTtQWOYBBfPZQ1SbUUHj1BjfsGsW0jxjXaUG23GlbAuwS6Mdwpz6BIbaI75dJnaCC7bgleVUFuWOKOUHEaxQjR9DejPVWrdgtcg4Ns9z4TKzlhxds4OonHd9wsnxVqwn0b@KbxoUZUVw9BHrmucNXacLFP4GYyR6dx3TaLQzcM4o8YloDZkBPsIij4yhonc08o/xejuUiUyTfYpWg/LYrTcpyi5WI61xaW2cKFW4/FYHY1HY/0NVn1EE06TSRLuElAv@4t95SgOw3TSu9GgOAhkUx7Lut
 
I was summoned?
 
@Zacharý Was I?
 
6:57 PM
@NieDzejkob Yes.
Actually, it's equivalent to [some_list[int1], some_list[int2]], but close enough :P
 
@Adám Was referencing the fact of how you program APL, and the feature in question is an array oriented thing. (Basically a pun). And I didn't ping you.
 
@Mr.Xcoder Sorry about your Pyth answer :/ I knew there was a reason why Pyth beat Jelly :P
 
@cairdcoinheringaahing Don't be sorry, I am trying to outgolf you now :P
 
@Mr.Xcoder Jelly or something else?
 
Both.
 
7:03 PM
ಠ_ಠ
 
@cairdcoinheringaahing Don't start
 
@Zacharý Start what?
 
@cairdcoinheringaahing Done.
 
@Mr.Xcoder It's one byte, you could just suggest an edit :P
 
I use nfind :P
 
7:06 PM
ಠ_ಠ
 
I know, I saw it :P
@Mr.Xcoder Why'd you delete it?
Never mind
 
so many identicons D: :P
 
@Mr.Xcoder Jelly will rule the (golfing) world! :P
 
+1'ed now
 
@Mr.Xcoder Thanks
 
7:08 PM
@cairdcoinheringaahing don't edit-suggest golfs
 
@Riker As in comment below to suggest a golf. Xcoder can't suggest edits :P
 
Someone should make a PR to implement Pyth's version of f in Jelly
 
@cairdcoinheringaahing MWHAHAHA I tied you in 05ab1e
 
@Mr.Xcoder ¯\_(ツ)_/¯
 
7:28 PM
@cairdcoinheringaahing BTW your previous version failed for 1
 
Is it acceptable to post questions which ask how to golf a specific piece of code in a particular language under some restrictions?
 
Yes it should be
 
Ruby I guess?
 
7:29 PM
@SimplyBeautifulArt Yes, but only if well-written and understandable. Basically the same as most Q&A sites
 
:P yeah yeah, that's a given
 
@SimplyBeautifulArt those are questions btw
 
ah, thnx
:| What to title it
 
How to improve Ruby code to <summary of task>
 
7:33 PM
s/to/for
 
@Mr.Xcoder Nice solution, that's a very good Jelly program :P
 
Then may I ask for feedback on this Jelly answer? codegolf.stackexchange.com/a/149664/47581
 
1
Q: The Microwave Challenge

Stephen LeppikInspired by this comment. Input The number of seconds on the timer. Output Here's our basic microwave: _____________________________________________________________ | | ___________ | | | | [display] | ...

 
@Sherlock9 Huh, that is one of the first answers I've seen where the [] are necessary
 
7:43 PM
Yeah a same byte alternative could be (base 250 for 72)D(bit shift)@
On mobile so I can't find the bytes right now
 
@Sherlock9 72 is the shortest version of 72 to get in Jelly
 
@cairdcoinheringaahing I don't think so?
 
@EriktheOutgolfer Removing them (and don't change anything else) makes it invalid
 
Hmm. Let me try that then
 
7:47 PM
Huh, weird. I could've sworn it didn't work for me
 
Well, I'll be darned
 
0
Q: How to improve Ruby code under some restrictions

Simply Beautiful ArtI'm (still) trying to make another submission to the Largest Number Printable question, and I've got the following bit of code: f=->a{b,c,d=a;b ?a==b ?~-a:a==a-[c-c]?[[b,c,f[d]],~-c,b]:b:$n} h=[],$n=?~.ord,[] h=f[h]until h==p($n+=$n)-$n The conditions I'm working with: Maximum 100 bytes. No ...

 
@HyperNeutrino I have a pretty good reason to believe your last Proton answer to the OEIS challenge (A000109) is not working correctly for n=7 (input 4). I'm currently running it on my computer since TIO timeouts, but there's probably a huge potential for a simple optimisation - when I ported the permutations function to python, I wanted to test it, and then I realised that it's 20 times slower than itertools.permutations. I don't know Proton so I'd need you to replace it
 
8:02 PM
@NieDzejkob This one?
 
@cairdcoinheringaahing yup
 
@NieDzejkob Fingers crossed that Hyper can fix that :P Otherwise that's ~60 answers invalidated
 
@cairdcoinheringaahing yup
 
@EriktheOutgolfer Before I forget, thanks for the tip. Will post it soon
@cairdcoinheringaahing I have credited you as well for your help. Thank you
 
8:24 PM
@Sherlock9 No problem
 
8:34 PM
wait, it's not input 4, it's input 5
 
8:56 PM
1
Q: Advent Challenge 2: The Present Vault Raid!

HyperNeutrinoAdvent Challenge 1. Challenge Now that Santa has finally figured out how to get into his present vault, he realises that somehow the elves got in there before him and stole some of his presents! They haven't figured out how to leave the vault yet though, so Santa has to try and catch them all. ...

 
@HyperNeutrino sorry to ping you again, but is this supposed to happen?
 
@Fatalize I'm trying to solve this challenge in Brachylog, but my attempt times out. Do I need to insert ≜ somewhere, or what's happening?
 
9:47 PM
@BruceForte Yeah, that's weird too.
I might look into it tomorrow and see what the incorrect program actually does.
But maybe this kind of weirdness is expected when one applies combinators to higher order functions. :P
 
I should definitely check out the source one day.. I have no idea what Husk really does in the background
Well nothing wrong with using combinators :)
 
10:23 PM
0
Q: 2 factors factorization

sergiolGiven a natural number n write a program or function to get a list of all the possible two factors multiplications that can be used to achieve n. To understand better what is pretended you can go to http://factornumber.com/?page=16777216 to see when n is 16777216 we get the following list: 2 ...

 
For anyone who wants to, I invite you to try to break my chat bot over in the Sandbox. Ping it with @JHTBot <command>
 
@cairdcoinheringaahing What does/can it do?
 
@Adám It's basically a tool for learning Jelly. Type @JHTBot help for help
 
What do you guys get when you run this?
 
@SimplyBeautifulArt The output?
 
10:30 PM
I think I broke it
 
81
6561
43046721
1853020188851841
 
:-/ I get weird stuff at the bottom
 
@SimplyBeautifulArt runs for a long time…
 
yeah ik
That's how most of my programs work ;P
.code.tio:3: [BUG] rb_gc_mark(): 0x00559b2860fea0 is T_NONE
ruby 2.4.1p111 (2017-03-22 revision 58053) [x86_64-linux]
Is that something to worry about?
 
@cairdcoinheringaahing You know SocraticPhoenix has made a generalised TIO bot which you can program (from inside the chat room) to your needs ?
 
10:33 PM
@Adám Yes, but that's not tailored for learning Jelly
 
@cairdcoinheringaahing So JHTBot does something more than just TIO evaluation? We just use a set up TIOBot for learning APL.
 
@Adám Yeah, for instance @JHTBot code page will post the code page, or @JHTBot describe <command> will describe the command
 
@cairdcoinheringaahing I have a code page command too, but we can't have describe command yet. Actually, we can, but it would be quite some work to set it up. Hm, maybe I should…
 
@Adám Yeah, the fact that all the commands are available in the same format on the Jelly wiki helps
 
Maybe crawl TryAPL?
 
10:43 PM
@Zacharý I have access to our sources.
 
That works better.
 
 
1 hour later…

« first day (2499 days earlier)      last day (2336 days later) »