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

8:00 AM
1 10 100 and 0.5 300 200 3 2
 
In Jelly it would be like <greater><filter off><right map><length><map> for 7 bytes
<greater><product><complement><sum><map> for 5 bytes
 
I want to make input in my lang work like brainflak. how do this
 
copy the brainflak code for input
 
ok then buddy
except
the python interpreter
looks like this
from re import*
exec(sub("&","','",sub("@","sub('",'''n=[];f=[]
def z():
 global n,f
 n,f=f,n
 return 0
def r(x):
 a=0
 x=@"&\\"',x)
 while n and n[-1]:a+=eval(x)
 return a
exec(@[>\]]&)',@}&")',@{&+r("',@\[&-(',@<&+0*(',@\[]&+len(n)',@{}&+(len(n)and n.pop())',@<>&+z()',@\(&+(lambda x:n.append(x)or x)(',@\(\)&+1',raw_input())))))))))))''')))
print n
like wat
 
@DestructibleLemon Ugh.
 
8:04 AM
yeah pain flak is supposed to be pain I guess
 
@DestructibleLemon You thought of code-golfing in language design as well?
 
no this is someone else's
mine is sane
 
oh OK
 
CMC: given a string with at least three words, swap the first and the third word. eg "this is hardly the case" -> "hardly is this the case"
the string will only have a-z and space
 
@LeakyNun so split on space and reverse?
 
8:07 AM
not reverse
 
@LeakyNun ah, at least
 
I should make that on main lol
 
split on space and swap index 0 and 2 (assuming 0-based)
 
yes
 
@LeakyNun May we return a list of words?
 
8:08 AM
not really
 
sed, 27+1(-r flag) bytes, s/(\S+)( \S+ )(\S+)/\3\2\1/
 
@LeakyNun awk, 23: {x=$1;$1=$3;$3=x;print}
 
@LeakyNun Trailing space ok?
 
@Adám not really
 
8:10 AM
Sorry to disrupt your conversation. Is it ok to throw in a short meta question or should I simply post it to meta?
 
throw
@Mayube 1. snippets are not allowed, 2. c[:2]=c[2:0:-1] or something like that
 
It's about my suffix type question: I just found out that the top voted haskel answer returns a list instead of a string like I assumed. I stated in a comment to "please output only a single char for each input char. ". Should I simply allow lists for all or should I make it more clear that I want a string and notify the author?
 
@LeakyNun Dyalog APL 16.0: 1↓∘∊(⌽@1 3(1,=∘' ')⊂' ',⊢)
 
@LeakyNun Python3, 59 bytes
@LeakyNun c[:2]=c[2:0:-1] replaces c[0] but doesn't affect c[2]
so you end up with hardly is hardly the case
 
All the work is splitting and joining. Just swapping the first and third element is ⌽@1 3
 
8:13 AM
CMC : Given an algebraic expression, list all its factors
The algebraic expression will have * for multiplication
 
@Arjun E.g.?
 
@Mayube 45 bytes
so just split on asterisk?
 
@Dennis Well then, I won't post it.
 
@Adám 5*x² => 5, x, x², 5x², 5x, 1, 5 (Tell me if I missed any)
@LeakyNun No.
 
why is 2.5 not a factor?
if it is a polynomial in R[x], then every non-zero number is a unit
 
8:20 AM
@LeakyNun Only integers can be factors as far as I know, otherwise an expression will have infinite factors
 
hence 3x+1 is irreducible as an element of Z[x]. but reducible as an element of Q[x]
 
@Arjun So 10x³ should give 1, 2, 5, 10, x, x², x³, 2x, 2x², 2x³, etc.
 
@LeakyNun I haven't studied higher Mathematics as you, but I don't think it is necessary for my CMC.
 
alright, so you can't have any non-integer numbers
algorithm: split on asterisks, factorize each, cartesian product
 
@LeakyNun Yes
 
8:26 AM
@Arjun Ðo we have to accept inputs like 2.5x²?
 
@Adám see above
 
