« first day (2352 days earlier)      last day (2786 days later) » 

19:00
@trichoplax the problem you just mentioned to me is that if the compile time takes 10 hours they can make a lot of primes
and that they can cheat by doing some of the computation at compile time
I don't know if that would be enough time to make a significant proportion of the required primes, and even then lookup time gets longer too.
I don't think understand "As long as it's specified there's no "best" limit" sorry
@Phoenix does CMC stand for chat mega challenge?
@trichoplax true
ok .. so 30 second compile time limit ok?
@Lembik I mean that the important thing is to have a limit, not what particular number you choose for the limit
19:01
got you
ok added
I think we are nearly there :)
@Lembik Depends how long you want to wait if there are lots of compiled entries (which a fastest code may attract...). 30 seconds sounds fine for you. The only reason to go longer is if you're interested in seeing what tricks people can do in the preprocessor
thanks
I don't care for preprocessor tricks too much :)
seems hard to fit these tricks in 140 characters in any case!
Specify that it's 30 seconds on your machine, just to be sure
done.. but changed to 1 minute :)
Oh you did...
19:05
of course it might just be too hard :)
Are there any compiled languages that take longer than a minute to compile just for basic programs?
I don't know many compiled languages
not that I know
for a short program the ones I know are essentially instant
I am a little worried about testing the esolangs
Another thought on test cases: the fewer you include, the fewer you have to test per submission...
@trichoplax true!
it would be great if we had an online timing tool like TIO
Oh good point. You won't be able to use TIO because that won't run on your computer
19:07
I may just have to use it anyway for some of them
I don't see a way round that
I am tempted to post the question now
You could download the implementations from the TIO GitHub repository, but that's making a lot of work for you...
yes!
This is why I lean away from fastest-code and tend to go with largest-output instead
Then I don't have to run anything on my own computer.
@trichoplax makes sense
@Downgoat hmm. I'd be up for that, tho if it's a JS proposal, maybe we could use one of those unused symbols, like @ or #
19:10
but what is largest output?
I'm working up to using my own machine for a KotH though, so I may change my mind after that
@Lembik Not a real tag. I mean like this or this of mine
(although the first one is more "smallest-output")
nice questions!
Thanks :)
@orlp @Qwerp-Derp follow-up: upon modifying the program a little bit, after running for 45 seconds, I've already reached b=5931643...
I figured when pushing the limits of what is findable, the difference between machines becomes less relevant than the algorithm
19:12
@trichoplax all true
I don't suppose by any chance anyone has a magical way of making JS code run on IE...?
1
Q: Fastest tweetable integer factorizer

LembikThe task is as follows: Write code that factorizes integers as quickly as possible subject to your code being no more than 140 bytes long. The output should be the list of all prime factors. Your code can take input and give output in any way that is convenient including for example as argumen...

@trichoplax polyfill? that's what people usually use
Does that require me to know which bit isn't working?
@trichoplax modernizr.com
@trichoplax I think modernizr does feature detection or something like that
19:21
@peoplewhoknowmoremaththanme What is the name for this mathematical notation:
Specifically the bars around Ax-b and the subscript 2?
@StepHen Interesting - thanks
15
Q: What does double vertical-line means in linear algebra?

Redeem-TokenI have a formula, which I have no idea how to solve, because I don't know that double vertical-line sign: $\|{\rm Ax} \|$? $${\rm x} \ne 0 \in \Bbb R^n, \quad 0 < m \le \frac {\| {\rm Ax} \|} {\| {\rm x} \|} \le M, \quad cond(A) \le \frac M m .$$ What does it mean? How should I solve this?

