« first day (2926 days earlier)      last day (1916 days later) » 

12:50 AM
any haskell experts here?
 
 
2 hours later…
2:47 AM
@flawr yea I meant the website :p nubleh.github.io/i_painted
 
 
7 hours later…
9:19 AM
@Riker oh neat:)
 
 
1 hour later…
10:34 AM
@Deadcode I think there is a fairly short regex solution to this since you only need to consider the largest prime factor. So with the appropriate multiplication and some fiddly work for when p < 14 it might be quite straight-forward. (I lack too much knowledge on multiplication to figure anything out)
 
 
1 hour later…
11:52 AM
@H.PWiz I've thought about that a little, but chose a different problem for my next post :)
 
 
2 hours later…
1:53 PM
@Deadcode: I've been interested in regex-with-backreferences recently for a quite different reason, and realised I don't know how backreferences work in complex situations; is there some concise/simple specification for explaining exactly what a particular backreference does in cases such as loops?
 
 
1 hour later…
3:10 PM
Does anyone know if it's possible to install a new R package on TIO ?
 
3:22 PM
@digEmAll Ask Dennis to do so in the TIO chat room

 talk.tryitonline.net

For general discussion and feature requests regarding tryitonl...
 
@Mr.Xcoder: oh thanks! sorry I didn't know of that chat...
 
3:53 PM
@Riker This is quite cool.
 
4:32 PM
here is a (slightly idealised) real life puzzle.I have a remote control car that takes 3 batteries. I can use it for one hour before the batteries go flat. I can recharge the batteries in a separate recharger and that takes 1 hour also. Unfortunately the recharger can only recharge either 2 or 4 batteries at a time and all the batteries must have an equal amount of charge to start with. What is the minimum number of batteries I have to buy so I can use my remote control car forever?
 
Probably 5 or, failing that, 7.
No, 5 doesn't work.
Use 3, swap'n'charge 2, swap'n'charge 4, repeat.
But it's probably best just to use the fourth battery charging point for something else.
Then you only need 6.
 
how do you do 6?
I use 3, then put a new set of 3 in and charge 2. Then what I do ? I only have 2 charged batteries
 
Stick a paperclip in the fourth charging slot, charge 3 batteries at once.
 
@wizzwizz4 I don't think that works
so do you think 7 batteries works ?
 
Electrocute self, burn down house.
@Anush Yes.
 
4:45 PM
so I use 3, then put 3 new ones in and charge how many?
it can only be 2
so then I have 3 to use
so I use those and charge 4?
is that the strategy?
 
@Anush Yes.
Though, IRL I wouldn't recommend it.
 
ok so then I have 4 charged and three used
 
Keep your batteries grouped together.
 
and it seems I can keep going forever?
 
@Anush Yes.
 
4:47 PM
why wouldn't you recommend it?
 
@Anush Devices don't use batteries evenly, so mixing and matching can cause problems.
Ahem. Reasons.
 
you mean one flat battery is not the same as another flat battery?
 
@Anush um... are you actually facing such a problem?
 
@EriktheOutgolfer yes!
the only idealisation is that it takes about 30 minutes to run the batteries down and 4 hours to charge them
 
the answer is, obviously, well, patience :P
 
4:49 PM
@EriktheOutgolfer sure but you still need a plan! :)
 
@Anush In which case the numbers work better.
It's an 8:1 ratio, not a 1:1 ratio, so you should only need 27 batteries and 8 chargers.
Making an assumption about the charging circuit of the chargers that may or may not be reasonable.
Namely that it will provide a fixed potential difference across the battery regardless of whatever's happening to the other batteries.
 
27 batteries is really expensive!
 
Not that expensive!
 
well 8 chargers are
 
It's less than three houses.
 
4:52 PM
welcome to Greece...
 
@wizzwizz4 a very good point
 
Once I've got three houses, I'll buy you 8 chargers.
 
are you looking to buy three houses?
 
Are you selling three houses?
 
:)
this has got surreal quickly
 
4:53 PM
If so, I think we've got a deal.
You get your battery chargers, and I get my three houses!
 
maybe a financial advisor would be cheaper... ;)
 
@EriktheOutgolfer Ssshhhh…
 
@Anush Can I interest you in ω houses?
 
@wizzwizz4 wait, what am I doing wrong? I'm just, eh, trying to prevent theft... :P
you won't silence me...
 
@Quintec of course!
 
5:01 PM
@Anush I suppose you won't mind if I do a small rotation and give you ε houses instead? :P
 
@Quintec It is a lot like a game of transfinite Monopoly here :)
 
@EriktheOutgolfer has been kicked from The Nineteenth Byte.
 
OuO
"Diamonds are forever - unless you misuse them..." hem
 
@Quintec Where'd my diamond go?
 
I stole it
 
5:08 PM
@Quintec Come back here!
 
flees
 
Thank you for returning it.
 
@Quintec Slightly more rotation gives you McDon..
 
@Bubbler That's not a number though.
That's what we started with.
 
