« first day (2635 days earlier)      last day (2230 days later) » 
00:00 - 18:0018:00 - 00:00

12:52 AM
@ETHproductions is there a japt logo
@LeakyNun you here?
look at what your challenge made me do :P
write a (slow, but correct AFAIK) generator that can generate all strings for an arbitary CFG
1:10 AM
@ETHproductions Japt highlight on PPCG-v2 :D
@Downgoat :O
@Downgoat charcoal highlight
do you have an existing highlighting/token list
@Downgoat i have a super old highlighting, but i also have crappy grammar
if you can create token list seperating into operator/symbol/keyword/number/string that would be great
@ASCII-only link?
btw is there a charcoal SVG?
@Downgoat not yet :(
1:12 AM
and btw can you answer this question in charcoal as a test
@Downgoat test?
yeah I'm using that challenge to test certain Axtell features
hmm, not sure how to handle verbose mode
could verbose mode get its own language + specialcased bytecount
talk to @Mego about byte counts
@Downgoat problem is it will have to read + modify stdout
1:16 AM
@ASCII-only ?
@Downgoat can i take input as an array of strings
sure whatever you like
@Downgoat correct bytecount is only accessible from stdout
@ASCII-only oh, is it possible you can write a byte-counter in python?
@Downgoat byte counter is in python
1:20 AM
@Downgoat or do you mean a function to return number of bytes
@Downgoat also doesn't it need to be in JS
@ASCII-only no becauser server is in python
@Downgoat oh yeah forgot this isn't TIO >_>
@Downgoat is it ok if it has to import Charcoal
@ASCII-only you have to talk to mego about this i have no idea :P
@ASCII-only TIO is written in Bash
1:22 AM
@Pavel i meant the fact that TIO has live bytecount
@Downgoat yeah it's probably bad idea since i want to add symengine/sympy/gmpy2 sometime
@ASCII-only ok, just ping mego when you have solutoin
Ping me in the Axtell room so I'm not super confused :P
I have a Python library I wrote that has various encodings for esolangs (plus APL and friends). Adding a new encoding is super easy if I have a codepage to reference
@Mego requested (codepage is there), needs a little specialcasing though: github.com/somebody1234/Charcoal/blob/master/charcoal.py#L4836
What's this character?
> 👍
1:36 AM
Oh geez
@Mego also not sure what to do with Charcoal verbose mode
@user202729 Thumbs-up emoji
@user202729 thumbs up ninja'd because bad internet
@orlp wow
I wonder if there is a shorter generator for the natural numbers
2:10 AM
@LeakyNun doesn't look like that can be shortened
@LeakyNun nvm
does this work:
also: link to whatever this is?
also, I wonder why it's T ( S ) instead of T ( B )
saner output format:
2 hours later…
4:04 AM
Q: Polynominal -> Integrate

l4m2Given a polynominal, each coefficient of which is rational, with one argument, output an expression with only 1, definite integral, and variables, that equals to it. E.g. -x2 can be expressed as ∫x∫111dtxdu. E := 1 | var | ∫EEEdvar Reasonable input/output method allowed Samples: Your score ...

@NewMainPosts this... actually seems kinda nice
@ASCII-only Although the generated expressions are going to be huge.
@user202729 depending on the testcases, but yeah
golfy submissions are also probably going to be super slow
Looks suitable for J...
5 hours later…
9:08 AM
J: Should I use +: -: or *2 /2? Which are more commonly used?
Similarly should I use <: >: or -1 +1?
9:22 AM
@Downgoat Charcoal, 19 bytes: UTAθEθ⁺× ⊘⁻⌈EθLλLιι
@user202729 depends, in trains especially, your choice would depend on the structure of the train
hi all
does anyone understand pari/gp? I am trying to run codegolf.stackexchange.com/a/162281/9206 and get bpaste.net/show/a2c2d02ed481
9:51 AM
@Lembik try allocatemem(100000000) before?
@ASCII-only Thanks! I got there in the end
the manual is very annoying on this topic
@Lembik :| but it literally says in the error message
does anyone know how to divide two very large integers in python to arbitrary precision?
In the post: "Computing f(11) needs a bigger stack size, the error message will tell you how to increase it. "
@ASCII-only it does says "O(^): domain error in O: x <= 0" which is how I worked out the solution :)
9:53 AM
@Lembik arbitrary precision decimal?
@Lembik there's the decimal module for that
@ASCII-only yes but the man page has allocatemem({s = 0}) as its example. Do you know why there is {s = 0} in there?
@Lembik it also says [hint] you can increase GP stack with allocatemem() >_>
I was confused by {s=0} in the man page
9:55 AM
@Lembik named argument. that works fine as well
i'm assuming s stands for size here
disclaimer: i have never used pari/gp before, i'm just testing on TIO so i may be wrong
ok it doesn't really mean use allocatemem(s=0)?
but rather allocatemem(0)?
I will try to decimal module thanks
@Lembik they're equivalent, i'm assuming it's defined as allocatemem(s) internally, so you can use or leave out s and it will work fine either way
ok but if you use x it actually changes the value of the variable x
In [4]: getcontext().prec = 128

