« first day (3186 days earlier)      last day (1642 days later) » 

12:13 AM
-1
Q: Mitrix Addition challenge

Abel Makanzu KinkelaHere is what I want. To Find the value of each alphabet letter with following Assumptions: A+B=2 A+N=378 N-M=144 J<2*I After that, write a function that accepts two square matrices (N x N two dimensional arrays), and return the sum of the two. Both matrices being passed into the function will ...

 
 
2 hours later…
A _
2:06 AM
Create some poem?/ Clearly it comes a long way,/ writing stuff I say.
 
2:54 AM
1
Q: Hell0 W0rld! scored by ASCII values

EvorlorWrite a program that outputs Hell0 W0rld!. It must match this output exactly, including capitalization, zeroes instead of o's, exactly one space, etc. Trailing new lines are allowed. Lowest score wins. Scoring is based on the sum of the ASCII values of the characters in your code. New lines ...

 
3:26 AM
@isaacg Thanks for the edit in my meta answer! I was probably thinking about Taylor series :-)
 
 
1 hour later…
A _
4:48 AM
@NewMainPosts I wrote 72.72% of all of the submissions of this challenge. :)
 
 
2 hours later…
7:04 AM
@A_ good job. 👏👏👏
 
A _
7:21 AM
@Jono2906 The problem is that nobody is willing to submit answers there anymore.
 
 
2 hours later…
9:05 AM
@A_ I did submit a few bitch and moo answers, just to make your percentage lower. You know that lower score is better in that challenge, right? :P
 
A _
Now I wrote 54.54% of all of the answers.
Yours is 13.64%.
 
and I somehow have the best non-Lenguage answer
 
9:25 AM
@NewMainPosts IMHO scoring by sum of reciprocal of ASCII values would have been better, that might have given golfing potential encouraging use of non-ASCII characters
 
9:37 AM
@UnrelatedString Well done @UnrelatedString! That is what I was looking for but I don't know many languages. I'm stuck in my PHP world :P
 
Keg is pretty niche
But that's one of the things it's really good at
 
 
4 hours later…
A _
1:19 PM
Here is another 05AB1E answer beating Keg. It too was posted by at-someone and uses null bytes inside the program. (I consider using null bytes a bit unfair.)
 
 
2 hours later…
3:02 PM
0
A: Sandbox for Proposed Challenges

A _Implement Or code-golf string interpreter or is a dubious esoteric programming language. The author is unknown but it is known that fungot (a chatbot) is currently learning or but it remains unknown how it does it and where it receives the required material to learn or. Check out this IRC log to...

 
4:01 PM
0
Q: KILL ALIENS NOW!

Duarte ArribasThe world has been invaded by aliens. They are everywhere killing people and taking over the world. You are hiding with your friend. They have one weakness - the high pitched sounds. You can't go yell at them, because you'd get caught before, so you remember the state had a conveniently made ma...

 
 
4 hours later…
8:02 PM
-2
Q: How to print all the lines in a file, when ever pattern matches between to values

nani2019I am looking for a code which would print below output from the attached file i.e. search between to Patterns SELECT and ;, where the pattern search should start from the line which is started from SELECT to till its corresponding ; and it output only last select query in the file. select query ...

 
Hi, can you do this integral in any language/library except mathematic?
f[x_] := Exp[-x];
c = 0.9;
g[x_] := c*x^(c - 1)*Exp[-x^c];
SetPrecision[Integrate[f[x]*Log[f[x]/g[x]], {x, 0.001, \[Infinity]}],20]
 
This is Mathematica, right?
 
*mathematica
 
Ninja'd. :-p
 
You can't just use an integration library as far as I can tell because the numbers get too small
 
8:03 PM
Do you mean do the calculation, or figure out how to integrate it?
 
@wizzwizz4 yes
 
Because I'm pretty sure you can do the symbolic algebra bit by hand, then feed it into a program in almost any language.
@Anush Which?
 
I would really like to be able to do integrals like that in a free language
@wizzwizz4 I don't think it has a symbolic integral
@wizzwizz4 I mean compute the numerical answer
 
Could you write it in MathJax / LaTeX? I must be misreading it.
Sage or Octave might be okay alternative thingies, but I'm not sure how programmable they are.
 
@wizzwizz4 bpaste.net/show/XZZ5G doesn't work for example
well the limits are from 0 to infinity
so not quite the integral I showed
but is it clear ?
 
8:09 PM
You're right about that not having a representation in normal symbolic algebra.
But I think it should be possible to hack it a little, if you know what p(x) and q(x) are.
Which you do.
 
def f(x):
return sum([ps[idx]*lambdas[idx]*np.exp(- lambdas[idx] * x) for idx in range(len(ps))])
def g(x):
return scipy.stats.weibull_min.pdf(x, c=c)
f = p and g = q
 
That's not going to work – definitely go the symbolic algebra route if you can.
Take advantage of the product rule and the quotient rule.
 
I don't think there is a closed form integral
 
In calculus, and more generally in mathematical analysis, integration by parts or partial integration is a process that finds the integral of a product of functions in terms of the integral of the product of their derivative and antiderivative. It is frequently used to transform the antiderivative of a product of functions into an antiderivative for which a solution can be more easily found. The rule can be thought of as an integral version of the product rule of differentiation. If u = u(x) and du = u'(x) dx, while v = v(x) and dv = v'(x) dx, then integration by parts states that:...
 
but the point is that mathematica can just do Integrate[f[x]*Log[f[x]/g[x]], {x, 0.001, [Infinity]}
 
8:11 PM
@Anush I don't know what that means, but I'm willing to bash the numbers with a hammer until they work. ☺
 
so the question is, can any other library/probramming langauge
 
@Anush That's because it's using symbolic algebra.
The following tables provide a comparison of computer algebra systems (CAS). A CAS is a package comprising a set of algorithms for performing symbolic manipulations on algebraic objects, a language to implement them, and an environment in which to use the language. A CAS may include a user interface and graphics capability; and to be effective may require a large library of algorithms, efficient data structures and a fast kernel. == General == These computer algebra systems are sometimes combined with "front end" programs that provide a better user interface, such as the general-purpose GNU TeXmacs...
Some of those can do integration, some of them are freely licensed… there should be some overlap.
 
ok thanks. I don't think it's going to help
but I would be happy to be proved wrong
maybe I should set it as a challenge :)
 
It's what I do whenever I've got a particularly difficult programming problem.
Just make it a challenge.
 
@wizzwizz4 really? :)
 
8:17 PM
@Anush Wait, I mean no, I definitely haven't done that.
Is this code dual-licensed under a code license? I'd like to produce a derivative work that's released under the GPL (although any GPL-compatible license will work with this). It's currently released under CC BY-SA 3.0. — wizzwizz4 Mar 27 '17 at 19:39
Cough.
 
@primo I just saw you found (after prplz) a widely applicable python golf :O
 
@wizzwizz4 :)
 

« first day (3186 days earlier)      last day (1642 days later) »