« first day (2777 days earlier)      last day (2163 days later) » 

12:00 AM
 
 
2 hours later…
1:58 AM
This is also one of the reasons why I often drop to Bash for initial processing
A lot of the basic tools are ridiculously fast
If you strip out overhead, you can often get very well
 
2:19 AM
@RaghavSood i thought using Bash to run a java program to benefit from multithreading
Or is there a way to do that as well in bash?
 
The easiest would be to just fork
But then you might forkbomb yourself
I suspect you would get better performance multithreading in Java directly
Vs. launching multiple instances of a single thread from bash
The JVM will likely optimize for multiple threads if it's all together
Bash works best if you go the whole way in bash
 
Understood
that article is actually pretty interesting
hmm, actually forking might be faster if every process runs X threads, with the opposite of Java where you're stuck with 1 process
 
2:41 AM
Again, it depends a lot on your use case
You may very well be caught up in an XY problem
I would suggest first listing down exactly what you want to do, and what is a priority in doing it - speed, memory, reliability
Once you have that, pick the right tools
Don't pick the tools and try to fit them to a problem just because that shadow guy from the internet said bash is awesome :P
 
hahaha true :D
 
So, what precisely are you trying to do? :D
 
a batch (say every 10min) that's gonna visit all "to process" folders of a directory and perform: compression (video / images) / conversion (pdf / svgs) then bulk upload the processed files into S3 / then update the DB
so kind of CPU and Ram intensive, what currently worries me is if that the executor isn't finished before the next round of the cron, in which case I need to make sure the parallelism is performed at the max
 
Why not on demand as files come in?
What are the sizes of the files being converted?
What are the formats being converted for videos?
Why do you need to convert them at all?
What are these files used for?
 
- Why not on demand as files come in?
I'm gonna exhaust the CPU and RAM + bandwidth + stressing the DB too much - as all these processes may end up continuously looping
- What are the sizes of the files being converted?
could be from 100k to 250m
- What are the formats being converted for videos?
Videos will mainly be compressed not converted
- Why do you need to convert them at all?
Need to have everything besides videos, served as images (pictures) at the end
- What are these files used for?
Streaming
 
2:51 AM
Alright, sweet.
The approach I would take is:
Two separate programs for videos and non-videos
Each program, when it starts, acquires a lock on the to-convert dir
If the next batch starts before the previous one is finished, the lock will prevent it from overlapping/interfering
Each program simply does the task it needs to, and outputs into a new directory
Another program handles uploads to s3, but doesn't batch them. Instead, it's always uploading 4 files (you may be able to increase that number), so that files are instantly uploaded as they're processed
As for the actual conversion programs, I would do ffmpeg + bash for videos
For PDFs, I might move to python since they're hard to deal with in bash
Same for SVGs
I would avoid VM based languages like Java unless I need to, since they will take up a bunch of memory on a potentially limited machine
If you frequently find locks being hit, you need a bigger machine
Another option would be to upload directly to S3, and trigger lambda jobs to do the conversions
Lambda is quite cheap, integrates directly with s3, and is far more parallel than your machine
Especially since your conversion tasks are all independent and don't depend on each other
Additionally, if the video files aren't in the GB range, you could even get away with lazy converting them when someone tries to stream
Transcoding/compression is faster than the stream in most cases, so the users won't notice much
And once the first user triggers the lazy convert, you can save the result and serve that directly next time
This is helpful if a large portion of your content is unlikely to be access immediately after upload
 
> you could even get away with lazy converting them when someone tries to stream
 
You can almost always lazy-convert the documents
They're tiny
 
This is assuming your storage can take it until the request
 
The video bit depends on your files tbh
8k to 264 isn't gonna work
mp4 to 264 will
I'm assuming you're on AWS, if you go this route, you can easily get fast enough storage
Storage is rarely a bottleneck
S3 is cheap
 
The storage is, but the IO isn't :D
 
