<theberlin>
and try to solve them using as much googling as it took
<theberlin>
then find other people's solutions on github and read through them
<Trilient>
I've already started a free online course to get the basics down.
joaoh82 has joined #ruby
<theberlin>
i wouldn't bother using coderbyte's interface, it's terrible
moritzschaefer has quit [Ping timeout: 272 seconds]
sputnik13 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
<Trilient>
That sounds like a good way to go about it as well, however that sounds like something I should do once I get a basic understanding of the language
<Trilient>
I'd have a better idea of whats going on and why it's wrong
<theberlin>
if that works for you
<theberlin>
i'm not big on structured courses
<Trilient>
It's how I've already started going about it lol
<Trilient>
I'm already about 60% done with codeacademy's course
<shevy>
Trilient in my opinion the only real way is to start writing ruby scripts on your own
<Boohbah>
try the ruby koans
<theberlin>
yeah, I would finish codeacademy then pick a project
failshell has joined #ruby
<Trilient>
That's also what I'm doing, I'm writing a text based RPG script as I follow this tutorial
doodlehaus has joined #ruby
<Boohbah>
and hartl's rails tutorial, if you're into that
<theberlin>
ugh, that tutorial
<theberlin>
you have to do it but it's a slog
arrubin has joined #ruby
sputnik13 has joined #ruby
Takle has joined #ruby
danman has quit [Quit: danman]
<Trilient>
I planned out a curriculum for myself. Codeacademy, the work on learncodethehardway's ruby tutorial
<Boohbah>
theberlin: i would rather call it comprehensive
<Trilient>
Then just see where it takes me
bradhe has quit [Ping timeout: 240 seconds]
<Trilient>
But I also like to gather other programmers input on the matter.
danman has joined #ruby
<Trilient>
I'd like to make sure I'm going in the right direction at the very least
gondalier has quit []
kenneth2 has joined #ruby
<theberlin>
basically just read and write lots of code
<kenneth2>
hi
<Trilient>
That's how I learned html/css
<Trilient>
Lol
hobogrammer1 has quit [Ping timeout: 264 seconds]
louism2wash has joined #ruby
<Trilient>
I figured it'd be a similar learning experience
benzrf|offline is now known as benzrf
joaoh82 has quit [Ping timeout: 240 seconds]
<Trilient>
except html is pretty simple.
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<theberlin>
html isn't code
<theberlin>
it's markup
weeb1e has quit [Quit: No Ping reply in 180 seconds.]
<louism2wash>
Hey guys, can someone give me a quick rundown of a thread vs. a process? From what I am seeing it seems like processes are more related to the OS than Ruby itself(Ruby is a process running on the OS). Threads are separate lines of execution that are natively managed by the a PROCESS on the OS. Am I on the right track? Thanks.
nmokru has quit [Quit: nmokru]
<louism2wash>
sorry for the typos
<`mrspock>
nice benzrf
Takle has quit [Ping timeout: 244 seconds]
x1337807x has joined #ruby
MrDoctor has quit [Remote host closed the connection]
sputnik13 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
MrDoctor has joined #ruby
<kenneth2>
no regex, thanks!
perlsyntax has quit []
Bumptious has quit [Remote host closed the connection]
jonr22 has joined #ruby
x1337807x has quit [Client Quit]
Bumptious has joined #ruby
theberlin has quit [Ping timeout: 255 seconds]
<benzrf>
louism2wash: that's it more or less
cjsarette has quit [Remote host closed the connection]
<benzrf>
louism2wash: a thread is a line of execution within a process, while a process is something with a PID
cjsarette has joined #ruby
doodlehaus has quit [Remote host closed the connection]
<benzrf>
a running program, perhaps
Gil has joined #ruby
sski has quit [Remote host closed the connection]
sputnik13 has joined #ruby
sski has joined #ruby
<louism2wash>
benzrf: ok, makes sense. I am coming across a testing gotcha using capybara/selenium that has to do with database transactions running on different threads. Trying to wrap my head around it. Thanks.
<benzrf>
np :)
MrDoctor has quit [Ping timeout: 240 seconds]
oo_ has joined #ruby
<csmrfx>
jhuang: well gem sounds rather nice
Bumptious has quit [Ping timeout: 264 seconds]
<csmrfx>
jhuang: there is commercial product that obfuscate your code, but I forget what the name was
cjsarette has quit [Remote host closed the connection]
<csmrfx>
I believe you could also make into jar file
cjsarette has joined #ruby
sski has quit [Ping timeout: 244 seconds]
Gil has quit [Ping timeout: 255 seconds]
sputnik13 has quit [Ping timeout: 240 seconds]
pen has joined #ruby
jottr has quit [Ping timeout: 255 seconds]
sevenseacat has joined #ruby
<shevy>
Trilient a programming language will be harder; for instance, you will have to understand how to use variables
yfeldblum has quit [Remote host closed the connection]
yfeldblum has joined #ruby
<segv>
shevy if I call it as an accessor it's just nill
<segv>
nil*
combusean has joined #ruby
robustus has joined #ruby
`mrspock has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<segv>
shevy now remember, passing anything as a 'def run(blah)' with thor being used, it will think that it is in fact a command being passed to be processed
<segv>
so I can't just pass ec2 over
aantix has joined #ruby
bradhe has joined #ruby
GoodTimes has quit []
glenfe has left #ruby ["Leaving"]
MrDoctor has quit []
amargherio has joined #ruby
<dorei>
use a global variable
bradhe has quit [Ping timeout: 240 seconds]
charliesome has joined #ruby
pen has joined #ruby
<segv>
dorei how would you suggest?
<segv>
ec2 isn't defined by me, it is created by just requiring aws-sdk-core.
<segv>
just do $ec2 = ec2?
doodlehaus has joined #ruby
koppa has joined #ruby
dapz has joined #ruby
ixti has joined #ruby
<segv>
welp that worked
<segv>
thanks!
joaoh82 has joined #ruby
mikepack has joined #ruby
dseitz has joined #ruby
timonv has joined #ruby
MatthewsFace has joined #ruby
bobdobbs has joined #ruby
louism2wash has quit [Quit: This computer has gone to sleep]
cjsarette has quit [Remote host closed the connection]
aspires has quit []
cjsarette has joined #ruby
joaoh82 has quit [Ping timeout: 272 seconds]
wallerdev has quit [Quit: wallerdev]
<bobdobbs>
hey guys. I'm just hacking a script to output some markup. In this paste, what is 'select'? http://pastebin.com/kzgRdrST
Rainicorn is now known as LadyRainicorn
MatthewsFace has quit [Client Quit]
timonv has quit [Ping timeout: 272 seconds]
kaspergrubbe has quit [Remote host closed the connection]
mikepack has quit [Ping timeout: 255 seconds]
JoshGlzBrk has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mikeric has joined #ruby
binaryhat has joined #ruby
CodeBunny has quit [Quit: CodeBunny needs a carrot. Be back later.]
GoInd has joined #ruby
Valesk_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
reset has quit [Quit: Leaving...]
danijoo has quit [Read error: Connection reset by peer]
reset has joined #ruby
deric_skibotn has quit [Ping timeout: 272 seconds]
danijoo has joined #ruby
hamakn has quit [Remote host closed the connection]
Gil has joined #ruby
koppa has quit [Quit: Leaving]
binaryhat has quit [Read error: Connection reset by peer]
toastynerd has quit [Remote host closed the connection]
nmokru has quit [Quit: nmokru]
GoInd has left #ruby [#ruby]
joaoh82 has joined #ruby
alvaro_o has quit [Quit: Ex-Chat]
calaba has quit [Remote host closed the connection]
cjsarette has quit [Remote host closed the connection]
luksaur has quit [Quit: Leaving]
cjsarette has joined #ruby
mikepack has joined #ruby
<csmrfx>
bobdobbs: perhaps ri Enumerable helps?
* bobdobbs
googles
tjsousa_ has quit [Quit: Computer has gone to sleep.]
<csmrfx>
dont google, install ri
<bobdobbs>
ri
<csmrfx>
ri
<csmrfx>
use ri
chipotle has joined #ruby
Hanmac has quit [Ping timeout: 240 seconds]
<bobdobbs>
ri is a documentation tool, right?
<bobdobbs>
seems I already have it
<bobdobbs>
'ri Enumerable' returns a long error message about no documentation
GriffinHeart has joined #ruby
wallerdev has joined #ruby
<bobdobbs>
but before I try and get ri working, could you tell if I can do what I'm trying to do? concatenate strings within an each loop?
mikepack has quit [Ping timeout: 240 seconds]
doodlehaus has quit [Read error: Connection reset by peer]
blackgoat has quit [Quit: WeeChat 0.3.8]
doodlehaus has joined #ruby
Jnco has quit [Read error: Connection reset by peer]
hiyosi has quit [Read error: Connection reset by peer]
Jnco has joined #ruby
hiyosi has joined #ruby
<bobdobbs>
should I be using a different kind of loop perhaps?
Alina-malina has quit [Read error: Connection reset by peer]
tacit7 has joined #ruby
dorei has quit []
<bobdobbs>
or is there some special way that I have to do string concat'ing inside each loops?
hamakn has joined #ruby
Alina-malina has joined #ruby
GriffinHeart has quit [Ping timeout: 245 seconds]
ghr has joined #ruby
hamakn has quit [Read error: Connection reset by peer]
hamakn has joined #ruby
musashi1 has joined #ruby
cjsarette has quit [Remote host closed the connection]
cjsarette has joined #ruby
<csmrfx>
bobdobbs: ok, so you have the problem of not having the documentation installed or built..
<csmrfx>
bobdobbs: there is also rdoc
IcyDragon has joined #ruby
<shevy>
bobdobbs append strings via <<
<csmrfx>
I would use .collect
<shevy>
bobdobbs it's very rare that anyone has to use a loop to concatenate strings
IceDragon has quit [Ping timeout: 244 seconds]
IcyDragon is now known as IceDragon
asteve has joined #ruby
<bobdobbs>
shevy: interesting
<csmrfx>
which is same as map
asteve has quit [Client Quit]
<bobdobbs>
shevy: basically, I'm just generating html markup.
<csmrfx>
bobdobbs: to get ri working you'd need to google the error
<shevy>
puts prefix . f . suffix
<shevy>
bobdobbs what's that
doodlehaus has quit [Remote host closed the connection]
braincra- has joined #ruby
<bobdobbs>
well 'puts f' returns the name of the file. I want to wrap strings around the filename
dwayhs has joined #ruby
<shevy>
so you thought you would use .
<bobdobbs>
It's basically for creating img tags from a directory of images
<bobdobbs>
yep
Channel6 has joined #ruby
<shevy>
in ruby, foo.bar is foo.bar()
<shevy>
and if you write
<csmrfx>
bobdobbs: and to answer your question, yes, of course you can concat strings, the correct question for you is if the variables are visible after the block exists
<shevy>
HMM just happens to be a filename here on my computer
<bobdobbs>
k
<shevy>
I'd normally have adblock too but right now I am on opera which is annoying
<shevy>
pls pls pls gist rather than pastebin
<shevy>
I have to leave here for a while though, sorry
<bobdobbs>
np. thanks for the help
mikeric has quit []
gusblan has quit [Remote host closed the connection]
nanodano has quit [Quit: Leaving.]
krz has joined #ruby
gusblan has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
Spami has joined #ruby
<noob101>
Hello everybody.
gusblan has quit [Ping timeout: 240 seconds]
d5sx43 has joined #ruby
naw has quit [Read error: Connection reset by peer]
bmurt_ has joined #ruby
naw has joined #ruby
rezzack1 has joined #ruby
niftylettuce_ has joined #ruby
mr_snowf1ake has joined #ruby
bmurt has quit [Ping timeout: 245 seconds]
gregf has quit [Quit: WeeChat 0.4.3]
postmodern has quit [Quit: Leaving]
rezzack has quit [Ping timeout: 252 seconds]
SilverKey has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
mattmcclure has quit [Quit: Connection closed for inactivity]
gregf has joined #ruby
aantix has quit [Quit: aantix]
nanodano has joined #ruby
kaspergrubbe has quit [Remote host closed the connection]
ta has quit [Ping timeout: 260 seconds]
Gil has joined #ruby
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ta has joined #ruby
sepp2k has quit [Read error: Connection reset by peer]
louism2wash has joined #ruby
d5sx43 has quit [Remote host closed the connection]
cjsarette has quit [Remote host closed the connection]
cjsarette has joined #ruby
andrewjanssen has joined #ruby
Gil has quit [Ping timeout: 244 seconds]
tacit7 has quit [Quit: Leaving.]
stantona has joined #ruby
d5sx43 has joined #ruby
cjsarette has quit [Remote host closed the connection]
SilverKey has quit [Quit: Cheerio!]
ninegrid has quit [Ping timeout: 252 seconds]
<louism2wash>
Hey guys, I am new to testing and I am doing my best to not over test. I have a method that raises an exception on it's first line if the object it is operating on has a certain state. My first instinct was to test this but now I sort of feel like it's overkill. To test whether or an exception is handled by an exception block seems an awful lot like testing the framework to me. Thoughts?
Hanmac has joined #ruby
cjsarette has joined #ruby
benzrf is now known as benzrf|offline
Hanmac1 has quit [Ping timeout: 240 seconds]
scx_ has joined #ruby
stantona has quit [Ping timeout: 272 seconds]
kies has quit [Ping timeout: 245 seconds]
scx has quit [Ping timeout: 255 seconds]
combusean has quit [Read error: Connection reset by peer]
combusean has joined #ruby
braincra- has quit [Quit: bye bye]
amargherio has quit [Remote host closed the connection]
bbloom has joined #ruby
jarray52 has joined #ruby
newUser1234 has quit [Remote host closed the connection]
Valesk_ has joined #ruby
dwayhs has joined #ruby
zoraj has joined #ruby
<sevenseacat>
just test that the exception gets raised in the right circumstances
pen has quit [Remote host closed the connection]
Bosox20051 has joined #ruby
pen has joined #ruby
freerobby has joined #ruby
mikepack has joined #ruby
kies has joined #ruby
bbloom has quit [Quit: Computer has gone to sleep.]
newUser1234 has joined #ruby
Hanmac1 has joined #ruby
braincrash has joined #ruby
crowell has joined #ruby
<crowell>
does anyone know of any gem for generating a flowchart graph (either image or ascii art)?
<baweaver>
check the readme for save-session and load-session
cjsarette has quit [Remote host closed the connection]
aspires has joined #ruby
<Mooneye>
baweaver: interesting. I can imagine how it's implemented, given my new discovery of "binding"
charliesome has joined #ruby
<baweaver>
Could always read through the source
<Mooneye>
yeah I just realized that, too and I am haha
<baweaver>
Though as it's still sub 1.0.0 I've left some commented code about as I'm moving fairly quickly through features this weekend.
hpoydar has quit [Ping timeout: 252 seconds]
<baweaver>
If you set _pry_.input to anything that responds to readline, it'll pull lines from that until it hits EOF treating them as if they were user input
<Mooneye>
oh!
<Mooneye>
and you're the author haha
<baweaver>
afterwards, it gets popped
<Mooneye>
I'm tired right now
cjsarette has joined #ruby
<baweaver>
Happens mate.
wmoxam has quit [Remote host closed the connection]
<baweaver>
then back to $stdin
gusblan has joined #ruby
i_s has joined #ruby
<Mooneye>
hmmm...
<Mooneye>
so is it possible to retain variable assignments from an "eval" call?
<Mooneye>
or rather, is there an easy way to do it?
LadyRainicorn has quit [Ping timeout: 264 seconds]
<Mooneye>
besides assigning a $global
hiyosi has joined #ruby
<baweaver>
eval literally evals a piece of ruby code
theberli_ has joined #ruby
cjsarette has quit [Remote host closed the connection]
<baweaver>
odd
<baweaver>
thought that'd work
fgo has joined #ruby
d5sx43 has quit [Remote host closed the connection]
<Mooneye>
haha
gusblan has quit [Ping timeout: 255 seconds]
<baweaver>
....that actually explains a number of headaches I had at one point
<baweaver>
huh
<baweaver>
dang
d5sx43 has joined #ruby
<Mooneye>
trust me man, I'm a decent programmer
<baweaver>
>> eval 'a=5'; puts a
<eval-in>
baweaver => undefined local variable or method `a' for main:Object (NameError) ... (https://eval.in/162077)
<Mooneye>
the thing is, it's making that assignment in local scope
<Mooneye>
in eval
<Mooneye>
so it doesn't come out
<baweaver>
pesky indeed
<baweaver>
Probably a reason in there somewhere
<Mooneye>
maybe I can just hack it out
<Mooneye>
alias eval, redefine it to call it and return a binding.
<Mooneye>
RubyPanther: erm. with all due respect, I don't know if I can be bothered to read that right now.
<RubyPanther>
Mooneye: But generally, send lets you call a method with a dynamic name, using string interpolation, without treating data as code. So it covers all the OOP cases of dynamic methods
gusblan has quit [Client Quit]
<RubyPanther>
Any code that would be in a string could be in code, by definition
<Mooneye>
Yeah, I know all that
lw has quit [Quit: s]
<Mooneye>
I literally just wanted to write a script to run some init code, start interpreting ruby, and warn me if I Ctrl+C
<pcfreak30>
OK I just checked, is there any reason to use File.directory? over Dir.exists? or vise versa
<pcfreak30>
Mooneye: sounds like you want to extend the ruby interactive shell irb
Fire-Dragon-DoL has quit [Quit: Leaving.]
<pcfreak30>
Try taking its source and forking it?
<pcfreak30>
Probably a lot less work.
<Mooneye>
I wouldn't have thought so, but maybe
<Mooneye>
by the way
<Mooneye>
those methods do different things, technically
<Mooneye>
write the one that is what you're trying to do
<Mooneye>
pick the clearer one
<pcfreak30>
So im new to ruby coding (not a newbie coder)
<pcfreak30>
Trying to use the better standards
d5sx43 has quit [Ping timeout: 240 seconds]
mradmacher has joined #ruby
Gil has joined #ruby
<pcfreak30>
and im trying to see if a dir exists so they both apply
<Mooneye>
Dir.exists? is better
<pcfreak30>
So im trying to know which is more wisdely used
combusean has quit [Quit: Leaving.]
<Mooneye>
you're probably not wondering whether or not it's a directory or a file
<pcfreak30>
Why are there a ton of methods that alias the same code
<Mooneye>
sugar
<pcfreak30>
I know theres exist vs exists for backwards compat but having multple mthods to the same thing doesnt add up.
ksinkar has joined #ruby
<Mooneye>
sure it does.
<Mooneye>
it's a cost-free way of making code more readable
<Mooneye>
it's not code duplication or anything
mikeric has quit []
`mrspock has joined #ruby
fgo has quit [Remote host closed the connection]
Gil has quit [Ping timeout: 245 seconds]
fgo has joined #ruby
benlieb has joined #ruby
__class__ has quit [Read error: Connection reset by peer]
Channel6 has quit [Quit: Leaving]
arrubin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
duncannz has joined #ruby
tkuchiki_ has joined #ruby
Rickmasta has quit [Ping timeout: 260 seconds]
fgo has quit [Ping timeout: 272 seconds]
theberli_ has quit [Remote host closed the connection]
Jnco has quit [Ping timeout: 240 seconds]
tkuchiki has quit [Read error: Connection reset by peer]
codeurge has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Rickmasta has joined #ruby
dukedave has joined #ruby
<pcfreak30>
If I did a http read and got the last-modified header, would it be the same format as File.mtime?
<pcfreak30>
http head*
timonv has joined #ruby
NukePuppy has quit [Ping timeout: 264 seconds]
wmoxam has joined #ruby
tyfighter has joined #ruby
__class__ has joined #ruby
aganov has joined #ruby
tyfighter has quit [Client Quit]
tyfighter has joined #ruby
Valesk_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
cjsarette has quit [Remote host closed the connection]
dwayhs has joined #ruby
ahofmann has joined #ruby
tyfighter has quit [Client Quit]
tyfighter has joined #ruby
cjsarette has joined #ruby
dukedave has quit [Ping timeout: 245 seconds]
<pontiki>
the time in the header would in a string. the time in File.mtime is a Time object
yfeldblum has quit [Ping timeout: 255 seconds]
<pontiki>
you can easily turn the time string in the http header into a Time object, should you wish to compare them.
dwayhs has quit [Ping timeout: 240 seconds]
cjsarette has quit [Ping timeout: 240 seconds]
whyy has joined #ruby
dawkirst has joined #ruby
speakingcode has quit [Ping timeout: 255 seconds]
Wolland has joined #ruby
<Mooneye>
pontiki: I think you have to parse the string
<Mooneye>
to make a Time object, that is
<pontiki>
exactly my point
Gil has joined #ruby
<Mooneye>
No I mean there's no method/constructor for Time that takes a string
<Mooneye>
you have to manually parse it
monkegjinni has joined #ruby
cjsarette has joined #ruby
why_away has joined #ruby
<pontiki>
you just need to require 'time' from the stdlib
tripiiii has joined #ruby
whyy has quit [Ping timeout: 245 seconds]
monkegjinni has quit [Ping timeout: 245 seconds]
toastynerd has joined #ruby
timonv has quit [Remote host closed the connection]
timonv has joined #ruby
spastorino has quit [Quit: Connection closed for inactivity]
chipotle has joined #ruby
jtiggo has joined #ruby
iamayam has joined #ruby
Morkel has joined #ruby
aspires has quit []
ahofmann has quit [Quit: Computer has gone to sleep.]
combusean has joined #ruby
qpok_ is now known as qpok
timonv has quit [Ping timeout: 272 seconds]
fgo has joined #ruby
Gil has quit [Remote host closed the connection]
jprovazn has joined #ruby
b00stfr3ak has joined #ruby
GriffinHeart has joined #ruby
hiyosi has joined #ruby
JoshGlzBrk has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Trynemjoel has quit [Ping timeout: 245 seconds]
d5sx43 has joined #ruby
fgo has quit [Ping timeout: 264 seconds]
amclain has quit [Quit: Leaving]
tagrudev has joined #ruby
newUser1234 has quit [Remote host closed the connection]
GriffinHeart has quit [Ping timeout: 244 seconds]
hiyosi has quit [Ping timeout: 244 seconds]
Bosox20051 has quit [Ping timeout: 255 seconds]
combusean has quit [Quit: Leaving.]
apeiros_ has joined #ruby
pvb has joined #ruby
apeiros has quit [Read error: Connection reset by peer]
niftylettuce_ has quit [Quit: Connection closed for inactivity]
cjsarette has quit [Remote host closed the connection]
alexju has quit [Remote host closed the connection]
timonv has joined #ruby
Morkel has quit [Quit: Morkel]
Shidash1 has joined #ruby
Shidash has quit [Ping timeout: 244 seconds]
<pcfreak30>
In zip::file does the name property start with a / or not
senayar has joined #ruby
timonv has quit [Ping timeout: 272 seconds]
mostlybadfly has quit [Quit: Connection closed for inactivity]
toastynerd has quit [Remote host closed the connection]
yfeldblum has joined #ruby
heftig has quit [Ping timeout: 264 seconds]
garndt has quit [Quit: Connection closed for inactivity]
timonv has joined #ruby
saarinen has quit [Quit: saarinen]
combusean has joined #ruby
chipotle has quit [Quit: cya]
relix has joined #ruby
apeiros_ has quit [Remote host closed the connection]
scx has joined #ruby
kenneth has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
d5sx43 has quit [Ping timeout: 240 seconds]
bradhe has joined #ruby
apeiros has joined #ruby
kenneth has joined #ruby
scx_ has quit [Ping timeout: 245 seconds]
amitchellbullard has joined #ruby
kenneth_ has joined #ruby
kenneth has quit [Read error: Connection reset by peer]
timonv has quit [Remote host closed the connection]
timonv has joined #ruby
jprovazn has quit [Ping timeout: 244 seconds]
dgaffney has quit [Remote host closed the connection]
apeiros has quit [Ping timeout: 252 seconds]
bradhe has quit [Ping timeout: 240 seconds]
dgaffney has joined #ruby
jprovazn has joined #ruby
cjsarette has joined #ruby
hamakn_ has joined #ruby
cjsarette has quit [Remote host closed the connection]
cjsarette has joined #ruby
tobago has joined #ruby
timonv has quit [Ping timeout: 245 seconds]
kiri has joined #ruby
dgaffney_ has joined #ruby
dgaffney has quit [Read error: Connection reset by peer]
GriffinHeart has joined #ruby
hamakn has quit [Ping timeout: 264 seconds]
Macaveli has joined #ruby
toastynerd has joined #ruby
wallerdev has quit [Quit: wallerdev]
toastynerd has quit [Remote host closed the connection]
Trynemjoel has joined #ruby
dwayhs has joined #ruby
dawkirst has quit [Remote host closed the connection]
djr has quit [Ping timeout: 252 seconds]
dgaffney_ has quit [Ping timeout: 264 seconds]
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
rippa has joined #ruby
nfk has joined #ruby
kilk_ has joined #ruby
yfeldblum has quit [Remote host closed the connection]
yfeldblum has joined #ruby
JasmeetQA has joined #ruby
dwayhs has quit [Ping timeout: 245 seconds]
relix has joined #ruby
fold has quit [Ping timeout: 264 seconds]
marcus3006 has joined #ruby
Vivekananda has quit [Read error: Connection reset by peer]
_bart has joined #ruby
kenneth_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
i_s has quit [Remote host closed the connection]
i_s has joined #ruby
i_s has quit [Client Quit]
Wolland has quit [Remote host closed the connection]
Wolland has joined #ruby
GriffinHeart has quit [Remote host closed the connection]
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
toastynerd has joined #ruby
relix has joined #ruby
mikeric has joined #ruby
relix has quit [Client Quit]
oo_ has quit [Remote host closed the connection]
GriffinHeart has joined #ruby
comma8 has quit [Ping timeout: 260 seconds]
kwd has joined #ruby
Wolland has quit [Ping timeout: 272 seconds]
mikeric has quit [Client Quit]
speakingcode has joined #ruby
oo_ has joined #ruby
apeiros has joined #ruby
hamakn_ has quit [Read error: Connection reset by peer]
hamakn has joined #ruby
cjsarette has quit [Remote host closed the connection]
dawkirst has joined #ruby
alem0lars has joined #ruby
combusean has quit [Quit: Leaving.]
dawkirst has quit [Remote host closed the connection]
dawkirst has joined #ruby
havenwood has joined #ruby
Morkel has joined #ruby
hiyosi has joined #ruby
combusean has joined #ruby
_justin has joined #ruby
d5sx43 has joined #ruby
Notte has joined #ruby
tessi_zz is now known as tessi
hiyosi has quit [Ping timeout: 264 seconds]
why_away has quit [Ping timeout: 245 seconds]
n0n3 has quit []
jackneill has joined #ruby
cjsarette has joined #ruby
tater has joined #ruby
combusean has quit [Quit: Leaving.]
tater has left #ruby [#ruby]
d5sx43 has quit [Ping timeout: 252 seconds]
claymore has joined #ruby
toastynerd has quit [Remote host closed the connection]
alem0lars has quit [Quit: Going AFK...]
dawkirst has quit [Ping timeout: 240 seconds]
comma8 has joined #ruby
jacks_spleen has joined #ruby
klaut has joined #ruby
GriffinHeart has quit [Remote host closed the connection]
cjsarette has quit [Ping timeout: 244 seconds]
jacks_spleen has quit [Client Quit]
dawkirst has joined #ruby
alem0lars has joined #ruby
blackmesa has joined #ruby
tyfighter has quit [Quit: tyfighter]
alem0lars_ has joined #ruby
alem0lars_ has quit [Client Quit]
alem0lars has quit [Ping timeout: 264 seconds]
alem0lars has joined #ruby
alem0lars has quit [Client Quit]
IceDragon has quit [Quit: Space~~~]
alem0lars has joined #ruby
fgo has joined #ruby
hermanmunster has quit [Remote host closed the connection]
`mrspock has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
hermanmunster has joined #ruby
anaeem1_ has quit [Remote host closed the connection]
GriffinHeart has joined #ruby
noop has joined #ruby
tectonic has quit []
Takle has joined #ruby
havenwood has quit [Remote host closed the connection]
fgo has quit [Ping timeout: 245 seconds]
hermanmunster has quit [Ping timeout: 240 seconds]
why_away has joined #ruby
kenneth has joined #ruby
whyy_ has joined #ruby
dwayhs has joined #ruby
kaspergrubbe has joined #ruby
pagioss has joined #ruby
blackmesa has quit [Ping timeout: 252 seconds]
sk87 has joined #ruby
Notte has quit [Remote host closed the connection]
speakingcode has quit [Ping timeout: 240 seconds]
jarray52 has joined #ruby
chipotle has joined #ruby
why_away has quit [Ping timeout: 245 seconds]
<jarray52>
Can Ruby initialize an array of length N in constant time? Can all elements of an array be set to a single specified value in constant time?
dumdedum has joined #ruby
CpuID has joined #ruby
CpuID has quit [Changing host]
CpuID has joined #ruby
dwayhs has quit [Ping timeout: 252 seconds]
<apeiros>
jarray52: nothing can truly do that.
chipotle has quit [Client Quit]
<pcfreak30>
undefined method `empty?' for #<URI::HTTP:0x7f8dc9ffbaa0>
<apeiros>
(the latter, allocate you can in constant time if you don't null out the array)
<CpuID>
hey ppls - has anyone ever had a scenario where you have about 40-50~ threads, with multiple queues in use for various purposes, pushing and popping from them at different times in your workflow, but at the end of everything you consistently end up with exactly 1 item (a random one each time) left in a single queue at the end?
<pcfreak30>
I get that from URI() or URI.parse
kaspergrubbe has quit [Ping timeout: 240 seconds]
<CpuID>
i cant seem to pinpoint why it wouldnt be getting popped off, i even have some debug output claiming its been popped off but its not :(
robbyoconnor has joined #ruby
<CpuID>
the weird thing is i tested just doing an array with a mutex around the push and delete methods, same place, that also retains 1 value exactly also
BizarreCake has joined #ruby
jprovazn has quit [Ping timeout: 245 seconds]
Takle has quit [Remote host closed the connection]
monkegjinni has joined #ruby
wookiehangover has quit [Ping timeout: 245 seconds]
holmser_ has quit [Ping timeout: 260 seconds]
george2 has quit [Ping timeout: 245 seconds]
momomomomo has quit [Quit: momomomomo]
qhartman has quit [Ping timeout: 272 seconds]
holmser has joined #ruby
<apeiros>
CpuID: I usually use Queue for queues across threads. And I haven't had issues with items claimed to be popped but not being popped.
wookiehangover has joined #ruby
qhartman has joined #ruby
tripiiii was kicked from #ruby by apeiros [#ruby is not your spamhub]
tripiiii has joined #ruby
tripiiii was kicked from #ruby by apeiros [#ruby is not your spamhub]
<CpuID>
weird? yea ok. ruby 2.0.0p353 here.
<jarray52>
apeiros: Thanks. I convinced myself that what you said is true.
<CpuID>
on osx
<apeiros>
jarray52: why are you asking?
monkegjinni has quit [Ping timeout: 245 seconds]
<CpuID>
its weird, this is the first time its come up, so im constantly reviewing my code thinking its my end but i cant pinpoint how :)
lolmaus has quit [Remote host closed the connection]
<apeiros>
initialization of an array in ruby is taking a comparably insignificant amount of time anyway…
<pcfreak30>
Error: Could not set 'present' on ensure: undefined method `empty?' for #<URI::HTTP:0x000000061b0d90>
<pcfreak30>
any help
<apeiros>
(compared to other costs in ruby)
<jarray52>
apeiros: I was just doing some Ruby exercises, and I needed to accomplish that to solve the problem using my approach, but my approach was wrong.
<pcfreak30>
i have tried ruby 1.8 and 1.9
<apeiros>
jarray52: "create an array in constant time" was a problem requirement? o0
<pcfreak30>
upgrading mean rvm, which meant using rvm and puppet and an extra puppet run on all new nodes
<pcfreak30>
and stadging. Really unwanted
qhartman has quit [Ping timeout: 264 seconds]
<Hanmac>
it works without rvm if you compile the source yourself
<pcfreak30>
Hanmac: I am working with puppet authomation and the code is a puppet provider.
<pcfreak30>
So that means getting puppet running on 1.9 via puppet run and crashing once
<Hanmac>
hm i can understand that ... i am working/learing into using chef
<pcfreak30>
So
<pcfreak30>
I am trying to not do extra work to get the same results
<Hanmac>
apeiros: did you know one of the recent changes with frozen strings? they reduce the allocated buffer into the size of the string itself
<pcfreak30>
and complicate the setup.
BizarreCake has quit [Read error: Connection reset by peer]
<apeiros>
Hanmac: that's a different one from the one where a frozen string literal is only allocated once?
george2 has joined #ruby
wookiehangover has joined #ruby
holmser has joined #ruby
bradhe has joined #ruby
<Hanmac>
apeiros: hm yes and no, they might be connected, normaly a string has more allocated in his buffer than the current string size, (so it must not reallocate again), but when a string is getting frozen its allocated buffer will be resized into the actual needed size
Takle has joined #ruby
timgauthier has joined #ruby
jtiggo has quit []
benlieb has quit [Quit: benlieb]
<apeiros>
interesting. I would have expected a string literal to always have a fitting buffer and then use growing algorithms when it actually gets mutated.
bradhe has quit [Ping timeout: 240 seconds]
<apeiros>
IME string mutation is reasonably rare.
heftig has joined #ruby
<apeiros>
then again, String probably has COW semantics.
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Takle has quit [Remote host closed the connection]
toastynerd has joined #ruby
ghr has joined #ruby
brunops has quit [Ping timeout: 240 seconds]
qhartman has joined #ruby
andikr has joined #ruby
GriffinHeart has quit [Remote host closed the connection]
<Hanmac>
apeiros: its more for when you freeze a string object later
Takle has quit [Remote host closed the connection]
<olivier_bK>
i use css
<olivier_bK>
the xpath is not clear for me
<olivier_bK>
:)
<etqqkoiflwhb>
olivier_bK: yea, you can navigate with css too :)
<Hanmac>
nokogiri supports css selectors too
<olivier_bK>
ahhh
<olivier_bK>
why i didn't see that on the doc gr......
alem0lars has joined #ruby
railzForDaiz has joined #ruby
d5sx43 has quit [Ping timeout: 240 seconds]
Takle has joined #ruby
moritzs has joined #ruby
moritzschaefer has joined #ruby
tkuchiki has joined #ruby
nerocrux has quit [Remote host closed the connection]
toastynerd has joined #ruby
nerocrux has joined #ruby
tkuchiki_ has quit [Ping timeout: 240 seconds]
cantonic has joined #ruby
cantonic has quit [Client Quit]
tkuchiki has quit [Ping timeout: 240 seconds]
DouweM has quit [Ping timeout: 244 seconds]
toastynerd has quit [Ping timeout: 244 seconds]
duncannz has quit [Ping timeout: 252 seconds]
kyb3r_ has quit [Read error: Connection reset by peer]
nihal has joined #ruby
_bart has quit [Ping timeout: 264 seconds]
blackmesa has joined #ruby
himsin has joined #ruby
routes has quit [Ping timeout: 240 seconds]
nihal is now known as routes
fgo has joined #ruby
<isomorphismes>
this stuff about "everything is an object" and passing messages to objects makes sense, and is actually kind of nice.
blackms has quit [Ping timeout: 252 seconds]
<isomorphismes>
It's pretty.
<sevenseacat>
:)
DanielRb has quit [Ping timeout: 264 seconds]
fabrice31 has joined #ruby
<isomorphismes>
Is that from Smalltalk?
fgo has quit [Ping timeout: 272 seconds]
<etqqkoiflwhb>
isomorphismes: yea
<isomorphismes>
well cooooooooooooooooool
<etqqkoiflwhb>
isomorphismes: there's a lot more good stuff, since everything is an object, classes are objects, method hooks (like method_missing, inherited..), metaprogramming (instance_exec..), read on
dwayhs has joined #ruby
blackms has joined #ruby
BizarreCake has joined #ruby
DanielRb has joined #ruby
alem0lars has quit [Quit: Going AFK...]
sinkensabe has quit []
sinkensabe has joined #ruby
dwayhs has quit [Ping timeout: 245 seconds]
<isomorphismes>
why does ruby provide both send and __send__? The koans ask this and I have no clue
byteoverfl0w has joined #ruby
Takle has quit [Remote host closed the connection]
<workmad3>
isomorphismes: because sometimes people override 'send'
<etqqkoiflwhb>
isomorphismes: yep, i recently added a Notification#send
terlar has quit [Quit: WeeChat 0.4.3]
terlar has joined #ruby
<isomorphismes>
ohhhh. right
<isomorphismes>
but then wouldn't you just use Object.send?
yacks has quit [Ping timeout: 255 seconds]
<isomorphismes>
Object::send maybe
<workmad3>
isomorphismes: but how would you call that on the object you want?
Deele has joined #ruby
<isomorphismes>
workmad3: haha. I was just trying and failing ;)
monkegjinni has joined #ruby
alem0lars has joined #ruby
terlar has quit [Client Quit]
terlar has joined #ruby
JasmeetQA has quit [Read error: Connection reset by peer]
<isomorphismes>
the only other two __x__ I see are __binding__ and __id__. But neither of those are defined as just "binding" or just "id" without __'s.
<Mon_Ouie>
Well __binding__ is a pry thing
<Mon_Ouie>
__id__ is in case people override object_id, it's because object_id used to be called id
GriffinHeart has quit [Remote host closed the connection]
<workmad3>
isomorphismes: __x__ basically means 'this is a really important method that is required for ruby to work internally... DON'T F****** TOUCH IT1
<workmad3>
etqqkoiflwhb: that's 'binding', not '__binding__'
<Mon_Ouie>
Indeed
<Mon_Ouie>
I also remember writing __binding__ :p
toastynerd has joined #ruby
<workmad3>
isomorphismes: as Mon_Ouie is now letting you know, sometimes gems will jump on the __ bandwagon when they add in methods that they really, really need and shouldn't be messed with...
<isomorphismes>
workmad3: but theoretically if you were some kind of computer scientist genius you could edit exactly that stuff and make the language totally different, perhaps also stillw orking.
<canton7>
rust is meant to be very safe. it isn't meant to be easy to learn or read, necessarily. it's meant for people who know their language, who want to leverage the compiler to provide a ton of safety for them
atraylen has joined #ruby
<apeiros>
_pingu: I don't use windows, so I don't know. but I'm pretty sure google has good infos about it
<shevy>
prison programming
<apeiros>
safety net programming
<isomorphismes>
_pingu: gem install pry
<apeiros>
pry won't solve that problem. it will emit the same color codes
<apeiros>
but yes, install pry. better than irb anyway :)
<isomorphismes>
oh oh. this is the escapes like \[029
d5sx43 has quit [Ping timeout: 240 seconds]
<etqqkoiflwhb>
canton7: safe -> no memory leaks?
<canton7>
static analysis is providing huge huge benifits in write safe and secure software. having a langauge which aids static analysis is a huge plus
whyy has joined #ruby
dawkirst has quit [Remote host closed the connection]
benlieb has quit [Quit: benlieb]
<isomorphismes>
hey _pingu , have you looked at shoooooooooes ?
<isomorphismes>
I don't use Windows either but I remember the tutorials for that are designed with Windows users in mind.
<etqqkoiflwhb>
canton7: unreferenced memory? p = malloc(...); p = malloc(...), the first piece of memory has no pointer holding it
Takle has quit [Remote host closed the connection]
DanielRb has joined #ruby
<canton7>
my understanding is that memory is always owned by *someone*, and is therefore always released correctly
<isomorphismes>
ping-pong: www.shoesrb.com/downloads.html If you get the Windows packet, that should contain something you can run irb in -- dont know if it will be Cygwin Bash or what.
<canton7>
(I don't know much rust - I've read lots of articles *about* rust, but haven't yet dug much into the language)
<isomorphismes>
_pingu: ^ that was for you
<shevy>
yeah way too much hype about rust
treehug88 has joined #ruby
<canton7>
shevy, then it probably isn't meant for you ;)
<shevy>
and possibly everyone else neither
oo_ has joined #ruby
tkuchiki has joined #ruby
<shevy>
add a new language every now and then, it does just about everything other languages already do, but touts itself having an advantage in environment x and a new feature z, and suddenly there is a lot of hype around it for a few years
<_pingu>
pry works. thanks
_pingu has quit [Quit: ChatZilla 0.9.90.1 [Firefox 29.0/20140428193838]]
Macaveli has quit [Ping timeout: 252 seconds]
oo__ has joined #ruby
<isomorphismes>
cool _pingu good to hear
fabrice31 has quit [Remote host closed the connection]
kilk_ has quit [Ping timeout: 264 seconds]
fabrice31 has joined #ruby
Takle has joined #ruby
<canton7>
shevy, the point is that rust *is* adding a ton of new stuff
<shevy>
indeed, a unique feature compared to other newcomers
musashi1 has quit [Quit: Musashi1]
fgo has joined #ruby
<canton7>
I'm not denying that a lot of new languages are useless :)
kilk_ has joined #ruby
samphippen has joined #ruby
<samphippen>
do hash instances === anything?
<canton7>
but I think rust will stick around, in the circles that need rust
donnoc has joined #ruby
<canton7>
(which is probably not the majority of the programming world)
oo_ has quit [Ping timeout: 244 seconds]
<shevy>
COBOL
<shevy>
it's immortal
<shevy>
it'll be around after the universe has its heat exhaustion
xcv has joined #ruby
Takle has quit [Remote host closed the connection]
<pcfreak30>
The file doesnt save. Data is getting downloaded in the block though
fabrice31 has quit [Remote host closed the connection]
<canton7>
debugging 101: break it down
<canton7>
can you write to a file, ignoring the download block?
jottr has quit [Ping timeout: 240 seconds]
<canton7>
does line 6 get called? print a debug message there
<canton7>
do 'response' and 'segment' contain any data? again, debug messages will help
<jhass>
you can also save the begin/ensure by using the block form of open: open("#{file}.tmp", "wb") do |file|
dwayhs has joined #ruby
tjr9898 has joined #ruby
moritzs has joined #ruby
<pcfreak30>
canton7: I stated already that I printed out the data downloaded'
<pcfreak30>
I just tested a save in irb and it was successful
tjr9898 has quit [Remote host closed the connection]
<canton7>
no, you stated that data was getting downloaded in the block. I'm not going to assume anything
Rainicorn has joined #ruby
tjr9898 has joined #ruby
LadyRainicorn has quit [Read error: Connection reset by peer]
LadyRainicorn has joined #ruby
<pcfreak30>
By that I ment I was printing it out in ssh
<canton7>
cool, so that's one bit satisfied
<pcfreak30>
a lot of binary data
<canton7>
check the other questions
dwayhs has quit [Ping timeout: 245 seconds]
<canton7>
essentially you've got a search space, where the problem could be occurring at any point. you want to do a binary search to figure out exactly where the problem is
<pcfreak30>
ok odd
<pcfreak30>
Somehow switching from the begin to the block
<canton7>
you don't have much code, so that's easy
<pcfreak30>
got it saving?
<pcfreak30>
Why is that
<canton7>
hmm?
moritzschaefer has joined #ruby
<pcfreak30>
Your sugestion
<pcfreak30>
using a block on open
<pcfreak30>
fixed it
<pcfreak30>
Im wanting to know why
tjsousa_ has joined #ruby
<canton7>
it shouldn't
<pcfreak30>
Well
<pcfreak30>
Im on ruby 1.8
<pcfreak30>
I changed the code
<pcfreak30>
and it magically started saving
<pcfreak30>
And I know 1.8 is old but its centos and im not going to upgrade
<jhass>
and most of us are not going to support 1.8
mengu has joined #ruby
<pcfreak30>
Well
Xeago has quit [Remote host closed the connection]
Rainicorn has quit [Ping timeout: 245 seconds]
<pcfreak30>
For what I have to do makes my life more complicated to upgrade
Biohazard has quit [Ping timeout: 252 seconds]
Takle has joined #ruby
<pcfreak30>
AS Ive dealing with automation
<pcfreak30>
on puppet
Xeago has joined #ruby
<pcfreak30>
and gettng puppet on 2.0 is a PITA
<canton7>
1.9?
<pcfreak30>
Need a external repo
<pcfreak30>
syill
<pcfreak30>
1.9 is easier, 2.0 requires rvm
<pcfreak30>
centos 6 doesnt go above 1.8
<pcfreak30>
and if im automating nodes
martisj has quit [Quit: Connection closed for inactivity]
<pcfreak30>
its more things to break.
<pcfreak30>
So im dealing with the hand im dealt
DanielRb has quit [Ping timeout: 264 seconds]
PanPan has quit [Quit: ChatZilla 0.9.90.1 [Firefox 30.0/20140605174243]]
toastynerd has joined #ruby
<whyy>
Hey
bradhe has joined #ruby
<whyy>
user.posts.monthly.count
<whyy>
I have code something like this, where monthly is a scope on post model
<whyy>
Now I want to stub the methods so that they are not called
<whyy>
I tried to do something like this user.stub(:posts).and_return([post])
<whyy>
Sorry: I think probably I should take it to #rubyonrails
Macaveli has joined #ruby
DanielRb has joined #ruby
toastynerd has quit [Ping timeout: 245 seconds]
_2easy has joined #ruby
<isomorphismes>
so the koan writes obj.send(:method) but it also works to do obj.send("meth" + "od") # (they talk about dynamically generating the method name)
Morkel has quit [Ping timeout: 240 seconds]
<isomorphismes>
additionally if I write obj.send(":" + "meth" + "od") # that actually fails
bradhe has quit [Ping timeout: 264 seconds]
dawkirst has joined #ruby
<banister>
isomorphismes of course the later would fail
<banister>
":hello" is not equivalent to :hello
<mozzarella>
because it's a string rather than a symbol
<banister>
but in the case of send() "hello" and :hello are both ok
<isomorphismes>
well the koan preferentially writes obj.send(:method, arg1, arg2) # in the symbol way
<Mon_Ouie>
Goeiedag
gruz0[russia] has joined #ruby
<Mon_Ouie>
Yes, that's how most you'd write it most of the time
<_2easy>
hi, i have a question regarding dynamic redefinition of object methods. I have an obcject which can behave in two different ways - master;slave - and would want have two methods 'become_master' and 'become_slave' which changes definitions of the methods defined in Master and Slave modules. How do I accomplish that?
<banister>
_2easy sounds like a weird design :)
<banister>
_2easy but if you really wanted to do that, you'd use composition and delegation, and you'd just swap out the delegatee
<isomorphismes>
I guess if you wanted to dynamically generate the symbol you would write a string and then .to_sym it? But is there any point in feeding send() a symbol as the first argument? if it accepts either
jottr has joined #ruby
<banister>
isomorphismes if you do dynamic stuff, just use a string
DanielRb has quit [Ping timeout: 244 seconds]
lkba has joined #ruby
<isomorphismes>
ok cool thanks banister . and thanks both of you Mon_Ouie for the pry!!
Xaitec has quit [Remote host closed the connection]
<etqqkoiflwhb>
with jruby
nerocrux has quit [Quit: Leaving...]
hiyosi has joined #ruby
<_2easy>
banister: I want to programm library for distributed system, and the machines can change their roles on the go, which should be invisible to the user. For ex: if i'm a master 'recv' function should forward request to slave, and a slave in recv should analyze it and send answer
jottr has quit [Ping timeout: 244 seconds]
donnoc has quit [Ping timeout: 244 seconds]
DouweM has joined #ruby
<banister>
_2easy then use the strategy pattern
seaned_ has joined #ruby
seaned_ has left #ruby [#ruby]
Macaveli has joined #ruby
lolmaus_ has joined #ruby
nffff has joined #ruby
<Mon_Ouie>
etqqkoiflwhb: You'd have to check how JRuby handles collections, but I'd imagine that it doesn't allow hash[key] = value to run on the same hash in two different threads
<_2easy>
banister: thanks, I'll check it out
<Mon_Ouie>
And having multiple objects to define stuff sounds weird
hiyosi has quit [Ping timeout: 240 seconds]
<etqqkoiflwhb>
Mon_Ouie: multiple objects?
<Mon_Ouie>
multiple threads*
<etqqkoiflwhb>
Mon_Ouie: just pondering on uses of a class level registry, could have very well been an internal DSL
charliesome has joined #ruby
d5sx43 has joined #ruby
bluOxigen has quit [Ping timeout: 240 seconds]
charliesome has quit [Client Quit]
zoraj has joined #ruby
emsilva has quit [Quit: Keep Walking (Computer Slept!)]
_justin has quit [Quit: _justin]
workmad3 has quit [Read error: Connection reset by peer]
workmad3 has joined #ruby
DanielRb has quit [Ping timeout: 264 seconds]
DrOwl has quit [Ping timeout: 260 seconds]
d5sx43 has quit [Ping timeout: 240 seconds]
phutchins has joined #ruby
DrOwl has joined #ruby
chipotle has joined #ruby
_justin has joined #ruby
chipotle has quit [Client Quit]
mupkoo has quit [Remote host closed the connection]
DanielRb has joined #ruby
chipotle has joined #ruby
eam has quit [Ping timeout: 240 seconds]
eam has joined #ruby
chipotle has quit [Client Quit]
chipotle has joined #ruby
moritzs has quit [Ping timeout: 240 seconds]
martisj has joined #ruby
moritzschaefer has quit [Ping timeout: 245 seconds]
chipotle has quit [Client Quit]
fgo has joined #ruby
boris has quit [Ping timeout: 264 seconds]
chipotle has joined #ruby
why_away has joined #ruby
whyy has quit [Ping timeout: 245 seconds]
chipotle has quit [Client Quit]
boris has joined #ruby
spectri has quit [Remote host closed the connection]
jrhe has joined #ruby
jottr has joined #ruby
fgo has quit [Ping timeout: 252 seconds]
timonv has quit [Remote host closed the connection]
workmad3 has quit [Ping timeout: 255 seconds]
Takle has quit [Remote host closed the connection]
noob101 has quit [Ping timeout: 246 seconds]
why_away has quit [Remote host closed the connection]
timonv has joined #ruby
fgo has joined #ruby
ponga has joined #ruby
Takle has joined #ruby
dawkirst has quit [Remote host closed the connection]
dwayhs has joined #ruby
mupkoo has joined #ruby
hpoydar has joined #ruby
dawkirst has joined #ruby
Xeago has quit [Remote host closed the connection]
GriffinHeart has quit [Remote host closed the connection]
timonv has quit [Ping timeout: 252 seconds]
charliesome has joined #ruby
dwayhs has quit [Ping timeout: 245 seconds]
GriffinHeart has joined #ruby
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
vifino has joined #ruby
hpoydar has quit [Ping timeout: 240 seconds]
mbuf has joined #ruby
monkegjinni has joined #ruby
bradhe has joined #ruby
whyy has joined #ruby
<mbuf>
if I have a = { '2014' => { 'c' => 10.5, 'd' => 5.4 } } and b = { '2014' => { 'c' => 2.5 }}, how can I merge these two entries to get result = { '2014' => { 'c' => 13.0, 'd' => 5.4} } ?
perlsyntax has joined #ruby
<apeiros>
mbuf: Hash#merge takes a block on collisions. test whether the values are a hash too and merge those too
<mbuf>
apeiros, could you give an example?
sepp2k has joined #ruby
<apeiros>
merged = a.merge(b) { |k,v1,v2| v1.is_a?(Hash) && v2.is_a?(Hash) ? v1.merge(v2, &same_block_here) : …define behavior for non-hash value collisions… }
<mbuf>
apeiros, I see
monkegjinni has quit [Ping timeout: 244 seconds]
bradhe has quit [Ping timeout: 252 seconds]
<perlsyntax>
hi all
JasmeetQA has joined #ruby
toastynerd has joined #ruby
fgo has quit [Remote host closed the connection]
banister has joined #ruby
nffff has quit [Quit: leaving]
exgf_z_o has joined #ruby
timgauthier has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<mbuf>
apeiros, what does &same_block_here refer to?
banister has quit [Read error: Connection reset by peer]
banister has joined #ruby
<apeiros>
to the block you're passing to the first merge
andrewhl has quit [Quit: andrewhl]
_justin has quit [Quit: _justin]
<apeiros>
means you have to assign it as a proc to a variable first and then use it
dwayhs has quit [Read error: Connection reset by peer]
vifino has joined #ruby
mbuf has quit [Quit: Leaving]
<apeiros>
mbuf: which is exactly doing what I told you (except that it uses a named method instead of a proc).
<apeiros>
but well… I guess some people rather spend an hour shopping around for predone solutions instead of figuring out how things work
ghr has quit [Ping timeout: 240 seconds]
bradhe has quit [Ping timeout: 245 seconds]
Takle_ has joined #ruby
ejnahc has quit [Remote host closed the connection]
robertodecurnex has joined #ruby
ejnahc has joined #ruby
_bart has joined #ruby
lw has quit [Quit: s]
Wolland has quit [Remote host closed the connection]
tesuji has quit [Ping timeout: 252 seconds]
sambao21 has joined #ruby
Wolland has joined #ruby
mattstratton has joined #ruby
tesuji has joined #ruby
tessi_zz is now known as tessi
Bosox20051 has joined #ruby
mark_locklear has joined #ruby
joaoh82 has joined #ruby
Xeago has joined #ruby
mradmacher has quit [Ping timeout: 244 seconds]
falsetto has joined #ruby
Wolland has quit [Ping timeout: 245 seconds]
<happytux>
jhass: the cloning/fetching thing from a template/skeleton repository sounds nice
toastynerd has joined #ruby
<happytux>
jhass: When would making a gem make sense?
fgo has joined #ruby
<happytux>
jhass: When I got a collection for a PHP project (I always opt for Rake as build tool, even for non-Ruby projects).
<jhass>
if it's reusable for other people I guess
anaeem1_ has joined #ruby
benzrf|offline is now known as benzrf
alexju has joined #ruby
<benzrf>
happytux: dont use php
alexju has quit [Remote host closed the connection]
timonv has joined #ruby
sk87 has joined #ruby
Xeago has quit [Ping timeout: 252 seconds]
lewix has joined #ruby
Zai00 has joined #ruby
sambao21 has quit [Ping timeout: 245 seconds]
toastynerd has quit [Ping timeout: 255 seconds]
asteve has joined #ruby
fgo has quit [Ping timeout: 272 seconds]
bmurt has joined #ruby
<happytux>
benzrf: right. This was meant as an example. For a PHP project there is a collection of Rake tasks which can be used on it.
workmad3 has joined #ruby
<happytux>
jhass: And if it is still too unstable for public usage, can I have private gems, too?
<apeiros>
happytux: note that you don't need to publish a gem
gruz0[russia] has joined #ruby
<apeiros>
you can just put it on a git server and use bundler with a git address
* apeiros
does that with lots of company specific gems
<happytux>
apeiros: ah
<happytux>
apeiros: When would you make a gem and when would you simply copy rake files / the main Rakefile?
pothibo has joined #ruby
<apeiros>
I would never copy stuff around
<apeiros>
that's *always* a headache
<apeiros>
you never remember where the newest is, you forget to synch, update
<apeiros>
at the very very least I'd symlink
<apeiros>
(I guess jhass already suggested that)
<apeiros>
s/guess/think/
sinkensabe has quit [Remote host closed the connection]
bluOxigen has joined #ruby
sinkensabe has joined #ruby
sinkensabe has quit [Remote host closed the connection]
yacks has joined #ruby
<happytux>
apeiros: so the best way is to use a gem?
<happytux>
apeiros: And should I use one .rake file per task?
sinkensabe has joined #ruby
maximski has joined #ruby
<jhass>
there never is the ultimately best thing for anything, it all depends on your situation. all the time
TheLarkInn has joined #ruby
ringarin has quit [Quit: Leaving]
vpretzel has joined #ruby
hiyosi has joined #ruby
whyy has quit [Read error: Connection reset by peer]
sinkensabe has quit [Ping timeout: 244 seconds]
whyy has joined #ruby
<Takumo>
Anyone here had experience packaging a ruby web application in a way which makes it easy to run on a Windows server (e.g. MRI + installation wrapper, JRuby JAR package)
hiyosi has quit [Ping timeout: 240 seconds]
<Takumo>
got this project which needs to run on a windows server, and I'd rather not learn .net and set up a windows development environment if I can help it ;)
tier has joined #ruby
chipotle has joined #ruby
lewix has quit [Ping timeout: 252 seconds]
dgutierrez1287 has joined #ruby
whyy has quit [Remote host closed the connection]
chipotle has quit [Client Quit]
kabana has joined #ruby
cg433n has joined #ruby
<kabana>
hi guys how can i join 2 lines of output from a funciton i wrote with ruby?
<kabana>
bear with me in a noob so if my code is a joke then sobe it
<jhass>
start by indenting your code
<apeiros>
sevenseacat: you don't know that song?
<kabana>
jhass yes will do :)
<kabana>
hehe
<sevenseacat>
apeiros: nope
<tobiasvl>
kabana: your code is badly intended and you're mixing {} and do…end for blocks
<tobiasvl>
but that goes with being a noob, that's okay
<kabana>
k ill work on that
<kabana>
thx
mduk_ has joined #ruby
qwyeth has joined #ruby
<DouweM>
sevenseacat: it's the song that started electronic dance music (EDM)
chipotle has quit [Client Quit]
mduk has quit [Ping timeout: 264 seconds]
<DouweM>
kabana: you may want to work on your variable names ;)
ddv has quit [Changing host]
ddv has joined #ruby
<kabana>
yes i will make them less obfuscated
chipotle has joined #ruby
<kabana>
i just wanted to get the skills so threw random names etc
<jhass>
kabana: the output you get is from `p minez`, it's not the return value of `oks` which you do nothing with
<kabana>
when i finalize this it will be clean indented and easily legible
lxsameer has quit [Quit: Leaving]
taybin has joined #ruby
<DouweM>
kabana: sure, but it doesn't hurt to start clean indented and legible :P
<jhass>
^ you'll only make yourself more work
<kabana>
yeah indeed
alem0lars has quit [Quit: Going AFK...]
<ddv>
any decent editor will do it for you
<kabana>
so ideally i would like to have thos seperate lines joined into a single line like this "varnish_servers,apache_servers" what am i missing?
<kabana>
or is my logic flawed?
yacks has quit [Ping timeout: 240 seconds]
bradhe has joined #ruby
lw has joined #ruby
railzForDaiz has quit [Ping timeout: 255 seconds]
alexju has joined #ruby
railzForDaiz has joined #ruby
moritzs has quit [Ping timeout: 272 seconds]
Bumptious has joined #ruby
Hanmac1 has joined #ruby
<kabana>
i tired using joun with like \n but no luck
<kabana>
join*
LekeFly has quit [Ping timeout: 245 seconds]
Hanmac has quit [Ping timeout: 252 seconds]
yacks has joined #ruby
<jhass>
(15:08:22) jhass: kabana: the output you get is from `p minez`, it's not the return value of `oks` which you do nothing with
chipotle has quit [Quit: cya]
alem0lars has joined #ruby
bradhe has quit [Ping timeout: 244 seconds]
pietr0 has quit [Quit: pietr0]
ghr has joined #ruby
chipotle has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
whyy has joined #ruby
bradhe has joined #ruby
<apeiros>
sevenseacat: old classic. 70thies I think
<TheLarkInn>
So I have a project I'm working on that is a page where 3 different active record model collections populate
blackmesa has quit [Ping timeout: 245 seconds]
Takle has quit [Remote host closed the connection]
mradmacher has joined #ruby
pietr0 has joined #ruby
<kabana>
jhass: thanks for the clarification so how would i join them?
mupkoo has quit []
<jhass>
you already do ( I think, I'm not 100% following your code tbh.)
<kabana>
oh ok
<TheLarkInn>
But my issue is that only one model type can be in an AR:relation wrapper array, so I can't perform db side filtering without having to break the model collections up first, and then put them back together when they are done
ghr has quit [Ping timeout: 264 seconds]
rdark has quit [Quit: leaving]
<TheLarkInn>
Does anyone know of a library which allows db actions on multi collections of different models at once
<kabana>
i takes the input slits into a hast then splits the values of that hash as they are multimple, looks for the hostname in those values and retursn the key associated with it
Takle has joined #ruby
<kabana>
sorry fats typing lol
<kabana>
fast alos
<kabana>
:P
dblessing has joined #ruby
<DouweM>
TheLarkInn: I'm not aware of such a gem... But if the filtering is the same for all three models and their structure is alike, why not use inheritance and select for the parent model?
rdark has joined #ruby
benzrf|offline is now known as benzrf
<DouweM>
TheLarkInn: I'm of course assuming that's appropriate for the models in question. Otherwise I have no idea
chipotle has quit [Quit: cya]
monkegjinni has joined #ruby
vpretzel_ has joined #ruby
bradhe has quit [Ping timeout: 244 seconds]
whyy has quit [Ping timeout: 255 seconds]
tesuji has quit [Ping timeout: 264 seconds]
asteve has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
chipotle has joined #ruby
<benzrf>
DouweM: sup m8
VinceThePrince has joined #ruby
<DouweM>
benzrf: not much bra. how's the haskell stuffs going?
<kabana>
jhass: also wouldnt i have to call the method for it to yield anything?
krz has quit [Quit: WeeChat 0.4.3]
<benzrf>
DouweM: quite good :^)
<benzrf>
im making some headway in the clowns/jokers paper
<DouweM>
what
BizarreCake has joined #ruby
<jhass>
kabana: no?
Macaveli has quit [Ping timeout: 252 seconds]
<kabana>
ok
<TheLarkInn>
DouweM: they don't really inherit and their structures are differet
<TheLarkInn>
thats what's irritating,
<kabana>
i get nothign unless i put getdata under the end
djcp has joined #ruby
<DouweM>
TheLarkInn: in that case, no clue. I agree it would be useful to have a collection of mixed models
<kabana>
or do something with getdata
djcp has left #ruby [#ruby]
<TheLarkInn>
Yeah like for example, if you have a collection of mixed models, and those models have SOME attributes are the same like a "is_featured" attribute
vpretzel has quit [Ping timeout: 264 seconds]
monkegjinni has quit [Ping timeout: 240 seconds]
alem0lars has quit [Quit: Going AFK...]
kpshek has joined #ruby
<TheLarkInn>
well if you have an array of those 3 collections and you try to set scopes for each to sort the by is_featured, you can't really use any scoping or db side filters on that collection without using ruby
moritzs has joined #ruby
<TheLarkInn>
to do the sorting/filtering
<DouweM>
yeah I recognize the problem
<TheLarkInn>
I'm surprised no one has come up with a solution yet, I think I'll have to create a new repo on github and start writing, shit it would be really useful in this project I'm working on so, lol
tesuji has joined #ruby
<olivier_bK>
how i can tell to nokogiri to select the comment <!-- --> ?
<sevenseacat>
we have a #rubyonrails channel you know :)
<TheLarkInn>
Mine is not working and I'm assuming its because of that, but didn't know if theres a way to do something like that in the scope declaration
<jhass>
kabana: if you don't understand answers given to you, do follow up questions, just pasting the _same exact thing_ without any of the previous suggestions even applied is just rude
<kabana>
thanks
<kabana>
:D
<kabana>
hehe
Channel6 has joined #ruby
* kabana
experiences brain melt
<kabana>
appreciate you're help
<canton7>
kabana, worky?
<kabana>
jhass the follow up question got me the answer
<kabana>
thanks
GriffinHeart has joined #ruby
<kabana>
worky nicey
<kabana>
;)
<kabana>
thanks for your patience folks
cocotton has joined #ruby
<kabana>
so long
<kabana>
:)
<canton7>
I probably shouldn't have just given you the answer. you need to understand when something is printed to the consolo :P
<kabana>
yeah
<kabana>
thanks man
LadyRainicorn has quit [Read error: Connection reset by peer]
<kabana>
i am running on 2 hrs sleep so brainfart
<kabana>
:P
hiyosi has joined #ruby
rdark has quit [Quit: leaving]
<kabana>
plus im a noob
SubSignal has joined #ruby
rdark has joined #ruby
chipotle has quit [Quit: cya]
kabana has quit [Quit: ciao]
hpoydar has joined #ruby
chipotle has joined #ruby
newUser1234 has joined #ruby
GriffinHeart has quit [Ping timeout: 264 seconds]
rdark has quit [Client Quit]
chipotle has quit [Client Quit]
rdark has joined #ruby
sski has joined #ruby
chipotle has joined #ruby
SCommette has joined #ruby
hiyosi has quit [Ping timeout: 272 seconds]
rdark has quit [Client Quit]
chipotle has quit [Client Quit]
rdark has joined #ruby
rdark has quit [Client Quit]
rdark has joined #ruby
failshell has joined #ruby
chipotle has joined #ruby
kies has quit [Ping timeout: 240 seconds]
chipotle has quit [Client Quit]
failshell has quit [Read error: Connection reset by peer]
failshell has joined #ruby
chipotle has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
chipotle has quit [Client Quit]
MZAWeb has joined #ruby
chipotle has joined #ruby
chipotle has quit [Client Quit]
pvb has quit [Quit: Leaving]
rdark has quit [Remote host closed the connection]
jespada has joined #ruby
rdark has joined #ruby
codeurge has joined #ruby
tier has quit [Remote host closed the connection]
chipotle has joined #ruby
byteoverfl0w has quit [Read error: Connection reset by peer]
byteover_ has joined #ruby
chipotle has quit [Client Quit]
sailias has joined #ruby
Zenigor has joined #ruby
asteve has joined #ruby
Bumptious has quit [Remote host closed the connection]
chipotle has joined #ruby
Takle has joined #ruby
Ankhers has joined #ruby
rdark has quit [Client Quit]
dik_dak has joined #ruby
rdark has joined #ruby
rdark has quit [Client Quit]
chipotle has quit [Client Quit]
rdark has joined #ruby
chipotle has joined #ruby
VinceThePrince has quit [Quit: Leaving]
chipotle has quit [Client Quit]
rdark has quit [Client Quit]
cocotton has quit [Remote host closed the connection]
gruz0[russia] has quit [Quit: This computer has gone to sleep]
RaCx has quit [Ping timeout: 240 seconds]
RaCx_ is now known as RaCx
RaCx has quit [Client Quit]
fgo has joined #ruby
codydh has left #ruby [#ruby]
<shevy>
why is #RubyOnRails so active
<shevy>
and #ruby so quiet
aganov has quit [Remote host closed the connection]
<shevy>
:(
lemur has joined #ruby
RaCx has joined #ruby
<crome>
:(
jiripospisil has joined #ruby
braincra- has joined #ruby
brasten has quit [Quit: brasten]
dgaffney has joined #ruby
RaCx has quit [Client Quit]
chrstphrhrt has joined #ruby
SubSignal has quit [Remote host closed the connection]
bbloom has quit [Quit: Computer has gone to sleep.]
<apeiros>
shevy: because ruby makes less troubles than rails, obviously!
<apeiros>
given that we have >2x the number of users…
jobewan has joined #ruby
<shevy>
haha
braincrash has quit [Ping timeout: 272 seconds]
<shevy>
that's a nice explanation
<shevy>
wow, workmad3 is like hyperactive there
<shevy>
if I combine #ruby and #RubyOnRails he must never be able to do anything else but to IRC
<shevy>
:>
<workmad3>
shevy: :P
Bumptious has joined #ruby
d5sx43 has joined #ruby
<workmad3>
shevy: I've just spent the last 2 hours rewriting a project document
<crome>
lies
<happytux>
Has anyone of you used Zend Framework? :)
<crome>
no one writes documentation
hiyosi has joined #ruby
<shevy>
rewriting documentation?
<shevy>
writing documentation is so boring
ffranz has joined #ruby
<shevy>
Zend ... is that the PHP crap?
<shevy>
that's like + 10 years ago for me
<chrstphrhrt>
hi… coming from python/virtualenv… i’m trying to have multiple “gemsets” with the same ruby version that i can switch between for different projects… rbenv-gemset is confusing to me.. seems i need to have a project already existing before using a gemset? can’t i just install a bunch of gems somewhere and then activate that to be used for e.g. providing the rails or bundler commends to be used in a project that hasn’
<chrstphrhrt>
been created yet
<happytux>
hehe
<crome>
chrstphrhrt: have you considered bundler?
<sevenseacat>
i used zend many moons ago
<workmad3>
shevy: working up an estimate for a potential new client... and their project document is pretty shit, so I just spent 2 hours rewriting it based on our current understanding of it :)
<sevenseacat>
it was a bad time in my life
<chrstphrhrt>
crome: yeah i installed bundler in my rbenv global
Xeago has joined #ruby
hamakn has quit [Remote host closed the connection]
<shevy>
workmad3 aaaah ok so you have a financial interest in writing stuff; I assumed documentation for like open source projects
<shevy>
if you get paid to do boring shit then that is better than to do boring shit without getting paid
<jhass>
chrstphrhrt: just using a global "gemset" and bundler is fine today
<shevy>
sevenseacat we all eventually overcome our bad days
<shevy>
smoking weed, drinking alcohol
<shevy>
coding in php
chipotle has joined #ruby
<chrstphrhrt>
jhass: ok cool will try that
Wolland_ has joined #ruby
treehug88 has joined #ruby
kaspergrubbe has quit [Remote host closed the connection]
jottr has quit [Quit: WeeChat 0.4.3]
<chrstphrhrt>
jhass: just means then that global needs to have rails… which is the very thing that will need to have different versions across projects
chipotle has quit [Client Quit]
<happytux>
shevy: lol :)
<workmad3>
shevy: it's a pretty interesting project really... rewriting this doc wasn't too bad :)
<crome>
so, what is the problem with bundler again?
dwayhs_ has joined #ruby
lw has joined #ruby
jottr has joined #ruby
<jhass>
chrstphrhrt: that's no problem, you can install multiple versions of the same gem and bundler will restrict to the right one according to your .lock
<sevenseacat>
bundler is an awesome tool
dumdedum has quit [Quit: foo]
blackgoat_ has joined #ruby
brasten has joined #ruby
jprovazn has quit [Quit: Leaving]
hiyosi has quit [Ping timeout: 245 seconds]
kaspergrubbe has joined #ruby
alem0lars has joined #ruby
Wolland has quit [Ping timeout: 245 seconds]
<chrstphrhrt>
jhass: ahh! heh ok thanks for the info.. guess i’ll need to start thinking less imperatively in ruby-land!
skaflem has joined #ruby
SCommette has joined #ruby
rdark has joined #ruby
taybin has quit [Quit: Leaving]
BWStearns has joined #ruby
lolmaus_ has quit [Ping timeout: 245 seconds]
dwayhs_ has quit [Ping timeout: 264 seconds]
<happytux>
Hi!
<happytux>
How are you managing assets like bigger image files or videos?
<happytux>
One shouldn't put them into git repository, right?
<happytux>
So one user proposed me to use an asset server.
byteover_ has quit [Quit: Leaving... have a good one...]
<happytux>
How does such an asset server look like?
pvb has joined #ruby
<lagweezle>
git is very bad at storing binary data, especially if it will be changing
<lagweezle>
Sadly, I do not know a good answer as to what the proper alternative is. :(
shredding has quit [Quit: shredding]
xaxisx has quit [Quit: xaxisx]
<lemur>
AWS
<happytux>
lagweezle: And what to do when the site also uses a CMS for being able to update content like text and photos.
<happytux>
lagweezle: I wouldn't store them in a SQL/NoSQL database, right?
<lemur>
See above comment
<happytux>
AWS?
Wolland_ has quit [Remote host closed the connection]
<happytux>
Amazon Cloud?
<lemur>
Amazon Web Services
joaoh82_ has quit [Remote host closed the connection]
<lemur>
Fog is used to connect to it, and a lot of people use it as a static resources store
Wolland has joined #ruby
geggam has joined #ruby
joaoh82 has joined #ruby
dgaffney has quit [Remote host closed the connection]
<happytux>
lemur: hm, it could be overkill? If it is just a smaller site?
<rdark>
I use s3 (with versioning) with cloudfront, then a rake script to manage that uses the regular aws sdk
<happytux>
I don't always use the cloud.
apeiros has joined #ruby
<happytux>
So you incorporate this into your build process? That the build script will download the assets?
benzrf is now known as benzrf|offline
fgo has quit []
<rdark>
rake task to pull down the files to a local folder (that is .gitignored), and another one to push up
xaxisx has joined #ruby
<happytux>
nice
Wolland has quit [Ping timeout: 245 seconds]
<rdark>
devs can just add new assets to the folder and push back up
<happytux>
rdark: hm, so I have to upload the complete release, including the assets. For one page this can easily become 300 MB.
tjr9898 has quit [Remote host closed the connection]
<happytux>
rdark: can I reuse them directly on production system?
tjr9898 has joined #ruby
kilk_ has quit [Quit: kilk_]
<rdark>
I do an md5sum on local files and check it against the remote for changes, so only changed files get pushed
* certainty
hates "the cloud"
Takle has quit [Remote host closed the connection]
apeiros has quit [Ping timeout: 252 seconds]
kilk_ has joined #ruby
<certainty>
there goes the apeiros. Quick the police has left the channel, let's go crazy and ramble
dangerousdave has joined #ruby
newUser1234 has quit [Remote host closed the connection]
willgorman has quit [Ping timeout: 240 seconds]
<happytux>
rdark: currently I am using git as deployment tool (configured to do so). This shouldn't be used for the assets, too. So I use rsync for the assets?
<happytux>
Capistrano also seems to upload some stuff not using git but rsync, separately.
Takle has joined #ruby
acrussell has joined #ruby
willgorman has joined #ruby
<lagweezle>
happytux: lemur's suggestion of AWS is a good one. Using a database can be a pretty good solution, but not terribly good for versioning.
<lagweezle>
From what I've fiddled with s3 so far, it is full of awesome.
kilk_ has quit [Client Quit]
tjr9898 has quit [Ping timeout: 240 seconds]
kilk_ has joined #ruby
<certainty>
it is full of "you don't own your stuff" anymore
bradhe has joined #ruby
tesuji has quit [Ping timeout: 252 seconds]
<lagweezle>
Well, there is that, too. :3
jerius has joined #ruby
<lagweezle>
It is quite nice in that you can set ACLs and version things, though, and is a weird sort of key-value database.
andikr has quit [Remote host closed the connection]
gruz0[russia] has joined #ruby
jiripospisil has quit [Quit: Leaving]
d5sx43 has quit [Remote host closed the connection]
weems has joined #ruby
gruz0[russia] has quit [Client Quit]
tessi is now known as tessi_zz
RaCx has joined #ruby
etqqkoiflwhb has quit [Quit: Computer has gone to sleep.]
lemur has quit [Read error: Connection reset by peer]
mikepack has joined #ruby
lemur has joined #ruby
<happytux>
lagweezle: what kind of database is good for big assets?
gruz0[russia] has joined #ruby
<happytux>
Using a cloud instead of a crude hosting / virtual server / root server is cheaper or more expensive?
<happytux>
I already full provision the stack, I could switch to a cloud, too
<lagweezle>
We could ask Sir Mix-a-lot.
<happytux>
*fully
bradhe has quit [Ping timeout: 272 seconds]
TuxLyn has joined #ruby
enebo has joined #ruby
<happytux>
lol
<happytux>
Who is Mix-a-lot?
fabrice31 has quit [Remote host closed the connection]
<lagweezle>
You would need to run the numbers to find out, honestly, happytux. Keep in mind that there are administrative costs to each, both in raw cash values as well as in time needed to learn and administer the new infrastructure properly.
<happytux>
lagweezle: ah, you also have seen the series Sherlock?
Xeago has quit [Remote host closed the connection]
<lagweezle>
Sir Mix-a-lot is the artist who wrote/performed 'Baby Got Back'.
<happytux>
ah
hamakn has joined #ruby
<lagweezle>
happytux: It pleases me greatly! (Sherlock)
havenwood has joined #ruby
monkegjinni has joined #ruby
Kwpolska has joined #ruby
<Kwpolska>
What is the recommended Ruby tutorial for already-programmers?
<lagweezle>
Kwpolska: I found the Ruby Koans VERY educational.
kaspergr_ has joined #ruby
<TuxLyn>
hmmm how can I fix this then ?
<jhass>
just strip the "#{...}"
dgaffney has joined #ruby
monkegjinni has quit [Remote host closed the connection]
<jhass>
on the other arg too, it's already a string
<jhass>
no reason to "convert" it into one again
<lagweezle>
Kwpolska: It assumes you understand the basics, and guides you through discovering how the Ruby approaches to things work and are the same or different from a lot of things you'd expect.
<TuxLyn>
jhass, same thing still
<Kwpolska>
lagweezle: I’m a huge fan of prose.
sepeck has joined #ruby
<TuxLyn>
jhass, I've tried that before too :)
<lagweezle>
Kwpolska: prose?
railzForDaiz has quit [Ping timeout: 252 seconds]
<Kwpolska>
lagweezle: ruby koans is written in Ruby. I want a tutorial that’s written in English.
<jhass>
TuxLyn: what do you have now
<TuxLyn>
one sec
<lagweezle>
Kwpolska: Not entirely certain I understand, but it sounds like you've tried the ruby koans and have decided they are not for you.
<blottoface>
Holy shit rbenv and ruby installation is disgusting. Can someone explain to me why such an active project has NO installers/packages for major distributions and OSes
pu22l3r_ has quit [Remote host closed the connection]
kenneth has joined #ruby
<TuxLyn>
jhass, yes to test two regex's from tags :)
GriffinHeart has joined #ruby
pu22l3r has joined #ruby
<jhass>
so as said, your regexes simply don't match what you think they do
dukedave has joined #ruby
<TuxLyn>
they do when I use gsub without method :)
<jhass>
but first let's get back to the issue I mentioned when talking about gsub!
SCommette has quit [Quit: SCommette]
<TuxLyn>
only not working like I have now
<jhass>
I'm sure they don't if they are literally the same
<jhass>
but I want to make sure first you got the implications of using gsub!
andrewjanssen has joined #ruby
<TuxLyn>
hmm hold on
chipotle has joined #ruby
<TuxLyn>
lol
apeiros has joined #ruby
<jhass>
that will change the string you put into the method, vars after calling clean will be changed. are you sure that's what you want?
aspires has joined #ruby
sepeck has left #ruby [#ruby]
<TuxLyn>
wait, I'm trying this wihout method to see if regex works correctly
chipotle has quit [Read error: Connection reset by peer]
xaxisx has quit [Quit: xaxisx]
timonv has quit [Remote host closed the connection]
xaxisx has joined #ruby
<blottoface>
sevenseacat: for example, let's say I want to install Jenkins on a machine. Well, holy piss there are .debs and RPMS sitting right there waiting to be installed. Ansible? No problem, just add this repository and you'll have ansible available to all your users. But Ruby?...balls to that, let's have a user install some other crappy package manager (rvm or rbenv) that exists outside of the OS ecosystem and has effing zero usabilit
joaoh82 has quit [Remote host closed the connection]
RaCx has quit [Quit: Computer has gone to sleep.]
timonv has joined #ruby
blooberr____ has joined #ruby
andrewjanssen has quit [Remote host closed the connection]
andrewjanssen has joined #ruby
toastynerd has quit [Ping timeout: 264 seconds]
carraroj has joined #ruby
diegoviola has joined #ruby
danman has joined #ruby
<Sou|cutter>
I find them pretty usable, what makes them unusable to you?
<sevenseacat>
yes, because no other language ever has a version manager *rolls eyes*
GriffinHeart has quit [Ping timeout: 272 seconds]
sinkensabe has quit [Remote host closed the connection]
<sevenseacat>
there are debs and stuff for ruby, and it is in the package manager of all major distros
<TuxLyn>
jhass, you where right even without method its not working properly lol
blackmesa has joined #ruby
<sevenseacat>
so if you want, you can just install it from your repos
sinkensabe has joined #ruby
<TuxLyn>
jhass, sooo how can I make gsub use regex array to clean data is that even possible ?
obs has quit [Quit: Saliendo]
<sevenseacat>
however, i have four different versions of ruby installed on my computer at the moment, for apps that use all the different versions... i do not want to manage that without a dedicated version manager
d5sx43 has quit [Remote host closed the connection]
d5sx43 has joined #ruby
Blaguvest has quit []
railzForDaiz has joined #ruby
hiyosi has joined #ruby
TuxLyn has quit [Quit: Leaving]
lxsameer has joined #ruby
lxsameer has quit [Changing host]
lxsameer has joined #ruby
mduk_ has quit [Ping timeout: 264 seconds]
chipotle has quit [Read error: Connection reset by peer]
ixti has joined #ruby
Kwpolska has left #ruby [#ruby]
heftig has quit [Quit: Quitting]
phinfonet has joined #ruby
sski has quit [Remote host closed the connection]
Tricon has joined #ruby
sski has joined #ruby
timonv has quit [Remote host closed the connection]
Guest95638 has joined #ruby
parduse is now known as Guest88462
Guest95638 is now known as parduse
parduse has quit [Changing host]
parduse has joined #ruby
hiyosi has quit [Ping timeout: 264 seconds]
MZAWeb has quit [Ping timeout: 240 seconds]
xaxisx has quit [Quit: xaxisx]
Guest88462 has quit [Ping timeout: 255 seconds]
xcv has quit [Remote host closed the connection]
1JTAAF9MT has joined #ruby
<blottoface>
sevenseacat: rbenv and rvm as version managers are junk. It shouldn't take me 30+ minutes to install a particular version of ruby because there is no pre-compiled package available from the source. Now even creating a dynamic test environment or spinning a base configuration becomes a "my code's compiling" excuse.
gruz0[russia] has quit [Quit: This computer has gone to sleep]
<sevenseacat>
erm
xaxisx has joined #ruby
<sevenseacat>
it... doesnt take 30min to install a ruby
<AntelopeSalad>
rvm has precompiled packages, but for not everything
scx_ has joined #ruby
LekeFly has quit [Ping timeout: 244 seconds]
cocotton has quit [Remote host closed the connection]
sski has quit [Ping timeout: 244 seconds]
jsaak has quit [Quit: leaving]
<apeiros>
sevenseacat: maybe he runs a P1 @ 90MHz and ~16MB Ram
<sevenseacat>
maybe
scx has quit [Ping timeout: 272 seconds]
jsaak has joined #ruby
jsaak has quit [Client Quit]
blackgoat_ has quit [Quit: gnight.]
jsaak has joined #ruby
danijoo has quit [Read error: Connection reset by peer]
bmurt has quit []
<apeiros>
too bad, can't test how long it takes for me as there are already binaries for 2.1.2 :)
xcv has joined #ruby
danijoo has joined #ruby
<apeiros>
but iirc it was <5min to build from scratch
<sevenseacat>
yes, thats setting up an entire development environment
<apeiros>
blottoface: you do notice this includes all the dependencies?
<sevenseacat>
not 'installing a ruby'
xaxisx has quit [Client Quit]
* apeiros
calls the whaaambulance
bmurt has joined #ruby
<apeiros>
"Installing ruby", "Configuring Git", "Installing Rails", "Setting Up MySQL", "Setting Up PostgreSQL"
redondos has quit [Excess Flood]
<apeiros>
but sure… that's all just part of installing ruby :o)
redondos has joined #ruby
redondos has joined #ruby
redondos has quit [Changing host]
railzForDaiz has quit [Ping timeout: 264 seconds]
* sevenseacat
calls trollolololol?
<apeiros>
maybe
mikecmpbll has quit [Ping timeout: 244 seconds]
sevenseacat has left #ruby [#ruby]
<blottoface>
apeiros: I'd call the whaaaambulance on myself if installing mysql and postgres from a package took more than a minute. But those common pieces of software come from packages and are trivial to install.
<TuxLyn>
this will teach me to code while I'm half a sleep lol
<TuxLyn>
jhass, sorry missed it ;)
Joulse has quit [Quit: Joulse]
<jhass>
and you're still ignoring my remark about gsub!
<TuxLyn>
now works like expected
<jhass>
I gave you. Twice
<TuxLyn>
jhass, thanks
lolmaus has joined #ruby
joaoh82 has quit [Remote host closed the connection]
<TuxLyn>
perfect ^_^
tjr9898 has joined #ruby
<apeiros>
blottoface: I've no patience for your whining. ruby installs in <1 minute here with rvm. it's 1 line to install rvm. and 1 line to install any version of ruby with it. if you call it junk - well, your problem. good luck with apt. maybe they've got their shit together by now.
<TuxLyn>
it was driving me nuts, and it was so easy to fix
ixti has quit [Ping timeout: 272 seconds]
poguez_ has joined #ruby
<TuxLyn>
jhass, thanks again for pointing that out :)
<Sou|cutter>
Does this boil down to "I have a hammer, why can't I use it for everything?"
joaoh82 has joined #ruby
jfran has quit [Quit: Going offline, see ya! (www.adiirc.com)]
railzForDaiz has joined #ruby
skysploit has quit []
kaspergrubbe has joined #ruby
bradhe has quit [Ping timeout: 252 seconds]
tier has quit [Remote host closed the connection]
Ankhers has quit [Ping timeout: 264 seconds]
<TuxLyn>
I know there is easier ways to do this, like using gem's nokogiri, but I wanted to do it this way on purpose :)
pu22l3r_ has joined #ruby
<TuxLyn>
I don't want to rely on gem, but instead build in libs :)
jgrevich has joined #ruby
diegoviola has quit [Quit: WeeChat 0.4.3]
bluOxigen has quit [Ping timeout: 252 seconds]
<TuxLyn>
alright, I'm out here. Thanks.
TuxLyn has quit [Quit: Leaving]
kaspergr_ has quit [Read error: Connection reset by peer]
dvabr has joined #ruby
almostwhitehat has quit [Quit: almostwhitehat]
jfran has joined #ruby
fold has quit [Ping timeout: 240 seconds]
kaspergr_ has joined #ruby
pu22l3r has quit [Ping timeout: 252 seconds]
kaspergrubbe has quit [Ping timeout: 240 seconds]
wallerdev has joined #ruby
dawkirst has quit [Remote host closed the connection]
andrewjanssen has quit [Quit: Leaving...]
tier has joined #ruby
andrewjanssen has joined #ruby
dawkirst has joined #ruby
MZAWeb has joined #ruby
bricker`work has joined #ruby
apeiros has quit [Remote host closed the connection]
maletor has joined #ruby
apeiros has joined #ruby
thesheff17 has quit [Remote host closed the connection]
hpoydar has quit [Remote host closed the connection]
bryan has left #ruby [#ruby]
Takle has joined #ruby
juco has quit [Quit: Leaving...]
Xeago has quit [Ping timeout: 245 seconds]
codezomb has joined #ruby
routes has quit [Ping timeout: 244 seconds]
benzrf|offline is now known as benzrf
stantona has joined #ruby
timonv has joined #ruby
kraljev4 has joined #ruby
kraljev4 has left #ruby [#ruby]
stantona has quit [Remote host closed the connection]
zybi1 has joined #ruby
timonv_ has joined #ruby
newUser1234 has quit [Read error: Connection reset by peer]
tus has joined #ruby
newUser1234 has joined #ruby
stantona has joined #ruby
trabulmonkee has quit [Quit: Connection closed for inactivity]
stantona_ has joined #ruby
joaoh82 has quit [Remote host closed the connection]
weems has joined #ruby
timonv has quit [Ping timeout: 244 seconds]
stantona_ has quit [Remote host closed the connection]
stantona_ has joined #ruby
deric_skibotn has joined #ruby
hobogrammer1 has joined #ruby
brunops has joined #ruby
boris has quit [Ping timeout: 245 seconds]
joaoh82 has joined #ruby
larissa has joined #ruby
stantona has quit [Ping timeout: 240 seconds]
wallerdev has quit [Quit: wallerdev]
gruz0[russia] has joined #ruby
boris has joined #ruby
TDJACR has quit [Max SendQ exceeded]
cocotton has joined #ruby
cocotton has quit [Remote host closed the connection]
tcstar has joined #ruby
TDJACR has joined #ruby
Takle has quit [Remote host closed the connection]
andrewjanssen has quit [Quit: Leaving...]
brunops has quit [Ping timeout: 240 seconds]
TDJACR has quit [Max SendQ exceeded]
boris has quit [Remote host closed the connection]
stantona_ has quit [Remote host closed the connection]
streblo has joined #ruby
TDJACR has joined #ruby
dawkirst has quit [Remote host closed the connection]
tier has quit [Remote host closed the connection]
sylver has joined #ruby
fold has joined #ruby
xaxisx has joined #ruby
tier has joined #ruby
stantona has joined #ruby
tier has quit [Remote host closed the connection]
jottr has quit [Quit: WeeChat 0.4.3]
brunops has joined #ruby
brunops has quit [Changing host]
brunops has joined #ruby
thoolihan has quit [Ping timeout: 240 seconds]
Takle has joined #ruby
andrewjanssen has joined #ruby
hpoydar has joined #ruby
SCommette has joined #ruby
TDJACR has quit [Max SendQ exceeded]
SCommette has quit [Client Quit]
saarinen has joined #ruby
mark_locklear has quit [Ping timeout: 244 seconds]
TDJACR has joined #ruby
joaoh82_ has joined #ruby
toastynerd has joined #ruby
newUser1234 has quit [Read error: Connection reset by peer]
TDJACR has quit [Max SendQ exceeded]
jxf has quit [Ping timeout: 252 seconds]
TDJACR has joined #ruby
mattstratton has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Mon_Ouie has quit [Ping timeout: 272 seconds]
djbkd has joined #ruby
newUser1234 has joined #ruby
alem0lars has quit [Quit: Going AFK...]
saarinen has quit [Client Quit]
bradhe has joined #ruby
newUser1234 has quit [Remote host closed the connection]
thoolihan has joined #ruby
joaoh82 has quit [Ping timeout: 240 seconds]
TDJACR has quit [Max SendQ exceeded]
TDJACR has joined #ruby
saarinen has joined #ruby
rezzack1 has quit [Quit: Leaving.]
olivier_bK has quit [Ping timeout: 240 seconds]
benzrf is now known as benzrf|offline
krz has joined #ruby
krz has quit [Client Quit]
<sylver>
hello guys, I'm having trouble to deploy a ruby app on heroku, while I have no problem on my local environment (of course...). Something related to sequel trying to load active_model via backports "`require': cannot load such file -- active_model (LoadError)". Nothing that I really understand...
krz has joined #ruby
chipotle has joined #ruby
TDJACR has quit [Max SendQ exceeded]
<sylver>
If anyone can have some clues for me (I can provide more informations of course)
TDJACR has joined #ruby
danijoo has quit [Read error: Connection reset by peer]
aspires_ has quit []
nmokru has joined #ruby
danijoo has joined #ruby
djbkd has quit [Remote host closed the connection]
andrewjanssen has quit [Quit: Leaving...]
<jhass>
so, you are using bundler? and your app still works when run with bundle exec ... ?
High-Q-Brah has joined #ruby
lkba has joined #ruby
TDJACR has quit [Max SendQ exceeded]
bradhe has quit [Ping timeout: 252 seconds]
TDJACR has joined #ruby
stantona has quit [Remote host closed the connection]
datafirm has joined #ruby
TDJACR has quit [Max SendQ exceeded]
timonv_ has quit [Remote host closed the connection]
<sylver>
jhass: yep I'm using bundler, it works like a charm on a clean virtualhost (vagrant) with bundler and the Gemfile with all dependencies. But when I push it to heroku I get this error when launching the app
wallerdev has joined #ruby
TDJACR has joined #ruby
chipotle has quit [Read error: Connection reset by peer]
<jhass>
and you do require bundler/setup somewhere early?
aspires has joined #ruby
djbkd has joined #ruby
TDJACR has quit [Max SendQ exceeded]
TDJACR has joined #ruby
benlieb has joined #ruby
Spami has joined #ruby
<sylver>
jhass: only in the config.ru, I have Bundler.require(:default, ENV['RACK_ENV'].to_sym)
zorak has joined #ruby
gondalier has joined #ruby
<jhass>
sequel depending on active_model is news to me though
crowell has left #ruby [#ruby]
<jhass>
where exactly is the require of that happening?
TDJACR has quit [Max SendQ exceeded]
TDJACR has joined #ruby
stantona has joined #ruby
bbloom has joined #ruby
tkuchiki has quit [Remote host closed the connection]
dideler|work has quit [Ping timeout: 240 seconds]
dideler|work has joined #ruby
TDJACR has quit [Max SendQ exceeded]
TDJACR has joined #ruby
Guest95638 has joined #ruby
parduse is now known as Guest30994
Guest95638 is now known as parduse
<sylver>
jhass: after require 'rubygems'; require 'bundler' and a require for loading environment variables, that's all
parduse is now known as Guest57900
<sylver>
before the require for my sinatra app
<jhass>
you got a backtrace for that error, don't you?
<jhass>
require 'rubygems' is implicit since 1.9 btw
Guest30994 has quit [Ping timeout: 252 seconds]
TDJACR has quit [Max SendQ exceeded]
theberlin has quit [Remote host closed the connection]
TDJACR has joined #ruby
Valesk_ has joined #ruby
aspires has quit []
theberlin has joined #ruby
Valesk_ has quit [Client Quit]
aspires has joined #ruby
skylite has joined #ruby
TDJACR has quit [Max SendQ exceeded]
Bumptious has quit [Remote host closed the connection]
TDJACR has joined #ruby
samphippen has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
yfeldblum has quit [Remote host closed the connection]
TDJACR has joined #ruby
blackmesa has quit [Ping timeout: 240 seconds]
<sylver>
jhass: yep, only for dev and tests tools (shotgun, tux and minitest)
bradleyprice has quit [Remote host closed the connection]
GriffinHeart has joined #ruby
gondalier has quit []
TDJACR has quit [Max SendQ exceeded]
<jhass>
did you do your local tests with a bundle install --without development test
mijicd has quit [Remote host closed the connection]
datafirm has quit [Quit: Computer has gone to sleep.]
<jhass>
?
TDJACR has joined #ruby
IceDragon has joined #ruby
datafirm has joined #ruby
pu22l3r_ has quit [Read error: Connection reset by peer]
<headius>
Mon_Ouie, etqqkoiflwhb: JRuby doesn't do any synchronization on hashes...neither does Rubinius nor MRI, but MRI doesn't run threads concurrently so it appears to be safe
pu22l3r has joined #ruby
Takle has quit [Remote host closed the connection]
TDJACR has quit [Max SendQ exceeded]
gnephiak has joined #ruby
kenneth has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<sarkis>
how can uninstall/install a gem installed in a different directory than normal gem path?
monkegjinni has quit [Ping timeout: 264 seconds]
crelix has joined #ruby
hpoydar has quit [Remote host closed the connection]
TDJACR has quit [Max SendQ exceeded]
TDJACR has joined #ruby
stantona has quit [Ping timeout: 255 seconds]
TDJACR has quit [Max SendQ exceeded]
stantona has joined #ruby
TDJACR has joined #ruby
TDJACR has quit [Max SendQ exceeded]
rezzack has joined #ruby
TDJACR has joined #ruby
LekeFly has joined #ruby
stantona has quit [Read error: No route to host]
diegoviola has joined #ruby
stantona has joined #ruby
anaeem1_ has quit [Remote host closed the connection]
andrewjanssen has quit [Quit: Leaving...]
senayar_ has joined #ruby
dideler|work has quit [Ping timeout: 240 seconds]
TDJACR has quit [Max SendQ exceeded]
andrewjanssen has joined #ruby
joaoh82_ has quit [Remote host closed the connection]
TDJACR has joined #ruby
chipotle has joined #ruby
<sylver>
jhass: try from a fresh install, in production mode, no problem. It's something different in the heroku platform I suppose, but I can't find it
dideler|work has joined #ruby
tjr9898_ has joined #ruby
senayar has quit [Ping timeout: 252 seconds]
blottoface has quit [Ping timeout: 246 seconds]
<jhass>
there's #heroku with 130 people in it, worth a try
andrewjanssen has quit [Client Quit]
TDJACR has quit [Max SendQ exceeded]
Zai00 has quit [Quit: Zai00]
TDJACR has joined #ruby
xcv has quit [Remote host closed the connection]
railzForDaiz has quit [Ping timeout: 240 seconds]
<sylver>
jhass: yep, will try there, thanks for your time anyway !
<sarkis>
hey guys i have bundle installed in a shared/ folder on my app, how can i uninstall/reinstall it?
<sarkis>
is there a --path to gem?
<sarkis>
ive been trying to set GEM_PATH
TDJACR has quit [Max SendQ exceeded]
<jhass>
try setting GEM_HOME
<sarkis>
/shared/bundle/ruby/2.1.0
TDJACR has joined #ruby
<sarkis>
is that what i give it?
chipotle has quit [Read error: Connection reset by peer]
hpoydar has quit [Remote host closed the connection]
anon_ has joined #ruby
<horrror>
thanks, good idea
treehug88 has quit [Ping timeout: 240 seconds]
<anon_>
Anyone here happen to work for LivingSocial?
hpoydar has joined #ruby
Hanmac has joined #ruby
MrDoctor has quit [Remote host closed the connection]
anaeem1 has joined #ruby
sputnik13 has joined #ruby
almostwhitehat has quit [Quit: almostwhitehat]
Hanmac1 has quit [Ping timeout: 245 seconds]
andrewjanssen has joined #ruby
dangerou_ has quit [Read error: Connection reset by peer]
jheg_ has joined #ruby
ghr has joined #ruby
GriffinHeart has quit [Remote host closed the connection]
dangerousdave has joined #ruby
fschuindt has joined #ruby
<jheg_>
any database recommendations for use with ruby?
lxsameer has quit [Ping timeout: 240 seconds]
dangerousdave has quit [Read error: Connection reset by peer]
<jhass>
choose a database fitting your data, not your programming language
dangerousdave has joined #ruby
gondalier has quit []
brian___ has quit [Quit: brian___]
<shevy>
jheg_ postgresql
* apeiros
likes postgres
<shevy>
jheg_ it's a bit annoying to setup but once it runs, it's nice
toertore has joined #ruby
<jhass>
sure postgres for relational data. We don't know his data though
Darryl has quit [Quit: Connection closed for inactivity]
<apeiros>
SO WHAT! JUST STUFF IT IN ANYWAYS!!!!
Wherdran is now known as Weredran
<jheg_>
so I'm looking to build a site that effectively leads the user through a series of questions and results in them being served a list of providers based on criteria which will be stored in a DB
nahtnam has quit [Ping timeout: 246 seconds]
<apeiros>
graph database then!
pvb has quit [Ping timeout: 245 seconds]
skaflem has quit [Quit: Leaving]
<jhass>
\o/ NoSQL fuckers!
<wallerdev>
lol
anon_ has quit [Quit: Page closed]
nmokru has quit [Read error: Connection reset by peer]
<jheg_>
I have no experience of working with a database so not sure what graph database is aperios
senayar has joined #ruby
ghr has quit [Ping timeout: 272 seconds]
nmokru has joined #ruby
ksinkar_ has joined #ruby
SCommette has joined #ruby
Nilium_ has quit [Read error: Connection reset by peer]
St_Marx has quit [Remote host closed the connection]
Notte has quit [Ping timeout: 240 seconds]
ksinkar has quit [Ping timeout: 240 seconds]
Notte_ has joined #ruby
gondalier has joined #ruby
toretore has quit [Ping timeout: 264 seconds]
acrussell has joined #ruby
olivka88 has joined #ruby
emsilva has quit [Quit: Keep Walking (Computer Slept!)]
<jheg_>
*sorry apeiros
DanielRb has quit [Ping timeout: 264 seconds]
St_Marx has joined #ruby
<apeiros>
it's a database specialized for storing and querying graphs
crazymykl has quit [Ping timeout: 240 seconds]
acrussell has left #ruby [#ruby]
crazymykl has joined #ruby
<apeiros>
and while it technically would probably fit best, I don't think I'd use it in your case. you'll be fine with an rdbms.
sputnik13 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
figgleberry has quit [Ping timeout: 272 seconds]
foobarbaz_ has joined #ruby
<foobarbaz_>
Hi guys, just a quick questoin. Is there a way to access the format.json render value?
<foobarbaz_>
question*
dangerousdave has quit [Read error: Connection reset by peer]
dangerou_ has joined #ruby
<jhass>
sounds like #rubyonrails
<foobarbaz_>
ah, thanks
<foobarbaz_>
Need +r for that channel, grr.
xaxisx has quit [Quit: xaxisx]
DanielRb has joined #ruby
lxsameer has joined #ruby
<foobarbaz_>
I guess I'll never know </3
horrror_ has joined #ruby
<jhass>
foobarbaz_: /msg NickServ help
horrror_ has quit [Client Quit]
horrror has quit [Read error: Connection reset by peer]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
fold has quit [Ping timeout: 252 seconds]
bbloom has joined #ruby
Gil has quit [Ping timeout: 255 seconds]
<apeiros>
specificially help register
olivka88 has quit [Quit: Leaving]
xaxisx has joined #ruby
sputnik13 has joined #ruby
kaspergrubbe has quit [Remote host closed the connection]
kies has quit [Ping timeout: 240 seconds]
C0deMaver1ck has joined #ruby
C0deMaver1ck is now known as Guest68508
jarto has joined #ruby
lolmaus has quit [Remote host closed the connection]
djbkd has quit [Remote host closed the connection]
sinkensabe has joined #ruby
DanielRb has quit [Ping timeout: 245 seconds]
Aryasam has quit [Quit: Bye]
DanielRb has joined #ruby
<jheg_>
I was speaking to a friend this evening about the fact i'm starting to learn ruby as a first language (he is a php dev) and although he didn't actually say it I got the impression that he thought that with php (opposed to ruby) you actually wrote more code rather than relying on things such as gems
Georg3 has joined #ruby
<jheg_>
is this a typical attitude toward ruby?
<jhass>
you would consider that a bad thing?
<jhass>
(relying on gems)
<Georg3>
Good afternoon =) - any know a good resource that shows dealing with legacy gems? I'm running through the testfirst.org ruby tests and it's asking for RSpec 2.0 but I installed 3.0
<jhass>
I do agree, I just think it's for the goods
<Georg3>
Not sure whether it's recommended to try and manage to two simultaneously installed gems or remove 3.0 and install 2.0...
<jheg_>
I didn't really have an opinion on it tbh it was just a convo he was making the point that with using gems you are not actually writing the code yourself rather using someone else's code and hoping it works with your own whereas in php you can use other peoples code but you have to taytlor it more to your own
moritzschaefer has quit [Ping timeout: 240 seconds]
moritzs has quit [Ping timeout: 240 seconds]
<jhass>
Georg3: that thing has a Gemfile, run gem install bundler; bundle and bundle exec all ruby commands and you'll be fine
maximski has quit []
sputnik13 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
<Georg3>
jhass: hmm, ok I'll check it out.
<Mon_Ouie>
It's not like all of your codes is just putting gems around… You're just using libraries to not reinvent the wheel everytime
sputnik13 has joined #ruby
<Mon_Ouie>
I mean he doesn't rewrite all of PHP's standard library every time either, does he?
<Georg3>
jhass: thanks.
havenwood has joined #ruby
<jheg_>
which is just like using a native method right?
<Mon_Ouie>
"native method"?
<jhass>
jheg_: libraries are usually the combined effort and experiences of many people or at least somebody who really went through it, you'd be a fool to not benefit from that and instead want to make the same mistakes again already been made for you
jxf has joined #ruby
<jheg_>
Mon_Ouie: I mean like is it not really any different to using something like .length
cocotton has quit [Remote host closed the connection]
<jheg_>
Yeah I agree jhass
<jhass>
that said, going through the pain again for the point of gathering experiences is fine
<jhass>
just don't think you've hit everything by doing so and use that in a real project
<Mon_Ouie>
Well the main difference is who implemented it and that it isn't actually part of the Ruby, but that's not bad by any means
maximski has joined #ruby
figgleberry has joined #ruby
<Mon_Ouie>
(There are many reasons for useful things to not be part of the language, for example them only being useful for few people)
kies has joined #ruby
DanielRb has quit [Ping timeout: 240 seconds]
JoshGlzBrk has joined #ruby
<Georg3>
jhass: if I run the gem install bundler - it's going to install an older version of spec - is this specific to that directory or will it install the gem globally and if os if I run say spec init is it going to by default use the latest version of rspec?
<jheg_>
yeah I get that Mon_Ouie makes sense
simoz111115 has joined #ruby
<apeiros>
blargh, jquery doesn't like it when I monkey patch Object (js)
DanielRb has joined #ruby
IceDragon has quit [Ping timeout: 255 seconds]
xaxisx has quit [Quit: xaxisx]
gondalier has quit []
IceDragon has joined #ruby
<jhass>
Georg3: gem install bundler itself won't install an older version of RSpec, but the bundle afterwards likely will. By default this goes to your global GEM_HOME yes, that's no issue though, rubygems is fine with having multiple versions and it will use the latest unless you go through bundle exec or restrict it by other means
jfran has joined #ruby
<jhass>
Georg3: bundler does have the capabilities to install to a local folder, you just won't need them for now
stantona has quit [Remote host closed the connection]
<axilla>
its not setting a primary key or updated_at / created_at time
maximski has quit [Ping timeout: 264 seconds]
foobarbaz_ has quit [Quit: Page closed]
<jhass>
axilla: probably some validation or database constraint failed, hard to tell with that little information
<Georg3>
jhass: Ah that clarifies it a bit =) - thank you again sir.
kies has quit [Ping timeout: 240 seconds]
<jhass>
axilla: try .create! which will raise the error
cocotton has joined #ruby
almostwhitehat has joined #ruby
<axilla>
thanks
cocotton has quit [Remote host closed the connection]
xaxisx has joined #ruby
cocotton has joined #ruby
bradhe has joined #ruby
SCommette has quit [Quit: SCommette]
<Rylee_>
Will the following work for adding all files in bin/ and lib/ to my gem?
<Rylee_>
s.files = Dir['bin/**'] + Dir['lib/**']
RLa has joined #ruby
emsilva has joined #ruby
nmokru has quit [Quit: nmokru]
<RLa>
how to really clean bundle gems?
<jhass>
RLa: what do you mean?
<axilla>
jhass: that's great! thanks i didnt know about htat
<axilla>
Stat type is not included in the list (ActiveRecord::RecordInvalid)
<RLa>
it says i have a nice list of gems but none of them exist as files
kies has joined #ruby
<jhass>
RLa: bundle show gemname should show you the location
krz has quit [Quit: WeeChat 0.4.3]
<RLa>
jhass, bundle install shows "Using thin 1.6.2", bundle show thin shows "The gem thin has been deleted. It was installed at:"
gondalier has joined #ruby
<RLa>
jhass, so where is the metadata?
<RLa>
i want to start from clean state
sinkensabe has quit [Remote host closed the connection]
<jhass>
uh, so you manually deleted stuff?
sinkensabe has joined #ruby
<RLa>
yes
<jhass>
if you're lucky bundle clean fixes something up
<RLa>
nope, it does not
DanielRb has quit [Ping timeout: 255 seconds]
<axilla>
jhass: thanks a lot that was beautiful, got it working!
stantona has joined #ruby
bradhe has quit [Ping timeout: 264 seconds]
<jhass>
RLa: check gem env and the directories mentioned there then
Nilium has joined #ruby
rezzack has joined #ruby
ninegrid has joined #ruby
kies has quit [Ping timeout: 240 seconds]
robbyoconnor has quit [Excess Flood]
DanielRb has joined #ruby
DanielRb has joined #ruby
DanielRb has quit [Changing host]
SCommette has joined #ruby
robbyoconnor has joined #ruby
razrunelord has joined #ruby
ninegrid_ has joined #ruby
<RLa>
jhass, nothing
sinkensabe has quit [Ping timeout: 244 seconds]
<jhass>
you probably want to clean the specifications of the gem folders you manually deleted (this is why you shouldn't do that again)
<RLa>
jhass, ok, removing those dire made bundle install now really install again
<jhass>
what's the point anyway
maximski has joined #ruby
sputnik13 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
<Georg3>
jhass: in the gemfile it says rspec >= 2.0 which would mean 3.0 should be fine right? Well when I run rake in the folder it spits out this error - "Gem::LoadError: can't activate rspec (~> 2), already activated rspec-3.0.0. Make sure all dependencies are added to Gemfile."
andrewjanssen has quit [Quit: Leaving...]
<jhass>
Georg3: run bundle exec rake
danijoo has joined #ruby
xaxisx has quit [Quit: xaxisx]
<Georg3>
in the same directory as the gemfile?
<jhass>
yes
asteve has joined #ruby
<jhass>
any subdirectory should work actually
andrewjanssen has joined #ruby
xaxisx has joined #ruby
<Georg3>
jhass: spits out the same error?
<jhass>
really?
tkuchiki has joined #ruby
<Georg3>
Yeah, hmm lol clearly I'm messed up somewhere.
<jhass>
ah, 2.10 seems to do if you cd into one of the subdirectories first
voodoofish430 has joined #ruby
<Georg3>
lol how specific.
<Georg3>
so change the gem file to 'rspec', '2.10'
xaxisx has joined #ruby
<jhass>
yes
andrewjanssen has quit [Quit: Leaving...]
<Georg3>
then run bundle and then inside a subdirectory run bundle exec rake
shanlar has joined #ruby
<jhass>
yes
<Georg3>
ok, tried that but it's stuck with 2.99 in the gemfile.lock , do I need to unlock, run bundle, then relock?
weems has joined #ruby
mikepack has joined #ruby
mikepack has quit [Remote host closed the connection]
mikepack has joined #ruby
aspires has quit [Client Quit]
<jhass>
hm, no, just running bundle again should do, at worst try running bundle update rspec
andrewjanssen has joined #ruby
jtiggo has joined #ruby
shanlar has quit [Remote host closed the connection]
jtiggo has quit []
dfinly has joined #ruby
ldnunes has quit [Quit: Leaving]
andrewjanssen has quit [Client Quit]
xaxisx has quit [Quit: xaxisx]
blackmesa has quit [Ping timeout: 240 seconds]
<Georg3>
man well this is all over the place. I updated the gemfile to ~ gem "rspec", "2.10" and it won't change from 2.99, I run bundle and bundle update rspec and it still just says "resolving dependencies ..." "Using rspec 2.99.0"
<Georg3>
that's not in the file, I was just separating it from my comments.
cocotton_ has joined #ruby
<Georg3>
omg, one sec.
<Georg3>
I think i just failed so hard.
IceDragon has quit [Ping timeout: 255 seconds]
RaCx has joined #ruby
aspires has joined #ruby
IceDragon has joined #ruby
<Georg3>
Ok got it to update to 2.10 (changed file name in terminal, didn't update the path in Atom so it was updating temporary files.) but still errors. -_- - I'll post the paste bin
lemur has quit [Remote host closed the connection]
riotjone_ has joined #ruby
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
benlieb has joined #ruby
sdelmore has joined #ruby
yfeldblum has joined #ruby
<sdelmore>
I have a little ruby enumerable problem I am trying to solve cleanly, I want to return true if the majority of items in a collection are true. Is there a known pattern for this?
<sdelmore>
It feels like it is halfway between .any? and .all?
riotjones has quit [Ping timeout: 252 seconds]
danman has quit [Quit: danman]
jobewan has quit [Ping timeout: 252 seconds]
klaut has quit [Remote host closed the connection]
anaeem1 has quit [Remote host closed the connection]
<sdelmore>
It actually calls a method each time. I am currently doing count, then checking if the count of items returning true from the block is more than half, but then i realized that if I hit 6 trues out of a collection of 10 things I could just stop there, the remaining evaluations are pointless.
NukePuppy has joined #ruby
linojon has quit [Quit: linojon]
<toertore>
break
<sdelmore>
Was trying to find a readable way to say I am just verifying at least half are true, without evaluating all.
<sdelmore>
Interesting. Thanks.
<apeiros>
if you want to optimize, then yes, count manually and return early
mjb2k has quit [Quit: Leaving]
joelteon has quit [Ping timeout: 240 seconds]
jheg_ has quit [Quit: jheg_]
<apeiros>
also .size is not part of Enumerable contract ;-)
<apeiros>
(only .each is)
kidoz has quit [Quit: Ухожу я от вас]
jheg_ has joined #ruby
tessi is now known as tessi_zz
aep has quit [Ping timeout: 252 seconds]
arrubin_ has joined #ruby
hpoydar has quit [Remote host closed the connection]
djbkd has quit [Remote host closed the connection]
aep has joined #ruby
sheperson has quit [Quit: sheperson]
arrubin has quit [Disconnected by services]
arrubin_ is now known as arrubin
treehug88 has joined #ruby
codeurge has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
treehug88 has quit [Max SendQ exceeded]
cpruitt has joined #ruby
fresham has left #ruby [#ruby]
pu22l3r has joined #ruby
treehug88 has joined #ruby
Georg3 has joined #ruby
nffff has joined #ruby
sylver has quit [Ping timeout: 245 seconds]
figgleberry has joined #ruby
tkuchiki has joined #ruby
razrunelord has quit [Remote host closed the connection]
figgleberry has quit [Client Quit]
pu22l3r has quit [Ping timeout: 245 seconds]
himsin has quit [Quit: himsin]
jackneill has quit [Read error: Connection reset by peer]
linojon has joined #ruby
nanoyak has quit [Quit: Computer has gone to sleep.]
thesheff17 has quit [Quit: Leaving]
andrewjanssen has quit [Quit: Leaving...]
mary5030 has quit [Remote host closed the connection]
wallerdev has quit [Quit: wallerdev]
wallerdev has joined #ruby
nanoyak has joined #ruby
gruz0[russia] has quit [Quit: This computer has gone to sleep]
benzrf|offline is now known as benzrf
stantona_ has joined #ruby
djbkd has joined #ruby
gondalier has quit []
wallerdev has quit [Client Quit]
nateberkopec has joined #ruby
wallerdev has joined #ruby
andrewjanssen has joined #ruby
St_Marx has quit [Quit: Ex-Chat]
NukePuppy has quit [Ping timeout: 240 seconds]
blackgoat_ has joined #ruby
stantona has quit [Ping timeout: 272 seconds]
etqqkoiflwhb has joined #ruby
etqqkoiflwhb has quit [Client Quit]
Georg3 has quit [Quit: Georg3]
tkuchiki has quit [Ping timeout: 272 seconds]
andrewlio has quit [Quit: Leaving.]
dgutierrez1287 has quit [Ping timeout: 240 seconds]
hpoydar has joined #ruby
chipotle has quit [Quit: cya]
gondalier has joined #ruby
Takle has joined #ruby
mikepack has quit [Remote host closed the connection]
razrunelord has joined #ruby
AlSquire has quit [Quit: This computer has gone to sleep]
theberli_ has joined #ruby
djbkd has quit [Remote host closed the connection]
Senjai has quit [Quit: WeeChat 0.3.7]
Senjai`work has joined #ruby
Senjai`work has quit [Changing host]
Senjai`work has joined #ruby
djbkd has joined #ruby
spider-mario has quit [Remote host closed the connection]
hiyosi has quit [Ping timeout: 245 seconds]
theberli_ has quit [Remote host closed the connection]
<jheg_>
well lets say I wanted to store the names of a football team to a variable called team and then I wanted to store that team at the end of a season as that years team to a variable called team_2014
<jheg_>
so at the end of the season I team_2014 = team
b00stfr3ak has quit [Ping timeout: 255 seconds]
<csmrfx>
yes?
<csmrfx>
so it would behave like:
<jheg_>
when the new season starts a 1 player leaves and another arrives and so I mutate the variable array team and it also mutates my stored team-2014
<jheg_>
which I wouldn't want
<csmrfx>
>> a = "wat"; b = a; a = a + " now?"; [a.__id__, b.__id__]
JoshGlzBrk has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<jheg_>
I defo need to read up more. I've just been introduced to what they called address space and it confused me when considering variables that are assigned to other variables same address space
Notte_ has quit [Remote host closed the connection]
<csmrfx>
with ruby you do not need to consider it
<csmrfx>
and, hardly can
lemur has joined #ruby
<csmrfx>
but, I think: variables are just labels that point to underlying objects
<jheg_>
in a complex site I just thought the chances of having two variable point to the same address space meant that altering one alters the other and that could cause issues
nanoyak_ has quit [Client Quit]
<csmrfx>
again, you are thinking it wrong
<csmrfx>
ruby is not assembler or C
<jheg_>
in the case of mutating the caller
Fezzler has joined #ruby
havenwood has quit [Remote host closed the connection]
<csmrfx>
you have no responsebility over address space in ruby
<csmrfx>
all you need to do, is solve your problem logic
havenwood has joined #ruby
redondos has quit [Excess Flood]
<jhass>
jheg_: two simple rules avoid that: make your methods short and don't let your methods mutate your arguments unless their contract explicitly says so
nanoyak has quit [Ping timeout: 264 seconds]
redondos has joined #ruby
sylver has joined #ruby
monkegjinni has joined #ruby
<csmrfx>
heh of course you could make a mess when passing variable around like that, sure
<jheg_>
ok so I'm not thinking it totally wrong regarding my example?
lemur has quit [Ping timeout: 240 seconds]
JoshGlzBrk has joined #ruby
<jhass>
well, it's unlikely for your program to do persistence by assigning the variable to another one
<jhass>
you'd rather store into a DB or so
<jhass>
in any case serializing the data and deserializing it at later point, resulting into different objects anyhow
<jheg_>
ah yes of course makes total sense I hadn't thought about the fact that most of this type of data would be stored in a DB
sylver has quit [Ping timeout: 240 seconds]
havenwood has quit [Ping timeout: 264 seconds]
<jheg_>
thanks again for your help in making me understand this stuff guys really appreciate it :)
<csmrfx>
Perhaps pickaxe or Flanagan-Matsumoto ruby book for deep insight
<IceDragon>
ruby 2.1.2p95 (2014-05-08 revision 45877) [x86_64-linux] # to be exact
<csmrfx>
well I'm below 2
railzForDaiz has quit [Ping timeout: 255 seconds]
testcore has quit [Quit: [BX] Abort Retry Fail]
<csmrfx>
but your test looks weird
<csmrfx>
how would a method from another module suddenly become a descendant of another module from another module?
<IceDragon>
think of it as extending an existing module
<csmrfx>
uh let me retry that 8)
<csmrfx>
how would a method from another module suddenly become a descendant of another method from another module?
<csmrfx>
nope.jpg
dawkirst has quit [Ping timeout: 252 seconds]
<csmrfx>
ah, forgot about chaining
xcv_ has quit [Remote host closed the connection]
<csmrfx>
ok ignore that
<IceDragon>
exactly, it should work technically
toastynerd has quit [Remote host closed the connection]
<csmrfx>
butbut
hiyosi has quit [Ping timeout: 252 seconds]
<csmrfx>
again, isn't it A::B.c
nanoyak has joined #ruby
<csmrfx>
not A.c
tvw has quit []
<csmrfx>
if you get my drift
stantona has joined #ruby
brandonjmckay has joined #ruby
<IceDragon>
yeah, but its an instance method of C which was included in A, and since A was included into B, MyClass should have c
<csmrfx>
again, class with a module with method inside module
jheg_ has quit [Quit: jheg_]
<csmrfx>
imagine requiring Math module. The PI contant becomes part of object, but if you'd require another module with constant, it would mean that the module becoems part of Object.
<csmrfx>
or, I'm just guessing
<csmrfx>
maybe someone else has input
<IceDragon>
modules are placed before the current class, and after the superclass when you use include
stantona has quit [Remote host closed the connection]