6 mins ago, by Arjun
@LeakyNun Only integers can be factors as far as I know, otherwise an expression will have infinite factors
@Adám No
 
@Arjun Do we have to accept input like 2x¯²?
 
That would be ridiculous
 
@Adám No, for simplicity's sake
 
8:29 AM
@Arjun Do we have to accept input like 2x³y?
 
@Arjun no, it's for feasibility sake
or else there would be infinitely many factors
 
@LeakyNun Oh, yeah
@Adám Yes
 
@Arjun OK, I'm not doing this CMC.
 
@Adám I think I should post this on main?
 
@Arjun Sandbox it.
 
8:31 AM
@Adám Okay.
 
CMC: Given a String of even length n, n≥4, make a turn it into a Staircase- String:
string: 'abcdef'
ab
  cd
    ef
string: 'MATHISCOOL'
MA
  TH
    IS
      CO
        OL
 
@Mr.Xcoder Turtlèd would be good at this
except I'm doing other stuff probably
 
NOTE: The second test case is a lie.
 
@Mr.Xcoder wouldn't that be:
 
CMC (revised): Given a String of even length x, x ≥ 4, turn it into a Staircase.
 
8:37 AM
CA
  KE
 
Yes, good test case.
 
ok pings don't work good with multiline markdown
 
@DestructibleLemon Yes, valid.
I love ping-ing myself
 
Jim
Last night I have dreamt of an esolang optimized for Kolmogorov complexity and 2D printing.
It had functions like vertical, diagonal, block and expand prints:
 
Actually, @Mr.Xcoder: Python, 58 bytes:
s=input()
for i in range(0,len(s),2):print(i*" "+s[i:i+2])
 
8:45 AM
@Jim Like Charcoal?
 
@Adám That's what I was thinking about, too
 
Jim
`v"Vertical"2 0d"Diag"4 2r"Reverse"4 6b"Block"11 2 7 4e"abcdefghi"19 1 6 4`

  V       e
  e      s         abbbbc
  r D   r  BlockBl deeeef
  t  i e   ockBloc deeeef
  i   v    kBlockB ghhhhi
  c  e g   lockBlo
  a R
  l
How do you make a code block in the chat?
Alright, found it
@Adám I don't know Charcoal, maybe. The idea here is to have functions for printing not only line by line, but directly like on a real board
With coordinates
 
@Jim Very nice.
 
@LuisMendo Thanks Luis! To be honest, the lack attention (and votes) took me by surprise too. I changed it to Game of Life and Fatigue per your suggestion... It's a much better title :)
 
Jim
Does a language like this actually exist?
 
8:54 AM
@Jim I don't think so. It is like a superset of Dyalog APL's new @ operator.
 
Jim
I don't feel like writing a new language right now (I'm too young to PPCG) but I'll keep the idea in mind
 
@Jim it might be like crayon but I don't know what crayon is
@Jim apart from the fact that charcoal has a persistent pointer rather than coords, this is like charcoal I think
 
Jim
@DestructibleLemon I will look into this. If indeed Charcoal already has similar routines, it has my interest
@DestructibleLemon crayonlang.org ?
 
9:10 AM
hmm, how would I grep to find files that include 2 lines, regardless of their position relative to eachother? I could do grep -P /line1.*line2/s but that would only show if line2 is after line1
or better yet how would I write a sed to remove line2 in those files?
 

 Crayon

For discussing Crayon, a golfing language designed for creatin...
 
@Jim I think lemon meant this: github.com/ETHproductions/crayon
 
except it is frozen
^^
nah it doesn't look like your specific idea
 
Jim
Yeah, Crayon is stack based
 
0
A: Sandbox for Proposed Challenges

Carlos AlejoImplement the very first sed command in history So, suppose we are just beginning to program and we do not have any sed-like command yet. How would you implement it? Write the shortest program/function that finds and replaces substrings of a given string, according to the following rules: The...

 
Tom
9:25 AM
@Jim I started working on something exactly like this, didn't get very far though.
Uses unicode arrows like ↓ to draw lines, and shapes like ■ to draw shapes. Not documented at all, but if you want to see how it works the code is on github.
Charcoal is definitely the best one that's actually usable
 
