« first day (2091 days earlier)      last day (2766 days later) » 

5:13 AM
not sure how to i/o...
How should I/O work in my programming language?
 
@noɥʇʎPʎzɐɹC too lazy
@DestructibleWatermelon stdin/stdout?
 
yup
not sure what do
It's the 2d substitution language
 
0
Q: Missing -lSDL and -lSDLmain for SDL2

Qwerp-DerpI'm trying to compile a Code::Blocks project with SDL2, but the file won't build, with the errors: ||=== Build: Debug in SDLtest (compiler: GNU GCC Compiler) ===| ld.exe||cannot find -lSDLmain| ld.exe||cannot find -lSDL| ||error: ld returned 1 exit status| ||=== Build failed: 3 error(s), 0 warni...

I'm cringing so hard at this xaxxon guy
 
Wtf s/he doin
 
.-. welp
> "I've never used it."
 
5:20 AM
just had an idea for a code golf question
given a chess board, calculate the material points of both sides (queen=9, rook=5, bishop=knight=3, pawn=1, king=0 (because they always have him))
 
@StevenH. Can you help me
 
With that? Unfortunately I don't have any experience with it :( sorry
 
IDK then
 
@DestructibleWatermelon we've had this, lemme search
 
@DestructibleWatermelon 2d array of only pieces?
 
5:31 AM
maybe, maybe not
perhaps something that works with casual chat chess
 
16
Q: Evaluating the score based from a chess FEN string

AdnanChallenge Forsyth–Edwards Notation (FEN) is a standard notation for describing a particular board position of a chess game. Your challenge is to evaluate the score using the FEN string. This is an example of a FEN string: 5k2/ppp5/4P3/3R3p/6P1/1K2Nr2/PP3P2/8 Using this string, you can calcula...

 
@xnor the post never indicated whether pawn promotion is valid
 
what magic chars should I have in the matching in my substitution lang?
 
5:54 AM
M
 
...
hmmm I could use \ for escape, but not sure
` might be better, but for messing up markdown
 
To show code in markdown: M\`M
 
also how should I handle output? I don't want it to be the grid output at all
maybe some char that prints the char after it?
 
6:14 AM
if ` prints the char after it, and ; halts the program
!     *%"p""``"#*<
>p`Hello, World!`;
!<<<<<<<<<<<<<<<
>"p""`*"'p''`'%  ^
should print "Hello, World!"
might have made mistake or something
(note that the ! doubles as the down command)
wait no it won't
I think this will
!               <
>p`Hello, World!;
!<<<<<<<<<<<<<<<
>"p""`*"'p''`'% ^
 
0
Q: Convert bitstring into a timestamp correction sequence

jpaWhen implementing an algorithm for correcting aliased measurement data, I hit the need to implement following function. The function takes input bitstring on the left, and should produce the integer and list on the right: 1 => 1, [0] 10 => 1, [0] 11 =>

 
explanation: hits the down, runs across the hello world part. prints the first char, goes down to the bottom line (this still could be golfed by reversing the sub part), substitutes p[anychar] with p. When it finally gets to printing !, it does not go down and hits the halt command
 
Anonymous
7:19 AM
Yearling :)
 
7:48 AM
sigh stackoverflow...
 
 
1 hour later…
9:05 AM
Is anyone on?
 
@Qwerp-Derp No
 
Break time, opened TNB, saw that
 
Argh, SDL is giving me headaches
 
@Qwerp-Derp Why
 
9:09 AM
The thing won't build properly still
There's still a missing -lSDL and -lSDLmain
 
@Qwerp-Derp What errors is it giving
 
||=== Build: Debug in SDLtest (compiler: GNU GCC Compiler) ===|
ld.exe||cannot find -lSDLmain|
ld.exe||cannot find -lSDL|
||error: ld returned 1 exit status|
||=== Build failed: 3 error(s), 0 warning(s) (0 minute(s), 0 second(s)) ===|
 
@Qwerp-Derp Then you didn't install the libraries correctly
 
I did
I downloaded it from the website
And I did exactly as the tutorial said
But it doesn't work
 