In [5]: Decimal(58377787470904339474720999683301559)/Decimal(5837778747090433947
...: 4720999683301599)
Out[5]: Decimal('0.99999999999999999999999999999999931480787928223354920739123922475877436183925901827778479871118447290751354728222123758017079976')
very nice!
thank you
googles getcontext().prec = 100 or whatever to set precision
it's pretty awesome
10:20 AM
@ASCII-only Because I was just messing around
the grammar is irrelevant
you can put in whatever grammar you want :)
that's the whole point
10:32 AM
what not to use a CFG generator for:
@ASCII-only btw you can just use multi character nonterminals :P
@orlp that's why I'm using them :P but this is PPCG so i'm trying to use them as little as possible that's not a good excuse is it
also in the original I linked
I intentionally limited it to integers of size 2
@orlp oh
11:01 AM
coding question.. if I have an array of n zeros and I want to put j 1s exactly in the middle (assuming j and n have the same parity)... how would you do that?
@Lembik what language
l = len(a)
a[(l - j)//2:(l + j)//2+1] = [1] * j
or something like that
ooh.. let me see
and when you say "put 1s exactly in the middle"
11:02 AM
do you want the new array to be of size n or size n + j?
size n
I'd not be confident in my abilities like ASCII does it
I'd write it like this
mid = l//2
sub_start = mid - j//2
a[sub_start:sub_start+j] = [1]*j
this prevents magical rounding errors
because [sub_start:sub_start+j] always has size j
l//2 = int(1.0*l/2) ?
but if they're both odd wouldn't start be one too high
11:05 AM
no matter what
@Lembik l // 2 == floor(l/2)
@ASCII-only possibly
now we have to worry if the start is one too high
yeah i think so
start = (l - j) // 2
11:06 AM
do that
skip mid
since they have the same parity that's guaranteed to be even
thanks.. you made minced meat of this :)
@orlp oh hang on.. what is the final version of your code for putting in the 1s?
start = (len(a) - j) // 2
a[start:start+j] = [1]*j
@Lembik ^
got you
11:39 AM
Q: Declined flag on a comment which was copy-pasted into the question's body

Erik the OutgolferRecently, I flagged this comment as no longer needed, since it has been rightfully copy-pasted into the question body. However, the flag got declined along with flags on two other comments which can now be answered by the post itself (1, 2). I have casted numerous flags in similar situations and ...