In linear algebra, functional analysis, and related areas of mathematics, a norm is a function that assigns a strictly positive length or size to each vector in a vector space—save for the zero vector, which is assigned a length of zero. A seminorm, on the other hand, is allowed to assign zero length to some non-zero vectors (in addition to the zero vector). A norm must also satisfy certain properties pertaining to scalability and additivity which are given in the formal definition below. A simple example is two dimensional Euclidean space R2 equipped with the Euclidean norm. Elements in this vector...
@ConorO'Brien so like @+ instead of (+)?
Ah, I read that page, but I didn't realize they were related and I couldn't understand what a norm was. So it's literally just the length of the vector?
19:24
@Downgoat perhaps. I think it'd be nice to use some of those symbols
@DJMcMayhem The Wikipedia page mentions the 2 subscript under Euclidean Norm
:O another idea 1 @add 2 Does add(1,2)
Like haskell
ok that's actually a good use for @
@trichoplax Sweet, thanks.
> a norm is a function that assigns a strictly positive length or size to each vector in a vector space—save for the zero vector, which is assigned a length of zero.
19:25
It's actually a lot simpler than I thought
Why are mathematical definitions so long complicated
@ConorO'Brien do you already have definitions for infix functions, like R?
Did anybody else notice how the Sandbox is no longer ? Can we maybe please fix this?
nope, this is JS
@DJMcMayhem For contrast a 1 subscript would indicate Taxicab (Manhattan) distance
19:25
:/
@SEJPM Community took it off, it's already been flag for mod attention
then I like @thing for that then
@StepHen I know right? If they had just said the length of the vector it would be perfectly intuitively clear.
@StepHen ok :)
@ConorO'Brien are you on es-discuss mailing list yet?
19:26
$ = (x, y) => x + y; _ = 3; console.log(_++@$++_);
@SEJPM this is a monthly process, eventually a mod will fix it
Ninja'd
@Downgoat nope. how do I get on this list?
@DJMcMayhem I guess they then contrast it to seminorm, where some non-zero vectors have a length of 0 (how that makes sense I don't know)
@trichoplax IIRC, the taxicab distance is the shortest path moving in straight cardinal directions? (So, the sum of the distance traveled in each direction?)
@totallyhuman one would expect they just setup a reminder for themselves ;)
19:27
@ConorO'Brien esdiscuss.org
@DJMcMayhem yes. Shortest distance using Rook moves
Would you ever write a subscript 3? Or 4 or greater? Are they all defined?
@DJMcMayhem It's (x^1 + y^1) rather than SQR(x^2 + y^2)
@DJMcMayhem Yes - read on a few more paragraphs to "p norms" for the generalisation :)
@Downgoat subscribed :D
Thanks guys. Trying to teach myself linear algebra is so much easier when I've got a room full of genius I can bother with random questions XD
19:30
@DJMcMayhem For 1, the points distance r away form a square at 45 degrees. For 2 (Euclidean) they form a circle. For higher numbers they get closer and closer to a square, with progressively less rounded corners
@DJMcMayhem You should see me when I don't have access to Wikipedia :P
3
Ha! See I have access to wikipedia also, it's just that the technical jargon is over my head since I've never learned the topic before
I have the advantage that I had to look this up a few months ago for something, so it's quicker to find this time
@DJMcMayhem the thing about norm_1 is that it is not preserved under rotation about the origin, while norm_2 is
@trichoplax Out of curiosity, how much do you know about linear programming? That's the real reason I'm trying to learn linear algebra right now, so I can learn linear programming
(Specifically linear programming with Julia)
but then, you can define a new type of rotation that preserves norm_1 (rotation in a "diamond" or a slanted square)
19:32
here you guys are talking about linear algebra and all I'm thinking of is "hey this could make a great esolang"
@LeakyNun That would make sense
@ConorO'Brien Call it Bars2
@ConorO'Brien :D ok so i guess we can make hackmd and then we can propose to esdiscuss
yessssss
@DJMcMayhem That's outside the range of my previous Wikipedia searches
19:33
If this gets into ES whatever we're at now I'll use it in production in ten years
@Downgoat for both @f and (op)?
Hm we could, both those features are two side of same coin
@Downgoat Is there any advantage to the second syntax as long as you have the first?
or to rephrase, can you do @op
@trichoplax I'm using this library called JuMP. It's actually incredibly simple and intuitive. Very high-level way of maximizing linear equations given restraints. Like if I want to maximize x^2 + 2xy + y^2 constrained by 0 < x < 2 and 0 < y < 30, you could just automatically solve it with this:
using JuMP
using Ipopt

m = Model(solver=IpoptSolver())

@variable(m, 0 <= x <= 2)
@variable(m, 0 <= y <= 30)