@Qwerp-Derp Hmm
 
9:10 AM
The most curious thing is that it shouldn't even be looking for those anyway
 
@Qwerp-Derp Use Linux :P
 
It should be looking for only -lSDL2main and -lSDL2 right?
@ASCII-only y u do dis
 
@Qwerp-Derp Why
 
Because I installed SDL2
 
@Qwerp-Derp How are you calling the linker, do you have a makefile
 
9:12 AM
Ummm what you mean
 
@Qwerp-Derp What command are you using to compile
 
Not using a command... just compiling it using codeblocks itself
Using the tutorial above
 
@Qwerp-Derp Weird, it says to set the linker options to -lmingw32 -lSDL2main -lSDL2, can you double-check your build options -> linker settings?
 
Yup
Hang on
This is the options:
-lmingw32 -lSDL2main -lSDL2
Which matches
 
Crack my submission at the C&R :p
 
9:18 AM
@Qwerp-Derp Okay, it's not using -lSDL2, you broke Code::Blocks
@betseg Pls link to question
 
@ASCII-only Wat
I just got it on Monday
 
@betseg Done :)
 
Woot
 
@Qwerp-Derp Also look at step 8
 
@ASCII-only too late m8
 
9:20 AM
interesting language, might have to try and golf some in that :)
 
@betseg But I just wanted to see the question ;_;
 
@ASCII-only SDL2.dll is in my folder for the project
So I have a project SDLtest.cbp
Which is in the folder cpp-test
And SDL2.dll is also in cpp-test
is that okay?
 
@Qwerp-Derp Where does it build to
 
@ASCII-only Pretty sure the files build to the same folder, cpp-test
 
@ASCII-only codegolf.stackexchange.com/a/96814/47066 this text is here to prevent oneboxing
 
9:22 AM
I think I borked up Codeblocks
 
9:33 AM
:D Finally Charcoal is at 36 bytes for this, but it's noncompeting because compression and Extend are new features :(
 
Kay, fixed it
 
9:48 AM
hi all
@quartata hi
 
@Lembik hi!
 
any code-golf math lovers in?
 
Yep
 
cool
I was thinking of a "Compute the permanent" challenge
I think this makes sense both as a code-golf and fastest-code challenge
which would you prefer first :)
 
Dunno
 
10:02 AM
@Lembik Explain?
 
@Fatalize ok.. do you know waht the permanent of a matrix is?
 
In linear algebra, the permanent of a square matrix is a function of the matrix similar to the determinant. The permanent, as well as the determinant, is a polynomial in the entries of the matrix. Both permanent and determinant are special cases of a more general function of a matrix called the immanant. == Definition == The permanent of an n-by-n matrix A = (ai,j) is defined as perm ⁡ ( A ) = ∑ σ ∈ S n ...
Now I know
 
@Fatalize ok.. so it's very hard to compute
as in computationally expensive
not very to write code to compute :)
In linear algebra, the computation of the permanent of a matrix is a problem that is known to be more difficult than the computation of the determinant of a matrix despite the apparent similarity of the definitions. The permanent is defined similarly to the determinant, as a sum of products of sets of matrix entries that lie in distinct rows and columns. However, where the determinant weights each of these products with a ±1 sign based on the parity of the set, the permanent weights them all with a +1 sign. While the determinant can be computed in polynomial time by Gaussian elimination, th...
and there is little if any code out there to do it for you
so a perfect codegolf.se question!
what do you think?
another nice challenge would be to play connect 4 perfectly I think
@Fatalize Too hard?
 
10:51 AM
@Lembik unless a golfing language has an inbuilt function I think Mathematica would win the golfing portion - Permanent[m] returns a fraction, Permanent[N[m]] returns a float, and Permanent[N[m,d]] returns to d digits of precision.
 
@JonathanAllan ah mathematica. I always forget about that cheating option :)
 
I suppose I could ban pre-existing functions for permanent?
 
That you could :D
 