Hey! Are there conventions/rules for placing a bounty to draw attention?
that's one of the reasons bounties are used
@EriktheOutgolfer just realized your avatar is PCG
I'd like to place a bounty for this challenge, but I'm unsure what to say..
I'd love to see either a really high-level answer (eg. the Idris one or a Haskell one) or a really low-level one (eg. asm or C) but these are quite the opposite :S
oh, then you don't want that kind of bounty!
11:49 AM
Should I just leave out the message?
you want an indefinite bounty
@BMO you don't need to
@EriktheOutgolfer: Oh, forgot about these.. In fact that's probably a good idea
@BMO but haskell has implicit currying :|
11:50 AM
you just post your bounty on the list of indefinite bounties over meta and a bot automatically posts it here
@ASCII-only: That's why I'd love to see a Haskell answer (it would have to be an input-function on N-tuples)
> If your language uses curried functions by default (eg. Haskell), you may expect the input function to be defined over N-tuples, instead of a "higher-order function"
@EriktheOutgolfer: I'll offer an indefinite bounty then, thx for the suggestion!
btw you can reply to messages if you didn't know
@EriktheOutgolfer Nope, I didn't know that
11:55 AM
That shouldn't be too hard, I think.
@totallyhuman A Haskell answer?
Then again, the Idris answer is using something Haskell doesn't have...
@BMO is a Haskell answer even possible? If the function has to be able to use any N-tuple, N has to be fixed
Ah! I thought tuples can only be of size (max) 15.. but in fact they can be of arbitrary size, just (Eq,Ord,Show) are not defined for >15. But I guess it's still tricky..
Oh, do we have to use tuples?
Or can we use lists?
12:01 PM
@totallyhuman lists are fine
Yeah, that's a good question :)
I think Haskell's tuples aren't really one datatype
@ASCII-only: They are?
they are N-tuples, i.e. 0-tuples, 2-tuples, 3-tuples etc.
well they're basically the same as tuples in Python at least - tuples are just immutable lists
i guess it depends on the language
12:02 PM
no, in Python tuples are one datatype for all lengths
@ASCII-only: But you can't do ["hello", 1984] which is quite different
@BMO :| that's valid as a tuple in a lot of languages
As a tuple yes, but a Haskell list would prevent that
Oh yeah...
12:15 PM
If I offer a bounty of say 150 to an answer, can I still offer one for 100 later to another answer?
@BMO nope
Good to know, I nearly placed two bounties. One for 100 and one 150, but that's impossible then
Yeah, they have to double at least
Ok, I just changed it to 100 and 200 but tied the 100 one to the second, st. I will delete it. (I can always repost a new one)
12:22 PM
oh yeah, not relevant: i had curry for dinner ~1 hour ago
@BMO Assembly has no concept of function parameter. You have to invent one and then use that, but there are definitions that trivializes the challenge.
The help center says that the minimum spend per bounty doubles for each subsequent bounty (with 50 min for the first). Doesn't that mean that you could post 2 bountys for 100 for example, but not 3? It doesn't say that the previous bounty must be doubled.
@Emigna The previous bounty must be doubled, the text is wrong
(yes, I don't like challenges that are unclear for some languages)
12:24 PM
@ASCII-only If that is the case, someone should probably update the help center text
@Emigna Raising the issue on MSE is the only way to get that done... the CMs are not here.
and shouldn't be a mod here, but a SE employee
@user202729 What convention would trivialize it?
@EriktheOutgolfer so we need to pass the input function a tuple right
Ah, I thought we (mods) could update our help center
12:25 PM
@BMO a convention that places out the args in the correct place
we can for some pages, but 1) I don't know if that's one of those pages and 2) it should be fixed for the whole SE
@user202729 (meta)
A: List of bounties with no deadline

BMO100 rep for a Haskell answer to "Make me some curry" I'll offer a 100 rep bounty for a Haskell answer to the above mentioned challenge. I might offer more than 100 rep for an interesting answer (for example not just copying the Idris answer or a clever TH answer). Given that tuples are tricky w...