3:00 AM
You can do conversion in memory for 250MB videos too
s3 to memory to s3
Don't even have to touch the disk
 
> For PDFs, I might move to python since they're hard to deal with in bash, Same for SVGs
I managed to process them in Java using OS tools, like Pdf2Svg
so basically just running a command from java
> Another program handles uploads to s3, but doesn't batch them
Why wouldn't you batch them?
Thanks Raghav! I'll re-read everything slowly when I wake up, it's 3am, my brain is at 3% XD
 
3:35 AM
@MehdiB. If you batch them, you will end up with large amounts of data occasionally. If you process it as soon as it's done, you can keep it going
Network uploads are usually something you can do continously
Plus, spacing it out prevent AWS from eating up your burst limits
 
 
1 hour later…
4:38 AM
 
5:24 AM
that template has great meme potential, worth investing
 
5:58 AM
Morning
 
6:11 AM
morning!
 
\o morning
 
Beautiful.
 
the pic?
or suraj? wink
:D
 
user443346
o/
 
if it's the pic it's my city's dam :D
 
6:27 AM
lol.. my profile pic is of the sun.
 
nice pic eric
morning
 
Gooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo‌​oooooooooooood Morning You Beautiful People!!!!!!! :D
 
o{94}
 
@W0MP3R erm did you happen to mix something in your morning coffee?
 
no that's normal
the max so far i think is... 92 O's.
aprox
 
6:34 AM
oh ok then.
 
no that is normal for her
 
Feb 6 at 7:33, by W0MP3R
Gooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo‌​ooooooooooooooood Morning Everyone!!!!!! :D
 
@W0MP3R catalonia's average salaries are the highest of spain, and 13th of europe by region.
 
looks at pocket
not here.
are you taking my part?
 
6:35 AM
looks at empty pouch not here either
 
well apparently the avg salary here is 1790€, so someone is getting a big cut from me
 
@CptEric that is nice right?
 
Ohhhhh I have an idea
afk 30
 
looks at empty pocket
i guess.
@AdamMc331 i am still amazed at how good night pics are in this phone
 
@CptEric Is it after tax deduction?
 
6:38 AM
 
tho average salary dont mean much , india's avg salary is shit
 
yup ronak
yeah probably all the CEO's in barcelona pumping those numbers up
 
CF, real shit... Maybe Bangalore, Mumbai, Pune leading but not other cities.
 
the average salary except the 1% highest and the 1% lowest is the best statistic imho.
anything else is too skewed and unrealistic
 
1790€ is not bad after tax deduction but expenses matters.
 
6:41 AM
it's not bad but i'm nowhere near that
 
yeah what ronak
 
that's actually what's considered a rich person salary after tax deduction.
 
if i was earning what india's avg salary is , i would be in debt upto the top
eric maybe change company?
 
user443346
@CptEric For Spain maybe :p here it's average income
 
Dataset compiled
 
user443346
6:51 AM
Beep boop, hired for new job
 
@Jordy congrats
 
Of course. You can't pay castle upkeep with average salary
 
I am also nowhere near to average income.
 
cat W0MP3R | grep -Po "G(o+)d"
Who wants to guess what's happening
 
you are compiling a list of good morning messages of womper?
 
7:06 AM
@ColdFire nah it's a good salary compared to peers. it's just that high tier salaries are too big and fake the graph
 
oh ok
 
@Jordy yup. we know. cost of life is lower here tho.
 
@Jordy rich dutchies
 
user443346
Yeah we have expensive frikandelbroodjes
 
user443346
We have to pay for it one way or another so we increase the loans
 
7:07 AM
well there is no point of a 10k salary if even food expense is 5K per month
 
user443346
Golden frikandellen
 
CF agree.
 
agree, that's why US salaries so off
 
yeah and so is india's
 
Sometime it happens that single medical expense may empty your years saving in case if you don't have insurance.
 