The Mathematica docs even tell you how to do that! Module[{n = Length[m]},
Sum[Product[m[[i, \[Sigma][[i]]]], {i, n}], {\[Sigma],
Permutations[Range[n]]}]]
 
10:54 AM
heh
just remove the spaces
 
you mean to golf it more?
I really prefer answers where people try to give the best answer by language
for example, it's interesting how small you can go in Haskell even if Jelly is smaller still
 
Python:
import itertools as i,functools as f
def p(a):r=range(len(a));return sum(f.reduce(float.__mul__,[a[i][p[i]]for i in r],1.)for p in i.permutations(r))
Translate that to Jelly and you might well beat Mathematica :)
 
@JonathanAllan nice!
 
not fast though
 
this is a floating point calculation for real 2d arrays, right?
 
10:58 AM
naiive implementation
yeah
 
calculating the permanent is never fast
 
no, but that is as slow as it gets :)
 
:)
 
unless you do something really wrong :p
 
I think a fastest code question could be interesting....
on a related note...it would be great if there were a gpu online everyone could use
I think amazon cloud provides gpus but obviously not free
 
10:59 AM
There is, you just have to pay.
 
@ASCII-only some way we can ask GPU challenges basically. So some system you can use for free to test your code
because it seems odd that codegolf, the most awesome code challenge place on the planet, doesn't have any challenges were people write gpu code :)
 
They are usually not very cheap (ovh.com/us/dedicated-servers/gpu).
 
contact your local friendly NCuda rep
pitch it as good marketing
 
GPU VPSs aren't really a thing, since GPU passthrough is horribly unstable for most VM stacks. And even then, most require one dedicated GPU per VM. This doesn't scale at all in a "cloud" way.
 
@mınxomaτ I am no expert but I think the there is opencl and there is cuda, right?
 
11:02 AM
These are the two major ones, yeah.
 
@mınxomaτ when you say not cheap.. looks like about 200 US dollars for a basic one?
 
@Lembik this?
 
@ASCII-only interesting but that looks dead
ok so opencl supports Intel HD graphics which is integrated into the CPU?
 
@Lembik 100 per week yeah. But these are used for huge GPGPU tasks. You don't actually need OpenCL or CUDA for smaller tasks. OpenGL GPGPU (via GLSL) is more than sufficient.
 
@mınxomaτ oh sorry.. I meant 200 dollars to buy one for yourself
@mınxomaτ I just mean for compute. Not actually for graphics
 
11:05 AM
Yeah, the second last commit was July last year :(
 
@Lembik Yes. You don't need CUDA or OpenCL for computations. GLSL doesn't need to display something.
 
@mınxomaτ oh ok. So what is the cheapest set up that gives you GLSL?
 
Well, any old PC and a cheap GPU. A 5450 is probably sufficient.
 
Yeah.
That's more than enough to score GPGPU efficiency.
 
11:08 AM
interesting
other places seem to say you need NVidia 620
 
Well, if you need CUDA. But the 5450 supports OpenCL (and obviously GLSL).
 
thanks
 
@Lembik What GPU and Browser are you currently on?
 
in any case.. it doesn't help codegolf people wanting to ask gpu coding questions :)
@mınxomaτ I have no gpu here. At work there are some
 
@Lembik Intel integrated is sufficient, I just want to show you something. But you need FF or Chrome
 
11:11 AM
oh I have chromium here
and I have FF
 
Oops reused i...
def p(a):r=range(len(a));return sum(f.reduce(float.__mul__,[a[j][p[j]]for j in r],1.)for p in i.permutations(r))
 
@Lembik Here's an example of a slicker GPGPU library (runs in C++ and JS), not using OpenCL or CUDA, but still doing general computation: minxomat.github.io/NanoCL . It measures performance. The top number is JS, the bottom one is GPU-accelerated JS.
Dunno if it works on your GPU.
 
nice!
I get 170 at the top and 2000 at the bottom
nope
10,000 at hte bottom
which is very surprising as I have no gpu :)
 
For me it's 20x better performance, I didn't know integrated GPU did that much
 