I had to realize that sooner
 
5:12 PM
Does C have uint_fast64_t?
 
Cool and good.
 
5:33 PM
Did you know that malloc and free are completely useless if you have realloc?
 
realloc won't free the old memory if it fails to allocate.
 
@Dennis You can still do:
char *buffer = realloc(NULL, 17);
char *newbuffer;
if (!(new_buffer = realloc(buffer, 22))) {
    realloc(buffer, 0);
    fprintf(stderr, "NOOOOOOOOO!\n");
}
 
5:48 PM
Or you could just use free and malloc. ;)
 
@Dennis Ssshhhh…
 
@Anush Better solution: Get a charger like the MH-C401FS that can charge any number of batteries (1, 2, 3, or 4) with independent circuits.
 
I have come up with a legitimate use case, though; a dynamically-growing static list defaulting to NULL.
@Deadcode You only save 1 battery, though.
So, in the end, it really comes down to which is worth more: a charger or a battery.
 
Or peace of mind!
 
6:09 PM
> > Germans have a saying: Early is on time, on time is late, and late is unforgivable.
Does this mean that early is unforgivable?
Or is it a mapping?
In which case, wouldn't it be better to optimise it?
 
@ais523 In ECMAScript, a backref is only set when a capturing group is exited, and all backrefs created anywhere inside a loop are deleted when that loop repeats. In PCRE, a backref is set when a capturing group is either exited or it loops back to the beginning, and backrefs are never deleted (except by what I will subsequently explain).
In Perl, it's like PCRE, except that a backref that was set during a previous iteration of a loop will be deleted by directly experiencing 0 repetitions during a later iteration of the loop (for example, (something)? will be deleted if the ? directly results in evaluating it 0 times).
In all engines, backrefs are deleted when backtracking goes through the point at which they were set (or if they had a previous value, backtracking will restore the previous value), and all backrefs created inside a negative lookaround are deleted upon exiting the negative lookaround (except for some exceptions in Perl which I haven't 100% researched).
 
@Deadcode Why isn't PCRE the same as Perl?
 
6:51 PM
@wizzwizz4 Well that's the question, isn't it? ;) "Perl compatible" is right there in the name.
There are plenty of other ways it's different, too.
 
7:06 PM
@Deadcode thanks
 
 
1 hour later…
8:31 PM
@wizzwizz4 has been requested to peacefully resign or the diamond will be taken away by force :P
 
You'll never take me alive! … again.
 
.oO( silencer is dead... nice ) ;P
.oO( looks like he tried to silence our Dennis too... does he have no shame... )
 
9:25 PM
Is anyone here familiar with Mathematica?
 
some
 
I'm trying to evaluate a sum of some complex numbers: Total[{1 , E^(2*I/3*Pi) , E^((4*I)/3*Pi)}] This sum should be zero, but I just get the same "symbolic" expression back.
Is there a way to tell mathematica to evaluate it?
 
@flawr Sum?
 
@wizzwizz4 that is what Total[] does.
 
Well you can wrap the whole thing in Simplify[]
 
9:33 PM
Or N
 
@PhiNotPi hm that seems to work, thanks!
@Pavel N?
 
@flawr If Simplify didn't work you could try N
But it did work
 
N[] basically evaluates expressions (like "2/3" which is normally left as a fraction) into a float ("0.666667")
 
In this case it actually gives about 4.4*^-16 though
 
Ah so N[] only evaluates the values numerically (using floating point numbers)?
 
9:48 PM
Yep
You can mitigate this using higher precision or use Chop[] to set small numbers to 0
 
Ah well in my case I need exact results so I have to rely on algebraic maniplations.
Thanks a lot for the help, everyone!
 
If you just want whether it's zero, there is PossibleZeroQ
 
I've found other functions with this Q-suffix, do you know what it means?
 
It returns a boolean
That's about it
 
I'm just guessing that it stands for "Query"
 
9:57 PM
oh, that makes more sense. I thought it has something to do with rational numbers :D
 
Can someone convince @wizzwizz4 that codegolf.stackexchange.com/a/179392/39328 is smaller than Loader's number (or prove me wrong?)
 
@lirtosiast I would also like that convincing.
My brain shuts down when numbers get that big.
 
I agree, numbers greater than three might be of theoretical interest but have no practical use whatsoever.
12
 
My assessment that it's stronger is that Loader's number is basically that Loader's number is the largest number expressible in the calculus of constructions, which is fairly powerful
And thus manually composing functions together can't beat it, since you can probably do that in the calculus of constructions
But that's not rigorous
 
If H(ω², 3) = 24, and h(3, 3, 2, 5) = 3^(2^5) (Hardy, hyperoperation), then I can try to represent my number.
Actually, h will need to be defined slightly differently.
 
10:06 PM
@ASCII-only Haskellers read this channel lazily if at all, so you cannot expect to reach us on the spot. Also don't ask to ask.
2
Also, there's a Haskell chat.
 
Also, not many will admit to being an "expert"
 
