« first day (2665 days earlier)      last day (2473 days later) » 

00:53
CMC: given a string, capitalize all characters with even ascii values and lowercase all other ones
ngn
ngn
@ConorO'Brien dyalog apl: ⊢819⌶¨⍨2|⎕ucs
01:13
> 13 ms per 100 elements
this is the 'benchmarks' for a tooltip library
this is horrendous yet they think it's good lmao
> 14kB gzip
holy shit why would you think this is good
un-gzip'd you're talking like 45000characters for a tooltip library
> Just 102.2ms used
02:05
This is on top of the fact that installing it with npm has like a solid 10% chance of bricking your system
Hello everyone! I'm trying to use the Esoteric IDE for a big project but there seems to be a character limit. Is there a way to remove this?
(sorry if I'm breaking some form of chattiquette)
02:25
@boboquack Character limit what?
02:38
@enedil Re your deleted answer: Standard loophole.
03:00
@user202729 it's about 20000 characters or so I think by testing.
I suspect ~16384.
A bit more.
0
A: Sandbox for Proposed Challenges

MegoGrouping Array Data Given an integer matrix a and a nonnegative integer i, output a mapping b that maps the distinct values in the ith column of a to rows of a who have that value in the ith column. You may assume that i is in the half-open range [0, num_cols(a)) (or [1, num_cols(a)] if you cho...

03:16
@boboquack Do you have C# build tools?
Adding this.txtSource.MaxLength = 0; after line 166 (this.txtSource.KeyDown += new System.Windows.Forms.KeyEventHandler(this.sourceKeyDown);) in Mainform.Designer.cs will work.
@ATaco Your site is down, in case you didn't notice.
03:37
@Pavel glow stick is to light your way in the cave
that's for when they need you to communicate with the cavepeople for AP lang extra credit
 
2 hours later…
05:14
@EsolangingFruit yep, down until I can afford the web host
05:52
Are there esoteric languages out there directly based on turing machines? I want to wrack my brain on a computation model that isnt really common out there
brainfuck comes close, but its still a structured programming language
you know with matching [] and all
06:26
@eaglgenes101 Try Fractran. (it even takes some steps to "reduce" it to a TM)
Besides, there are TM interpreters...
 
1 hour later…
07:50
hi all
Following Peter Taylor's comment, would anyone like to vote to reopen codegolf.stackexchange.com/questions/164876/… ?
The differences to the claimed dupe are: parentheses, an effective time limit, the exponentiation operator and a range of values of x.
08:05
@ConorO'Brien Charcoal, 11 bytes: ⭆θ⎇﹪℅ι²↧ι↥ι
 
2 hours later…
10:29
@ASCII-only Parser for that language would be trivial anyway... (except the control structures which should be no harder than BF)
11:23
@Anush uh, answers can't be "reopened" :P
11:59
@EriktheOutgolfer "e). OTOH I'm not the only person who can cast a reopen vote: you're welcome to make your case in the chat room and get some third, fourth, etc. opinions"
from Peter Taylor's comment
but you link to an answer :P
wait, did you take this seriously
@EriktheOutgolfer oh ok :)
if you can vote to reopen the question that would be great!
apparently you can vote for your own question to be reopened?!
if you believe so, otherwise you don't need to
e.g. you shouldn't hammer an obvious dupe of yours open
I think it is different enough to be interesting
the linked challenge has a 23 byte solution.. I really don't think mine does
well if it is does.. it's a much cleverer one
then feel free to vote
12:05
I did !
:)
I am just hoping someone on chat .. cough.... will vote too :)
I won't vote yet because I have a hammer
ah ok
interesting
I'd be hesitant to vote because it was hammered closed but I will look at it. I also have a hammer so I'm not going to vote.
@HyperNeutrino thanks!
out of interest, is there any pattern to what sort of question gets the largest number of upvotes on ppcg?
12:07
memes?
I personally think it's a dupe. For any submission there, you can just stick a wrapper around the program/function to take a number n and return [n] * n and pass that into the inner program, and I doubt there would be many other approaches that aren't basically the same thing
@HyperNeutrino but those other answers won't work will they? I mean there is a parenthesis rule, an exponentiation rule and a time limit
Fair enough
12:09
@HyperNeutrino :)
I'll consider it, but for now my opinion is still that it is a dupe
@HyperNeutrino ok thanks
I can't ask more than that
I won't vote either way for now because it's binding. But I will look into that.
let me see if I can run the other code and see where the answers are different
It depends on whether or not competitive answers there just try everything possible (either the naive way or the DP way) because then you can just add extra rules, though that might hit TLE.
12:11
repl.it/C2F5 hmm.. try that with [4,4,4,4] 4
I get set() as the output
in other words it fails even that basic task
@HyperNeutrino so it seems it can find neither "4" nor "(4*(4-4)+4)" as an answer
Hm okay..
That's because it only deals with operator precedence and not parenthesis
@Emigna Right
and also insist on using all the numbers
yep, that is the task
I still claim my question is different :)
12:20
@Anush That's a different language...
@Anush Absolutely no...
sorry.. what is the "no" in reply to?
I would call it a variation on the same task. Which on case-to-case basis can be either cause for a new challenge, or not
@Emigna I agree
14 mins ago, by Anush
out of interest, is there any pattern to what sort of question gets the largest number of upvotes on ppcg?
you can click the arrow to the left of the @Username to see the original message.
oh thanks
@HyperNeutrino thanks
12:22
I sometimes wish I could VTC/VTRO without it being binding lol.
@user202729 True.
just have an option to apply 1-5 votes either way, yk
CMC: Given two numbers a and b, return [a+b,a-b]. E.g. a=4 and b=3 gives [7,1]
Python: lambda a,b:[a+b,a-b]
Jelly, 3 bytes: +;_
Proton: (a,b)=>[a+b,a-b]
Enlist, 1 byte: ±
12:25
I don't get Jelly.. I see a lot of 2 and 3 bytes answers in Jelly. But there can only be 65536 2 byte Jelly programs!
how come so many of them are answers to our questions?
@Anush "A lot"? How many?
@Anush Often a single program can solve multiple problems depending on the what the arguments are and how many arguments there are.
@Adám oh!
Proton: ((+),(-))
:D
someone should catalogue all 2 byte Jelly programs
12:26
And 65536 are an awful lot of programs...
@Anush As in list them (easy) or describe what they do (hard)?
@user202729 hmm.. now I want to find a way to search PPCG for all 2 byte Jelly programs
is that possible?
@Anush Sure, just search for "Jelly, 2 bytes"
@Adám I mean the latter and it wasn't 100% serious.. just slightly serious
search "Jelly 2 bytes is:a" probably
@user202729 I believe that is the same in Cthulhu where I got the idea from, but I could be mistaken.
@Adám Remember the quotes...
that seems like a really high percentage to me.
@HyperNeutrino if you remove the parentheses, you have the solution in Dyalog
someone make an SEDE query :P
@EriktheOutgolfer oh cool :D
to put it another way.. I would expect almost all random code to be syntactically invalid!
welcome to the world of golfing languages
@Anush In fact almost all random code are syntactically valid.
12:30
let alone happen to compute the exact function you are interested in
@Anush No, quite the opposite. Every error is a missed opportunity for additional functionality.
(in Actually all byte sequences do something)
well, it isn't random when we are solving it...
@user202729 oh really? Is that true in C etc?
Well..... no.
12:31
oh I see.. you mean in Jelly
@Anush Yes. Most of them will throw various compiler errors but that is still" doing something", just not something meaningful
Actually there are invalid Jelly code (such as €€). However there are no reason to implement error handling. So just assume they're valid.
Well, in every language, all byte sequences do something. Usually throw an error.
@Anush "Actually" is a language
ok
12:31
get ninja'd
@Adám many just don't compile so you get nothing to execute
most
@Anush Only for compiled languages.
@Anush Oh, ok, then in every interpreted language…
@user202729 That's actually surprising since each each is valid (and useful) code in J.
@Anush a C program's source code isn't actually a program but an input to a compiler...
@Adám if you have a syntax error in python that code just doesn't run
12:33
@Anush Doesn't it cause output to stderr?
@Adám looking up adverb creation
@EriktheOutgolfer what do you count as a program?
@Anush The 1-byte Python program ( prints a long output. No other languages can do that.
@Adám I suppose in the same way a compiler does for a syntactically invalid piece of code
@user202729 It derives a new adverb which when applied to a verb, applies the verb to each element of each element.
12:34
well, in the case of C, even though here we count the source code's score, it's actually the compiled executable which runs
in any case.. the point was just to say how amazing Jelly is :)
it's designed for that purpose
Heh, on Windows, every file with a .exe extension can run and does something.
and J too
@Adám well, 16-bit files sometimes don't work, but the error is still something
12:36
I mean how extraordinary that "+/ .*" computes the permanent of a matrix!
you mean +/.*?
@Anush In Sharp APL (from which J derives) you write just +.×
@EriktheOutgolfer No, the space is necessary :-(
@Adám ah he's talking about J
blimey.. the determinant is much harder it seems
what is the shortest code for that?
in J?
Jelly is ÆḊ
12:38
wow :)
is that a library call?
probably
@Anush In J: -/ .*
CMC: Given a matrix A, find $A^TA$ (A-transpose times A)
ah ok.. I meant without any libraries
Jelly can do it in 3 bytes i believe
12:39
@HyperNeutrino 5 bytes in APL.
I want to try :P
jelly can do it in 2 bytes
but it's a full program
wat o_O nice
I would've gone with the obvious Zæ× but that's cool
12:40
um, Zæ× is something completely different
æ× is matrix multiplication
computing the determinant using only basic arithmetic I really meant
@EriktheOutgolfer which is what I want
is simply transpose that many times
oh
that's not what I wanted
@Adám how do you write a matrix in APL
@HyperNeutrino The matrix itself? Either reshape a vector (3 3⍴3 1 4 1 5 9 2 1 7) or mix a vector of vectors (↑(3 1 4)(1 5 9)(2 1 7)).
12:44
oh ok
@HyperNeutrino I'm working on a direct notation though. I expect it to become possible to write [3 1 4 ⋄ 1 5 9 ⋄ 2 1 7] or
That would be really nice
[3 1 4
 1 5 9
 2 1 7]