nope..I am on the amd 8350
AMD FX(tm)-8350 Eight-Core Processor
no gpu in sight
is the code showing the speedup on your computer rather than mine?
 
11:16 AM
No, it's all client-side.
 
well why is there a speed up then?
 
@Lembik Well something is generating the screen you see.
What motherboard do you have?
 
ASRock 880GM-LE FX
 
@Lembik That has a GPU
> Integrated AMD Radeon HD 4250 graphics
A pretty good one.
 
oh! :)
I had no idea
I feel I should use it now!
which libraries will support it?
 
11:19 AM
@Lembik Rofl, well something has to generate the screen you're seeing :D
 
@JonathanAllan Are f and i defined automatically somehow? I don't see where they come from.
 
oh prev code...
import itertools as i,functools as f
 
ah, ok :)
 
save some bytes with Python 2, since reduce is a builtin
 
@mınxomaτ so can I use opencl here?
 
11:21 AM
@Lembik Probably not.
Well, actually ...
Yes you can, but OpenCL CPU, not GPU.
Since OpenCL is a general framework, not limited to GPUs.
 
ok so this is all very confusing
what I want to know is how I write code that will run fast :)
i.e. which library I have to use to get that speed up you showed
 
@Lembik That speed I showed is using NanoCL, my own library. You can still use OpenCL on your CPU, but not on the GPU you have.
 
@mınxomaτ ok so using opencl on my CPU seems pointless right? I mean it won't give a speedup
so the answer is.. your library is the only way to go?
 
@Lembik For you (since OpenCL can only use your CPU, not GPU), the maximum speedup is the same as if you would use good C++ code.
 
ok but your NanoCL can get a better speed up?
on my system
 
11:24 AM
Probably, since it's apparently compatible with your GPU.
 
I find it weird that the only library able to use my GPU is yours!
 
But it's not released yet.
 
:)
 
@Lembik You could make your own. Not that hard.
 
fascinating :)
 
11:34 AM
what should my new 2d esolang be called?
 
planar?
I have no idea :)
 
@DestructibleWatermelon Retina2D
 
pls no
It isn't even retina
is retina self modifying?
 
@DestructibleWatermelon No
@DestructibleWatermelon ><> ><>
 
(legitimate question: I didn't actually know)
how about something that isn't just a modification of other langs names?
subber?
Subbre, which has the substring re, like pythons regex module
 
11:41 AM
@DestructibleWatermelon Planex for "Planar Expression", or ^^vv<><>ba
 
Not really planar expressions though
In sports we often shorten the "greatest of all time" to The G.O.A.T.. Read as goat. — earl3s 8 hours ago
@Downgoat
 
@JonathanAllan I feel we have to make a challenge now you have code!
 
I'm staring at Jelly at TIO, make. brain. hurt.
 
@JonathanAllan :)
 
Dennis will do it in 8 bytes :p
 
11:47 AM
:)
 
12:42 PM
@JonathanAllan meta.codegolf.stackexchange.com/a/10350/9206 in the sandbox
I made it a little more interesting :)
 
0
A: Sandbox for Proposed Challenges

LembikCodegolf the permanent The challenge is to write codegolf for the permanent of a matrix. Your code can take input however it wishes but please include in your answer a full worked example including clear instructions for how to supply input to your code. To make the challenge a little more inte...

 
@Lembik that lengthens the Python code, but has no effect on Jelly.
 
@JonathanAllan ah!
does that mean a Jelly solution now exists?
 
Not that I can piece it together in Jelly though :(
nope
I know what I need to do, but not how to do it heh
 
aha :)
please do let me know if the sandboxed question needs improving
I don't want to post it and then find a huge hole!
also please check the answers are correct!
 
1:12 PM
@Dennis Could you pull Charcoal? Thanks in advance!
 
hi @Fatalize
are you about?
 
Kind of, why?
 
Do you know how to add the code snippet that lists best answers per language?
in answer to your comment
it might make it clearer
 
I tried once and failed miserably
 
ah :)
 
1:26 PM
@Lembik did you use other code to calculate the examples?
 
