« first day (1565 days earlier)      last day (3295 days later) » 
01:00 - 19:0019:00 - 00:00

1:00 AM
@PhiNotPi Nothing wrong with that.
 
Like, I literally wrote this today: soundcloud.com/phinotpi/serene
Still WIP, but it's more music than the average person wrote today.
 
The average person writes 4'33", every day :)
4
 
Just when I was hoping someone would make a John Cage reference.
@PhiNotPi Not sure what it is about it (maybe pentatonics?) but it sounds vaguely Japanese to me. I really like it, nice work!
 
Here's a death metal cover of 4'33: youtube.com/watch?v=hUzI3Ui1Eok
 
1:18 AM
He nailed it.
 
I also expanded one of the other pieces I was working on. soundcloud.com/phinotpi/cave1b
 
That's fantastic!
 
thanks!
 
You've got some serious talent there.
 
1:40 AM
well, I keep working on it
 
 
4 hours later…
5:12 AM
Just a random question that came into my mind: what's the shortest CJam quine not involving leaving code blocks on stack? AFAIK the {"_~"}_~ one relies on printing the code block as is, followed by the string.
 
There's the example one in the online interpreter - basically the same thing, but it isn't a block
 
Right. Does there also exist one that does not use eval?
 
There might be one of the form <number> <number>b:c if you can be bothered checking if a solution exists
 
So that'd basically base-convert a number to itself?
Sorry, I'm not very experienced in CJam although I'd like to try more sometime
 
5:33 AM
Hmm too bad CJam doesn't have a raw string format or copying the Ruby/Python quine might have been possible
 
6:17 AM
@Sp3000 I don't think so I wrote 4'33" yesterday at all
or day before
 
I don't think we'd quite consider you average though, @Optimizer ;)
 
@Sp3000 do you know how the new e% works?
 
I think I do, but I couldn't find an option like %r in Python which would put quotes around strings
 
when I try to use it I get "Format string requires '%'."
 
What are you trying?
 
6:30 AM
was trying %s and %p and %%... apparently none of those exist... %d works
 
If you're formatting a single string like "String: %s" "abcd" e% that won't work because strings are arrays of chars, so you need "String: %s" ["abcd"] e%
 
