« first day (2234 days earlier)      last day (2611 days later) » 

11:02 PM
Gah, there's a Memory Leak in the Java File Watcher I'm writing.
 
Java's Garbage Collector is reasonably good at not leaking anything
 
Does Java use ARC?
 
It fails to collect itself, though
 
Or equivalent
 
11:07 PM
Java uses a generational GC
PHP uses ARC with the occasional mark and sweep when it's really desperate
 
No-matter how good Java's GC is supposed to be, Apparently it's not good enough in this case.
At first I had assumed it was because I was using HashMaps or Stacks, but they're not the source of the leak.
My guess is that WatcherService is terrible and should feel bad.
 
Yuck Java uses dynamic GC
 
Java actually has 4 garbage collectors
And I think an API to write your own?
 
0
A: Answer-Chaining - Positive divisors of a number

Mistah FigginsAnswer 15, Befunge-98, 15 &f!0pv ' %QTS|Q" @ ░┼_¥f : : + ! vUGw((( {})<>)){((({}[() ] < n=int(i nput({})(<>))><>) < {i=1di v = w v hile(({ })){({}<>)){ifn%i== g 0 0 div.app en d(i)i=i+1}printdiv)}#R{}T : . eX╜R; j ...

 
11:10 PM
Apparently all threads are blocked until GC finishes
 
but isn't arc really slow
 
Not too much - and it's better spread out
 
@ГригорийПерельман Know a good way to spot Memory Leaks?
 
@Dennis Speaking of which, Python 3.6 when?
@ATaco I think there's a tool called jProfiler?
 
JProfiler isn't free but is really really good, much lighter-weight and flexible than the profiler that comes with NetBeans.
 
11:16 PM
@ATaco Task Manager :P
 
I haven't ever tried Eclipse's (does it have one?)
 
I have currently disabled my laptop's touchpad because the driver leaks non-pagable memory...
 
ooof
 
@ATaco What IDE are you using?
 
What kind of terrible driver is that
 
11:19 PM
Eclipse.
 
windows?
 
Don't hate me.
@ASCII-only And I know there is a memory leak, I just don't know why.
 
iirc Eclipse has a memory profiler built in
 
Synaptics. I think it was OK in Windows 8...
 
11:20 PM
Downloading Now...
I'm running this on a Prod Server, can't have a memory leak.
 
I thought huge RAM was considered the cost of doing business with Java.
 
Huge Ram is fine.
Infinitely increasing RAM is not okay.
 
As long as it's consistent
 
It's got a Base usage of 20MB/s, which is more than fine.
 
Just destabilize the program a bit so it needs to be reset every so often.
 
11:22 PM
Just do what PHP does, and restart every once in a while (several times a second)
 
I was tempted to do that; but I also decided it would be better to not.
 
You can manually call System.gc()
 
TIL Wikipedia has a page called "Australia's big things"
The big things of Australia are a loosely related set of large structures, some of which are novelty architecture and some are sculptures. There are estimated to be over 150 such objects around the country, the first being the Big Scotsman in Medindie, Adelaide, which was built in 1963. There are big things in every state and territory in Australia. Most big things began as tourist traps found along major roads between destinations. The big things have become something of a cult phenomenon, and are sometimes used as an excuse for a road trip, where many or all big things are visited and used as...
 
11:25 PM
Australia has a lot of Big things.
Like A Giant Pineapple, Sheep, Guitar, Etc.
 
They even have wood bananas they use as weapons
 
Oh, the GC is never running.
That may be why it's leaking.
 
Try calling System.gc()
 
11:26 PM
How does it happen that the GC never runs?
 
You're doing it wrong if you need to call the GC manually
just assume that Java will expand to its max. allowed memory and let it do so
 
We've already determined that something is wrong
 
System.gc() is ignored 99% of the time.
 
I'm running my main loop on the main thread.
This is usually considered bad practice.
 
11:29 PM
@quartata for(int i:new int[100])System.gc(); :P
 
@ГригорийПерельман 10? You must have meant 100.
 
Not that kind of non-determinism.
 
So now it occasionally actually runs the GC.
 
I spend far too long optimizing when all I had to do was actually use the GC built into it.
 
Just give it less memory...
 
Gosh, now my code is actually not-wasteful, what kind of coder am I?
All that would achieve is make it crash faster.
 
That's not really how System.gc(); works so I'm not sure what kind of crazy code you're doing
 
Have you tried it?
Java only cares about memory when it runs out
 
11:31 PM
Well, I had a lot of objects being created and de-referenced.
You can generally assume that if there's a bad practice I was following it.
There's a good little Java file.
 
Congratulations, you have just created an OCD wretch.
 
Huh?
 
@ГригорийПерельман Not sure. That would require installing a fourth copy of all Python modules on TIO.
 
Really? Can't 3.5 and 3.6 use the same modules?
 
Wait, I'm not yet using RHB, Give me two seconds...
 
11:36 PM
@ГригорийПерельман No.
 
Please tell me you're not actually running System.gc one hundred times in a row?
 
No, I'm running it once every minute or so.
 
But... the modules are written in Python, and python 3.6 is backwards compatible with 3.5
 
@ATaco eh, still bad
 
I'd love to do it automatically, but I'm using the main thread to do the loop.
 
11:38 PM
Why is System.gc() so bad?
 
Java runs the GC when it needs memory. Just set the memory limit lower and it will GC more often.
 
No, then it crashes faster.
 
Don't set it that low then.
 
It was crashing at it's current memory limit.
 
Give it some breathing space
 
11:41 PM
Java wont interrupt the main thread, not even for something as necessary as GC.
The proper way to handle this is to move it from the main thread.
 
it definitely will
 
@ГригорийПерельман @ATaco @MatthewRoh How exactly is this too broad?
 
Java attempts GC just before throwing OOM
 
 
EEEEK
 
11:43 PM
^
 
Those examples are clearly supposed to just be test cases for a challenge that cannot be realistically solved.
 
@Dennis I misinterpreted the question, I was going to reopen vote but my internet wasn't working when I tried to, and then I forgot.
 
@ATaco and with that screenshot, I"m outta here
 
If they just want all those examples to be solved, than it's a silly question but not too broad, otherwise, it's too broad.
 
11:45 PM
@ГригорийПерельман I've never understood the appeal for RHB
 
There is no appeal.
That's the appeal.
 
ATaco has a script to convert code to RHB
 
It's bad for the purposes of being bad
 
11:46 PM
Like Hotdog.vim
 
Tried googling RHB but just found a bank.
 
Right-hand brace style
ATaco invented the name also
 
Google doesn't get money by showing you a coding style...
 
I prefer reverse indentation.
 
11:48 PM
How about the fibonacci indent?
 
54
Q: Reverse indentation

Doorknob I've heard that your code can run faster if you indent it in reverse, so that the compiler can process it like a tree design pattern from the very top of the "branches" down. This helps because gravity will speed up the time it takes for your code to be compiled, and the data structure efficien...

 
@ATaco you missed the for brace
 
I just ran one of the answers to the challenge...
 
Bum-Bum
 
11:51 PM
Language!
 
RProgN!
 
translate: bumbum
(from Portuguese) butt
 

« first day (2234 days earlier)      last day (2611 days later) »