« first day (2633 days earlier)      last day (2432 days later) » 

00:37
0
Q: Create a compiler

User that is not a userThis is different from this question because this question is strictly for non-golfing languages. In a language where a compiler exists, create a compiler for a Turing-complete language (or create said language and a compiler for it.) However, this language can't be a golfing language (e.g. Jelly...

00:58
@NewMainPosts :| disallowing golflangs
01:18
1
Q: Escape from the tarpit (Cops)

NathanielThis is a cops-and-robbers challenge based around defining languages and proving they are Turing complete. This is the cops' thread. The robbers' thread is here. Cops As a cop, you will prepare two things: A formal specification of a programming language, or other computational system. (Com...

0
Q: Escape from the tarpit (Robbers)

NathanielThis is a cops-and-robbers challenge based around defining languages and proving they are Turing complete. This is the robbers' thread. The cops' thread is here. Robbers The cops will post definitions of Turing-complete languages. Your task is to crack them by proving that they are indeed Turi...

 
4 hours later…
05:28
in PPCG v2, 8 hours ago, by Mego
Alright we really need a name now. First suggestion that doesn't suck wins.
06:15
0
Q: Generate Men of Culture

chesnutcaseThis challenge is inspired by the meme Men of Culture. The meme involves blanking out parts of the original caption, "Ah, I see you're a Man of Culture as well", to make it appear as if the character is saying something else. Your challenge is to write a program that, given an input, show how t...

06:33
0
Q: Render a monospaced bitmap font from image

Piotr GrochowskiInput is in this format: image fontwidth fontheight rowwidth xoffset yoffset xgap ygap non-existent charstart thetextitself thetextitself: The text that should be rendered from the image. image: The image filename. Implementation may vary; it could be either the filename from your computer, a...

 
2 hours later…
08:06
@orlp yeah, 5 != 120
 
1 hour later…
09:09
J: How can I implement this?
I hate auto capitalization of I and I have no idea why it exists at all
std::vector<int>a(10);
for(int j=0;j<7;++j)a[j+3]+=a[j];
@Adám Why don't smart double quotes have a shortcut? (language bar/Jelly)
@user202729 a+_10{._3}.a?
what is the expected output for a=.i.10 ?
@Cowsquack tio.run/…
Does SE chat have auto capitalization of i?
09:25
@user202729 no... why would have auto anything
@user202729 because "I" is always supposed to be capitalized...
I don't know, but I can't type lowercase I in SE chat, but I can on TIO.
@ASCII-only Even in code. No.
@user202729 of course not...
@user202729 because TIO specifically disables autocorrect...
@user202729 ???
@ASCII-only Interesting. Guess that's Edge's behavior.
Re
@Mego If there are problems with close-reopen votes, I think it is signal of unclear site policies, not a too low privilege level. If one gets 100 average reputation per day, it takes a month to get the required 3000 reputation for casting close and reopen votes (at SO) and that includes very active participation. If learning site policies takes that long, they are just too complicated and unclear. — fergusq 3 hours ago
1 Higher rep users sometimes get in disagreement as well. 2 I feel that most of the rules are nowhere documented, and is very hard to document.
So...
Experiment: We try to write very clear rules regarding when to vote to close/reopen. If that does not succeed then raise the privilege levels.
@flawr surely you mean 5!=120
Jelly: Is there a way to return a truthy/falsy value according to whether a char is equal to a space, with a single link, in less than 3 bytes?
09:41
You mean, check if value == space?
10:41
@user202729 I think they were not on the list when I built from it last time.
11:31
2 hours ago, by user202729
J: How can I implement this?
2 hours ago, by user202729
std::vector<int>a(10);
for(int j=0;j<7;++j)a[j+3]+=a[j];
@user202729 I don't know about J, but I can write it in APL if I can understand that to me unknown language.
@Adám ... you don't know C++?
@user202729 So it makes a into a length-10 all-zero vector, and then populates it.
@user202729 No, I don't.
a = [0] * 10
for j in range(7): a[j+3] += a[j]
@user202729 But if a starts off being all-zero, how can adding elements to each other ever give anything but zeros?
11:37
Ok then...
a = [0] * 10
for j in range(10): a[j] = int(input())
for j in range(7): a[j+3] += a[j]
@user202729 Ah, ok, a starts out populated. {a[⍵+3]+←a[⍵]}⍳7 then.
@Adám don't you need ¨ before ?
@dzaima Yes, you do, typo. Otherwise all the assignments will be done simultaneously instead of sequentially.
@user202729 Sorry, as dzaima said: {a[⍵+3]+←a[⍵]}¨⍳7
1
Q: Generate lowest degree polynomial from sequence

Joris GuexIntroduction A sequence of numbers is passed in as the input. The program has to generate the lowest degree polynomial possible. This was my first programming project in college and it would be interesting to see how much smaller the solution could have been. Challenge The input is a list of i...

@Adám O_o simultaneously
12:05
@ASCII-only Technically not "simultaneously" (unless on a parallel computer perhaps), it's more like a, b = b, a in Python.
39 mins ago, by user202729
2 hours ago, by user202729
J: How can I implement this?
Please?
@user202729 hasn't adam already answered
@ASCII-only That's for APL. I don't think there is a "sequential" adverb in J.
oops nvm >_>
I keep using = for =:
12:28
@user202729 ¨ is just map
I believe it is equivalent to each in J
(3 :'a=:(+/a{~b,y)(b=.3+y)}a')each i.7[a=.i.10 should do something similar
12:50
@EriktheOutgolfer J has "0 but...
What is the ?
@user202729 assignment
like, ¨ maps with a single argument and vectorizes with two arguments (minor cells), but if they have different lengths it errors
... The each actually maps through each leaf?
@Cowsquack :| this looks super verbose
Idk a shorter way to change a single element in an array in J :/
12:54
@user202729 when it comes to ranks, yes
13:10
@Cowsquack I think you can use }. If I understand right, it is like APL's @.
Re code.jsoftware.com/wiki/Vocabulary/… : I don't understand. Why are parentheses important?
(BTW how to get permalink to a section?)
...you just did?
@EriktheOutgolfer Inspect element and copy item id? ...
yeah MediaWiki doesn't actually make it easy
@user202729 To separate the left argument from the operand (? or whatever the "argument" of an adverb is called in J lingo).
14:15
1
Q: Circle intersection area

Muhammad SalmanDescription : Give the intersecting area of two congruent circles rounded down to nearest integer. Inputs : You will be given the following inputs : array 1 = x and y positions of circle a array 2 = x and y positions of circle b radius = radii of the two congruent circles Note : For langua...

0
A: Sandbox for Proposed Challenges

Erik the OutgolferOrdering the integer arrays code-golf integer array-manipulation So, we have managed to print all integers. Yay! The next step is to extend this to the set of integer arrays. An integer array is an ordered array that only consists of integers. As in the linked challenge, integers can be negative...

 
1 hour later…
15:44
-1
Q: What is the most number of times we pass through a node

Vedant ShettyIf I have a graph with just 1 unique path between nodes. There also exists a path between any 2 nodes. You are also given n Sources and destinations. What's the most efficient way for finding the node that is travelled through the most?

@user202729 I really think you should stop telling people "we are not a question and answer site". First of all it does not answer any of their questions, i.e. "Why is my challenge being downvoted? Why is it not valid? What can I change to make it valid?". Second much of the language of the site uses the word "question", so your statement seems quite contradictory.
@musicman523 I added more clarification.
Just saw. Thanks!
16:07
@NewMainPosts Finally there is someone who cares to improve their question!
Jelly: How can I compare two lists (lexicographically)?
... I feel bad that after such a long time programming in Jelly I don't know how to do such a simple thing ^.
Pair, then check sortedness?
@user202729 ?
1
Q: Seats in a Finnish cinema

ngnYou're given the map of a cinema theatre as a boolean matrix: 0 represents a free seat, 1 - occupied. Each Finn who walks in chooses the seat farthest away (Euclidean distance) from the nearest occupied one, or if several such exist - the first among them in row-major order. Output a matrix showi...

16:44
Not bad. (although unintuitive)
@user202729 Well, it is APL's which is called Grade Up.
 
2 hours later…
18:43
Ugh... PyCharm 2018's Markdown codeblock syntax highlighting is soo broken.... Backspace can't remove white-space, backticks disappear after a second... And opening new files will just load them for infinity. Happened to me when I used ```yaml at beginning of codeblock. Is anyone else having the same problems?
Anouncment: In case anyone cares, PPCGv2 has a name now and is called Axtell, named after Mount Axtell in Antarctica.
3
And it doesn't auto-escape HTML tags in code blocks. Yeah, amazing...
18:58
@Soaku There are several markdown plugins you can try that might be better
@Pavel Why?
@Adám Because penguins I guess
@Pavel Except the official, I see only one. No time to check it rn anyway
Mm, I remember IDEA had a few. Maybe they don't all support PyCharm
19:24
hi all
0
Q: Pristine and Unique Code Bowling

Aidan F. PierceYour challenge is simple: write as long of a pristine program as possible in the language of your choice using only unique bytes. (A pristine program, as explained in the linked question, is one that runs without errors, but which has an error if you remove any contiguous string of characters.) ...

19:42
hi Lembik
I am being stupid but how do I actually get odd_parts to give me an answer in codegolf.stackexchange.com/a/162275/9206 ?
If you just print it you get <generator object odd_parts at 0x00007fbdfffa6408>
20:03
print(*C(num_white, num_black))?
hi @orlp
@Dennis thanks..
Can you overload the splat operator in Python?
Probably uses __iter__.
20:12
yo since when has wikipedia had mouseover text for linked articles
@Riker Wikiwand has had that for forever
not wikipedia tho
9/10 very cool
Right, but you should be using wikiwand because it's awesomer
They have a chrome extension to redirect wikipedia to wikiwand, which is nice
@Dennis Thanks
@Lembik hi
Anonymous
20:25
@Pavel Always because penguins. Also Axtell is a cool name. Also also Axtell was the first name suggested that didn't suck :P
I like it a lot too
@orlp I thought your code gave 30 for 9 white balls (the odd_parts code) but I think I am wrong and just don't understand yield :)
@orlp do you understand the complexity of your code when using lru_cache?
as in the computational complexity
:4402212 Because if you did where many goats live (Bangladesh), that just doesn't have the same ring to it
@Lembik eh it's a bit tricky
@Downgoat Goats kinda live everywhere though
You pick a random place and there's a pretty high chance there will be goats there
Anonymous
20:31
If goats lived in Antarctica, Mount Axtell could have Precipice Penguins and Cold Goats
3
@orlp yes :)
CMC: Find a part of the world where you could see both Penguins and Goats
@Pavel except antarctica :|
@Pavel this chat room
Anonymous
@Pavel Chile
20:36
@Mego Now trying to find photos of goats and penguins together
do goats eat penguins?
No
do penguins eat goats?
Goats are herbivores, and Penguins can't eat anything that large
@Pavel Even better, here's an actual goat named Penguin: edgarsmission.org.au/30980/penguin
Neato
Anonymous
@orlp Penguins are pescivores - they only eat fish
Not a photo though
@mınxomaτ wow a penguingoat
21:35
@Pavel Most zoos.
21:54
if I have a fucntion that gives me x/a.y x/b.y x/c.y what's the best way to transform that into f/a.g f/b.g f/c.g
echo vsl/*.m | xargs -n1 -I{} bash -c 'echo artifacts/$(basename {} .m).bc' feels too long
22:22
4
Q: Escape from the tarpit (Cops)

NathanielThis is a cops-and-robbers challenge based around defining languages and proving they are Turing complete. This is the cops' thread. The robbers' thread is here. Cops As a cop, you will prepare two things: A formal specification of a programming language, or other computational system. (Com...

VTC
literally a pop-con with no way of determining what answers are better :|
there isn't a end goal of like what an ideal answer should be
22:58
How have I never heard of symengine before? A symbolic type and decent speed are all I ever wanted...
$ cat bench.py
from sys import argv
if argv[1] == 'gmpy2': from gmpy2 import mpq as T
if argv[1] == 'symengine': from symengine import S as T
if argv[1] == 'sympy': from sympy import S as T
one = T(1)
sum(one / n for n in range(1, 10001))
$ time python3 bench.py gmpy2

real    0m0.069s
user    0m0.063s
sys     0m0.006s
$ time python3 bench.py symengine

real    0m0.164s
user    0m0.154s
sys     0m0.010s
$ time python3 bench.py sympy

real    0m2.549s
user    0m2.513s
sys     0m0.037s
@Dennis because murphy
23:14
@Dennis video "investigated JavaScript"
since when was JS fast
@Dennis i wonder if they have symbolic functions
So far, it had everything I've searched for (not much), although sometimes in usual places.
also: TIL sympy has N
why was i spending all my time implementing arbitrary precision arithmetic in python (and failing to do so) lol
just import mathics
@Pavel isn't it slow
Mathics takes longer to start up than symengine does to do all the computations.
23:22
@Dennis what does symengine output btw
If I wanted to use something slow, I wouldn't be searching for SymPy alternatives.
@ASCII-only Mathics is abysmally slow
That wasn't a serious suggestion :P
@ASCII-only For that? A fraction.
@Dennis but isn't SymEngine basically a drop-in replacement for SymPy's symbolic manipulation
@ASCII-only Drop-in? Not sure. Try it online!
23:38
@Dennis So what you care about is mainly the import time?
No, computing the sum takes 15x longer with SymPy.
Are you sure? Try the timing script with the last line deleted.
SymPy imports in less than 0.4 seconds.
Ah ok, on my machine it has the issue of taking 10 seconds to be imported.
Is it pre-compiled? Are you using python -O?
23:42
It might be storred zipped or something...
yeah, it's in a bz2 archive
> sympy's symbolic manipulation
That's a compatibility layer
yeah >_> only realized after i looked in the source
It's not drop-in if you have to change how you're doing things. You can't just import symengine as sympy and be done with it.
I have yet to find polynomials. :/
yeah i thought they might have written hacks to add the rest of sympy to symengine, or replace sympy's types when symengine was imported. turns out it was nothing that magical though

« first day (2633 days earlier)      last day (2432 days later) »