« first day (3275 days earlier)      last day (1553 days later) » 

12:39 AM
0
Q: I'm stepping down

a'_'You are given 4 positive integers: volume of the first container (v1), volume of the second container (v2), volume of the liquid in the first container (l1), and volume of the liquid in the second container (l2). Your task is to move (or "step down", if appropriate) some of the liquid from contai...

 
@Jono2906 I use fresh keyboard and code page in my jelly.
 
12:55 AM
@a'_' Of course, two of the tastiest ingredients.
 
1:19 AM
1
Q: Are the beams above or below the notes?

Purple PIn musical notation, groups of notes shorter than one beat are joined together by a line at the bottom called a beam. Here are a few bars of music with the beams highlighted: (Taken from Second Suite in F by Gustav Holst; you can hear how these notes sound at 0:13 in this video.) You may noti...

 
 
2 hours later…
3:01 AM
0
Q: Time complexity of combinations of n pairs of parentheses

okwapI have the following code snippet for combinations of n pairs of parentheses. def parens(n): if n <= 0: return [''] else: combinations = [] helper('', n, n, combinations) return combinations def helper(string, left, right, combinations): if left <= 0...

 
3:58 AM
Hey guys, where's the rollback button gone?
Because I can't find it
And I want to make a rollback
 
I just did a rollback for you. Maybe try a refresh?
 
@a'_' I had to look on MSE to find the solution
and it turns out I just had to click on "edited ... hours ago"
But I'm use to seeing an explicit "Rollback to revision" dropdown box on mobile when clicking "edit"
Ugh.
Everyone, just pretend that I never said anything
2
Also, it must be that I was used to seeing rollbacks before having 2k edit privileges.
Not that I don't like 2k edit privileges though.
 
 
8 hours later…
11:47 AM
hello all.. anyone in?
I am just trying to draw this picture. https://matheducators.stackexchange.com/a/17072/10432 What is wrong with
import matplotlib.pyplot as plt
import numpy as np
x = np.linspace(10**18, 10**19)
plt.plot(x, 3**(np.log(x)**5), 2)
plt.plot(x, np.sqrt(x))
plt.show() ?
it gives an overflow and doesn't draw one of the lines at all
 
12:16 PM
1
Q: Smallest number such that concatenation is a square

mabelChallenge Write a program or function that takes a number \$n\$ and returns the smallest \$k\$ such that concatenation \$n'k\$ is a square. This sequence is described by A071176 on the OEIS. I/O Examples input --> output 1 --> 6 (4^2) 35 --> 344 (188^2) 164 --> 836 (406^2) 284 --> 259...

 
12:36 PM
@Anush didn't check if that makes it plot anything, but I think you want 3*, not 3**
 
0
Q: Cutting Sequence for N dimensions

Hymns For DiscoInputs: The program or function should take 2 vector-like (e.g. a list of numbers) O and V of the same number of dimensions, and a number T (all floating-point numbers or similar) Constraints: T >= 0 All elements of Vector O will be in the range [0,1) Output: The program or function shoul...

 
@ChristianSievers I did thanks. That was a silly typo
 
1:14 PM
bounty added
 
 
1 hour later…
2:15 PM
Does anyone have advice on how to make recursive Husk programs type check (or fail to type check) in a more reasonable amount of time? Maybe there's some way to provide type annotations to reduce the size of the search space?
 
is there a compression tool that has arbitrary window size?
gzip and bzip2 have a relatively small maximum
 
2:44 PM
perhaps look into something with DEFLATE64 support.
It never really took off because it didn't bring enough improvement over DEFLATE in the usual case
 
0
A: Sandbox for Proposed Challenges

KeizerHarmElect the Doge of Venice! The Venetian election system was... complicated. The Great Council came together and put in an urn the ballots of all the councilors who were older than 30. The youngest councilor went to St Mark's Square and chose the first boy he met who drew from the urn a ballo...

 
@JohnDvorak interesting..let me see
"The basic workings of the procedure remain unchanged from traditional Deflate, but the addressable size of the dictionary has been expanded from 32kbytes to 64 kbytes"
I was hoping for my like 1GB
 
2:59 PM
Keep in mind that a rolling window of 1GB requires to you to keep 1GB of memory occupied at all times during decompression
 
@JohnDvorak right. In this case that is what I want
it's clearly not sensible in general
 
You could always roll your own
I've implemented a Deflate decoder myself, it's not hard
 
that might be the only way but there are so many compression tools I assumed one of them would have a flag for window size
@JohnDvorak it seems xz will do it!
with --block-size=size
I wonder if it's the only such tool... surely not
 
oh, neat
pops open the specification
 
3:14 PM
but it seems not to work :(
try making a file from /dev/random that is 10M in size
and then concatenate it to itself
oh maybe it does..let me see
oh I have no idea what is going on.. xz is behaving very oddly
try this:
dd if=/dev/urandom of=sample.bin bs=10M count=1
cp sample.bin sample2.bin; cat sample.bin >> sample2.bin
sample2.bin is now two copies of the same file so we should be able to compress it by 50%
 
@Anush zpaq successfully generated a 10.1mb file, took 36 seconds
 
ls -l sample*
-rw-rw-r-- 1 user user 20971520 Jan 17 15:21 sample2.bin
xz --block-size=20971520 sample2.bin
user@user-desktop:~$ ls -l sample*
-rw-rw-r-- 1 user user 20972624 Jan 17 15:21 sample2.bin.xz
what is going on?
@dzaima that's cool.. if slow!
if you repeat exactly the same experiment with 1M instead of 10M it does compress it
 
zpaq is probably overkill if you're just dealing with extremely repetitive text
 
xz looks like it should be perfect. It's very fast
if only I could work out what is going on
 
@Anush 2000000 -> 1026957, 3.8s
 
3:27 PM
@dzaima which tool?
 
@Anush apt install zpaq, nothing more fancy
 
ah ok.. let me try that
@dzaima what command line did you use?
 
@Anush zpaq c output input
 
thanks
10617240 Jan 17 15:33 sample2.bin.zpaq
 
(not saying at all this is the best thing to use, it's just that .*paq.* is the only non-ubiquitous compression thing i know :p)
 
3:35 PM
it's hard to guess the options!
how do you decompress?
oh..won't overwrite
so zpaq works in a sense
but it's nowhere near as good as xz is if you reduce the file size to 1M
well..2M as it's two copies itself
@dzaima it's 51 seconds for me. How dd you get 3.8s?
 
@Anush 3.8s was for the 2mb file input, i'm not doing anything special
 
got you..There is an "oc" option but seems to need a build that apt install doesn't give you
it is meant to be faster
but I am still hoping for gzip but with huge window size :)
 
3:52 PM
0
A: Sandbox for Proposed Challenges

famous1622Make a Decompiler Bomb Similar to the Make a Compiler Bomb challenge, but backwards. The goal is to create the smallest binary that creates the largest output when decompiled. Constraints A binary is either an x86 binary (in the form of an ELF file, PE file (.dll/.exe), or Mach-O binary) or ...

 
 
2 hours later…
6:04 PM
I wonder if there is somewhere I can ask this question
 
@ankh-morpork sufficiently complex husk programs tend to take a long time to typecheck. I think making all the arguments explicit, with lambdas and superscripts might help. Also I think parentheses can be better than compositions in some places
 
 
3 hours later…
8:58 PM
AI singing: soundcloud.com/sean-zhao-236492288/29-test (from arXiv:1704.03809)
 

« first day (3275 days earlier)      last day (1553 days later) »