@JonathanAllan I did.
I used a library I found
would have been better to use mathematica but I don't have a copy
 
agreed to 8 s.f.
 
hooray!
I might just post the question
it seems harmless
unless you think that is crazy?
 
I have no copy either, and that "agreed" was with my Python code, I don't know Mathematica well enough to actually get the reduced complex output
(0.36697 +0.0245945i)(0.501318 +0.130679i)(0.527295 +0.597421i)+(0.679859 +0.114192i)(0.527295 +0.597421i)(0.81149 +0.752697i)+(0.36697 +0.0245945i)(0.68902 +0.508863i)(0.103302 +0.835327
i)+(0.81149 +0.752697i)(0.103302 +0.835327i)(0.710857 +0.861998i)+(0.679859 +0.114192i)(0.68902 +0.508863i)(0.625682 +0.959509i)+(0.501318 +0.130679i)(0.710857 +0.861998i)(0.625682 +
0.959509i)
:/
You can use Mathematica for free (at least a bit) develop.wolframcloud.com
 
why the slightly sad face?
 
1:32 PM
confused face - that is the output of Permanent[N[a]] for your first example
 
oh
so doesn't match at all?
well it must be doing something else
 
I clicked "fully simplify" and it gives 0.989687 +i(3.01723 +(2.73188 +0.769543i)i)
 
very odd
maybe it isn't recognising i as a complex number
that is it thinks it is a variable?
 
x+yi is evaluated as a complex numbe
 
try i^2?
 
1:36 PM
0
Q: Codegolf the permanent

LembikThe challenge is to write codegolf for the permanent of a matrix. Your code can take input however it wishes and give output in any sensible format but please include in your answer a full worked example including clear instructions for how to supply input to your code. To make the challenge a l...

 
hang on if I actually simplify that it comes out to -1.7421929999999999+2.247687j which agrees too
 
oh, new challenge :)
hooray!
 
so it's just a question of knowing how to do that in Mathematica
 
this may be the simplest challenge I have posted in years :)
the fastest-code version won't be anywhere near as easy :)
how long does your code take on a 6 by 6 matrix?
the answer should be -0.5388706291080894-27.823024319655588j
 
@Lembik IMO that's underspecified. In general, I think users shouldn't have to use an external source to understand the task
 
1:43 PM
@DJMcMayhem you mean the definition of the permanent should be in the question?
 
Yeah, I think that would help
 
ok I can do that
by copying and pasting the wiki :)
 
I should probably know what a permanent is, lol
 
hmm
copying and pasting the wiki isn't so easy
the same source doesn't work
I could copy a screenshot
is that acceptable?
 
No. It should be in text
To see if I understand it correctly, it's basically the sum of the product of the diagonals?
 
1:48 PM
I give up
 
@Lembik Python 3 on my laptop takes no noticeable time
 
@DJMcMayhem actually the answer there is a good way to understand it
@JonathanAllan cool.. 20 by 20 is when it starts getting slow it seems
 
20! is pretty big yeah.
 
@Lembik Type the LaTeX here, then upload the images you get to SE's image includer thing.
 
1:52 PM
@El'endiaStarman Thanks... what would be nice is if "The permanent of an ''n''-by-''n'' matrix ''A'' = (''a''<sub>''i,j''</sub>) is defined as" worked
as it does in the wiki
 
Do I need to handle the empty matrix?
 
why not
 
best to ask in the comment
cos if not I can golf some off
5 bytes
 
I see
 
the reduce would not need the ,c(1) oh and I would save the c= and ; too
so 8
9 even
 
1:56 PM
sorry :(
got to do the empty case :)
I have updated the question now by stealing from the wiki as requested
 
yeah I suspected so, hence handled it
I added the 6*6 to my repl.it
 
cool
try a 20 by 20 :)
 
gonna make a coffee...
 
aa = np.random.random((20,20))+1j*np.random.random((20,20)) is how I make the random matrix
 
priorities :p
 
1:58 PM
:)
 

« first day (2091 days earlier)      last day (2766 days later) »