« first day (2742 days earlier)      last day (2093 days later) » 
00:00 - 16:0016:00 - 00:00

12:41 AM
It's impressive how after all the 'async performance-focused design decisions' of Node.js it still operates are 0.1% the speed of python
 
12:54 AM
@LuisMendo I remember seeing "mín" for sure. I don't remember any trig tho'. I'll try to find it again, so I can look at it some more.
 
1:09 AM
@EriktheOutgolfer What's a ping list? And the answer is probably.
 
@mbomb007 It's like a mailing list but for people who want to be pinged in chat
 
Anonymous
1:52 AM
@Downgoat Node's good design decisions essentially were just putting lipstick on a pig. At the end of the day, it's still JS.
 
@Mego What good decisions?
 
Anonymous
I should've used quotes :P
 
@EriktheOutgolfer Sure, put me on the ping list. If I change my mind later I'll let you know.
 
@EriktheOutgolfer "ping list" for what?
A SMBF answer?
 
No clue
I'm not on the pinglist
(And don't want to be)
 
 
1 hour later…
3:32 AM
0
Q: The Clock Hands of Doom

Redwolf ProgramsYou are chained to a chair. Underneath you is a huge volcano. A clock next to you ticks ominously, and you see that it has wires leading from the back up to a chain, which will drop you into the center of the earth. Taped to the clock is a note: Each clock hand has an electrode. When all three c...

 
4:19 AM
0
A: Sandbox for Proposed Challenges

Redwolf ProgramsGold Collectors king-of-the-hill In this KoTH, the aim is to be the last bot alive. Coins will be placed in random areas, and your bot must get the coins first. If a bot runs into another bot, the bot with more coins wins, and the other bot dies. More details below. Coin types There will be 2...

 
4:30 AM
does anyone here know what would cause a sun to glow blue and start talking about calzones
 
Anonymous
4:45 AM
@quartata I think it's hungry
 
5:43 AM
@OMᗺ why are you BWO
@Pavel because you didn't find about onivim early enough :P
 
6:28 AM
 
ah, backwards not upside down
 
7:17 AM
@Downgoat What do you need my logo for? :p
 
 
1 hour later…
8:25 AM
@Fatalize Adding Brachylog to axtell
 
I see. Not sure how valuable that would be considering no one uses Brachylog :p
 
@Fatalize Sad as it is. I find it to be the most intriguing of all golfing languages.
 
8:40 AM
Understandable though: I haven't worked on it for months, it's not as short as other languages, some useful things are missing, and most people are not familiar with such languages
@Adám Your curiosity does not seem strong enough to motivate you to learn it though :p
 
@Fatalize I'm here for work.
 
Maybe APL needs some declarativeness
ais523 had a plan to mix Jelly and Brachylog into a single language but since he stopped coming I have no idea if he ever progressed on it
(Considering how many language ideas he had and how little he actually implemented, I doubt he has anything working :p)
 
9:43 AM
For those who can view it, CMC. Deleted because I think it's a bit trivial for main.
 
ngn
@Mr.Xcoder in k that's |/#:'=2!
2! for modulo 2, = to group them, #:' to get the length of each group, |/ max
 
Same length and algorithm as my Jelly solution
Actually, 5 bytes in Jelly: ḂċⱮ`Ṁ Try it online!
 
@Mr.Xcoder Ugh, that's a confusing line.
 
@Adám in what way :P
 
@ASCII-only Usually, messages beginning Actually, nn bytes provide solutions written in the "Actually" programming language.
 
9:58 AM
@Fatalize since i don't know brachylog: what (main) differences are there from it just being a golfy prolog
@Adám that's not the message i replied to :|
 
@ASCII-only Well the main difference is obviously that it has way, way more built-ins, which makes it way less obnoxious than Prolog to use
 
@Adám Wasn't Actually named that way exactly for this purpose? :P
 
@Fatalize that's expected from a golflang though
 
The major "theoretical" difference is that in Brachylog, all arithmetic uses constraints by default, which makes the language more declarative in a sense
 
i am a noob, what is brachylog
and soomeone mentioned ais523, isnt that guy a weird esolanger and how do people contact him
 
10:02 AM
@gnu-nobody basically golfy prolog, apparently
 
i dont know prolog either
 
@gnu-nobody he occasionally (re)appears here
@gnu-nobody think of it as HTML for logic, you say what you want, prolog gives you the answer
(i.e. you don't say the process)
 
haskell but logic
?
 
(in ideal situations)
 
@gnu-nobody it's quite different
e.g. prolog doesn't really have functions
 
10:03 AM
arent both declarative
what
 
wait. what
 
haskell is declarative
 
@Mr.Xcoder Indeed.
 
and you say what you want, prolog gives the answer without the process == declarative
 
@gnu-nobody yeah, apparently it's mostly declarative
the main difference though is that haskell is functional (and built around that)
 
10:05 AM
In Haskell you declare functions that transform an input into an output
In Prolog you declare relationships that link variables together
 
how do i look a unicode char's byte count
 
@Fatalize hmm. do constraints fall under relationships
 
@ASCII-only thanks
 
@ASCII-only I'm not an expert, but basically you can see a constraint as a relationship for which you cannot immediatly conclude the result, so you delay it
 
or TIO :P
@Fatalize the result being?
 
10:08 AM
e.g. you can relate X to 4 by saying X*X #= 4, but since two results are possible, it will set a constraint X in -2\/2
 
@mbomb007 I wouldn't mind if you edit your name out by yourself :P
 
Then if you add another relationship say X in 0..sup, it will have enough information to solve the constraints and find X = 2
 
@user202729 for help with use of the language
 
In short a constraint is a relationship for which you delay the evaluation until necessary or when it only leads to a unique result
 
also, replying from mobile is hard, I just use the full site
 
10:11 AM
CMC: Given a character, return number of bytes when encoded with UTF-8.
 
use mothereff.in/byte-counter with doing some weird shit with some http call or something like that
how do i make strikethrough
 
@gnu-nobody ---
@gnu-nobody *TIO
well mothereff.in would work
@Adám JS: s=>unescape(encodeURIComponent(s)).length
 
Coding challenge.. If I give you a set of n 2d points where each one lies on one of two straight lines
can you find the two straight lines?
 
@Anush of course :P
 
hey check out my work-in-progress language, suggest stuff and such repl.it/@_Nobody_/ugl-dev-0
 
10:20 AM
@Anush Sure, write a program to print out a picture of the points, get a human to draw the lines then scan the picture back
 
:)
 
> ugl
 
@ASCII-only How? :)
 
what @ASCII-only
 
@Anush Surely you're asking for lowest asymptotic complexity, right?
 
10:22 AM
there is a big black docs there dude
 
@user202729 well yes
 
i had googled this and nothing came up so what the hell why the hell WHY
 
@gnu-nobody example programs pls
 
@ASCII-only I am pretty sure you should be able to do it in linear time
 
10:24 AM
it is in way too early stages
 
@Anush that wouldn't be surprising
 
@Mr.Xcoder Perl 6, 40 bytes Try it online!
 
@Anush Just repeatedly pick 2 random points, and the probability that those 2 lies on the same line (in the result) is at least 1/2. So you only need constant number of tries.
 
too early for example programs
like +2 5 prints 7 and such but there are literally 5 functions rn
 
@gnu-nobody but how to feedback if nobody knows what it's doing
 
10:25 AM
the docs
 
The average attention draw to a language is inversely proportional to the number of languages.
 
> There are no loops, lambdas,maps,filters etc do that.
:|
 
that is wrongly worded
 
> There are no variables in UGL. Everything is immutable,
and the user performs functions on them.
:| :|
> The result of the function is implicitly printed.
how to print more than one thing
 
>There are no loops ;;; lambdas, maps, filters etc do that
 
10:26 AM
concat, i guess?
 
yes
no
+
is concat
 
@user202729 interesting method!
 
so basically yes
 
The first symbol is when calling the function,
The second symbol is when passing the function as
argument.
 
because one of them produce plus({},{}) the other produce plus
 
10:28 AM
@user202729 so if we are in dimension d it seems trickier if we use that method, right?
 
@gnu-nobody hmm. what would accept a function as argument though
@Anush dimension d?
 
map, filter, fold, even *
 
@Anush The probability is still the same...
 
@Anush probability is 1/number of lines
nothing to do with dimensions
 
*<function><number> returns a function which takes one argument and returns the function applied to the argument number times for example
 
10:30 AM
@ASCII-only ... I don't think so.
Assume there are a1, a2, ..., an points on each of n lines.
 
@ASCII-only You need to pick d points to define a hyperplane in dimension d
 
The probability is (a1²+a2²+...+an²)/(a1+a2+..+an)².
@Anush So... not on a line, but on a d-hyperplane?
 
@user202729 right
hmm. then the chance would be a lot lower
 
@ASCII-only For two d-hyperplanes?
 
@user202729 Yes the d-1 dimensional equivalent of a line
so the chances are 1/2^(d-1) using the randomised approach
 
10:33 AM
@user202729 yeah. since you'd need more points to define a d-hyperplane
@Anush assuming an equal number of points on each plane
 
right
 
@ASCII-only (which is the worst case)
 
might be fun as a PPCG challenge in 30 dimensions
or it might be too hard.. always tricky to guess
 
People will definitely have a hard time thinking about any number of dimension >3.
 
actually a non random solution for d = 2 would be interesting too
 
10:36 AM
i have a theory that suggests god is infi-dimensional but it is not formal so not really a theory
 
is it rude to suggest you don't share it here?
 
@Anush Pick any 3 points. Of course 2 of them is on the same line. 3 tries, done.
 
@gnu-nobody wat
 
@user202729 very nice!
 
no, dimensions were mentioned, so i just wrote
 
10:38 AM
...
Is this deterministic method better or worse, on average?
 
@user202729 well you can make the method deterministic
just use the order the points came in :P
 
hmm.. so if I pick d+1 points in general. then d of them must be on the same hyperplane
isn't that much faster?
 
@Anush No.
 
why not?
 
@Anush yes. because a hyperplane is only defined by d points
 
10:39 AM
You need 2d-1 points.
 
oh I see
they might be a mix
so you don't know which d are on the same hyperplane
so now you have to find d points our of 2d-1 that are on the same hyperplane
 
@Anush or even if d of them are on the same hyperplane
for all you know half belong to each plane
 
right
so let's set d= 3
how fast in the deterministic algorithm?
 
@Anush is there one?
apart from the de-randomized random one
 
5 choose 3 is 10. Not sure about the average case.
 
10:42 AM
hmmm
 
@Adám Python, 24 bytes: lambda n:len(n.encode()) (Try it online!)
 
I can do the last CMC in 7 bytes in Dyalog APL.
 
CMC: Sample 10 points at random from two randomly chosen 2 dimensional planes
 
@Anush E.g.?
 
10:47 AM
@Anush Distribution?
 
@user202729 I'd assume linear if nothing else stated.
 
Linear in what?
You can't "sample a real number" right?
 
@Anush So you want 10 3D coordinates, which must all fall within two planes?
@user202729 Dunno, we need ranges.
 
@Anush How are the planes given?
 
@Adám yes
@BetaDecay you have to sample those too!
 
10:50 AM
In 3D right?
 
@user202729 uniform
@user202729 3D yes
 
It could be: chose two planes that intersect the (0,0,0)-(1,1,1) box. Within those two planes, find ten random points.
 
@Anush It is impossible to uniformly sample from a set with infinite measure.
The "known" part is super important in the linked post.
 
1
Q: Select a random hyperplane

user66307How can one generate a uniformly random $n$ dimensional hyperplane which passes through the origin? In 2d it seems one can pick an angle at random and draw a line from the origin at that angle. I am not sure what the right thing to do in higher dimensions is.

that's the link I meant to give, sorry
 
@Anush Ok, so the planes have to pass through (0,0,0).
 
10:52 AM
The "pass through the origin" is important in this post.
 
yes
sorry if that wasn't clear
 
@Anush Oh. So could I just choose the plane $a_\mu x^\mu = n\$ Where $a_\mu$ is a random hypervector and n is random
 
@Anush Do the planes also have a bound?
 
@Adám no... but the 10 3D coordinates just have to be distinct, not randomly chosen
please don't make any of the points at the origin :)
 
@Anush Oh, so I can just use (1,1),(1,2),(1,3), etc. and project onto one of the chosen planes?
 
10:56 AM
@Adám yes
as long as you end up with points on both planes
 
Could you simplify the challenge?
Maybe take the normal vectors to the planes as input
 
Is that like asking Leonardo Da Vinci to paint inside the lines? :)
@BetaDecay I could but I think it's less fun. I like challenges that require a little bit of work
otherwise, what's the point?!
 
:45980126 Can I always have one point on one plane and nine on the other?
 
@Adám oh ok
as long as none is at the origin
 
@Anush I'm beginning to think this challenge is a bit strange. Maybe simplify it to return 10 distinct non-origin points on a random (linear distribution) plane through the origin.
 
11:04 AM
@Adám why strange?
 
@Anush Too many arbitrary specs.
 
@Adám There are only 2 numbers in the whole thing! 10 and 3 :)
 
@Anush 3? I see a 2.
 
well yes. 3 was the dimension of the space which was implied
Maybe I should write a challenge that takes the dimension as a parameter
 
How about this:
 
11:08 AM
CMC: Given N, return a linearly random point in N-dimensional space where each coordinate is in the range 0 to 1 (inclusive or exclusive as you see fit).
 
10 points from two random planes
 
@Adám Brachylog, 5 bytes: ~lṙ₁ᵐ
 
ngn
@Adám oK, 1 byte: ?
4
 
Hello. When you are banned from a given SE website, let us say one year, are you allowed to create a new profile, give up on your suspended profile and never claim your reputation there, is this allowed or not?
 
11:20 AM
@J.Doe gunna go with no
99% of the time, creating a new account to bypass a ban on any website is against ToS
 
Ok, thank you for the info
 
@ngn !
8
 
Wait a minute... suspended, not question-blocked?
 
Yes, I am banned because I created a program in Python that takes advantage of the review queues
 
@Adám mOZ or mO0 in Pyth (Try it!)
 
11:22 AM
point still likely applies
 
.oO( what do I star, Adám's ! or ngn's ?? )
 
How 'bout both?
Why in the world does oK have such a built-in?
 
@Mr.Xcoder n uniform random floats.
 
I guess because it's an APL-like language
 
but APL's ? doesn't behave like that
in APL, it would be ?⍴∘0
 
11:25 AM
@user202729 ! ... I know that. But it's still terrifyingly arbitary
 
ngn
@Mr.Xcoder because the original k has it: kparc.com/k.txt see the line that says "generate"
 
Most language have generate random float in [0..1] (except Jelly). If nothing else, it's a natural extension.
 
CMC: Given N, return N distinct points in N-space with all coordinates being positive integers in the range 0 to N or 0 to N–1 (you choose origin).
 
ngn
@Adám if N isn't too large: (-N)?+!N#N
 
11:30 AM
@Adám Any distinct points or randomly chosen?
 
ngn
@Mr.Xcoder well, it wouldn't be very interesting if they weren't random
 
Pyth, 5 bytes (if randomness is required): <.S^U.
 
@Mr.Xcoder Oh, I forgot to say linear random this time.
 
Algorithm: Cartesian power of [0 ... N) and N, then shuffle and pick the first N.
This way they are also guranteed to be distinct.
 
@Mr.Xcoder Sure, but I've found a language (not Dyalog APL) which has built-ins to skip some steps for only 4 bytes.
 
11:38 AM
Well, Jelly? :P
 
@Mr.Xcoder Nope.
 
oK/K? Or J?
 
@Mr.Xcoder Yes.
 
Which one?
 
@Mr.Xcoder J
 
11:41 AM
I dunno J so :(
Anyway, Jelly, 4 bytes
 
@Mr.Xcoder What are those four?
 
seems my challenge wasn't CMC suitable.. sorry about that
 
ṗ` is Carteasian Power with itself (automatically creates a range) and the last two are shuffle and head respectively. Is it okay to chose the origin at (1,1,1,...,1)? Because this algo generates all coords in [1 ... N].
 
@Mr.Xcoder Oops, typo in CMC, I mean 0 to N-1 or 1 to N.
 
Ah great
@Adám I guess the J solution is similar, but J might have a dyad which takes N random elems of a list? (So both shuffling and head are not necessary?)
 
11:51 AM
@Mr.Xcoder Not exactly: The J solution I found was ]?#~ self distinct-linear-randoms-from replicate selfie (N dimensions of 0 to N-1).
 