(I admit nothing!)
 
h is like that, except if you wrote h(ω², 3, 2, 5) and "n" (the current parameter to H) was currently 3, it'd do h(ωω, 3, 2, 5) = h(ω*3, 3, 2, 5) = h(ω*2 + ω, 3, 2, 5) = h(ω*2 + 3, 3, 2, 5) = h(3, 3, 2, 5) (discarding everything except the last term).
 
I don't need exact, just a very loose upper bound
 
@H.PWiz I admit that @H.PWiz is an expert.
 
10:10 PM
Damn!
 
Now, w is ω, and w_n is ω_n.
@flawr All those years of building up a secret identity, and you ruined it!
 
(though to be fair, I know little further than code golf)
 
so... now that we've admitted @H.PWiz is an expert, well, any expert tips for golfing in Jelly? :P
 
@H.PWiz that is what I'd expect an expert trying to hide his expertise to say.
 
a is a strange thing that can't really be represented with the Hardy hierarchy by me, because I'm not an expert, so I expect @H.PWiz to fix it for me.
 
10:22 PM
Basically, a(0) becomes h(h(ω_n, ω_n, ω_n), h(ω_n, ω_n, ω_n), h(ω_n, ω_n, ω_n), h(ω_n, ω_n, ω_n)), a(1) becomes…
h(h(h(ω_n, ω_n, ω_n, ω_n, ω_n, ω_n), h(ω_n, ω_n, ω_n, ω_n, ω_n, ω_n), h(ω_n, ω_n, ω_n, ω_n, ω_n, ω_n), h(ω_n, ω_n, ω_n, ω_n, ω_n, ω_n), h(ω_n, ω_n, ω_n, ω_n, ω_n, ω_n), h(ω_n, ω_n, ω_n, ω_n, ω_n, ω_n), h(ω_n, ω_n, ω_n, ω_n, ω_n, ω_n), h(ω_n, ω_n, ω_n, ω_n, ω_n, ω_n)), h(h(ω_n, ω_n, ω_n, ω_n, ω_n, ω_n), h(ω_n, ω_n, ω_n, ω_n, ω_n, ω_n), h(ω_n, ω_n, ω_n, ω_n, ω_n, ω_n), h(ω_n, ω_n, ω_n, ω_n, ω_n, ω_n), h(ω_n, ω_n, ω_n, ω_n, ω_n, ω_n), h(ω_n, ω_n, ω_n, ω_n, ω_n, ω_n), h(ω_n, ω_n, ω_n, ω_n, ω_n, ω_n), h(ω_n, ω_n, ω_n, ω_n, ω_n, ω_n)), h(h(ω_n, ω_n, ω_n, ω_n, ω_n, ω_n), h(ω_n, ω_n, ω_n, ω_n, ω_n,
 
@H.PWiz The "don't ask to ask" link pretty much covers that too.
 
@wizzwizz4 is this some new APL bullshit
 
more like an overly long message... ω is the ordinal symbol
 
and a(2) becomes something bigger than fits in my computer's RAM.
 
@wizzwizz4 Tip: "bigger than fits in my computer's RAM" is completely insignificant for this particular question.
The same applies to "atoms in the universe" and the like.
 
10:25 PM
By the way, ω_n is actually {ω_0, ω_1, ω_2,…} where ω_0 is {0, ω, ω*2, ω*3…} and ω_1 is {0, ω_0, ω_0*2, …}.
 
0
A: Sandbox for Proposed Challenges

qwrSLIPpery Packets The Serial Line Internet Protocol is an early internet protocol, used to essentially escape any "packet END" bytes that may appear in a packet. It has since been replaced by the more sophisticated Point-to-Point protocol, however it is still preferred on microcontrollers and low...

 
@ØrjanJohansen I am aware.
I don't comprehend that, though.
Anyway, a(9) isn't that big, but H(h(9, a, a), 9) is pretty big.
I don't know whether it's big enough, though.
I plan to make a new version, v2, where h(a, b, c) is identical to h(H(a, n), b, c) for non-integer values of a.
That'd be better-defined, but is not what we're discussing right now.
And I've got to go, so I can't discuss; if anyone can sketch a basic proof as to an upper bound on my number, and if that upper bound is less than loader.c, then I'll delete my answer.
 
actually... the burden of proof is on the answerer
 
@wizzwizz4 I don't understand these fast-growing ordinal notations, but in some sense this amounts to the question of whether the CoC programming language can define the construction you use. If it can, then Loader's number immediately blows it out of the water.
Although I seem to recall that for fast growing functions, constructing them in CoC basically requires constructing something like the corresponding ordinal in order to have a termination proof, so the two ways of seeing it may be equivalent.
(I don't really understand CoC either, mind you :P)
 
10:59 PM
@Neil Looks like I beat your Retina solution for Rocco numbers by 1 byte. Mine converted to Retina would be 67 bytes.
(5 bytes of overhead for converting decimal to unary)
 

« first day (2926 days earlier)      last day (1916 days later) »