so...basically Charcoal
 
Tom
I have a lot of plans for what I think would be improvements on charcoal. That and it isn't just for drawing ascii art
 
I was thinking of renaming Sadflak to Woefully 2: Electric boogaloo
@Tom charcoal isn't just for ascii art!
 
@DestructibleLemon But that's its main purpose
 
Tom
ooh, is it not? I thought that's the main purpose?
 
9:33 AM
it is the main purpose
but I imagine that the drawing thing you're making would also be for ascii art mainly
 
"main purpose" abundance
 
Tom
@DestructibleLemon The drawing thing would be for ascii art, but wouldn't be the main purpose of the language. What I wanted was a golfing lang, like Japt, but with functions to do ascii art if needed
I couldn't find any language that combined both being a really short golfing language and being good at ascii art; and I don't have the time to make one myself :'(
 
@Tom charcoal kind of works like that
it just doesn't have a great amount of general functions I don't think
 
Tom
I found that it didn't have enough builtins to do "well" in code-golf challenges, but I haven't looks into it too much
 
for the exact opposite of what you want, please see Turtlèd
fun fact: I stole the ascii art thunder from both crayon and charcoal
so that was good
 
Jim
9:45 AM
@Tom It is indeed very close to my idea, you still work on it?
@Tom I think a language good only at ASCII-art is enough.
 
Tom
@Jim I think that Charcoal would be best for what you want
 
Jim
@Tom Well I was wondering which language I would learn after Pyth. I have my answer it seems.
 
the first two semicolons replaced with newlines
 
0
A: Sandbox for Proposed Challenges

ArjunList My Factors! code-golfmath Introduction Given an algebraic expression as input, list all the factors of it. A factor of an algebraic expression is any algebraic expression (or simply a numerical expression, sometimes) that evenly divides it. A factor can only be an integer or an algebraic...

 
0
A: Sandbox for Proposed Challenges

ArjunList My Factors! code-golfmath Introduction Given an algebraic expression as input, list all the factors of it. A factor of an algebraic expression is any algebraic expression (or simply a numerical expression, sometimes) that evenly divides it. A factor can only be an integer or an algebrai...

 
10:00 AM
@Riker /r/gonwild/
 
@Adám but i. in J gives 4 2 4 1
 
Jim
10:15 AM
@LeakyNun The translation in Pyth, 18 bytes: Wz+*dZ<z2=z>z2=+Z2
 
@Jim try not to translate in pyth
 
Jim
I just save you time :p
 
@Jim can you golf it?
It's obviously golfable
 
Jim
@LeakyNun Gonna try
 
It's 13 bytes for me
 
10:18 AM
someone help how do I do string input or int input and stuff like brainflak
I need to know
 
Jim
@LeakyNun I'm at 15 bytes right now
 
@Jim good
 
Jim
Multiple trailing newlines are OK?
 
@Jim let's say it is
 
Jim
@LeakyNun I think I have 12 bytes
 
10:28 AM
nice
 
Jim
@LeakyNun With no trailing newlines: j.e+*ykdbcz2
 
wow, that's nice
you see, you do know those built-ins
mine was j+Vm*;ydUQcQ2
 
Jim
Yeah, I begin to know a bunch of them
 
that's a good thing
 
-1
Q: Swap the two given indices

Leaky NunGiven an array of positive integers and two distinct valid indices, return the array with the two elements corresponding to the two indices swapped. You may choose to use 0-indexing or 1-indexing, but the testcases below will be 0-indexed. array m n output [1,2,3,4] 0 1 [2,1,3,4] [5,8...

 
Jim
10:30 AM
Not sure I understand yours. V cause me trouble
"Vectorized function"
 
BF interpreter without any data fetch instructions: github.com/xoreaxeaxeax/tiresias
 
Jim
@LeakyNun Well, I look into it later
 
@mınxomaτ nice
isn't it TC with just the mov command?
 
That's completely unrelated
 
it is actually pretty related
ah, same guy
the entire sadflak language is finished apart from input
which I can't figure out
which should have been simple
 
11:06 AM
damnit it is actually still bugging
 
evil sheep is in the room
 
@LeakyNun math.stackexchange.com/users/229191/san is funny given our previous conversation :)
 