7:11 AM
I mean, if your salary is 80K$ but a 30m2 flat is 1.5 Million $, what's the point?
and a broken leg is 24K$
 
tho India's real estate and housing is going high at a skyrocket pace
 
Yeah. Population.
 
i prefer to live in a country where the avg salary is 22K and a family sized house is max 4x times that
 
not just india
my apt is worth 10% more than last year
 
wow rich tim
 
7:14 AM
That's here too. 10%+ when we renew the rent agreement.
 
eric :- same
ronak that is rent
tim have his own house
 
well the bank owns 95% of it
 
my rent went down 5% lol
my renting company had to pay me back 28€
that i overpaid
 
Eric that really happens?
 
awesome
 
7:15 AM
when your rent is regulated by the regional government, it is.
 
Thats a really good news.
 
560 € rent is costly tho
 
there's not many houses that are regulated by gov, but some are.
 
quick maths
 
yea
 
7:16 AM
i just pay 50% of that :D
280€ me, 280€ the government, extra costs and services are on me.
 
280€ seems reasonable i guess
 
in NL you sign a contract and the rate can't be changed by anyone
 
and the government makes a yearly review of the soil price, services nearby, etc, and regulates the maximum and minimum costs
the better the "zone" is, the higher the max rent is. and vice versa
 
@CptEric wow such good government
 
yeah regional gov <3
 
7:18 AM
Sounds good.
 
the law is blocked on the constitutional court for overstepping on responsabilities, but the banks agreed with the regional gov to keep the measures anyway ( or they would loose every single penny the gov has on them)
the central gov dislikes a lot when regions make better measures than them and blocks them on the court for years
when a law enters court is automatically blocked until resolution, and can take up to 6 years for that.
 
@TimCastelijns well same tho contract renews every year and many times you have to pay a 10% hike
 
no you sign the contract once and it is not renewed
 
o/
well i was telling about here
 
7:22 AM
@TimCastelijns infinite length rent contracts? or you mean mortgage?
because the first sounds dangerours for the renter, but i like it
 
if your message travels to me through the internet, is "here" where you live or where I live? because the message is now here 🤔
mortgage
 
oh, here they can be renewed only the client
but there's two types of contract
 
o/
 
fixed interest, and variable interest
variable interest -> your interest rate is fixed at the euribor, currently at 0.2%
fixed interest -> your interest rate is the same always, currently banks offer 3-6%.
 
7:43 AM
I started watching SV btw. It's pretty funny
 
Pretty funny?
 
what am I saying.. this is the funniest shit ever
2
 
It's hilarious
Gilfoyle / Erlich / Russ are all hilarious
 
the theme and the jokes combined with the autism.. it is the embodiment of r15
2
 
I love the starting cartoon thing (you should watch out for the changes over each season, new companies appearing, some disappearing / crashing)
 
7:53 AM
SV is what R15 would look like if we all were rich and decided to move and make a company
 
Question is... who is who
 
@TimCastelijns SV?
silicon valley?
 
Dutch humor. Even a Blitzkrieg wasn't able to fix it....
 
8:06 AM
I like how a random ww2 joke appears
 
Hi, I need help with Room library and sqlite in general: hastebin.com/inoxeyakil.m I think my database schema/tables are flawed
 
I present to you... @W0MP3R Stats!
 
nice work.
 
sorry nobody here uses room I think
 
no problem, thanks.
this is where I need a TypeConverter I think, just reading about them.
oh, right, you like Realm.
 
8:15 AM
@TimCastelijns @AdamMc331 has used it
 
@RaghavSood its odd that the number of O's decreases on Friday/Saturday..
 
@rupinderjeet perhaps a better question, why don't you like Realm?
 
I guess W0MP3R is not a weekend person
Or maybe too much of a weekend person, and doesn't drop in here as much
 
yeah
 
8:31 AM
I do, but I can't use it in here.
At Job.
 
@RaghavSood lol... that sunday 'o'
xD
 