@user202729 I'm sure for every challenge we'll find a language for which it's unclear.
@ASCII-only Damn, I didn't know about that one. What about N = 33? :P
12:33 PM
@BMO exactly lol
i guess it's actually possible though
Sure it is, but I'm not smart enough for this.
That's as good as it gets I think
You could use TH to generate an instance "on-the-fly" for functions with N≥32 but that's quite ugly ^^
I'm using a version of Lua that is really struggling with floating point arithmetic
To the point where "Why is that number suddenly 6*10^106"
@BMO Not for those which are defined with only observable behavior.
@BMO No, Template Haskell is the only way (because types can be different)
12:40 PM
Oh, and even more interestingly, only sometimes.
Apparently lcm(3,3)=86.9, I never knew.
@ATaco What's happening...
The worst implementation of lua I have ever used.
Which one
Actually, even standard lua is making this explode towards infinity...
Atleast standard lua makes sense...
@ATaco It does not correctly implement Lua standard, it's not Lua.
12:45 PM
The issues appears to exist in my implementation of GCD, I think..?
Alright, lua almost catches the floating point issues, but 0.1%(2%0.1), or more accurately, 2%0.1 pushes it too far.
@ATaco You have to handle it yourself.
Very aware.
1:10 PM
Q: Dollar Bill Auction

RamenChefThis is a KOTH challenge for the dollar bill auction game in game theory. In it, a dollar is being sold to the highest bidder. Bids go up in increments of 5¢, and the loser also pays their bid. The idea is that both players escalate the bidding war far beyond the value of a dollar in order to cut...

:| haskell being statically typed makes it so much harder
@ASCII-only Really? I find it easier to use than dynamically-typed or untyped languages
i meant for BMO's challenge lol
A: Haskell, is it possible to create a curry function that can curry any number of tuple elements

Ed'kaOne of the ways to implement such function is to use GHC.Generics. With this approach we don't even need to pass a number of parameters (or tuple size). This works because there is an instance of Generic defined for tuples which effectively converts a tuple into tree structure (of type Rep a) whi...

> The only limitation of this approach is that Generic is defined only for up to eight-element tuple.
Still special-cased.
1:19 PM
the main problem is you'll have a function that might return a lambda or the result (i.e two possible return types)
so you'll probably have to metaprogram the curry function itself or something too?
@ASCII-only Change your perspective: any value is just a nilary function that returns itself
tfw a question like this has to be protected by moderators
@Poke Everyone has an opinion on steak :P
mfw people eat steak well-cooked
yep. guess so
1:30 PM
Q: Recovering Range Parameters

Kyle GullionDescription You are given the results of a range function where every element has been rounded down to the nearest whole number. Your goal is to recover the original list. For example, the following function (in Python3) will produce an input for your program: from numpy import arange, floor d...