anyway, here is an 8 byte no-eval quine: "_`o"_`o
@Pietu1998 ^
oh, apparently I've got exactly 500 answers now
 
Nice :) How many from answer chaining/CnR? :P
 
I don't think many are from answer chaining
CnR though...
48 from CnR
 
:P
Well I was thinking OEIS, which has kind of died down...
There's a lot of interesting sequences I'd like to do, but unfortunately there's too much noise as well
 
6:38 AM
@Sp3000 I still mean to complete that Fission program, but I don't think I'll post it to EOEIS. I think the sequence I picked would still be an interesting golf in itself, so I'll probably post it as an answer there when I get around to writing that challenge. (it wouldn't have been very deep in the tree anyway)
 
6:53 AM
@Sp3000 @Pietu1998 7 bytes:
"_p"
_p
 
Hmm that one looks familiar - did you post that before some time ago?
 
yeah I think I was
 
Glad to know Martin is consistent in thought patterns, even after 2 months
 
:D
in fact, I did think of the \ version first, but discarded it in favour of o right away this time :D
 
 
4 hours later…
10:59 AM
anyone up for 2 byte golfing for the bean machine ?
 
I'm up... But I have to do something else for the next half-hour... :(
 
hi all
 
nvm, just did it
 
:( my tic-tac-toe thing is downvoted
 
I guess, its time for "Take that Pyth!" ?
 
11:10 AM
anyway, i expect you are all writing bots for aBOTcalypse? :D :D :D
 
12:00 PM
@randomra wow, that looks so like CJam
 
@Optimizer to me it looks like J or random signs :)
it does miss some J signature chars like .:@
 
@randomra Atleast it runs perfectly fine in CJam
given that CJam is not exception safe, that's something!
 
If you have ( or ) in your code try replacing by their hex values %28 and %29
 
@Sp3000 somehow it still worked
 
Usually I just replace anyway :/
 
12:05 PM
fear of the brackets
 
wow, what does it do? it seems nontrivial
 
lets see
 
Gibberish XD
 
yeah
 
I mean, :)~ who does that
 
12:10 PM
doesn't this make sense? q~]:)~ or is there a shorter variant?
 
Well it does things, just not something that'll come up a lot
btw speaking of CJam, cjam-docs.readthedocs has become cjam.readthedocs.org
 
sorry that my J code isn't an often used CJam code, will try harder next time :)
also, long-face is not implemented... RuntimeException: Long :) not implemented
 
:X works only on arrays
but nice idea to do an implicit , in there!
 
5 chars shorter than Jakube's pyth, that can't be right
 
Different languages excel at different questions :P
 
12:17 PM
If you have beaten Jakube, only Dennis can beat you now
 
@Sp3000 I don't think J has any advantage here and my code seems cumbersome, I'm sure Jakube's code will be halved eventually :)
 
I'm kinda surprised the solutions are this long anyway, I've had the idea for my question for a while and to this point I've thought it'd be like 15 in some of the Great Golf Languages™
Not that I'd have a shorter one for now
 
@Pietu1998 I think too it should be around 15 chars based on my solution
 
12:47 PM
salut :)
why did the op unlink all this post from my definitions ? codegolf.stackexchange.com/questions/50022/…
like sudoko-friendly , and pseudo-solvable , ...
 
I'm not sure what you are asking
 
Probably because it reads better this way (IMO). The links went to Puzzling posts, not succinct definitions. Having the definitions clearly stated inline is less burden on the reader.
 
1:04 PM
I think they probably removed it because the definitions weren't really necessary for defining the challenge. Also in English "sudoku" is normally used over "sudoko" or "sudokoo", just as another note
 
who was the guy who knew enough TI-BASIC to double check Timtech's answers?
 
Runer IIRC
 
ah yeah you're right
@Runer112 would you mind having a look whether this looks legit? (I don't see anything fishy, but I've grown a bit wary :D)
 
Weary, wary, or both? ;)
 
:/
(thanks)
 
1:30 PM
sure
 
Hello all
 
looks like line 4 has a slight error
 
A wild Zgarb appeared.
 
it should have 1+ before the second arg, like line 6
because indices in TI-BASIC are 1-indexed
 
I'm gone for two weeks and questions/day jumps from 4 to 5.8 o_O
 
1:34 PM
strange that he got it right for one but not the other
 
@Zgarb which is surprising, seeing your question volume ;)
 
0
A: Sandbox for Proposed Challenges

randomraConnecting Gaps with Tetris Pieces code-golf tetris You should write a program or function which given a list of tetris blocks as input outputs or returns the biggest gap between two points in the same height level which the pieces can connect. The 7 types of tetris pieces are the following: ...

will post if no comments
@Zgarb what timeframe is that calculated on?
I have posted like 10 questions in the last two weeks :)
 
I think random got tired of CH getting all the question glory :P
 
@randomra Exactly 2 weeks, it seems
 
"and sleeps a bit between each line of output you get a -10 bonus." <-- :/
 
1:38 PM
I'll just post a quick golf and get back to work, things are crazy right now
 
@Zgarb definitely prioritise posting that challenge then.
 
@MartinBüttner Posting a challenge counts as a coffee break :P
 
did the answer ratio went down by the question volume increase?
 
Not noticeably, it's still > 9:1
 
its so nice that even though most of Zgarb's challenges involve graphs and grids and structures and what not, but the input is simply an array of instructions :D
 
2:22 PM
I have the feeling that this is not the intended answer. But screw that, it's a bear.
 
it won't
why?
 
ugh, how do i translate a list comprehension to pyth
 
asdkjhksad@#$asd!@sad
not the shortest way.
 
hm, there must be a better way to turn an array into a list of its non-zero indices
 
@Geobits How to have a spoiler. I know the answer.
 
2:35 PM
>! spoiled text
 
i might know the answer as well
 
I gave the answer. If you don't want a bear to be shot, don't surprise a hunter by placing one in his hut :P
 
I think the hut is pretty big. If you can leave it, walk 1 kilometre North, then 1 mile South, and still be in the hut.
 
@trichoplax nah it determines where the hut is
 
I'm guessing over a third of a mile North to South
@sirpercival It would if it was 1 mile North then 1 mile South
 
2:41 PM
...no?
 
But a kilometre is less than two thirds of a mile
 
My internet stops right after I post the answer.
 
ha i missed that
 
@Geobits Does my answer make sense?
 
2:53 PM
I thought about something similar, but using a slightly different definition of "bear" (see urban dictionary).
 
Gross
 
It is impossible to increase your latitude by 1 km, and later reduce it by 1 mile, and end up at the same place.
 
@Geobits I have two friends that attend the Texas Bear Round Up each year
 
@MartinBüttner better than ,,:) ?
 
@Rainbolt Google images gives very interesting results for that.
 
3:05 PM
what about ,{)}/ ?
 
@Geobits I don't even want to know
 
I didn't scroll through much, but what I saw was generally SFW, for what that's worth.
 
@Geobits maybe he has content filter off ?
 
Nah, I always have the content filter off, so that shouldn't make much difference.
 
@Optimizer I don't think we're talking about the same thing
[0 0 -2 0 1 123] --> [2 4 5]
 
3:09 PM
oh, that thing you are doing there at the end
little better:
:z:g_,,.*0-
but pretty sure that you need to change your algorithm to be anywhere near 20 bytes
even better:
_,,.e&0-
@MartinBüttner ^
 
how does the CJam , filter work? does it expect a function somehow? or two arguments?
 
ee{~{;}|}% awww {;} is too long :(
 
(I'm starting to confuse ><> and CJam operators... :/)
 
@Sp3000 mine is better ;)
 
@randomra Here's an example for getting all numbers which are equal to 3 mod 5: [0 5 2 2 5 7 13 3 8] {5%3=}, p
@Optimizer I never said mine was short :P
 
3:21 PM
@Sp3000 Wow, a somewhat comprehensible CJam snippet
 
so blocks {} are pushed to stack as functions? without executing them
 
Martin is already working on a different algorithm..
ticket #64 is becoming interesting
 
Basically, although it differs slightly from eval in that it still need to be syntactically valid
 
and how cjam generally decides how many arguments an operator takes? based on the typeof the topmost stack element?
eg if its block, , is filter, not length/range
 
its decided by aditsu
 
3:25 PM
@Optimizer that's not helpful
 
I know right!
how can we let him decide everything
anyways, there is very little documentation of everything cjam. but the sourcefourge page should be a good start
 
I'm working on it :P Maybe I should do the operators instead of the tutorial first
 
@Sp3000 yes
 
As for number of arguments, I think they're the same for any single operator - its functionality just changes depending on the types
 
no operator has overloading in terms of number of operands
(except maybe ] and similar ones)
 
3:29 PM
I see, so the type of the first argument(s) decide the operator AND it's arity
 
the operator decides that
not the arguments
just special case blocks
{}X
 
but [1 2]{0=}, filters [1 2], gives length
so {} bonds to the operator?
 
34 secs ago, by Optimizer
just special case blocks
@randomra if it has one , yes
are you learning cjam to write a better J code that is more often used in CJam ?
 
@Optimizer but with your model this shouldn't work [0 1 5 0 6]{0>}0;, yet it gives 1 5 6
 
Guess I was wrong then :P
 
3:33 PM
@randomra everything is decided at runtime
(except f , : and . which are wired in at the time of syntax check)
 
Number of operands might be determined by types of topmost elements in that case
 
whee sandbox ideas
 
I still would say that treat block as special case. Would ease the understanding overall
 
@Sp3000 based on what Optimizer said the only deciding of arity is by the fact taht if topmost element is a block
 
yes, arity changes only for block (as far as I know)
I have no idea how I end up doing such typos
 
3:37 PM
0
A: Sandbox for Proposed Challenges

sirpercivalScralphabet A normal bag of Scrabble tiles contains the following letters (? is a blank tile, which can stand for any other letter): AAAAAAAAABBCCDDDDEEEEEEEEEEEEFFGGGHHIIIIIIIIIJKLLLLMMNNNNNNOOOOOOOOPPQRRRRRRSSSSTTTTTTUUUUVVWWXYYZ?? The letters have the following value: {"A": 1,"B": 3,"C": ...

 
it could be weirder like: arity is 1 if the second topmost element isn't an array :P
 
@sirpercival Oh god SESQUIOXIDIZING
You might want to provide a dictionary though
 
@Sp3000 just finished editing to add that in, actually
 
Awesome
 
do you like this challenge?
 
3:44 PM
I like it, but you really should define/provide a single dictionary.
 
Single dictionary would be better, IMO too
 
ok i'll fix
done
 
As for like... I wouldn't be surprised if someone hits optimal quickly with a good heuristic, but I dunno
 
not short but did it _,,]z{~;g},{~\;}%
 
btw any special rules for blanks left over or do they deduct 0?
 
3:47 PM
they deduct 0
well, no
 
@randomra did what?
 
they contribute nothing to the letter values of the anti-word, but they increase its length
 
the nonzero positions
 
:D
 
time to download cjam so I dont have to use the mouse :)
the shell just quits on error? :O
 
3:52 PM
you saying something about mouse ..
also, on website, Ctrl Enter from anywhere runs
 
@aditsu ArrayList ArrayList e* not implemented :(
 
repeat corresponding times ?
 
@Optimizer ah that's neat, thanks
@Optimizer yes. so, like \:a.*, basically
actually
your code doesn't work
because I can't get the 0 index with that
 
:D
too bad
use Sp3000's
or do :)0-:( :D
 
should answers be deleted from the sandbox once they've been posted?
 
4:00 PM
@sirpercival Generally yes.
 
okie doke
 
@Optimizer it's the same length as what I've got
 
1 byte shorter
 
was there a shorter version after ee{~{;}|}%?
 
I meant, mine is 1 byte shorter than what you have currently
(the one which does not work is 5 bytes shorter. if you do the :) :(, then its 1 byte shorter)
 
4:05 PM
oh okay, I was referring to Sp3000's
@Optimizer I think it's only 3 bytes shorter to begin with
 
@MartinBüttner how so ?
 
_,,.e&0- vs ee{1=},0f=?
 
ohhh
I was adding the {}% too :D
 
right...
oh I can use Sp3000's though to get rid of the {}% and save one byte
 
Mine is the same length, but I was wondering if you could save by starting with :ee
lol nvm
 
4:09 PM
yeah that
and then {..}f%
 
@Geobits, @Sp3000 should i post the scralphabet thing or should i give it a couple days for comments
 
If you're sandboxing at all, I'd suggest a one day minimum
 
alrighty then
 
To give other timezones at least a chance, even for the most impatient
@MartinBüttner _,,{;(},
Oh wait, empty array left
Stick a +? Same length then though :(
 
{_,{;(},+}%
 
4:22 PM
Oh right, implicit range
 
thanks :)
 
given a set of items N, and each pair of items in the set has a weight M, order the set such that the sum of each adjacent items' weight is as large as possible
 
it's still horribly long though
CJam needs an operator for this
@aditsu ^
 
is there an algorithm for the above?
 
@MartinBüttner veryyy specific use case
 
4:24 PM
You can generalise to two arrays, one values and the other truthy/falsy
 
is that to me, Sp3000?
if so, what does true/false mean?
 
That was at Optimizer/Martin :)
 
ok :P
 
@Nathan For the sum, wouldn't it just be 2*sum(m) - m[0] - m[n-1]? Each item is being added twice except the first and last.
 
@NathanMerrill You are trying to find a maximal weight Hamiltonian path in a complete graph with weighted edges
That may be googlable
 
4:28 PM
If my last comment is correct, then just put the lightest items in first/last positions and the rest doesn't matter.
 
@Geobits no, that isn't right. Each pair's weight won't be summed. I need to order them such that the pairs are the greatest
@Zgarb that sounds right, thanks
 
@Geobits I think it's a matrix of pairwise weights
 
yep
In graph theory and theoretical computer science, the longest path problem is the problem of finding a simple path of maximum length in a given graph. A path is called simple if it does not have any repeated vertices; the length of a path may either be measured by its number of edges, or (in weighted graphs) by the sum of the weights of its edges. In contrast to the shortest path problem, which can be solved in polynomial time in graphs without negative-weight cycles, the longest path problem is NP-hard, meaning that it cannot be solved in polynomial time for arbitrary graphs unless P = NP. Stronger...
NP-hard :(
 
I'm not sure what you mean now by "each adjacent items' weight". If the set is [1,2,3,4], what are you looking for?
Oh wait, each -pair- of items has a weight.
Well nvm.
That'll teach me to not read.
 
Right, Hamiltonian path reduces to it pretty directly (given graph G, construct the weighted complete graph H with same vertex set and edge weight 1 if the edge is present in G, else 0; the maximal weight of a path in H is #G - 1 if and only if G has a Hamiltonian path).
 
4:35 PM
actually, this paper says that is possible because the graph is complete: mimuw.edu.pl/~rytter/MYPAPERS/fun2012_submission_10.pdf
haven't read it yet
 
@NathanMerrill Those are special kinds of weightings that are defined using trees.
"The vertices of KT are nodes of T and weight(i; j) is the distance between i; j in T."
 
bah, you're right
wait...what if I take the max edge M, and recalculate each edge N to be M-N?
and then search for the shortest path?
why is that any different than shortest path?
 
The shortest path will probably not contain every node
 
oh, is shortest hamiltonian path NP-hard?
 
0
A: Sandbox for Proposed Challenges

LucasQuaternion calculator Quaternions are extensions of the complex number system that are used in 3d graphics and some other applications. In addition to i, there is also j and k. j^2 and k^2 are both -1, however, ij=k, jk=i, ki=j, ji=-k, kj=-i, and ik=-j. Write a calculator that can calculate addi...

 
4:43 PM
Yes, because it's equivalent to heaviest path
By what you just said
 
yeah, and its NP-Complete
which means that longest path is NP-Complete as well
ok, well thanks!
 
4:58 PM
@trichoplax i'm now officially getting my ass kicked by the 4DTTT ai
and it's fast
 
Are you aiming to make it a question on PPCG? A golf, or maybe a KotH?
 
@trichoplax the ai? the game? nope, it's for an app i'm making
 
Ah OK
 
even a level 10 AI (read: 10-turn lookahead) takes <1s to generate a move
there's a noticeable pause, but it's not long enough to be annoying
its strategy is interesting and not what i would have expected, but it beats the crap out of me lol
 
Sounds like a very satisfying kind of defeat
 
5:05 PM
haha yep
 
5:17 PM
how do you do elementwise actions with arrays in cjam? e.g. differences like [0 1 5][1 0 3]]z{~-}% == [-1 1 2]
 
@randomra you install Pyth
come to the dark side
with have imperative programming
 
@Geobits, so what do you think about a Linken challenge?
Is CJam not imperative?
@randomra .-
 
Sounds fine, but I expect most answers to be a pretty straightforward graph search (depending on challenge type I guess).
I like the game though, and it has the kid's seal of approval too. He played the first 30ish levels while waiting for dinner last night.
 
@MartinBüttner thought it was stack-based mr. buettner
 
When does it get hard, though?
 
5:24 PM
@orlp so? It's still imperative, as opposed to declarative or functional.
 
@MartinBüttner is the dot documented somewhere?
 
@Geobits I'm in the fourth level set now. Three are quite a few levels I need over a minute for.
 
Okay, I figured they did, just curious. In the second set now and they're still pretty simple.
 
what game are you talking about?
 
@randomra it's a 0.6.5 feature, so only in Sp3000's unofficial docs
 
@Geobits oh I don't have an intelligent phone
 
whos that agawa ?
lol anyway
 
@MartinBüttner found it, thanks
 
i think ma sudoko was meant to be an accent but not phrasing problem
 
@orlp I'm learning Python, Pyth isn't that different to peak my interest :)
 
5:29 PM
@randomra Pyth is just the next step in the crack-cocaine world of Python :P
because most python golfs have a direct Pyth translation - which you can then further improve :P
 
I hope I can take away something more than reputation from golfing so I will focus on different languages.
 
all these new challenges make me wish i live twice of each moment right now
 
@randomra don't be silly
 
Saying there's more to this than reputation is bordering on blasphemy.
 
reputation is all that we need
 
5:32 PM
(no matter how true)
 
it feeds us, shelters us, completes us
 
And Python might be useful in other places too so I give myself a chance to learn it fairly correctly before I look at Pyth at all.
 
To quote the famous Descartes: "I have reputation, therefore I am".
 
who cares about digital reputation
 
HTML Framing seems to be disallowed on SourceForge so Sp3000 have to do the docs so we could use cjam like this:
 
5:38 PM
Give the code section hover-tips for operators, like a bloated IDE :D
 
and code-completion for 2-letter instructions :D
 
Hi, I'm Jammy! It looks like you're trying to bar the foo. Would you like some assistance?
 
6:00 PM
@randomra relevant (see bonus panel)
 
That comic peeked my interest in peaking at piques.
 
@Geobits I stab at thee with my paki pike, I poke and poke, until I puke. Pika! Pika!
 
@MartinBüttner where is the bonus panel? you mean the second one?
 
where it says "bonus panel"
(below the two other panels)
(you need to click it)
 
gray/grey :D on a bad monitor is almost white, I also searched for bonus but it was an image :D
I checked to be sure if it's peak or peek, and turns out it's piqued... blog.dictionary.com/pique-peak-peek
 
01:00 - 19:0019:00 - 00:00

« first day (1565 days earlier)      last day (3295 days later) »