8:56 AM
o/
@MuratK. me
 
user443346
@CptEric Turns out your Catalonian goverment also commited fraud and stole 10 milion euro's to finance the Catalonian independent voting
 
that was the news this morning, you're late news
 
@RaghavSood wait how wat
 
not only you man, every day
 
now it's 2 millions by the barcelona metropolitan government on 2015, and nobody knows where it went to
 
user443346
8:58 AM
Own pockets + other shady stuff
 
probably
 
user443346
Some questions aren't really hard to answer
 
but not the gov, and not for the indyref ( not that i would have cared, it's my tax money anyway)
 
user443346
To supply hard evidence however..
 
yeah. the news also said that 500 policemen were sent and 10 people were detained
and now it's 50 policemen and one detained, the ex president of the metro zone in 2015.
 
9:16 AM
Howdy, does anyone know how can I get the colorPrimaryDark color from my theme programmatically? It is always returning the stock color and not the color set in my theme
and I am passing the activity context
(google fu has failed me on this one)
 
@Code-Apprentice move to the pyrinees mountains and i'll join you.
 
@TimCastelijns That was exactly the first one I tried, returns the default material grey color #ff757575
then I thought "maybe the view context is wrong, I should pass the activity that has the theme instead", still same result
 
are you sure you didn't miss any of the steps
 
I am
I also tried this one stackoverflow.com/a/39377287/524695 same exact result
 
9:24 AM
@Jordy the Gurtel corruption case has concluded
 
For the record, I am trying for the R.attr.colorPrimaryDark attribute
 
10 years of investigation, 1700 judicial files
 
because that is he one I changed in my theme
 
The ruling party of spain (PP)'s economy ministers and spokespersons between 1998 and 2014 condemned to 351 years of prison
 
My goal is to find whichever color my activity currently has as colorPrimaryDark
 
9:25 AM
@Shadow getPrimaryDarkColor();
 
@ColdFire Where does that even go to?
 
user443346
@Shadow He's trolling
 
oh...
So there is no way to find what is the current primary dark color set on an activity programmatically
 
user443346
ThemeHelper.getPrimaryDarkColor());
 
user443346
With ThemeHelper Lib i presume
 
9:30 AM
why would you need that though?
 
That's a library? I would prefer not to have to include it just for one single goal
 
i mean, aren't you the one defining it?
 
user443346
I wouldn't either
 
@CptEric I am, but the color changes during app use and requires the original one to be restored when needed
And that means those changes may occur with different themed activities
and I didn't want to pass the color manually every single time I need it
 
user443346
Can't you just read from your colors.xml?
 
9:31 AM
and why don't you store the state somewhere
instead of guessing via xml?
^an idea
 
@Jordy I can, but different themes = different primary dark colors
 
user443346
So after change, just get the color from your colors.xml and revert it to this value
 
user443346
Aaah okay
 
@CptEric How so?
 
have a database/helper/wathever of themes and values.
 
9:32 AM
It's just confusing that I can get the status bar color whenever I need to, but the rest appears impossible
@CptEric Holy hell, that would be worse than passing the values manually
 
why? if your app has N themes, the best is to encapsulate them
 
@rupinderjeet did they just vote against using it and wanted to use Room instead?
 
@CptEric It sounds worse than to just pass the values instead. all I wanted was to fetch the current primary dark color, that's it, why Android must be broken every 4 steps of code
 
ios is worse tbh. but what i'm saying is that you can't just pretend to have a infinite amount of themes with style setups on your app to set them programatically and set every value by hand without control
 
that's why resolveAttribute should work as expected
I would understand if this behavior was because I was using android.R.attr....
but I am not, why does it return the material value and not the themed one...
slams head on kb
 
user443346
9:38 AM
KGB?
 
get a rubber duck, review your code
 
user443346
I use a rubber Tim, it's basically a duck with a printed picture of Tim's head attached to it
5
 