Sorry for the repeated edits, poor internet because I just crossed the border between Austria and Hungary
I have to go now. o/
 
OK how about this easier CMC. Given two sorted lists of integers, output the intersection of the values in the order the came in. E.g.for [1,2,4,5] and [0,2,5, 23] the output should be [2,5]
 
ngn
@Anush APL:
 
:)
hard to interpret
 
Okx
CMC: Count the amount of zeroes in a number's binary representation, ie 482 -> 4
 
12:04 PM
@ASCII-only Where?
 
Jelly, 3 bytes: B¬S (or ASCII-only: BCS)
 
ngn
@Anush I meant the APL language has a built-in for that, e.g. 1 2 4 5 ∩ 0 2 5 23 is 2 5
 
Husk, 3 bytes: #0ḋ
 
right!
I was wondering how to do it in a single pass in python
I think we need to keep two counters, one into the first list and one into the second
but I can't quite get the logic right
can anyone do it?
 
Okx
@EriktheOutgolfer How does it work?
 
12:09 PM
B = convert to binary (boolean list)
¬ = logical NOT (ldepth 0)
 
did I get that right?
 
not sure, but that paste expires tomorrow...
 
 
12:21 PM
@Anush Yes, though why did you import random?
 
Debugging question go to Stack Overflow your debugger...
 
