<maloik>
It has to do with continuous running of certain tasks while spreading those runs to not overload the system
marr has joined #ruby-lang
sedrickcz has quit [Ping timeout: 256 seconds]
Join has joined #ruby-lang
Join is now known as Guest51175
crudson has quit [Quit: Leaving.]
leekiernan has joined #ruby-lang
tonni has joined #ruby-lang
rsync has left #ruby-lang [#ruby-lang]
hhatch has joined #ruby-lang
PacketMonkey has quit [*.net *.split]
_rgn has quit [*.net *.split]
yxhuvud has quit [*.net *.split]
erichmenge has quit [*.net *.split]
supki has quit [*.net *.split]
Glass_saga has quit [*.net *.split]
chris2 has quit [*.net *.split]
matled has quit [*.net *.split]
jstemmer has quit [*.net *.split]
ndrst has quit [*.net *.split]
freedrull has quit [*.net *.split]
antbody has quit [*.net *.split]
danrabinowitz has quit [*.net *.split]
vadviktor_ has quit [*.net *.split]
matled has joined #ruby-lang
supki has joined #ruby-lang
freedrull has joined #ruby-lang
danrabinowitz has joined #ruby-lang
_rgn has joined #ruby-lang
Guu has joined #ruby-lang
yxhuvud has joined #ruby-lang
Guest51175 has quit [Quit: ChatZilla 0.9.90.1 [Firefox 23.0.1/20130814063812]]
torrieri has joined #ruby-lang
torrieri has joined #ruby-lang
SteveBenner009 has joined #ruby-lang
SteveBenner09 has quit [Write error: Connection reset by peer]
torrieri_ has quit [Write error: Connection reset by peer]
PacketMonkey has joined #ruby-lang
erichmenge has joined #ruby-lang
ohsix has quit [Excess Flood]
ohsix has joined #ruby-lang
vadviktor_ has joined #ruby-lang
ndrst has joined #ruby-lang
fsvehla has quit [Quit: fsvehla]
axsuul has quit [Ping timeout: 251 seconds]
chris2 has joined #ruby-lang
sedrickcz has joined #ruby-lang
<yorickpeterse>
what exactly are you trying to rubberduck?
<yorickpeterse>
there's not much to say about this snippet
<maloik>
I'm just not sure if that's a decent way to spread those jobs being run
<yorickpeterse>
Easiest would be to just schedule them with a time in between
<yorickpeterse>
unless they have a greatly varying execution time
<maloik>
we can't "schedule" in that sense, we can just send something off into our queue
<yorickpeterse>
Yeah, but there's where you can schedule
<maloik>
so scheduling would mean figuring out which objects to do the queue for and running that method several times per day
<yorickpeterse>
as in, you schedule when to shoot it to the queue
<maloik>
also, just found this little gem: if %w[production sandbox].include?('production')
<yorickpeterse>
Some of our systems work that way: a cronjob schedules data every now and then, which is then processed separately using an AWS queue
arBmind has joined #ruby-lang
<maloik>
yea but I suppose my question is a) is it logical to create all of those cron jobs, isnt there a better way and b) does the spreading method make sense at all or is there just an easier way
elia has joined #ruby-lang
fsvehla has joined #ruby-lang
tonni has quit [Remote host closed the connection]
tonni has joined #ruby-lang
tonni is now known as ta
ledestin has joined #ruby-lang
fsvehla has quit [Quit: fsvehla]
thillux has joined #ruby-lang
heftig has quit [Ping timeout: 245 seconds]
linc01n has quit [Ping timeout: 260 seconds]
Emmy is now known as EMMY
linc01n has joined #ruby-lang
lsegal has quit [Read error: Connection reset by peer]
lsegal has joined #ruby-lang
hahuang65 has quit [Read error: Connection reset by peer]
vlad_starkov has joined #ruby-lang
hahuang65 has joined #ruby-lang
hakunin has quit [Read error: Connection reset by peer]
hakunin has joined #ruby-lang
scottschecter has quit [Read error: Operation timed out]
zenspider has quit [Read error: Connection reset by peer]
zenspider has joined #ruby-lang
Mon_Ouie has quit [Ping timeout: 276 seconds]
vlad_starkov has quit [Ping timeout: 264 seconds]
scottschecter has joined #ruby-lang
bzalasky has quit [Remote host closed the connection]
MaddinXx has joined #ruby-lang
vlad_starkov has joined #ruby-lang
EMMY is now known as Emmy
vlad_sta_ has joined #ruby-lang
vlad_starkov has quit [Ping timeout: 260 seconds]
heftig has joined #ruby-lang
Voker57 has joined #ruby-lang
<yorickpeterse>
well gee, Wednesday "Yorick finds potential holes" in software
<yorickpeterse>
* day
havenwood has quit [Remote host closed the connection]
BobuSumisu has left #ruby-lang ["WeeChat 0.3.8"]
Pupeno has joined #ruby-lang
Pupeno has joined #ruby-lang
nneko001__ has quit [Quit: Konversation terminated!]
nneko001__ has joined #ruby-lang
faces has joined #ruby-lang
linc01n has quit [Ping timeout: 264 seconds]
face has quit [Ping timeout: 240 seconds]
linc01n has joined #ruby-lang
ironcame1 is now known as ironcamel
Criztian has joined #ruby-lang
judofyr has joined #ruby-lang
sascha_d_ has quit [Quit: obai]
sedrickcz has quit [Ping timeout: 260 seconds]
sedrickcz has joined #ruby-lang
linc01n has quit [Ping timeout: 260 seconds]
linc01n has joined #ruby-lang
<Dernise>
morning
Johz has joined #ruby-lang
zmike1234 has joined #ruby-lang
SteveBenner009 has quit [Quit: Leaving]
gja has joined #ruby-lang
gja has quit [Changing host]
gja has joined #ruby-lang
<yorickpeterse>
HNNGNGGGG I don't like it when people just remove config options without some warning
<yorickpeterse>
Devise apparently renamed `pepper` to `secret_key` so it just shits itself because the latter isn't set
<yorickpeterse>
`gem update devise` "...Updating devise_invitable..." WAT
Guedes0 has left #ruby-lang [#ruby-lang]
Guedes has joined #ruby-lang
Guedes has quit [Changing host]
Guedes has joined #ruby-lang
thebastl has quit [Ping timeout: 264 seconds]
maxmanders has quit [Quit: Computer has gone to sleep.]
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
fosky has joined #ruby-lang
relix has joined #ruby-lang
<judofyr>
ljarvis: wat
<judofyr>
indeed
hogeo_ has joined #ruby-lang
lsegal has quit [Quit: Quit: Quit: Quit: Stack Overflow.]
hogeo has quit [Ping timeout: 276 seconds]
rolfb has joined #ruby-lang
thebastl has joined #ruby-lang
<TvL2386>
hi guys, I'm making a gem and would like to require lib/*.rb What would be the correct way to do this?
<ljarvis>
TvL2386: require the files you need separately
realDAB has joined #ruby-lang
vlad_sta_ has quit [Read error: Connection reset by peer]
vlad_starkov has joined #ruby-lang
jstemmer has joined #ruby-lang
torrieri has joined #ruby-lang
postmodern has quit [Quit: Leaving]
<ljarvis>
also your gems files should be in lib/gemname/ and required by lib/gemname.rb you you dont pollute the load path
maxmanders has joined #ruby-lang
maxmanders has quit [Client Quit]
maxmanders has joined #ruby-lang
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Mon_Ouie has joined #ruby-lang
poga has joined #ruby-lang
torrieri has quit [Ping timeout: 264 seconds]
fosky has quit [Ping timeout: 264 seconds]
<TvL2386>
ljarvis, that's a shame, I was hoping to dynamically load all my files
<TvL2386>
thanks!
<ljarvis>
TvL2386: it's possible, but it's generally a bad idea
<ljarvis>
TvL2386: but if you really want it: Dir['gemname/*.rb'].each { |f| require f } (or **/*.rb for recursive globbing
hashkey has quit [Quit: Leaving]
<TvL2386>
ljarvis, I have lib/gemname/client/*.rb and the idea is that it will become large and when adding new stuff, it will be there. Order of loading is not important
thebastl has quit [Remote host closed the connection]
thillux has quit [Remote host closed the connection]
hogeo_ has quit [Remote host closed the connection]
<yorickpeterse>
just use require()
<yorickpeterse>
as mentioned
gja has quit [Quit: This computer has gone to sleep]
hashkey has joined #ruby-lang
<TvL2386>
doing that... :)
thebastl has joined #ruby-lang
yfeldblum has joined #ruby-lang
a7d7p has quit [Quit: a7d7p]
Vade101 has joined #ruby-lang
<Vade101>
Hey all, i wonder if anyone can help me, i am learning ruby by building a small log parser for work. and i am having an issue with File.file?(filename) i am looping on a directory using Dir.foreach(folder) do |item| and for some reason the File.file? is not regonizing the files in the folder altho i know they are there
ldnunes has joined #ruby-lang
<ljarvis>
Vade101: make sure you're expanding the path to the files (Dir.foreach doesn't do that) so iron out any inconsistencies
<Vade101>
ah
<Vade101>
is there somewhere easy to paste my code so you could take a look?
<ljarvis>
gist.github.com
<ljarvis>
remember Dir.entries("foo") will return ["bar.txt"] not ["foo/bar.txt"]
<Vade101>
i put in aFile = File.expand_path(item) then i checked if it is a file
<ljarvis>
and that returns false?
Johz has quit [Ping timeout: 240 seconds]
<Vade101>
ah i am being an idiot my problem isnt there at all.... the problem is more inside, it is opening the file and failing on the line.include?
<ljarvis>
:)
<ljarvis>
fwiw you can also do File.open("...").each_line do |line| ...
tomzx_mac has joined #ruby-lang
<Vade101>
is that a prefered way to do it? - this is only my second day playing with ruby :p
benlovell has quit [Ping timeout: 256 seconds]
<ljarvis>
there are many ways to do it, I would do File.open('...') do |f| f.each_line do |line| ...
linc01n has quit [Ping timeout: 245 seconds]
linc01n has joined #ruby-lang
<Vade101>
thanks ljarvis, i really appreacte the help :D
poga has quit [Remote host closed the connection]
arBmind1 has joined #ruby-lang
thebastl has quit [Remote host closed the connection]
linc01n has quit [Ping timeout: 264 seconds]
arBmind has quit [Ping timeout: 256 seconds]
linc01n has joined #ruby-lang
a7d7p has joined #ruby-lang
<Vade101>
@ljarvis sorry bud, 1 more quick question, is there a way which i can quickly scan a file for a string? without reading in every line, line by line? basically in a logfile there will be a line starting with #Fields: if its not there then i dont want to do anything with it. or is the only way to do it, to read it in line by line, and then do it again if it is a logfile?
Criztian has quit [Remote host closed the connection]
<Vade101>
the directory it looks at is a bunch of txt files. but "not a file" is triggered each time
tonni has joined #ruby-lang
<andrewvos>
maybe it's a directory then
<andrewvos>
#where the magic happens!
<Vade101>
haha i know my senior dev just told me off about that :p
<Vade101>
i output the aFile to check what it is checking, and it is defo linking to the text file
gja has joined #ruby-lang
gja has quit [Changing host]
gja has joined #ruby-lang
<andrewvos>
Vade101: Might want to use File.directory?("name")
a7d7p has quit [Quit: a7d7p]
<andrewvos>
Why are you naming your variable aFile
<andrewvos>
?
<andrewvos>
What does the a signify?
<Vade101>
it is a test, this is only my second day doing ruby, i am doing this to learn :)
<Vade101>
@andrewvos I just added an elsif to test if it thinks its a directory but it doesnt
<andrewvos>
Oh ok
threecreepio has quit [Quit: threecreepio]
joshuairl has joined #ruby-lang
vlad_starkov has quit [Remote host closed the connection]
<andrewvos>
so what line of code is causing your error?
<andrewvos>
Vade101: You might just want to use some code like this: Dir.glob("*.log").each do |log_file|
<Vade101>
well theres no error persay but its not doing what i expect, so this line: if File.file?(aFile) should ring true as aFile = /Users/Alan/RubymineProjects/Log_Parser_v1/download.digitaltheatre.vualto.com-136942134361687372.txt in this example
<andrewvos>
Though I probably shouldn't have helped you that much :)
<Vade101>
i didnt want to use something that limits to .log as sometimes its a .txt
<andrewvos>
Dir.glob("you_directory/*.txt") is probably what I meant to say
<ericwood>
yorickpeterse: ya gotta make sure Review exists!!!!!
sascha_d has joined #ruby-lang
<andrewvos>
yorickpeterse: Yeah man. First line of code in any project I write.
<yorickpeterse>
No no, exists?() is a Mongoid method here
carraroj has quit [Remote host closed the connection]
<yorickpeterse>
So it doesn't actually check the Review constant
<andrewvos>
hahahah
<yorickpeterse>
It will still blargh if it's not there
<ericwood>
lol that's even better
<yorickpeterse>
I also fucking hate how Mongo is a little bitch and can't count 35m rows
<yorickpeterse>
Review.count # errrr sorry mate, Imma go shit myself now
linc01n has quit [Ping timeout: 264 seconds]
<yorickpeterse>
TABLE SCANS YO
<yorickpeterse>
WEBSCALE
<yorickpeterse>
JSON
* yorickpeterse
bangs head
<ericwood>
brb shitting myself
<ericwood>
yorickpeterse: well, at least mongomapper is in C now
<ericwood>
I remember using it in the early days when it was pure ruby and it was slow as ballz
Criztian has joined #ruby-lang
<yorickpeterse>
We don't even use Mongomapper
sascha_d has quit [Client Quit]
killthe|slp is now known as killtheliterate
<yorickpeterse>
We use Mongoid, which is slow as shit in a lot of cases
<ericwood>
yay!
<yorickpeterse>
as in, you can run the same query in the mongo shell and it will be at least 2-3 times faster
<ericwood>
>.>
<ericwood>
<.<
<whitequark>
a mongad is a mongoid in the category of endofungstors
linc01n has joined #ruby-lang
<ericwood>
yorickpeterse: punch it in the monoids
<yorickpeterse>
a what
<yorickpeterse>
Pretty sure mongoid is a category of mold
<yorickpeterse>
errr species or w/e
<ericwood>
fancy computer-y words
<Vade101>
@andrewvos i worked it out... but its stupid, the file runs as expected if the files are in the same folder as the ruby script.... but it shouldnt argh!
benlovell has quit [Ping timeout: 276 seconds]
lfox has joined #ruby-lang
<Vade101>
aFile = File.expand_path(item) puts it to the local path of the ruby script. it doesnt get the full path from the item from the dir loop
<yorickpeterse>
wait a minute, this isn't even using Mongoid
<ericwood>
lol
<yorickpeterse>
Oh, it uses Mongomatic
<yorickpeterse>
even worse
<ericwood>
how many mongo wrappers do we need
<yorickpeterse>
Well, this *is* Ruby after all
<yorickpeterse>
Can't have enough of them
<yorickpeterse>
omakase
<ericwood>
I always stick with whichever lib has the dumbest name
benlovell has joined #ruby-lang
leonardys has quit [Quit: leaving]
<yorickpeterse>
It's that I know that in the coming months this code is going to be redone anyway but otherwise I'd be crying here
<yorickpeterse>
this code, ugh
sedrickcz has quit [Remote host closed the connection]
Johz has quit [Ping timeout: 276 seconds]
thebastl has joined #ruby-lang
<yorickpeterse>
there's also some bits that just directly talk to the MongoDB driver
nneko001__ has joined #ruby-lang
GeissT has quit [Quit: MillBroChat AdIRC User]
mistym has joined #ruby-lang
superdealloc has joined #ruby-lang
<superdealloc>
Hi everyone. What's the right channel to ask questions about C extensions?
<superdealloc>
More precisely, building them ;-)
joshuairl has quit [Ping timeout: 240 seconds]
vlad_starkov has joined #ruby-lang
<andrewvos>
You're in it
fjfish has joined #ruby-lang
<superdealloc>
Oh great! My question is:
francisfish has quit [Read error: No route to host]
<superdealloc>
I've defined custom classes in my extension. I know there's a Check_Type macro, but that checks against T_FIXNUM, T_BOOLEAN and so on and so forth.
<superdealloc>
How do I check the type for one of my custom classes?
ledestin has quit [Quit: ledestin]
fjfish has quit [Read error: Connection reset by peer]
nathanstitt has joined #ruby-lang
joshuairl has joined #ruby-lang
<yorickpeterse>
hm, I did this somewhere in C
<yorickpeterse>
I think I just checked for the class
thebastl has quit [Remote host closed the connection]
<yorickpeterse>
what the
PaulePanter has joined #ruby-lang
cads has quit [Ping timeout: 276 seconds]
threecreepio has joined #ruby-lang
<yorickpeterse>
Speaking about times/dates, Time.strptime parses a date according to TZ, is there a way to parse it something as UTC *without* having to call #utc afterwards?
gnufied has joined #ruby-lang
gnufied has left #ruby-lang [#ruby-lang]
<yorickpeterse>
because for example `Time.strptime('2013-01', '%Y-%m').utc` would result in 2012-12-31
francisfish has quit [Read error: Connection reset by peer]
<yorickpeterse>
(given TZ is not set to UTC)
<yorickpeterse>
errrr
<yorickpeterse>
given TZ is GMT+2
francisfish has joined #ruby-lang
shinnya has joined #ruby-lang
tonni has joined #ruby-lang
io_syl has joined #ruby-lang
<yorickpeterse>
meh fuckit, I'll use Date.strptime
<yorickpeterse>
who needs timezones
<spike|spiegel>
before I run off, ruby can parse Saturn days too!
mbull9 has quit [Remote host closed the connection]
Criztian has joined #ruby-lang
Criztian has quit [Remote host closed the connection]
rservant_ has joined #ruby-lang
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
rservant_ has quit [Read error: Connection reset by peer]
rservan__ has joined #ruby-lang
rservant has quit [Ping timeout: 245 seconds]
workmad3 has quit [Read error: Operation timed out]
kirin` has quit [Ping timeout: 276 seconds]
benanne has quit [Ping timeout: 245 seconds]
kirin` has joined #ruby-lang
<gnufied>
ndrst: what you mean by bundler is not checking what it is download?
<gnufied>
downloading*
DarkBushido has quit [Quit: Leaving...]
<gnufied>
there is #bundler as well, if you think you found a security problem.
<gnufied>
happy to discuss here, if you can be more specific
<yorickpeterse>
What he probably means is that before unpacking a Gem no verification is made to see if it has been tampered with
<yorickpeterse>
I recall that RubyGems 2.0 included some SHA1 checking but I'm not sure in what shape or form
ebouchut has joined #ruby-lang
brianpWins has joined #ruby-lang
ebouchut has quit [Client Quit]
ebouchut has joined #ruby-lang
Senjai has joined #ruby-lang
weeb1e has joined #ruby-lang
benanne has joined #ruby-lang
iliketur_ has quit [Quit: zzzzz…..]
arBmind has quit [Quit: Leaving.]
tylergillies_ has joined #ruby-lang
sedrickcz has quit [Remote host closed the connection]
iliketur_ has joined #ruby-lang
Bosox20051 has joined #ruby-lang
sedrickcz has joined #ruby-lang
skade has quit [Quit: Computer has gone to sleep.]
vlad_starkov has joined #ruby-lang
matled has joined #ruby-lang
pothibo has joined #ruby-lang
ebouchut has quit [Quit: This computer has gone to sleep]
Cremno has quit [Quit: Cremno]
<freedrull>
does it make sense to place a method expection on a real class, not a method or stub?
ebouchut has joined #ruby-lang
Asher has joined #ruby-lang
pskosinski has joined #ruby-lang
mistym has quit [Remote host closed the connection]
mistym has joined #ruby-lang
mistym has quit [Remote host closed the connection]
<ndrst>
gnufied: I will investigatte a bit more and then let #bundler know
davetoxa has quit [Quit: ушёл]
carraroj has joined #ruby-lang
arBmind has joined #ruby-lang
<gnufied>
bundler uses rubygems classes for unpacking and installation of gems, so if rubygems has support for md5/sha etc of downloaded gem bundler will benefit too
<gnufied>
I haven't looked closely in that area though
<erikh>
it's that people keep bikeshedding over details
yalue has quit [Quit: Leaving]
vlad_starkov has quit [Remote host closed the connection]
<yorickpeterse>
pipework: pedantics, it's an example
* yorickpeterse
slaps pipework around a bit with a large trout
<ndrst>
well i think https + some verification via checksum would be a good start
<erikh>
and honestly, there are workable, simple solutions (e.g., delegating to verisign or w/e for trust) that could be implemented in a few weeks time if people could just figure out what the minimum level of effort would be
<pipework>
yorickpeterse: Just saiyan.
<yorickpeterse>
(ffs still not using my custom trout slaps)
maxmanders has quit [Quit: Computer has gone to sleep.]
<erikh>
and some "easy" rubygems cert system
<erikh>
which is mostly there, but some kind of gpg-alike wizard would probably be good.
<judofyr>
erikh: we need Windows compat (aka. pure Ruby)
<erikh>
yeah, this is one of those bike sheds imo
<judofyr>
what'd you mean?
<erikh>
target openssl
<erikh>
profie
<erikh>
profit too
<yorickpeterse>
fuck Windows
<ndrst>
what is with this pgp signed rubygems that i've seen flying around?
<yorickpeterse>
that alone solves 50% of your security issues :P
<ndrst>
yorickpeterse: ++
<erikh>
not "fuck windows" as much as "windows isn't urgent"
<erikh>
or "windows isn't the test platform". or whatever.
<yorickpeterse>
Either way, for deployments you can solve the issue by running a RubyGems mirror (something we're setting up in the coming days/weeks), pre-packaging stuff (fuck Capistrano with a fork) and then you're pretty much independent
<ndrst>
yorickpeterse: most likely
<yorickpeterse>
Given GH/Rubygems doesn't shit out while building the package
<yorickpeterse>
Though a Rubygems mirror would in turn take that problem away
musl has quit [Quit: WeeChat 0.4.1]
<judofyr>
yorickpeterse: or just store some MD5 in the .lock-file and I don't have to setup my own infrastructure
<ndrst>
yorickpeterse: this is actually the reason why i looked into this. becaus i was building a gem mirror for oour setup
<yorickpeterse>
judofyr: how would that solve the issue of GH/Rubygems being exploited?
<yorickpeterse>
If you're going to implement it you'd better do it in such a way that it doesn't require Bundler
<yorickpeterse>
alternatively you can just do the checksumming yourself
<yorickpeterse>
which is also pretty easy
<judofyr>
yorickpeterse: it downloads the .gem-file, and it turns out it doesn't match the checksum in the Gemfile.lock => ABORT.
<yorickpeterse>
shit them on S3, use sha1sum or w/e and you're done. Takes about 15 minutes
cored has quit [Quit: leaving]
<judofyr>
yorickpeterse: how can I verify checksums during `bundle install`?
apeiros has quit [Remote host closed the connection]
<yorickpeterse>
By not downloading them from Rubygems during a deployment
musl has joined #ruby-lang
<yorickpeterse>
or by teaching Rubygems (`gem`) to do it
apeiros has joined #ruby-lang
sedrickcz has joined #ruby-lang
<judofyr>
yorickpeterse: that's one solution, but requires running infrastructure for deploying
user78 has joined #ruby-lang
user78 has quit [Client Quit]
<yorickpeterse>
If you're serious about deployments you'll need that one way or another anyway
<yorickpeterse>
there's no silver bullet Apple style where you press some magical button and "It just works"
<yorickpeterse>
(except when Apple gets hacked, lol)
<yorickpeterse>
I may be misunderstanding you though
<ndrst>
judofyr: to rely on a remote hosted service fro deployment is crazyness in my eyes anyways
mistym has quit [Remote host closed the connection]
<judofyr>
ndrst: *shrugs*. it's a trade-off, especially in the beginning of a project.
MaddinXx has quit [Remote host closed the connection]
sedrickc_ has joined #ruby-lang
sedrickcz has quit [Read error: Connection reset by peer]
<yorickpeterse>
are we talking about personal projects here or $WORK stuff?
<ndrst>
I've seen it know a couple of times that people get whiny when they can't continuously deploy because github is down again
<ndrst>
or rubygems mocks arround
jwoods has joined #ruby-lang
duphus has joined #ruby-lang
<ndrst>
for pet projects it's not a thing. but if you have a business around this build I don't want to trust in a service i can't fix
<ndrst>
my sentences make no sense anymore ):
<judofyr>
ndrst: so what do you do for Rails projects? do you have a gem mirror running? how do you keep it in sync?
<yorickpeterse>
In my $WORK case we're moving from Capistrano (ugghhhhhhh) to a packaging setup using a RubyGems mirro in between
<yorickpeterse>
said mirror would be synced with all the stuff we use
<yorickpeterse>
Packages would be built using Jenkins (or w/e you'd want to use)
<pipework>
ndrst: That's just a funny thing that noobs cause themselves.
<yorickpeterse>
"noobs"?
bgant has quit [Quit: Leaving.]
<ndrst>
we too, but we use debian packages to bring the code where it belongs
<yorickpeterse>
#call-of-djuty-lang
<ndrst>
pipework: ?
<pipework>
You don't need a mirror, you can either package your gems or vendor them.
<pipework>
ndrst: So do we.
<ndrst>
using fpm.
<yorickpeterse>
True, but then you can't package shit when Rubygems is down
<pipework>
We package our gems into deb packages.
<pipework>
yorickpeterse: We don't package at deploy-time.
ebouchut has quit [Quit: This computer has gone to sleep]
<yorickpeterse>
Neither would we, or most others
<pipework>
We also don't depend on github for anything but providing pull request discourse mechanisms.
<ndrst>
and most of the stuff is in a local cache/mirror
bgant has joined #ruby-lang
<yorickpeterse>
You pre-package them during build time. If you use service X at that point and its down (and out of your control) then good luck
<pipework>
It's just that people don't get git.
<pipework>
yorickpeterse: Stop pulling from external services.
* yorickpeterse
facedesk
<pipework>
It's not like it's rocket surgery.
<yorickpeterse>
"JUST ROLL YOUR OWN!" - Said no one ever with a small team
carraroj has quit [Ping timeout: 264 seconds]
<pipework>
You make it sound like git is hard.
<ndrst>
it's not a big overhead having your git repos mirrored on a local machine
carraroj has joined #ruby-lang
<pipework>
someone with know-how should just spend a day to think it through.
<yorickpeterse>
pipework: you make it sound like git would be the only service
<pipework>
yorickpeterse: We were talking about github.
<yxhuvud>
why do you expect people to have know how?
<pipework>
Feel free to expand.
ssb123 has quit [Remote host closed the connection]
<pipework>
Don't expect me to go beyond the scope of your argument.
<yxhuvud>
we do at our place, but it is precious few that would be able to set it up on their own
<judofyr>
yes, I agree that having packages on a machine you control is better than relying on rubygems, but that kind of system requires time and maintainability. at the moment we're happy to depend on rubygems as it makes deployment easier. not saying it's *better*, it's just easier :)
ssb123 has joined #ruby-lang
apeiros has quit [Remote host closed the connection]
apeiros has joined #ruby-lang
<judofyr>
I'm sure one day we'll have serious problem, and after that we'll set up a proper system
<yorickpeterse>
pipework: Github was given as an example, not the sole service people might depend on
<pipework>
There's tools like geminabox for those less technically inclined.
<yorickpeterse>
But yes, a Git mirror is an option
<judofyr>
but at the moment: it's not worth it
<yorickpeterse>
and Geminabox can't scale sadly
<yorickpeterse>
As in, it shits itself around the 200 Gem mark (varying based on the Gem size)
<yorickpeterse>
* sizes
<pipework>
yorickpeterse: For deployments and pulling local-only gems, geminabox can't serve your requests enough?
<pipework>
Or just the size of the repo?
carraroj has quit [Client Quit]
<yorickpeterse>
Take into account that your Gem mirror would also need to include *all* deps, which can very easily go above that limit
<pipework>
This really isn't a difficult problem to solve, I don't know why people make it sound like it is.
<yorickpeterse>
(we have some binary blobs in some gems that are around 80MB)
mistym has joined #ruby-lang
<pipework>
These excuses aren't the sort of thing I'd expect from a real engineer.
<judofyr>
pipework: it's not a difficult problem, but it takes time to setup. show me something I can setup in < 1 hour and doesn't require much maintainability and I'll happily use it.
<judofyr>
pipework: it's called "trade-offs"
<yorickpeterse>
pipework: feel free to dismiss everything as easy or an excuse, but I've yet to see you make an actual good argument as to why it's easy
<yorickpeterse>
until then it's just bullshit
<pipework>
judofyr: If you're feeling the pain and don't react, isn't that a sign that you're a bit slow?
<apeiros>
yorickpeterse: but bullshit is easy
<yorickpeterse>
A git mirror isn't hard, correct. A basic RubyGems mirror using Geminabox, sure. A Geminabox mirror containing, say, 500 Gems that have to be actively kept in sync? Good luck
<pipework>
So don't use a gem server.
ssb123 has quit [Ping timeout: 245 seconds]
<yorickpeterse>
You inevitibly have to at some point, that's the whole thing
<pipework>
It's hard to solve a general problem without details, so stop hiding detail?
<yorickpeterse>
unless you pre-package it on a CDROM that you pre-distribute with your servers or something
<yorickpeterse>
or a floppy!
<judofyr>
pipework: I'm not feeling any pain :)
<pipework>
judofyr: Then why are we bitching about external services fucking up deploys?
<yxhuvud>
yorick: we are increasingly moving towards distributing the servers preinstalled :P
<yorickpeterse>
judofyr: you started it
<judofyr>
I don't think we actually disagree on anything
<pipework>
I'd assume that real engineers could probably fix these problems if they felt pain.
<yorickpeterse>
who needs mirrors, it's all in the cloud
<yorickpeterse>
nothing can go wrong
<yorickpeterse>
and define "real engineer"
<judofyr>
or, maybe some details
<pipework>
yorickpeterse: No.
<yorickpeterse>
I've yet to meet one who didn't bitch about trivial things
verto has joined #ruby-lang
<apeiros>
ask the NSA gently. they surely have a copy.
rservant_ has joined #ruby-lang
<yorickpeterse>
apeiros: they'll reject it on grounds of it being a matter of national security
<apeiros>
hm, trudat
<pipework>
You're excusing laziness, which is fine if your intent is to be lazy.
<yorickpeterse>
"I want all cat pictures ever taken by the NSA" "Nope, matter of national security"
vlad_starkov has joined #ruby-lang
<apeiros>
laziness is a core virtue of a good programmer
<yorickpeterse>
pipework: Laziness? when the fuck did that come into the picture?
<judofyr>
yorickpeterse: I started talking about how I wanted checksums in .lock so I can continue depending on rubygems.org without worrying about someone hacking rubygems.org
* apeiros
is in shitting randomness mode
<judofyr>
anyway
havenwood has quit [Remote host closed the connection]
<judofyr>
time for some sleep
<pipework>
It's cool with me. But losing your ability to deploy without external services and not changing that seems a bit lame.
<apeiros>
hm?
<apeiros>
bundle package
<judofyr>
bye!
<pipework>
Maybe it's just a cultural thing I don't understand.
<yorickpeterse>
I think at no point anybody here stated they didn't want to change
judofyr has quit [Remote host closed the connection]
<apeiros>
no dependency on external services
<Boohbah>
pipework: it seems like big services should have local mirrors
<apeiros>
and bundle package --all to include :git gems
<pipework>
Boohbah: I don't know what that means.
sedrickc_ has quit [Remote host closed the connection]
<Boohbah>
local mirrors of the gems they depend on to deploy their services
<pipework>
Yeah, keeping a local cache of libraries you use is definitely a smart idea.
<yorickpeterse>
`gem` actually allows you to do that
<yorickpeterse>
`gem server` to be exact
<yorickpeterse>
serves whatever is locally installed
rservant has quit [Ping timeout: 276 seconds]
<pipework>
With docs!
rservant_ has quit [Read error: Operation timed out]
<pipework>
Should they be installed too.
<yorickpeterse>
meh, that's the first thing I disable on servers
<ndrst>
hm is anyone actually using ri?
crudson has joined #ruby-lang
<yorickpeterse>
I do
<yorickpeterse>
It's faster than booting up Pry and in most cases more accurat
<ndrst>
I have the feeling I am too stupid to use it or to find stuff
<yorickpeterse>
* accurate
<yorickpeterse>
ri File.file?
<yorickpeterse>
etc
<yorickpeterse>
A good example is `ri CSV`
<ndrst>
hmmm Nothing known about CSV
<yxhuvud>
I have too many bad experiences from earlier times. that burned ri out of me
<yorickpeterse>
ndrst: might need to install stdlib docs upon installing Ruby
<ndrst>
can this be reinstalled without installing the whole ruby again?
<yorickpeterse>
Not sure
<yxhuvud>
may depend on how you installed ruby.
GaelanAintAround is now known as Gaelan
<ndrst>
i still use rvm, but I've heard thats already uncool again
ruby-lang265 has joined #ruby-lang
<yxhuvud>
there are less intrusive environments around.
fedesilva has joined #ruby-lang
ssb123 has joined #ruby-lang
<spike|spiegel>
what happened here?!
<yorickpeterse>
spike|spiegel: bikes being shed
* spike|spiegel
is glad he missed all of it
<yxhuvud>
I wish we had a proper shed for our bike stand.
<Boohbah>
yxhuvud: rbenv?
<whitequark>
spike|spiegel: you know, noo one forces you to listen. just sayin'
vlad_starkov has quit [Ping timeout: 246 seconds]
<yxhuvud>
boobah: or chruby
<yorickpeterse>
lololol rbenv
<yorickpeterse>
rbenv rehash all the things
saarinen has quit [Quit: saarinen]
<Boohbah>
heh
<yorickpeterse>
and that rubygems plugin for it only solved half of my issues with it
<Boohbah>
yxhuvud: i have not tried chruby, i'll check it out
<yorickpeterse>
e.g. didn't work with Bundler at the time
amcoder has joined #ruby-lang
<yxhuvud>
worked better than stock rubygem on centos for me :P
<Boohbah>
rehash sounds like you're eating leftovers for dinner
<spike|spiegel>
I have a particular distaste for any tool that molests my shell's env, that rules out all of these multiple rubies yay! kittens! thingies.
nneko001__ has quit [Quit: Konversation terminated!]
<ndrst>
if you plan to shot a rocket to the moon that should not return anymore thats a good choice yorickpeterse
<yxhuvud>
yorick: yes, but that is what we use.
<yorickpeterse>
yxhuvud: same here
<yorickpeterse>
which is why I hate it
mbj has quit [Ping timeout: 256 seconds]
<ndrst>
and why?
<yorickpeterse>
Amazon makes their approved AMIs or w/e using CentOS
<yorickpeterse>
They come with some custom magic I believe
<ndrst>
is there something bad about using a debian?
<yorickpeterse>
nfi, I don't maintain our infrastructure
<yorickpeterse>
Everything based on Deadrat needs to go
<spike|spiegel>
didn't someone deploy archlinux to production?
ruby-lang265 has quit [Quit: Page closed]
* yorickpeterse
raises hand
serroft has quit [Quit: Leaving.]
<yorickpeterse>
Though I've since swapped it out with Debian
<postmodern>
Fedora 19 is rather nice, provides ruby 2.0.0
<yorickpeterse>
Because of reasons you can probably figure out :P
<yorickpeterse>
Arse Linux is great for a dev machine though
<yorickpeterse>
I do find it hilariously bad that on CentOS I have to add some random third-party repo to get a stone-old version of clang
<apeiros>
andrewvos: random backlog spotting: Dir.glob(x).each do …--> Dir.glob(x) do # glob accepts a block
<spike|spiegel>
my gripe with Fedora/Redhat derivates is the sheer stupidity in stripping out all ECC crypto
Nisstyre-laptop has joined #ruby-lang
<postmodern>
spike|spiegel, agreed
<spike|spiegel>
(for work, unrelated to anything web)
<postmodern>
spike|spiegel, makes playing with bitcoin stuff hard
bgant has quit [Quit: Leaving.]
killtheliterate is now known as killthe|afk
sedrickcz has joined #ruby-lang
Nisstyre-laptop is now known as Nisstyre
umgrossco has quit [Quit: Nettalk6 - www.ntalk.de]
mbj has joined #ruby-lang
<spike|spiegel>
and plenty of other things
<Boohbah>
yorickpeterse: do you know anything about running opscode chef on Arse Linux?
<Rylai>
arse linux, lul
richardburton has quit [Quit: Leaving.]
<yorickpeterse>
Boohbah: I tried it in a distant past but gave up because I didn't like Chef
<yorickpeterse>
I did run Puppet for a while, which was a total nightmare but that was on Puppet's end
<spike|spiegel>
seriously though: you folks needs better more robust rubygems.org at the least.
<Boohbah>
ahh what is your favorite config management system then? CFEngine?
<yorickpeterse>
spike|spiegel: requests welcome
<yorickpeterse>
on Github
<yorickpeterse>
Boohbah: I use Ansible for my personal stuff since that's mostly "copy this file to remove location X"
<yorickpeterse>
But I fail to see how Ansible would work out for large amounts of servers
<yorickpeterse>
on a somewhat shitty internet connection in particular
<yorickpeterse>
tbh I'm not sure if I'd use something like Chef at all for large setups
<spike|spiegel>
you mean issue? can I just enter 1? rearchitect it. and may be not write it in ruby :)
<yorickpeterse>
Probably go with an imaging setup
<Boohbah>
i suppose the reason opscode developers don't put more effort into supporting Arse Linux is because nobody uses it on production servers
<yorickpeterse>
spike|spiegel: if you can rewrite all of it, go ahead
<yorickpeterse>
Boohbah: not sure, Puppet at least supports both Pacman and yaourt
itcharlie has left #ruby-lang [#ruby-lang]
<yorickpeterse>
I liked Puppet because you can do the easy approach of "here's a file, provision server plz"
<yorickpeterse>
instead of "here's some random bunch of directories that all have to be there because fuck you"
<zenspider>
erikh: facts... bah.
tehroflmaoer has left #ruby-lang ["Leaving"]
<spike|spiegel>
well, that's a long project, for someone who does C for day job, it's not worth the effort to call it "pet project"
<yorickpeterse>
But heavens forbid trying to get Puppet to run *without* Webrick or Passenger
<Boohbah>
yorickpeterse: the problem i'm having with chef is that it isn't aware that Arse is using systemd now. There is a systemd provider in chef but i don't know how to make chef use it on an Arse Linux machine
<yorickpeterse>
oh right, systemd
<yorickpeterse>
ugh
<yorickpeterse>
tbh I'd just not bother with Arse in production
<yorickpeterse>
You'll end up with all kinds of upgrade issues in the long run
<postmodern>
yorickpeterse, resistance is futile you will be assimilated by systemd
<yorickpeterse>
plus it's quickly becoming "The Linux that's unlike all the others", not always in a good way
<Boohbah>
yes, i don't bother with it in production, this is just for development
<zenspider>
arse... linux? really?
<yorickpeterse>
postmodern: systemd is fine from a user perspective
pipework has quit [Remote host closed the connection]
<yorickpeterse>
as in
<Boohbah>
zenspider: i thought it was hilarious!
<spike|spiegel>
systemd, you know, the init that also does your gardening
<zenspider>
like, maybe the name was a hint?
<yorickpeterse>
I'll take `systemctl reboot mysql` over `sudo /etc/init.d/mysqld restart` (or was it mysql?) any day
<Boohbah>
the logging integration is quite useful
<yorickpeterse>
and the fact that it has a standard status command
<yorickpeterse>
BUT FUCK THE BINARY LOG
<yorickpeterse>
FUCK IT
<yorickpeterse>
In a non positive way
<Boohbah>
and i believe Deadrat Enterprise Linux will be using systemd in their next major version
<yorickpeterse>
zenspider: some of my old co-workers called it that, it kinda stuck around
<yorickpeterse>
Exhibit A:
<spike|spiegel>
did I just fill 10G in /var? what could it be.... oh oh systemd journal. ok.
<yorickpeterse>
sudo journalctl --since="10 minutes ago" # enjoy waiting for a good few minutes
<whitequark>
systemd is, well, poettering
workmad3 has joined #ruby-lang
<whitequark>
poettering, adj.: bloat, bugs, actute case of NIH.
<yorickpeterse>
it's a schizophrenic piece of software that doesn't know what it really is
<whitequark>
*acute
<whitequark>
everything that lennart poettering writes looks like that.
<yorickpeterse>
"I can be init! I can be an oven! I can even bring you to wo...oh shit I filled up /var/"
<postmodern>
what about upstart?
<whitequark>
I think it's more or less dead
<whitequark>
but I liked it.
<Boohbah>
yorickpeterse: why are you waiting for a few minutes running journalctl?
<yorickpeterse>
Little experience with upstart
<yorickpeterse>
Boohbah: because it's slow as shit for medium sized log files
<whitequark>
there's also pulseaudio, aka, "OH GOD ALSA IS TOO COMPLEX"
<Boohbah>
yorickpeterse: is that on a busy server?
<yorickpeterse>
that's on my local laptop
<spike|spiegel>
gentoo's named runlevels / openrc used to be nice
<yorickpeterse>
lemme see how big it currently is (I have a rather small limit set)
<Boohbah>
yorickpeterse: there is something wrong then
<yorickpeterse>
103M
<whitequark>
lolsystemd
<yorickpeterse>
Boohbah: note that the following queries it will be faster
<whitequark>
it's telling you to not use it, see?
<yorickpeterse>
SystemMaxUse=100M
Johz has quit [Ping timeout: 264 seconds]
<yorickpeterse>
INTERESTING
<yorickpeterse>
103M IS NOT 100M SYSTEMD
<Boohbah>
lol
<whitequark>
I think it uses binary megabytes, and whatever you use look at file uses decimal
<yorickpeterse>
either way, systemd would've been nice if it didn't try to do everything
<yorickpeterse>
since it doesn't really do a good job at any of it
<whitequark>
b...b...but QR-codes in init!
<yorickpeterse>
wait what
<spike|spiegel>
nice? how? it's units/targets system is ridiculously complex.
<yorickpeterse>
spike|spiegel: it's at least more standardized than init.d
<whitequark>
it can display QR codes in pseudographic console characters