Anyone interested in outgolfing my answer? (Important note: it might be impossible to do so)
@Fatalize It depends on the cut of the meat. For example, with a cheap cut, you can do pretty much anything you want to it without hurting the flavor too much, because it's cheap and won't have great flavor anyway. However, cooking a tenderloin well-done is a borderline crime, because it won't be tender anymore, and so you've ruined the whole point of having a tenderloin.
rare > medium > eating actual poop > well-cooked and very rare
^ facts
@Mego But I like tenderloin, and I don't like meat that isn't well done.
@Soaku yes, eventually
still have like ~20? languages to add to RosetTIO, I think
1:36 PM
@Dennis Really? I find tenderloin to be tough and unbearably chewy when cooked anything more than medium
Though like the top answer on that question said, it's probably due to experience. I've only had bad experiences with well-done steaks (my dad wasn't the greatest with a grill), and only good experiences with my usual preference of medium-rare.
Don't ask me about the process. No meat my wife prepares could be described as chewy.
If you come to Brazil and ask for a well done steak basically anywhere, your waiter will probably confirm three times before sending the order
It's just not something that happens
Eh, restaurants. I've sent meat back to the kitchen because they wouldn't believe I actually meant well done the first time.
Medium rare is the temperature I usually go for when making bbq
Medium when mom asks for it
1:41 PM
@Dennis Sous vide perhaps? I've heard good things about that method, but I haven't had the opportunity to try it yet
No, nothing that fancy.
Life in Texas:
@Mego basically any bbq in Brazil
i just make sure i'm up to 145F to do the fda proud
1:42 PM
Though 8/10 no cross-hatches
I do the cross-charring(is that a word?) myself because my grill isn't crossed
What happened to the traffic data under site analytics? It only shows traffic since March 25 this year for me, and I'm pretty sure there has been site traffic (and data of it) before this date.
@J.Sallé Mine isn't either. I find that the amount of time it takes to get the crosses done right is about the same amount of time it takes to cook the meat to medium-rare
@Laikoni Really...? Are you setting the "From" field correctly? Screenshot please?
@Mego yup, exactly!
1:45 PM
@Laikoni That's weird. File a bug report on meta?
@Mego can you reproduce it?
A: Sandbox for Proposed Challenges

TinyTRex72No "E" code bowling I created this challenege idea with @redwolfprograms. In the challenge, you would create the longest program possible (code-bowling), but it cannot: Contain the letter e, capitalized or not Contain the same alphanumeric character more than twice Conatin the same non alphanu...

@Laikoni I only see traffic data from april 6th
and the past 5 days are less than 1% in all stats than the 6 days previous to that
@user202729 ^
@Emigna That's even weirder.
@Soaku You can't place a 50 rep bounty on a challenge you've already answered. 100 is the minimum.
@Laikoni why the red lines?
@Dennis Oh, fine. Didn't know
(because there are <5k users around here?)
Reproduced. Traffic on 01 Feb ~ 04 Apr is zero.
Wait, why is page view zero too?
you folks are reproducing a bug and then commenting on how weird it is that the data you're getting is not what you'd normally expect it to be
that's the weird part
@Poke {it's very weird} ==> {it's a bug}
1:59 PM
@ASCII-only nvm i'm stupid
@user202729 As far as I know you're not supposed to share this data.
Oh yes... but... wait a minute.
What do you use the data for? How is it useful?
Or is it just a part of SE gamification system?
there's a reason people don't use hitcounters on websites anymore
It might be interesting. I haven't found it useful so far.
i imagine if a change to the website is released you can correlate page hits to the reception of that change, etc
i doubt it's as useful to high privilege users
but maybe those who operate/maintain certain stacks
2:05 PM
i don't know what i'm doing:
^ TemplateHaskell
@ASCII-only It won't help at all with the error, but if you use cat <<'end', you don't have to escape every $ in your source code.
2:59 PM
Any final comments before I post this one to main?
@AdmBorkBork No.
(in this case "no" answers are good as it indicates the challenge is good)
3:39 PM
Q: Four Spiraling Axes

AdmBorkBorkTake the numbers 0, 1, 2, 3, 4, ... and arrange them in a clockwise spiral, starting downward, writing each digit in its own separate square. Then, given one of four distinct and consistent ASCII characters (your choice) representing an axis, and an input integer n, output the first n terms of t...

4:13 PM
> parseInt(0.000001)
< 0
> parseInt(0.0000001)
< 1
> parseInt(0.000006)
< 0
> parseInt(0.0000006)
< 6
Javascript is so satisfying, it makes me realize Java is not so bad after all.
Java is the reason we have C#, so that's how I'm fine with it.
4:31 PM
A: Sandbox for Proposed Challenges

Redwolf ProgramsArmored war bots king-of-the-hilljavascript I have seen KOTH challenges where the bots fight each other, and I have seen KOTH challenges where the bots are in an auction. So I came up with this: The challenge: You will create a function using Javascript. You can name the function what you lik...

A dozen, a gross, and a score,
Plus three times the square root of four,
Divided by seven,
Plus five times eleven,
Is nine squared and not a bit more.
A limerick.
*clap* *clap* *clap*
Found on the interwebs.
@AdmBorkBork May we use that?
Not mine. Looks like it came from Tumblr somewhere.
4:40 PM
CMC: Given the number of a hole (1-10, or 0-9 if you want 0-indexing) and a boolean for blow/draw, return the note that would be played on a C Major Diatonic Harmonica
Hole	1	2	3	4	5	6	7	8	9	10
Blow	C	E	G	C	E	G	C	E	G	C
Draw	D	G	B	D	F	A	B	D	F	A
zip("CEG"*10, "DGBDFABDFA").index(arg)?
@DJMcMayhem Do you mean to ask me how it works?
Yeah. That was my guess of how it works
(in python pseudocode)
PowerShell, 44 bytes, 0-indexed -- param($n,$b)(('CEG'*4),'DGBDFABDFA')[$b][$n] Try it online!
4:47 PM
Hmm, it just occurred to me that this challenge would be significantly harder if a different key was chosen, because then there would be sharps in some of the notes
@DJMcMayhem Not exactly. 10⍴'CEG' is cyclically reshape into length 10. Now we have ["CEGCEGCEGC","DGBDFADBFA"]. Then curries that as right argument to the (pick) function, which uses the left argument of [Boolean,index] in sequence. First it picks the Boolean'th element, and from that, it picks the index'th element. This is different from n-dimensional indexing.
Hole    1   2   3   4   5   6   7   8   9   10
Blow    A   C#  E   A   C#  E   A   C#  E   A
Draw    B   E   G#  B   D   F#  G#  B   D   F#
@DJMcMayhem Markdown is hard. :-)
Stupid tabulators
@DJMcMayhem So Blow-2 is not C-sharp?
4:51 PM
My bad
C, F, and G should all be sharp
@Adám That's interesting. Cool how is reshape rather than repeat which is what I would expect
It's like repeat and trim merged together into a single function
7-zip is the best. 809MB of random files i want to archive in only 110 MB of space \o/
@DJMcMayhem And monadic is just re shape. "Replicate" is / which is "Compress" when used with a Boolean left arg. For trimming, there's also ("Take") which even allows you to "over-take", padding with appropriate fills for your array.
@DJMcMayhem PowerShell, 72 bytes, 0-indexed -- param($n,$b)((('A','C#','E')*4),-split'B E G# B D F# G# B D F#')[$b][$n] Try it online!
Same concept, just uses arrays of strings instead of strings
Markdown is unpredictable.
Markdown is like HTML had a baby with satan
@DJMcMayhem Understand or needs explaning?
I don't understand any APL, but it looks like a fairly straightforward modification of your last answer
Rather than changing the encoded data, you're conditionally adding a #?
@DJMcMayhem Yes. The left paren is a function. It takes the argument and concatenates , the hash reshaped by ⍴⍨ the Boolean for whether the argument is a member of CFG ∊∘'CFG'.
@DJMcMayhem Notice how you can "change tense" of "reshape" with the "suffix", from "reshapes" to "reshaped by".
@J.Sallé it sure would be nice if everyone agreed on one flavor of markdown
5:11 PM
@mınxomaτ Not enough levels though. :/
@moonheart08 ye compression in general is pretty good
@AdmBorkBork APL (Dyalog Unicode), 42 bytes Try it online!
@AdmBorkBork that's actually from a 1948 maths book by a dude named Leigh Mercer
5:42 PM
@J.Sallé Sweet, now I have a source.
Though the limerick is sadly not quite accurate. I suppose it works if you take floordiv.
@AdmBorkBork huh?
@AdmBorkBork His wikipedia page is quite poor but it has that limerick there. The source is a 404 though
am i missing something
5:49 PM
@Poke well technically it's 9^2+0 >.>
@J.Sallé true
3*sqrt(4) != 3*4
ah >.<
00:00 - 18:0018:00 - 00:00

« first day (2635 days earlier)      last day (2230 days later) »