11:20 AM
Anybody knows C here ?
 
I have changed the way input is given to save bytes!
 
int getword(void){
    int s[3];
    int i=0,c;
    for (c=getchar(); (c=='\n')||(c==' ');){}
    if (c == EOF){
        s[0] = 0;
        s[1] = 0;
        s[2] = 1;
        return s;
    }
    else { Blah Blah } }
 
wtf is that
 
Why the function returns address of local variable error at return s; ?
@DestructibleLemon wtf is "wtf is that" ?! :P
 
yeah I use python so I don't have to deal with that. you're on your own
 
11:27 AM
@KritixiLithos You konw C ?
 
I think I understand your problem
 
Yeah, why ?
 
you probably forgot a magical * or something
 
@AlexKChen because you returned the address of a local variable
 
@LeakyNun Come herer.
 
11:34 AM
@Lembik lol
 
> herer
Should it be called Sadflak or woefully 2: electric boogaloo?
for a suggested name github gave me reimagined-memory
that's deep
 
Can the output not be in the form of a list (print the integers separated by a newline instead)? — Mr. Xcoder 20 mins ago
is this on meta?
 
11:49 AM
I don't seem to find it either @LeakyNun
Anyways, it does not matter to me anymore
Because the newline-based solution was 46 bytes longer than my golfed Swift answer :))
 
alright, new github. now I have to figure out how to set the github part to origin in git
again
 
Bye guys ✋🏻
 
@downgoat How am I supposed to build VSL before testing it, again?
 
@ATaco don't worry, if it gets 70 degrees warmer, it'll wrap around to 0 degrees
5
 
Pretty sure caching is messing with me again
 
12:06 PM
@Mayube =instant death
 
I mean, I'm pretty sure 359 degrees heat is pretty much instant death anyway
unless you're measuring in Kelvin
 
yes he's measuring in kelvin
 
a sudden move from 359 to 0 degrees in F, C or K is pretty much guaranteed death regardless
0K = death, 359F = death, 359C = megadeth, the sudden switch in temp = temperature shock death
 
someone's been downvoting many of the answers here: codegolf.stackexchange.com/q/127569/41805
 
sad flak is made and done now!
now I just need to get dennis to add it to tio
@Dennis can you add Sad-Flak to TIO?
also I'm gonna add this to the graph wiki
 
Jim
12:20 PM
@LeakyNun Can you explain how your solution j+Vm*;ydUQcQ2 works? I still don't get it
 
anyway, seeya!
 
@DestructibleLemon make sure to use a custom codepage so that ≤≥ aren't 3 bytes each
 
@Mayube not sure if intended to be a golfing language
 
12:42 PM
@KritixiLithos oh that explains a lot
>.>
it seems they just downvoted all the golf langs
 
@Jim cQ2 splits the input into groups of two
m*;ydUQ you can just try that
for +V, please refer to V
vectorized
 
Jim
@LeakyNun Oooooh, I just understood what is ; in this context
 
@Jim nice
 
Jim
@LeakyNun And I did not know you could do U on other things than strings
 
@Jim well, time to read the docs
oh wait, it's undocumented
I'll submit a pull request
# U. int, str, list.
def urange(a):
    if isinstance(a, int):
        if a >= 0:
            return list(range(a))
        else:
            return list(range(a, 0))
    if is_num(a):
        return urange(int(a))
    if is_col(a):
        return list(range(len(a)))
    return unknown_types(urange, "U", a)
environment['urange'] = urange
@Jim here's the relevant code though
 
Jim
12:54 PM
@LeakyNun I meant "other things than integers" in fact
 