12:39 PM
@OMᗺ Thanks! import random was a copy and paste error :)
 
I've only been involved in Rockstar for 2 days but I've already learned a lot about parsers and lexers. Might be time for me to revisit Funcsational
 
I'm pretty new to golfing in R, and this answer I just drew up seems a bit too long - does anyone have any pointers for how to get rid of the multiple function(...) calls?
or any other hints?
0
A: Calculate the inverse of factorial

Taylor ScottR, 98 bytes A function which takes input z and outputs the inverse factorial of that number f=function(z)uniroot(function(a){integrate(function(x)x^a*exp(-x),0,Inf)$v-z},c(0,z+1),tol=1e-9)$r Try it online! Ungolfed and Commented inv.factorial = function(z){ # Declare function which ...

 
3
A: Tips for golfing in R

BLTWhen you do need to use a function, use pryr::f() instead of function(). Example: function(x,y){x+y} is equivalent to pryr::f(x,y,x+y) or, even better, pryr::f(x+y) Since If there is only one argument, the formals are guessed from the code.

 
12:59 PM
How can you implement the intersection of two sorted lists (with duplicates) without the equivalent of python's append? For instance, how would you do it in C? bpaste.net/show/060ca64397a9 has the code in python
 
@BetaDecay - I don't know how I skipped over that one when I checked the tips - Thanks so much for pointing me in that direction!
 
1:12 PM
2
Q: Stack Exchange Stock Exchange - V3

Beta DecayIntroduction Good evening, traders! You are all traders for the golfing company PPCG. Your task is to make as much money as possible. Challenge Write a program that buys and sells shares on the Stack Exchange Stock Exchange with the aim of making as much money as possible. Gameplay All playe...

 
the answers posted to my question about intersecting two sorted lists.. did they work if there were duplicates in the lists?
 
1:47 PM
Weather today: nuclear blast
 
@mınxomaτ Are you sure? That looks like an aurora to me. Maybe EMP?
 
Maybe it's a bacteria and is evidence of a plague.
 
@AdmBorkBork Is that a while blood cell on the lower left?
 
@mınxomaτ Considering the temperatures, that would be actually accurate
 
Could be. If so, it's doomed. I mean, look at the size comparison.
 
2:08 PM
@EriktheOutgolfer I have no idea how to do that.
 
just edit the post? ...
 
@mbomb007 The meta post about the LotM.
 
2:38 PM
@EriktheOutgolfer Oh, I thought you meant a ping list that would ping us every time someone posted an answer in SMBF.
Like, an automatic ping
 
what? no, considering what LotM tries to achieve, if done correctly, people in the list would've gotten a few useless pings every day if it was automatic like that
 
@gnu-nobody Suggestions: - instead of fold make a foldl and foldr version which can also act as fold?1 with a default value 0,[],"" etc. (depending on what it needs), that would be cool - concatmap? - fixpoints (std. fix, fix with an intitial value)? - is partial application a thing? - scan in the same spirit as fold
Also are infinite lists a thing?
 
Wait, is there any pinned message about LotM?
 
No, but it is
 
2:54 PM
@wastl Trailing newline.
 
@user202729 Oh, thanks!
 
(because TIO hello world includes a trailing newline. I don't know bc)
 
3:09 PM
So I'm testing a bot for @BetaDecay's KoTH, and I hit absurd prices very fast
 
@Mayube When there are no other bot...?
 
no I also put in a naive bot that does the whole "sell if price higher than buy price, buy if price lower than sell price"
I wonder if I just need more instances of the bot
 
3:21 PM
Yeah, probably
Add some random ones in too
To simulate the noise of a load of bots
 
3:48 PM
There you go Beta, wrote some simple bots to keep things going while I work on my """clever""" bot
 
restarts controller yet again
 
haha, I'm adding yours to mine now erik
OverflowError: cannot convert float infinity to integer
oh
 
um, what?
it's supposed to work in Python 3
 
I'm in 3.6.6
 
(although I'm pretty sure it works in Python 2 too)
3.6.6 should be more than enough
 
3:57 PM
it's not your bot
it's the controller
 
if you witness the event only when you add my bot, it means something is somehow returning very high values or infinities in my bot, however that's outside my control (I assume everything works)
 
one of the chimp bots got to inf balance
because the stock prices were so absurdly inflated
 
also, be careful with Mnemonic's "Buy Low", it currently doesn't work
 
I haven't seen that one yet, not using it
 
00:00 - 16:0016:00 - 00:00

« first day (2742 days earlier)      last day (2093 days later) »