« first day (2321 days earlier)      last day (2818 days later) » 

19:00
0
A: Sandbox for Proposed Challenges

caird coinheringaahingHow long is your program? As this site is all about making code as short as possible, you should write a program that tells you exactly how long the program is, in bytes, in your language's native encoding. There is just one catch. Adding a no-op to the code should change the output. Therefore,...

Speaking of sandbox, is this ready to post?
#include <stdio.h>

int main()
{
prinf("hello world");
}
Why the above code keeps showing up error ?
@LeakyNun Both return a shallow copy of a list argument and both require a to be iterable. If there are differences, I can't find them.
19:07
flag->spam/offensive
@Dennis thanks
@EriktheOutgolfer You are alive !
talking about shallow copy, your x uses shallow copy, which causes problems @Dennis
Done, @MDXF
@LeakyNun My x?
19:11
@Dennis Jelly
There are a lot of x's. You'll have to be more specific.
Anonymous
@LeakyNun 1) It really should be called "middle". 2) It wasn't meant to sort the elements. 3) Not everything that can be put in a list has a defined sort order, so sorting will fail on basically every heterogenous list.
yeah, there are XẊxẋ...
I'm talking about x
@Downgoat Meh, Wolfram Language europe stations → (data not available) and us stations only gives 241 names. My code gives 2271 stations.
19:13
But is more apparent in the code @Dennis :
	'ẋ': attrdict(
		arity = 2,
		rdepth = 0,
		call = lambda x, y: iterable(x) * int(y)
Anonymous
@LeakyNun List comprehensions are usually faster.
the iterable(x) is a shallow copy
Ia Amazon down for anyone else? I keep getting dog images
Anonymous
@HelkaHomba Nope
@LeakyNun It is not. And if it were, why would that be a problem?
Anonymous
Also isup.me/site is an easy way to check
@Dennis I mean, it's a shallow copy after you use * int(y)
because it causes problem when using mold
@HelkaHomba Same here
Anonymous
@LeakyNun usually != always
@Mego how can list comprehension be faster than a built-in method?
please change a so that the list comprehension is faster
19:16
@LeakyNun Instead of feeding me information piece by piece, could you simply tell me what the problem is?
Anonymous
@LeakyNun Depends on the type of a I think
@Dennis ok, a second
@Mego just give me an example
@Dennis here
@Mego I get 503 error for some things but not all
@Dennis compare this
Anonymous
@LeakyNun You're going to have to wait until I am not busy so I can find the SO post that detailed how comprehensions are faster in cases. Alternatively, you could look for it yourself.
19:21
> The list comprehension executes the loop in Python bytecode, just like a regular for loop.

The list() call iterates entirely in C code, which is far faster.
13
A: Python list() vs list comprehension building speed

Martijn PietersThe list comprehension executes the loop in Python bytecode, just like a regular for loop. The list() call iterates entirely in C code, which is far faster. The bytecode for the list comprehension looks like this: >>> import dis >>> dis.dis(compile("[x for x in xrange(1000000)]", '<stdin>', 'e...

@Mego
Anonymous
I guess I had it backwards
@LeakyNun Oh, so the problem is that it's not a deep copy. Not sure if I should fix that in the repeat or the mold atom.
@Dennis in the repeat atom, I would say
like, obviously mold isn't the only atom uncompatible with shallow copies
start, stop, step = (b+[None]*3)[:3]
what kind of code is this
Looks like Python.
I know
I mean, what on the world is this style of code, meaning that I don't like this style
19:28
Hey @Downgoat, remember how I complained about how I somehow had more Node JS modules than CPAN modules even though I never use Node and I use Perl every day, then I nuked my node_modules directory? Well six months later:
$ ls node_modules | wc -l
571
I don't even know how this happened, it's like an infection
That's twice as many from last time:
Feb 24 at 16:49, by quartata
$ ls -l node_modules/ | wc -l
267
I think it's because I installed Yeoman?
Solution: Don't use Node
I don't
It's probably the solution to all programming problems IMO
@quartata sounds likely
I just wanted Yeoman so I didn't need VS to make an empty ASP.NET project
19:30
0
Q: Trivial Brainf**k Substitution Interpreter

MD XFBrainf**k is the most famous esoteric programming language and is the inspiration for hundreds of other esoteric languages. In fact, there are quite a few languages that are so heavily based off of Brainf**k that the only difference is the characters used. Your challenge is to interpret one of th...

Why are you not using pug
?
$ pip list | wc -l
DEPRECATION: The default format will switch to columns in the future. You can use --format=(legacy|columns) (or define a format=(legacy|columns) in your pip.conf under the [list] section) to disable this warning.
100
$
@quartata why are you make app in .NET and not Node
@Downgoat Because I don't like Node?
who does
19:32
[x for x in itertools.islice(a,b,b+1)][0]
But... but... you can if you install babel
That's not the point at any rate
Can I just replace ^ with list(a)[b]?
@Downgoat Nah, Node as a web framework by itself is way too minimalist.
@totallyhuman idk 3M people?
@quartata opls it's more bloated than rails stack
19:34
Not really. The one time I tried it basically felt like working with sockets
@quartata see this is why project have 593 dependencies
Ono wat ur using createServer not express
Looks like the runner up in "most packages" is Ruby (which I also don't use that much):
$ gem list | wc -l
114
$ perldoc perllocal | grep "installed into" | wc -l
113
for CPAN
@Downgoat Express isn't part of Node, right?
It's a node.js library it's ubiquitous for all servers in node
Eh, whatever
There are so many differences I don't even know where to start
19:41
Cannot open output file [redacted]. permission denied - ld.exe; Why this is happening ?
@MDXF Nah, it's basically the same. Just need to replace the characters
#include <stdio.h>

main()
{
double c;

for (c=0; getchar() != EOF; ++c)
;
printf("%.0f",c);


}
Here.
@AlexKChen is the output file an exe
and is it running
@Mego you keep talking about "this"
I don't know which line you're referring to
@Poke I have no idea what you're talking about - I'm just saying while running that code; I'm getting that error message.
Oh OK now got it.
You have to kill it from task manager.
19:53
My guess is that it starts running when you run your program and you're either not waiting for the program to complete or terminating it in such a way that it leaves that file open. You can either continue to kill it from task manager or there should be a stop button of some sort in your ide that you can use
Can some experienced users take a look, I am perfectly fine with having made a mistake. I don't see reopen votes flooding in but MD XF seems quite certain I am wrong...
0
Q: Trivial Brainf**k Substitution Interpreter

MD XFBrainf**k is the most famous esoteric programming language and is the inspiration for hundreds of other esoteric languages. In fact, there are quite a few languages that are so heavily based off of Brainf**k that the only difference is the characters used. Your challenge is to interpret one of th...

@MDXF If I have, please do accept my apologies!
If it, in fact, is a dupe, accept mine for getting angry. I don't appreciate wasting my time but it was not your fault :P
@MDXF IMO substituting but not interpreting isn't a dupe, but the hardest part of the challenge currently is interpreting
@StephenS So I should change it to be "TrivialBrainf**kSubstitution Transpiler" or something along those lines?
@MDXF don't change it just because of me (and wait for more senior opinions), but if I was making the challenge, it would just be "Input the 8 replacements and the source, and output the BF code" (so yes)
20:00
Yeah that might be a better challenge regardless of duplicates
@JonathanAllan While I can see your reasoning for it not adding interest to the "Interpret Brainf**k" challenge, and I agree that I should modify my challenge, I stand firm that it is not a duplicate. Yes, the differences don't change much, but there are still enough differences that it isn't a dupe doesn't seem like a dupe to me. Either way I'll be fixing it.
0
A: Sandbox for Proposed Challenges

Stephen SDiagonal Alphabet code-golf kolmogorov-complexity Given no input, your task is to generate the following: a b c d e f g h i j k l m n o p q r...

Native unix programming in C# feels very similar to summoning multiple demons at once.
6
why was the "must be data and code in a quine" definition chosen?
i don't see the reason
@mınxomaτ And yet it was the language of choice for GNOME apps for quite a long time. It boggles the mind.
@totallyhuman because languages that print their own source make really boring quines? At least compared to languages with boilerplate and whatnot
@totallyhuman and it was chosen my community consensus, remember
20:12
May 8 at 13:12, by Leaky Nun
CMC (credits to Kritixi Lithos): Output this:
btw
print'this:'
@quartata I mean, it's actually pretty painless. I've ported a system that messes with netlink, namespaces, cgroups et al to C# and apart from having to use Syscall. before every ... syscall, it has been entirely painless.
@KritixiLithos I was unaware of that (deep in a chatroom I'm not in) - what happens next?
Much more productive than my first attempts at doing the same thing with Rust.
@StephenS it's just a CMC, don't fret, you can still post your challenge :)
20:21
No competition on JSON metro stations?
Anonymous
@LeakyNun Those are line comments. Look at the commit to see them with context.
20:47
Would it be too big a challenge to take a klc file and generate a keyboard map?
CMC: Given a string 's', find the length of the longest run of 'a's in s.
"Hello world" --> 0
"aaaa" --> 4
"abcdef" --> 1
"a aa a aaa a aaaa a aa" --> 4
CMC: Given a string s and a character a, find the longest run of as in s.
I kinda want to post mine now
Also, question: Are there any esoteric languages that use only 12 commands and don't get too large?
@MDXF That's almost exactly what I just said
commands like Brainf**k's <, or ., etc. Not commands like Bash commands.
@DJMcMayhem But a bit more complicated
e.g. "Hello world",'l' --> 2
"aaaa",'a' --> 4
But you posted essentially the exact same CMC seconds after me
20:50
@DJMcMayhem It was based on yours, yes
I saw yours and thought "oh that could be a good challenge for main with one simple modification" (IMO)
21:07
@DJMcMayhem The longest run in "hello world" is not 0.
The longest run of the letter 'a'
@DJMcMayhem APL, 10 bytes: ⌈/'a+'⎕S 1
@DJMcMayhem There are no a runs, so none have a length of 0.
Retina, 16 bytes. Try it online!
Probably very inefficient
15 bytes in V: Try it online!
Ugh. My second attempt is even worse, [18 bytes](Try it online!)
21:20
@JanDvorak How did you bork that formatting?
I'm guessing it's [18 bytes]([Try it online](link))
I tried to put a link markdown inside a link markdown as if the former was a URL
Oh nice
0
A: Sandbox for Proposed Challenges

rogaosMe, Me, Me! Your code is clearly superior to all other code. In fact , your code is so great that it prints itself when the opportunity arises (but not when any other, inferior code is around.) Task Write a program that takes a string as input. If the string is equal to your source code, then ...

 
1 hour later…
22:38
0
A: Sandbox for Proposed Challenges

flawrFence Matrix code-golf Given a positive integer n, output the 2n+1 x 2n+1 "fence"-matrix 0 1 0 1 ... 0 1 2 1 2 ... 1 0 1 0 1 ... 0 1 2 1 2 ... 1 ⋮ ⋮ ⋮ ⋮ ⋮ 0 1 0 1 ... 0 Examples n = 1 0 1 0 1 2 1 0 1 0 n = 2 0 1 0 1 0 1 2 1 2 1 0 1 ...

23:01
0
Q: Math matrix in 2D array

alexandros84I am coding for a few months now and I have just finished a project that brought me face to face with a couple of interesting challenges. One of them demanded the construction of a math matrix out of two given arrays, and its subsequent "transformation" in a 2D array. I came up with the followin...

23:15
0
A: Sandbox for Proposed Challenges

fireflame241Lazy Click and Drag code-golf internet image-processing Your task is to write a program or function that, given two nonzero integers x and y, returns a truthy value if the image at coordinates x east and y north of xkcd's click and drag comic is mostly white and a falsey value otherwise. Spe...

23:35
@DJMcMayhem cheddar: @.sort((>)).map(@.length).max
0
Q: Rooting for Trees With the Right Nodes

fireflame241Background A rooted tree is an acyclic graph such that there is exactly one path from one node, called the root, to each other node. A node v is called the parent of another node u if and only if the path from the root to u goes through v and there is an edge connecting u and v. If node v is the...

@DJMcMayhem 10 bytes: 'a+'XXc&n&

« first day (2321 days earlier)      last day (2818 days later) »