@Jim I know.
 
Jim
But I still don't get how +V works because actually I don't understand M (Map) either
 
@Dennis what are different lock reasons? I don't seem to be able to find a meta post...(that is, let's rather not make a looooong comment discussion :P)
and I think that all of them at least lock the question, so it still can't be undeleted...unless some are half locks
I know some of them like dispute-locks don't lock the answers...
 
@Jim +V[1 2 3)[4 5 6) would give you [5, 7, 9]
because 1+4=5, 2+5=7, 3+6=9.
 
@LeakyNun Yes. So that isn't the J solution. Close though.
 
1:00 PM
@EriktheOutgolfer Of course they all "lock" the question. That just means different things for different lock reasons. If I lock it for Offtopic comments, I suspect it could be undeleted.
The others are Content dispute and Wiki answer. The first would fit marginally better, but I know for a fact that it's weaker than HS.
 
I don't think you need to lock the answers
of course hs locks everything and only applies to questions I guess
or you need to lock them? wait, if they're edited that means the memes post will float in the front page or something?
 
Deleted questions don't get bumped to the front page.
 
Jim
@LeakyNun It's just a kind of zip where you give the operator
 
@Jim yes
 
Jim
@LeakyNun Alright, thanks
 
1:04 PM
I've read somewhere that they do...anyways, if not so, then the answers could stay unlocked and I don't think that content dispute will let you undelete the question...of course you can't test that in practice
oh wait, editing deleted answers bumps the question though
 
@Jim and truncating.
 
Jim
@LeakyNun To the shortest column?
 
@Jim that is what truncating means, isn't it.
 
@EriktheOutgolfer Can't test it without help, anyway. Of course, the easiest and most reliable option is to leave it simply as it is.
 
Jim
@LeakyNun Just wanted to make sure what you were talking about
 
1:07 PM
that is, unless sandbox stack exchange is created...
...where you could possibly have a setting to enable diamond or something
 
@Jim Should I explain M to you as well?
M  <any>                  def g(G,H): return A. g -> n ->
M  <pf1> <col>            Map. Map A(_) over B, where _ is the lambda variable. Map uses m underneath.
M  <pfn> <col(seq)>       Map. Map A(*_) over B, where _ is the lambda variable. Map uses m underneath. Each element of B is splatted as the arguments to A.
 
@KritixiLithos I think the mass downvoter was juniorRubyist, they downvoted because they thought only functions were allowed by the meta consensus. You know, that user that told me: "Thank you for grief". Or was it another wave of downvotes (after that one)?
 
Jim
1:27 PM
@LeakyNun No I'm good, I finally noticed the word "preceding" in the description of <pfn>. It makes sense now:
pfn = Preceding function of arity n. *F, for instance.
 
@Jim nice
 
> splatted
i love how it's now a technical term
 
1:43 PM
@Mr.Xcoder ;_; my submission was not a function
 
4
Q: Double up some diamonds

LiefdeWenProblem Given a positive integer n where n < 100 Output a diamond pattern as follows: Input n=1 /\/\ \/\/ Input n=2: /\ /\ //\\/\/\//\\ \\//\/\/\\// \/ \/ Input n=3: /\ /\ //\\ /\ /\ //\\ ///\\\//\\/\/\//\\///\\\ \\\///\\//\/\/\\//\\\/// \\// \/ ...

 
1:59 PM
@KritixiLithos Perfectly fits the scenario, then
 
1
Q: Counting Gems on the Ground

Keyu GanCounting Gems Background My jewel box just fell down! There're too many gems of different shape on the ground. And your task is to count number of a certain type of gem. I/O Your code should take two inputs S and G, which could be a string with newlines, an array of lines, a two-dimensional ...

 
there are no functions in the language i used >.>
 
Same
 
same
@NewMainPosts ouch, 98 bytes in dyalog apl
s/98/96/
 
2:19 PM
0
A: Sandbox for Proposed Challenges