@objective(m, Min, x*x + 2x*y + y * y)
@constraint(m, x + y >= 1)
status = solve(m)
19:36
@StepHen @+(3,4) looks kinda weird IMO
@ConorO'Brien I thought it was 3 @+ 4
I think I have it messed up though ignore me
no, (+) would make the operator a function, and @ would make a function infix
@trichoplax done :)
so a = (+); a(3, 4) == 7; and o = (x, y) => x * y; 3 @o 4 == 12
@ConorO'Brien OK that makes sense. So you're basically adding a way to convert func->op and op->func
19:38
yup
@ConorO'Brien What does @(+) do
^ yeah we can't do 1 (func) 2 because could be ambiguous
@Downgoat it's either function ( argument) literal or literal ( op ) literal, and the first can never happen
@DJMcMayhem That makes me want to see how high level programming languages have got in another 10 years
@ConorO'Brien but like in JS 1+\n1 is 2
19:40
right, but there aren't parenthesis around the +
@trichoplax print(the answer)
TBH unary functions could also be nice
@ConorO'Brien a = (+); 3 @a 4 == 7?
@StepHen no, because 3 + 4 != 12
@DJMcMayhem The next stage after that is having to opt out if you don't want answers provided automatically before you even type anything
19:41
@trichoplax java will be around forever
and it's basically high level
@ConorO'Brien But my question is would 3 @(+) 4 be valid?
@ConorO'Brien I'm not saying existing ones won't be there - I'm talking about how much higher the level will get (like DJMcMayhem's example code)
@trichoplax I think I've heard those called synthetic programming languages somewhere
@StepHen I would imagine @ would expect a word after it, but idk. I don't think there's much purpose in allowing @(+)
19:43
@ConorO'Brien I thought it expected a function after it
a function name is a word
Could you do @(x=>2x)
hm
that would seem to be a tokenization nightmare
(where parens are not your new parens)
cc @Downgoat
CMC: Given a 2d vector (a 2 item tuple), output the difference between the 2norm and the 1norm of said vector (the difference between the distance according to the pythagorean theorem and the Taxicab distance)
19:46
@DJMcMayhem testcase?
@DJMcMayhem So the difference between the length+height and the hypotenuse?
^ exactly
@ConorO'Brien I think should yeah require identifier otherwise allowing expression would greatly increase complexity
So (3, 4) would give 2 or -2
(I'm not sure which)
Fair enough. So it's the absolute distance
@DJMcMayhem yeah
19:48
@DJMcMayhem Jelly, 4 bytes: ÆḊạS
> Determinant. For non-square z, computes det(zzT)½; if z is a row vector, this is its norm.
Convenient builtin
@DJMcMayhem JavaScript, 37 bytes: (x,y,a=Math.abs)=>(x*x+y*y)-a(x)-a(y) I think
Wouldn't (x,y)=>(x*x+y*y)-math.abs(x+y) be shorter? (I'm not positive that's equivalent)
Wait no
if x or y are negative it screws it up
unless I did it wrong
Oh yeah
19:52
36 bytes: x=>y=>(x*x+y*y)-(a=Math.abs)(x)-a(y)
or, a=Math.abs;x=>y=>(x*x+y*y)-a(x)-a(y)
@ConorO'Brien Darn currying
Hmmm. I wonder if there's any possible formula that only requires calling Math.abs once
oh wait we're all idiots
@LeakyNun Fails for negatives (sorry for not providing test cases): Try it online!
[x,y].map(Math.abs) :P
19:54
you don't need the parens around x*x+y*y
> People keep talking about using cloud saves with their games. Cloud couldn't even save Aeris, what makes you think he could save your game?
@DJMcMayhem No that's correct (I think)
I don't think so. The taxicab distance would still be 7 (3 steps negative x, 4 steps positive y), and the pythagorean distance shouldn't change cause of squaring
And if they're both negative, it gets worse
oh wait I'm an idiot, all of our JS answers are screwed up, no wonder I'm confuzzled
x=>y=>Math.sqrt(x*x+y*y)-(a=Math.abs)(x)-a(y)
Wouldn't you want to subtract from the norm1 rather than subtracting from the norm2? (Since the norm1 will always be larger than or equal)
20:00
yeah
actually working: (x,y,a=Math.abs)=>a(x)+a(y)-Math.sqrt(x*x+y*y)
Probably my fault for not defining the problem super well.
Would this be a good main challenge?
@DJMcMayhem No, I forgot that I need Math.sqrt for Pythagorean :P
and probably if it's not a dupe from 2012
Haha, I wouldn't even know what to search for
Potential title: Pythagoras's Taxicab
20:04
If you're posting it to main I'm going to learn Taxi real quick
Should I invent a long and convoluted fake story about two people (Pythagoras and Ramanujan) travelling in their prospective taxicabs from the origin to point (a, b), and you must determine how much Pythagoras will beat Ramanujan by?
@DJMcMayhem If you wanna, long convoluted stores usually get upvotes
Maybe a slightly less convoluted story: How much will the crow beat the taxi by?
@DJMcMayhem yes
Would it be better with 2, 3, or arbitrary dimensions?
20:12
@DJMcMayhem you mean taxi vs n? I dunno, up to you, how do you solve it?
No, I mean the dimension of the space you're travelling. Because the pythogrean theorem can be extended to arbitrary dimensions, and taxicab distance is still the absolute sum of the distances
@DJMcMayhem gotcha. so for 3 it would be cubeRoot(x^3+y^3) right? up to you
No
So, an input of (3, 4, 5) you'd have to calculate sqrt(3^2 + 4^2 + 5^2) - abs(3) - abs(4) - abs(5)
Whoops, the order is wrong there
But you get the idea
oh yeah
depends on whether you want trivial answers or not :P
Taxi can't do abs or sqrt as far as I can tell so that's a dead end
I think I'll just stick to two
Jim
Jim
20:22
Ono @StepHen, where did the hen go?! Now you are just Step…
@Jim I guess chat truncated me
Hey guys Dennis and Martin are both almost at 150k rep we need a really good challenge for it
Something simple, short, and not trivial
and original and new
@StepHen Just means your code will be a bit longer...
@trichoplax There's a formula with + - * / for sqrt? Really?
@StepHen Not a formula but you can implement it in code...
Can Taxi do loops?
I think so
20:27
@StepHen There's even one just using logic gates, imagine that!
Let me rephrase that: the archive.org documentation says it can but I haven't figured out or tried to figure out how
20:51
@StepHen You could use 1 / this:
Fast inverse square root, sometimes referred to as Fast InvSqrt() or by the hexadecimal constant 0x5f3759df, is an algorithm that estimates 1/√x, the reciprocal (or multiplicative inverse) of the square root of a 32-bit floating-point number x in IEEE 754 floating-point format. This operation is used in digital signal processing to normalize a vector, i.e., scale it to length 1. For example, computer graphics programs use inverse square roots to compute angles of incidence and reflection for lighting and shading. The algorithm is best known for its implementation in 1999 in the source code of Quake...
I have no clue how I would do that
(in Taxi)
I don't know Taxi...
I don't either
But I'm making it do something
Maybe try Broken Car in Heavy Traffic instead
that's even worse
20:58
Yes, definitely not being serious :)
ok I got it to do x*x+y*y
How accurate do you need it to be? You might be able to hardcode a fixed number of iterations of finding the square root without using loops (won't be golfy though...)
It has loops and I can figure them out I think
Sorted then...
and I only need to find one sqrt so it doesn't have to be reusable
no it's on main already :( I'm never going to get this done in time
21:11
0
A: Sandbox for Proposed Challenges

Carlos AlejoHouse of cards Simple challenge: given an integer, draw a house of cards with the given number of stories. If the number is negative, draw the house upside-down. Examples: Input: 2 Output: /\ -- /\/\ Input: 5 Output: /\ -- /\/\ ---- /\/\/\ ------ /\/\/\/\ -------- /\/\/...

There's a time limit...?
@trichoplax Well in time for anyone to care except me :P
^
Late answers don't get a lot
First 5 or 6 answers then, to make sure it's seen?
Just the existence of that makes me smile
21:12
It already has 6 answers, and I'm only 1/3 done :P
I'll still finish it though if I can
I'm not gonna quit now
OK so is Newton's method the best one?
Shortest?
that
No idea
guess - (guess - num)/(2 * guess)
^^ newton's
The shortest might be looping through all possible floats until it matches, but that would not be quick...
21:13
XD
Actually that looks even shorter than looping...
I need a way to find a good guess though
if there will be decimal input I'm screwed though
Why a good guess? If you don't need speed you just need a guess that won't diverge
@trichoplax oh right
(so not zero...)
21:15
I guess num/2 is a good enough guess
let's see, I can only store 3 passengers
and I need to get gas at some point
Why do you want to find a sqrt?
@PeterTaylor So I can answer this in Taxi
From the context I can see, it seems like you're trying to compare the L_2 and the L_\infty norms
@PeterTaylor All I need to do is find the L_2 norm actually
2 hours ago, by DJMcMayhem
CMC: Given a 2d vector (a 2 item tuple), output the difference between the 2norm and the 1norm of said vector (the difference between the distance according to the pythagorean theorem and the Taxicab distance)
21:16
@PeterTaylor If there's a better way with + - * / that Pythagorean let me know
Correction: L_2 and L_1. But I see: you need to find the difference and not just the greater
I also need to compute abs with that
I'm trying to implement (x,y,a=Math.abs)=>a(x)+a(y)-Math.sqrt(x*x+y*y) in Taxi
Do you have conditionals? Because that's the obvious way to do abs
is there a better way?
@PeterTaylor oh duh yeah
so is there a formula for the L_2 norm? I'm assuming not
For sqrt I would also use Newton-Raphson
In fact I've ended up doing it before with BigDecimals in (IIRC) Java
21:21
@PeterTaylor This look decent? stackoverflow.com/q/14038456/7605753
I wanna answer in jelly but I still have no idea how to chain ;-;
21:39
I got so mad at the interpreter, until I realized I was subtracting a number from itself and wondering why I got 0
@Riker I don't get it.
21:57
What would be an appropriate short title for an error message that appears when the user exceeded their allocated disk quota?
"Error: exceeding allocated disk quota."
Less words.
"Error: exceeding allocated di"
"Error: exceeding allowed space"
"error: ran out of memory"
"Error: out of memory"
OOM is a different error.
I'm looking for something linguistically similar to 'timeout' (which is the title if the set runtime is exceeded)
'spaceout'
22:08
...
Jan 21 at 22:11, by mınxomaτ
I quickly realized it was a bad idea asking this in here.
@trichoplax I got abs working though it's lengthy
How do I make the haskell code in my answer look fancy?
@SEJPM Rewrite it in Jelly
@mınxomaτ pls
Specify fancy
22:09
@mınxomaτ syntax highlighting on SE
@SEJPM what answer?
0
A: Fastest tweetable integer factorizer

SEJPMHaskell, 100 Bytes f n=[h,div n h]where h=g 17(s 17);s x=mod(x*x+1)n;g a b|d>1=d|1<2=g(s a)(s$s b)where d=gcd(abs b-a)n This works for the first 5 test cases in unnoticable time. This will probably time-out on the second-largest test case. It will also not work on the last test case because it...

Add the language name to the opening tag of the code block AFAIK
Oh no, that was Github markdown...
@SEJPM <!-- language-all: lang-hs -->
@WheatWizard ty
22:28
@SEJPM great, now the scrollbar disappeared :D
@flawr :D
I wonder whether I could do ECC factoring in sage
in 140 chars
technically this would be valid as it doesn't use a built-in for factoring...
The Lenstra elliptic curve factorization or the elliptic curve factorization method (ECM) is a fast, sub-exponential running time algorithm for integer factorization which employs elliptic curves. For general purpose factoring, ECM is the third-fastest known factoring method. The second fastest is the multiple polynomial quadratic sieve and the fastest is the general number field sieve. The Lenstra elliptic curve factorization is named after Hendrik Lenstra. Practically speaking, ECM is considered a special purpose factoring algorithm as it is most suitable for finding small factors. Currently...
damn it's probably too complex :(
23:10
@mınxomaτ If you don't need it to be true, you could say "Disk full"
23:24
Why wouldn't that be true?
BTW, that was exactly what I chose
I meant if it's only their allocated portion that is full, rather than the whole physical disk, but it seems close enough even then
For the user it's the root mountpoint, so for all intents and purposes it's their whole disk.
Perfect
23:44
I got my Steam Link today
23:56
6
Q: The Crow vs The Taxicab

DJMcMayhemImagine travelling to a point A miles away vertically and B miles away horizontally. Or in other words, travelling from (0, 0) to point (a, b). How far would you need to end up travelling? This seems like a straightforward question, but the answer depends on who you ask. If you're a crow, and you...

-1
Q: 9 Teraflops? Yeah right

QuadmasterXLIII recently got access to a GTX 1080, and was hyped up to bask in its insane 9 teraflops of raw power. However, much to my surprise, my poorly optimized tensorflow code only reached a Gigaflop! Please, please help me prove that this purchase was justified. The challenge: write the shortest progra...

3
Q: Operator precedence: How wrong can I be?

Challenger5Say I have an expression: 9 * 8 + 1 - 4 This expression can be interpreted in six different ways, depending on operator precedence: (((9 * 8) + 1) - 4) = 69 (* + -) ((9 * 8) + (1 - 4)) = 69 (* - +) ((9 * (8 + 1)) - 4) = 77 (+ * -) (9 * ((8 + 1) - 4)) = 45 (+ - *) ((9 * 8) + (1 - 4)) = 69 (- *...


« first day (2352 days earlier)      last day (2786 days later) »