user443346
Sometimes he even calls me a rookie
 
lol
 
our ducks are so so so ugly... we don't have the pretty american yellow rubber ducks here
 
9:40 AM
what ducks do you have?
 
"why Android must be broken every 4 steps of code" usually (not necessarily in this case) when this comes to mind it is a sign that you are trying to do something strange
 
user443346
You can order like 100 pieces for 60$ on aliexpress
 
here we do it too real, similar to this encrypted-tbn0.gstatic.com/…
 
user443346
Scratch that
 
user443346
100 for 20$
 
user443346
 
user443346
Had to shorten the URL juk - just buy the duckkies
 
oh god, eyebrow duckies
the ladies at the office would take them all
what the -
It works correctly for colorAccent
WHY?
 
android hates you, join the "go to X mountain and herd goats" wannabe club, like me or @Code-Apprentice
i stopped wondering why stuff doesn't work anymore
after BLE.
i just want technology to fall and go back to feudal simpler times.
 
I would agree with you, but I like flashlights that don't have fire risk...
 
user443346
@CptEric Me2, we will defeat you sooner this time
 
9:46 AM
@Shadow because it does
 
@Shadow check the primaryDark definition, maybe there is a typo or something
 
It does for colorAccent because...
BECAUSE IT IS NOT android:colorAccent !!!1
 
lol
 
(eureka light bulb)
 
on a serious note : colorAccent is a actual inbuilt attribute so it works
 
9:48 AM
primaryDark is too
 
maybe the attribute you are using doesnt exist?
 
yes it is, but it is defined as <item name="colorAccent"> in my style
the other one is <item name="android:colorPrimaryDark">
android: prefix!
 
:/
 
(going alnighter drunk at this point, my last breath)
drunk? no, drowsy
 
9:49 AM
so is this a problem or a solution? I don't follow
 
I am trying it at this very moment
I am afraid that...
IT WORKED!
the resolve attribute needed the android prefix
because that is what is being used in the style attribute
now things make sense again and thank you all for the help
 
sigh
 
(this is way better than our ugly rubber ducks that have no eyelashes)
 
user443346
Tim, shall I say it?
 
well glad you got it to work
 
user443346
9:51 AM
@Shadow Get back to the rookie corner
 
@TimCastelijns This was absolutely right
 
**noob corner
 
user443346
Dec 9 '16 at 17:02, by Tim Castelijns
I have an app that detects rookie mistakes all over the world, just received a notification from it
 
@Jordy Tercios Triggered
 
cool
5 mins ago, by Tim Castelijns
@Shadow check the primaryDark definition, maybe there is a typo or something
I take credit
 
9:52 AM
No
 
@TimCastelijns 2% interest credit
 
I prefer this one
https://chat.stackoverflow.com/transcript/message/42661299#42661299
what, it didn't quote ;_;
 
because you added text before it
 
dang it, I give up, time to get some sleep
thanks all for the help!
 
gn
 
9:57 AM
@MarkO'Sullivan no, it was more of "use something new, and modern. see google's improving room everyday, we will get better db".
 
user443346
@CptEric They're nothing vs our army of frikandellen
 
user443346
We developed a BUK-rocket that shoots frikandellen
 
@rupinderjeet Room seems to fit in well with their new architecture stuff
 
10:18 AM
o/
 
Yes, I think I have to learn this ViewModel thing, almost all examples are with ViewModels.
It seems too much, I just got hang of MVP yet.
But, anyway, good to be always changing, than being grumpy on just one skill.
 
10:50 AM
If a Presenter doesn't show anything on View, but just receives user interactions from View, is it still called a Presenter?
or Controller?
 
presenter is not defined by the specific interactions with its view, but by its role in the system. So yes it is still a presenter
 
I think most people just jump on mvp and don't actually know why they need it
in the end their presenter is literally just what they had in the activity before
 

« first day (2777 days earlier)      last day (2163 days later) »