so much overloading of [...]...
@EriktheOutgolfer True, but here it is pretty clear. If the brackets are broken by a line break (or a diamond — diamonds are equivalent to line breaks) then it is an array. Otherwise it is index/axis.
12:47
@Adám what's wrong with {⍉⍵+.×} (SyntaxError on char 0)
@Adám why not simply use parentheses instead though
@HyperNeutrino +.× is dyadic.
oh right there isn't implicit arguments :/ Jelly lol
@EriktheOutgolfer Because I want (1 2 3 ⋄ 4 5 6) to be equivalent to (1 2 3)(4 5 6) so you can write:
@Adám I have ⍉⍵+.×⍵ for my CMC which is 1 character too long. Golfing tips?
12:49
(1 2 3
 4 5 6)
thinking about the four fours question and relatives... what is the shortest list of integers for which you can make all numbers 0..100?
@HyperNeutrino It doesn't work either. requires braces, and will take everything on its right as argument, i.e. it transposes the matrix product of and .
oh
so it has to be {⍉⍵+.×⍵} which is still way too long (and apparently doesn't work)
well crap
I'm guessing I shouldn't be using {}?
@HyperNeutrino It is almost right, you just need to fix the order of evaluation (hint).
@Adám hm, it kinda makes sense if you think about it
12:51
@HyperNeutrino No it shouldn't, but you can write it as a dfn (braces-style) first, and then convert it to tacit form (like Jelly) to save some characters.
{⍵+.×⍨⍉⍵}?
@HyperNeutrino Yes, that works.
yay ok
+.×⍨⍉ still gives trans(w*w)
@EriktheOutgolfer Having the rule that a parenthesis broken over multiple lines just means that each (non-empty) line is parenthesised and then they are put next to each other has an additional benefit in that it will enable you to write trains that span multiple lines.
so does ⍉+.×⍨
12:54
@HyperNeutrino No it gives trans(w)*trans(w).
@HyperNeutrino That is trans(w*w).
hm ok makes sense
wait `T commute is also selfie right?
@HyperNeutrino Yes. when applied monadically. f⍨A ←→ A f A. A f⍨ B ←→ B f A.
okay. is there an identity function in APL?
12:55
@HyperNeutrino Yes: .
right, thanks
@Adám would ×∘+⍨⌽ work? Didn't test >.>
@Adám ⍉+.×⊢
Does this puzzle.se post render like this for anyone else?
@J.Sallé You mean . instead of and instead of ?
12:57
@Adám no to the former, yes to the latter
@HyperNeutrino Correct! Have an APL pie: 🥧
The was a missclick :p
@J.Sallé How can × substitute for +.×?
now I want to learn more APL :P
12:58
@J.Sallé You could do +.×⍨∘⍉⍨, but why would you?
@Adám no idea. I'm still sleepy, just read the cmc and that's what came to mind hahahahahah
@HyperNeutrino I'm happy to hear that. Maybe it's time for me to start a new class of my weekly lessons so people have a chance to start from scratch again?
CMC: Given two positive integers x and y, return the 1-indexed xth element of 0, 1, 2, ..., y-1, y, y-1, ..., 2, 1, 0, -1, -2, ..., -y+1, -y, -y+1, ..., -2, -1, 0, 1, 2, ... etc. Alternatively, non-negative x and 0-indexed.
@Adám Possibly, though that depends on how many people want to do that. I can only participate every other week and usually not until the latter half.
@HyperNeutrino I could run them an hour later.
If everyone else is fine with that that would be great :D idk if it will work next year though because that is right after school for me which happens to be, suitably enough, during CS club, but next year I'm partially running that so idk if it will work. hopefully will
13:02
@HyperNeutrino In any case, I'll be happy to assist. Maybe start reading the lesson transcripts?
Sure, I'll start by doing that, thanks!
@Anush In APL.
nice!
@HyperNeutrino Do you have an example?
@AdmBorkBork 7, 5 -> [0, 1, 2, 3, 4, 5, 4, 3, 2, 1, 0, -1, -2, -3, -4, -5, -4, -3, -2, -1][7] => 4
13:08
@Anush The notes have a bunch of algorithms.
Jelly, 9 bytes: ⁴NrŒḄṙ³ị$
thanks, that's cool
@HyperNeutrino PowerShell, 52 bytes, 0-indexed -- param($x,$y)(0..$y+--$y..-$y+-(++$y)..-1)[$x%(2*$y)] Try it online!
Wait, typo ... should be 4*$y for the modulo
13:12
oof
@HyperNeutrino Jelly, 3 bytes (0-based x): æ%A
oh
so I was meant to use that atom
nah, you weren't, I wonder why it was even made...
@EriktheOutgolfer Obviously, to map x in the interval (−y, y].
13:19
but that's not what it does
Are you saying that Jelly's documentation isn't fully fleshed out?
it's actually summetric modulo, it takes two arguments and returns one value, not some sort of rage
and I don't know if Jelly's documentation is that accurate, even though I add stuff regularly
The example there, 100Ræ%4 returns a range(s).
R makes the range there
Wonder why it doesn't for your CMC example.
13:23
because you are mapping 100 values
Oh, durr, completely missed the R
nvm
100R is the left argument which is 100 values
@EriktheOutgolfer E.g. The sign of the alternating sum of the reversed products is ×(-/(⌽+)) which you could then write as (× ⋄ -/ ⋄ ⌽+) or:
(×
 -/
 ⌽
 +)
Which also means that trains could be commented.
@Adám wouldn't that more resemble (×)(-/)(⌽)(+)?
@EriktheOutgolfer Ah, yes, I just realised that as I wrote it. Hm, as I said, WIP.
13:35
(×
 (-/
  (⌽
   +)))
Oh goody, meaningful indentation. Because that never gets confusing.
it's not meaningful
the parentheses make the meaning
@EriktheOutgolfer Right, right, now I remember. Exactly because it makes no difference to parenthesise the "cars" in a train, you could put each car on a separate line:
avg←+⌿÷1⌈≢ or:
avg←(
  +⌿
  ÷
  1⌈≢
)
Notice how nice division looks! You could almost think it was a 2D language.
avg←(
    +⌿
÷⍝ ----
   1⌈≢
)
@Adám ^
____←÷
avg←(
   +⌿
  ____
  1⌈≢
)
13:40
finally
no, we don't even know if it's yet, so the reason to close it is different
It's not a duplicate
the problem here is that it doesn't have an objective winning criterion, which is important for questions too
13:55
3
Q: quine program in C using only macros

kickstartAsked on Stack Overflow, but they suggested to move it here A while ago I was reading about quines. It made me wonder if it possible to write a macro in C which will print itself, without writing any function such as main. every piece of code should be only in macro. After a few attempts, I coul...

@AdmBorkBork It's not? A quine written in CPP (if at all possible) could be posted as an answer to the quine challenge.
16 mins ago, by Erik the Outgolfer
no, we don't even know if it's yet, so the reason to close it is different
Why is a winning criterion necessary for a question? That doesn't even make sense.
because we're not code review
at last someone on my side :) (for my closed question)
13:59
@AdmBorkBork Then what is [tips]?
The definition of [tips] is "to get tips to optimize the program for some criteria"

« first day (2665 days earlier)      last day (2473 days later) »