musicman523Home on the Range code-golf number Challenge Given a range [0,n) that has been shuffled, return the index of each element of the range. Examples [1, 2, 0] -> [2, 0, 1] This is the range [0, 3) after being shuffled. The element at index 0 in the result is 2 because, in the input, 0 is at ind...

 
^ how are we going to score these kinds of programs?
:)
 
hey I got a message back from the SE team
 
@HyperNeutrino oh about your account?
@flawr we'll probably assign each piece a "byte" value, kinda like how we do scratch
 
@Mayube yeah
lol I had a profile on all of these accounts:
Stack Overflow
Super User
Server Fault
Stack Apps
Cooking
Home Improvement
Game Developers
Gaming
Mathematics
Statistical Analysis
Web Apps
Webmasters
Apple
English Language and Usage
Personal Finance and Money
Role-playing Games
Ubuntu
WordPress
Programmers
Android Enthusiasts
Physics
IT Security
Graphic Design
Science Fiction
Area 51 Discussions
Code Review
Code Golf
Quantitative Finance
Skeptics
Drupal Answers
Parenting
SharePoint
Musical Practice and Performance
Philosophy
Cryptography
Bitcoin
 
please tell me you got it back, I want my lost rep for your sake so that you get your privs back
 
2:28 PM
Not yet; they want me to create new profiles in all of the accounts that I want to keep, and they can remap all of the content back into my profile (which from my understanding should merge the two and add my past rep into my current rep hopefully)
@KritixiLithos lol I want the votes remapped too because pretty much every single active PPCG user lost rep; e.g. Dennis lost 148 rep rip
 
@HyperNeutrino your pun...
 
Also apparently I was reported, and they did read chat, and they thought I was trying to avoid deletion because immediately after realizing the restriction I cleared every single PII on my profile lol
@LeakyNun I know, it was quite bad /:
Maybe I need to up grade my puns
 
... you just made two in a row
and I've just added you to the Jelly Hypertraining room
 
@HyperNeutrino what happened?
 
@flawr account deletion due to age restriction because of some misunderstandings
my SO account was made when I was 12 but I'm almost 15 now
 
2:31 PM
how did they find out??
 
@LeakyNun I know, I'm great
 
Oh, and do realize that this is what /: in J does, which makes this a 2-byte solution. — Leaky Nun 6 mins ago
@LeakyNun Oh, well that sucks /: — HyperNeutrino 4 mins ago
 
@flawr 3 reasons. 1: I said something about it in chta that made it seem like I was <13. 2: I cleared all of my PII very rapidly after that which made it suspicious. 3: Someone reported me.
 
@LeakyNun Typo. Thanks! I've never used J so I didn't realize there would be a builtin for it /: maybe I could convert this into a "best-algorithm" question? — musicman523 2 mins ago
Seriously guys, the puns.
 
I usually use :/ but I used /: just for the pun. And I said up grade also just for the pun
 
2:32 PM
#doitforthepun
 
@HyperNeutrino Did you find out who reported you?
 
@KritixiLithos :o wow that is great
@Mr.Xcoder No, and I don't plan on trying.
 
bad idea
 
I there any official currency lower than the Japanese yen? Besides for its subtypes? Because I see 1 British pound = 140.709681 Japanese yen
 
2:38 PM
@HyperNeutrino PII?
 
Personally identifiable information
 
beat me to it lol
 
ah
 
@HyperNeutrino it's called ninja-ing
 
> it-s
and yes I know
 
2:42 PM
:P
 
but I wasn't ninja'd, because I never sent the message
 
2:54 PM
5
Q: Spin the Calculator

Kevin CruijssenIntroduction: Let's take a look at a standard Calculator in Windows: For this challenge, we'll only look at the following buttons, and ignore everything else: 7 8 9 / 4 5 6 * 1 2 3 - 0 0 . + Challenge: Input: You will receive two inputs: One is something to indicate the rotation in increm...

 
Is there a consensus on how many bytes a singe flag (i.e. -P) costs?
 
it is 3 if it is the first flag @obarakon
 
really?
hm.
 

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