<justjealouse>
cmd has a weird way of copying stuff
sparrovv has joined #ruby
<shevy>
no worries man, one day you will come to linux too
<shevy>
ok you did not do what I told you to do
britneywright has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<shevy>
:(
yfeldblum has quit [Ping timeout: 272 seconds]
oo_ has joined #ruby
<Hanmac>
justjealouse: "checking for main() in -lstdc++... *** extconf.rb failed ***" means the C++ compiler is missing ... but i dont know how to fix that on windows
Takle has joined #ruby
oo_ has quit [Remote host closed the connection]
saltsa has joined #ruby
<Nowaker>
Hanmac: it's very easy to fix that on windows - install linux in virtualbox
<shevy>
obviously you lack the stdc++ shared object
<shevy>
I have that one here /usr/lib/x86_64-linux-gnu/libstdc++.so.6
<justjealouse>
haha this is frustrating
oo_ has joined #ruby
<justjealouse>
I have gcc and visual studio installed god damn
earthquake has joined #ruby
sparrovv has quit [Ping timeout: 255 seconds]
cirn0 has joined #ruby
jottr_ has quit [Ping timeout: 246 seconds]
Kricir has joined #ruby
yfeldblum has joined #ruby
TheDracle has joined #ruby
w09x has quit []
pu22l3r has quit [Remote host closed the connection]
affsd has joined #ruby
<affsd>
leave
affsd has left #ruby [#ruby]
tkuchiki has joined #ruby
Takle has quit [Ping timeout: 246 seconds]
avita1 has joined #ruby
<justjealouse>
affsd ?
cirn0 has quit [Ping timeout: 246 seconds]
zz_karupa is now known as karupa
<Nowaker>
justjealouse: and this will be frustrating. you'll be fixing one problem just to encounter the other. it's really not worth trying.
<Hanmac>
what he means is "windows is not worth trying" ;P
<Nowaker>
yeah
<Nowaker>
:P
lucianosousa has joined #ruby
cocotton has joined #ruby
<Hanmac>
okay OSX might be problematic too, that you need third party stuff like macports or brew to have a decent package system ...
i6ghost has joined #ruby
oo_ has quit [Remote host closed the connection]
<justjealouse>
hmm yea i think im just gonna switch to linux tonight
<justjealouse>
gentoo's for the real hackers right?
<centrx>
gentoo's for the fake hackers who want to be real hackers
Fire-Dragon-DoL1 has quit [Quit: Leaving.]
beef-wellington has joined #ruby
<justjealouse>
Im gonna dl gentto tonight boys
otherj has joined #ruby
TheDracle has quit [Ping timeout: 268 seconds]
Fire-Dragon-DoL has joined #ruby
<centrx>
*bravo*
<justjealouse>
getting back in that programming game this year
tkuchiki has quit [Remote host closed the connection]
oo_ has joined #ruby
ghost2060 has joined #ruby
jerius has quit [Ping timeout: 268 seconds]
Juanchito has quit [Quit: Connection closed for inactivity]
jerius has joined #ruby
<Nowaker>
haha, 7 years ago I bought a server and wanted to install gentoo
<Nowaker>
I failed
<Nowaker>
but I intalled slackware hehe
Kerber0s has quit [Remote host closed the connection]
absolutezeroff has joined #ruby
Kerber0s has joined #ruby
ClarusCogitatio has quit [Ping timeout: 252 seconds]
starless has quit [Quit: Leaving]
<lucianosousa>
slackware <3
<Hanmac>
as long as you dont try centos everything should be fine ;P
earthquake has quit [Quit: earthquake]
<lucianosousa>
I used for a long a basic install with fluxbox and xterm
<lucianosousa>
:)
<arrubin>
Arch is great these days.
patrick99e99 has joined #ruby
<centrx>
Arch has the best wiki
SilkFox has joined #ruby
<lucianosousa>
Hanmac: why? I’m using in all my servers nowadays. Looks like amazon linux is an custom centos too
<lucianosousa>
a custom*
ClarusCogitatio has joined #ruby
beef-wellington has quit [Ping timeout: 268 seconds]
oo_ has quit [Remote host closed the connection]
Kricir has quit [Remote host closed the connection]
mikepack has quit [Remote host closed the connection]
Lewix has quit [Read error: Connection reset by peer]
TheDracle has joined #ruby
Lewix has joined #ruby
oo_ has joined #ruby
sonOfRa has quit [Ping timeout: 268 seconds]
patrick99e99 has quit [Ping timeout: 255 seconds]
soasme has joined #ruby
SilkFox has quit [Ping timeout: 268 seconds]
<justjealouse>
oh wow Hanmac you were right I just had to use devkit magic
<justjealouse>
my ruby installation is now "enhanced" with the devkit whatver that means
nucatus has quit [Remote host closed the connection]
<justjealouse>
im still gonna install linux later tho thats a good idea
j_mcnally has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
sepp2k1 has quit [Read error: Connection reset by peer]
shackleford has quit [Remote host closed the connection]
zettam has quit [Read error: Connection reset by peer]
ezar has joined #ruby
sparrovv has joined #ruby
Guest43009 is now known as magic
magic has quit [Changing host]
magic has joined #ruby
mollitz has quit [Ping timeout: 260 seconds]
sleepee has joined #ruby
szarubin has joined #ruby
sparrovv has quit [Ping timeout: 276 seconds]
nucatus has joined #ruby
vinky has quit [Ping timeout: 240 seconds]
sleepee has quit [Max SendQ exceeded]
Aranshada|W has quit [Ping timeout: 245 seconds]
zarubin has quit [Read error: Connection reset by peer]
CodeBunny has joined #ruby
vinky has joined #ruby
krz has joined #ruby
ezar has quit [Ping timeout: 246 seconds]
Aahz has quit [Read error: Connection reset by peer]
sleepee has joined #ruby
Aahz has joined #ruby
GriffinHeart has joined #ruby
digin4 has joined #ruby
digin4 has quit [Max SendQ exceeded]
oo_ has quit [Remote host closed the connection]
sevvie has quit [Ping timeout: 245 seconds]
oo_ has joined #ruby
thomasxie has joined #ruby
sleepee has quit [Read error: Connection reset by peer]
GriffinHeart has quit [Ping timeout: 252 seconds]
sleepee has joined #ruby
CorySimmons has quit [Quit: Bye!]
digin4 has joined #ruby
Scotteh_ has joined #ruby
JohnFord has joined #ruby
bogeyd6 has quit [Ping timeout: 264 seconds]
sleepee has quit [Max SendQ exceeded]
Scotteh has quit [Ping timeout: 246 seconds]
bogeyd6 has joined #ruby
digin4 has quit [Remote host closed the connection]
caveat- has quit [Ping timeout: 268 seconds]
sleepee has joined #ruby
pu22l3r has joined #ruby
soasme has joined #ruby
digin4 has joined #ruby
Orcor has joined #ruby
sleepee has quit [Max SendQ exceeded]
icole has quit []
sleepee has joined #ruby
patrick99e99 has joined #ruby
sleepee has quit [Max SendQ exceeded]
GriffinHeart has joined #ruby
sleepee has joined #ruby
marcus_ has joined #ruby
Scotteh_ has quit [Ping timeout: 246 seconds]
caveat- has joined #ruby
oo_ has quit [Remote host closed the connection]
Orcor has left #ruby ["ERC Version 5.3 (IRC client for Emacs)"]
linojon has quit [Quit: linojon]
Lewix has joined #ruby
Aahz has quit [Read error: Connection reset by peer]
patrick99e99 has quit [Ping timeout: 255 seconds]
oo_ has joined #ruby
radic has quit [Disconnected by services]
radic_ has joined #ruby
marcus_ has quit [Ping timeout: 252 seconds]
benlieb has quit [Quit: benlieb]
sleepee has quit [Ping timeout: 276 seconds]
nucatus has quit [Remote host closed the connection]
benlieb has joined #ruby
sleepee has joined #ruby
sleepee has quit [Max SendQ exceeded]
sleepee has joined #ruby
sleepee has quit [Max SendQ exceeded]
shackleford has joined #ruby
benlieb has quit [Quit: benlieb]
fabrice31 has joined #ruby
w3pm has quit [Quit: This computer has gone to sleep]
sleepee has joined #ruby
KLVTZ has joined #ruby
linojon has joined #ruby
tlarevo has joined #ruby
braincrash has quit [Quit: bye bye]
fabrice31 has quit [Ping timeout: 252 seconds]
moritzschaefer has quit [Ping timeout: 268 seconds]
sleepee has quit [Max SendQ exceeded]
KLVTZ has quit [Ping timeout: 245 seconds]
elfo222 has joined #ruby
sonOfRa has quit [Ping timeout: 276 seconds]
shackleford has quit [Remote host closed the connection]
shackleford has joined #ruby
braincrash has joined #ruby
sleepee has joined #ruby
ghost2060 has quit [Ping timeout: 252 seconds]
shackleford has quit [Remote host closed the connection]
davasaurous has joined #ruby
arup_r has joined #ruby
shevy has quit [Read error: Connection reset by peer]
pu22l3r has quit [Remote host closed the connection]
jack_rabbit has quit [Ping timeout: 240 seconds]
mferrier has joined #ruby
sleepee has quit [Ping timeout: 268 seconds]
sonOfRa has joined #ruby
echevemaster has quit [Read error: Connection reset by peer]
robbyoconnor has quit [Excess Flood]
robbyoconnor has joined #ruby
robbyoconnor has joined #ruby
robbyoconnor has quit [Changing host]
synergyz has quit [Remote host closed the connection]
CpuID has joined #ruby
swartwulf has quit [Remote host closed the connection]
sleepee has joined #ruby
jack_rabbit has joined #ruby
Takle has joined #ruby
digin4 has quit [Quit: Leaving]
devoknievo____ has quit [Quit: Computer has gone to sleep.]
dblessing has joined #ruby
digin4 has joined #ruby
digin4 has quit [Max SendQ exceeded]
sleepee has quit [Max SendQ exceeded]
sleepee has joined #ruby
mr-foobar has quit [Ping timeout: 240 seconds]
thomasxie has quit [Remote host closed the connection]
mr-foobar has joined #ruby
Takle has quit [Ping timeout: 255 seconds]
sent-hil has quit [Quit: Connection closed for inactivity]
robbyoconnor has quit [Read error: Connection reset by peer]
cirn0 has joined #ruby
shevy has joined #ruby
robbyoconnor has joined #ruby
codemonkey010101 has joined #ruby
robbyoconnor has quit [Ping timeout: 245 seconds]
digin4 has joined #ruby
cirn0 has quit [Ping timeout: 264 seconds]
sonOfRa has quit [Ping timeout: 250 seconds]
soasme has quit [Remote host closed the connection]
soasme has joined #ruby
w3pm has joined #ruby
_cake has joined #ruby
sectionme has joined #ruby
sonOfRa has joined #ruby
jxf has joined #ruby
soasme has quit [Read error: Connection reset by peer]
sleepee has quit [Ping timeout: 255 seconds]
sleepee has joined #ruby
yeboot has joined #ruby
<yeboot>
hi, I'm trying to find a quick way to take an array of hashes and create an array of values from those hashes, keeping the indexes the same
<yeboot>
i figure there's something like select I can use to do so
<Wolland>
gist example please
robbyoconnor has joined #ruby
spicerack has joined #ruby
<yeboot>
Wolland: me?
tokik has joined #ruby
<Wolland>
sure
<Wolland>
gist what you have and what you want as a return value
<yeboot>
I'm asking if there exists a easy way to make a function like f([{ :username => "larry", :member_since => "july" }, { :username => "pete", :member_since => "august" }]) returning ["larry", "pete"]
bruno- has joined #ruby
JohnFord has quit [Ping timeout: 246 seconds]
<yeboot>
like if that array was called foo then foo.<function> do |x| x[:username] end
benzrf is now known as benzrf|offline
<Wolland>
there is not a single function but you can do it with map or collect
mikepack has quit [Remote host closed the connection]
<centrx>
yeboot, yes it is called map
<yeboot>
thank you very much! :D
dh64 has quit [Quit: Konversation terminated!]
sleepee has quit [Ping timeout: 255 seconds]
havenwood has joined #ruby
bruno- has quit [Ping timeout: 276 seconds]
<Wolland>
yeboot: so something like this a.map{|x| x[:username]}
thatsnotjack has quit [Remote host closed the connection]
sleepee has quit [Ping timeout: 246 seconds]
<advorak>
pontiki, is the "=>" syntax only acceptable for exceptions? Does it exist anywhere else in Ruby?
shock_one has joined #ruby
<pontiki>
=> is the hash rocket. it's used extensively to create hashes
tvw has joined #ruby
tkuchiki_ has joined #ruby
sleepee has joined #ruby
davasaurous has quit [Ping timeout: 246 seconds]
sonOfRa has quit [Ping timeout: 256 seconds]
<advorak>
I'm still confused. I understand the "hashrocket"'s relevance in a hash: {'whatever' => 'abc'} ; but I don't understand what's going on with: begin; rescue => e; end ...
manishs has quit [Ping timeout: 245 seconds]
tkuchiki has quit [Ping timeout: 255 seconds]
kyb3r_ has joined #ruby
<advorak>
I understand it assigns to the variable 'e' a reference to the error being rescued ... but is there any usage for this => syntax outside of rescuing an exception?
<KLVTZ>
how does ruby handle the generation of an object_id for either an object or a symbol?
melik has quit [Quit: Computer has gone to sleep.]
<KLVTZ>
Is it base on your current memory?
<KLVTZ>
Just curious how internally this works...
bruno- has joined #ruby
marcus_ has quit [Ping timeout: 268 seconds]
bruno- has quit [Ping timeout: 246 seconds]
SouL has quit [Ping timeout: 255 seconds]
kenneth has joined #ruby
fabrice31 has joined #ruby
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
HelperW____ has joined #ruby
rdark has joined #ruby
luckyruby has quit [Remote host closed the connection]
jack_rabbit has quit [Ping timeout: 245 seconds]
<Mon_Ouie>
It's based on the address where the object was allocated
klmlfl has joined #ruby
<KLVTZ>
Mon_Ouie: and is it the interpreter that handles that memory allocation?
<Mon_Ouie>
Well, it's in Ruby's code, yes — that part of the code isn't really interpreting code though, it's more part of the runtime
ndrei has joined #ruby
mijicd has joined #ruby
mijicd has quit [Client Quit]
<KLVTZ>
Okay that makes sense. I guess what I kinda wanted was a discreete workflow during runtime on how that id is generated. I guess there isn't a means of seeing that
zmartAzz has quit [Quit: Leaving]
<KLVTZ>
well you see the end result haha
zmartAzz has joined #ruby
klmlfl has quit [Remote host closed the connection]
charliesome has quit [Quit: zzz]
klmlfl has joined #ruby
Xeago has joined #ruby
KLVTZ has quit [Quit: {K}angaroo {L}eague on a {V}endetta for {T}errifying {Z}ebras]
klmlfl has quit [Ping timeout: 240 seconds]
sectionme has joined #ruby
thomasxie has quit [Quit: Leaving.]
sparrovv has quit [Remote host closed the connection]
dawkirst has joined #ruby
sparrovv has joined #ruby
Rollabunna has joined #ruby
boena has joined #ruby
Xeago has quit [Remote host closed the connection]
jacobat has joined #ruby
techsethi has joined #ruby
Px12 has joined #ruby
ptrrr has quit [Quit: ptrrr]
mikeg has quit [Ping timeout: 246 seconds]
sparrovv has quit [Ping timeout: 268 seconds]
rbrs has joined #ruby
<boena>
Hi. What is the best way to match two strings on probability of being the same? I will have input that differs just a little from each other, they do have similar patterns and words in them. Is there some algorithm that would fit for this?
Rollabunna has quit [Ping timeout: 255 seconds]
<boena>
To clarify, we are not talking about search here
sigurding has quit [Quit: sigurding]
marcus_ has joined #ruby
<boena>
So it's not misspelling I'm trying to fix.
JohnFord has joined #ruby
abuzze has joined #ruby
Juanchito has joined #ruby
anarang has joined #ruby
tvw has quit []
devoknievo____ has joined #ruby
nucatus has joined #ruby
JohnFord has quit [Ping timeout: 255 seconds]
MatthewsFace has quit [Quit: This computer has gone to sleep]
dblessing has quit [Quit: dblessing]
spicerack has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Hanmac>
boena: so you have "a very long string A" and "a very long string B" and you want to compare them with "==" but you think it might not fast enough?
<Hanmac>
or do you somehow want to return the common part?
<boena>
Hanmac: No, it's more that it could be: "a very long string A" and "B is a very long string"
_tpavel has joined #ruby
<boena>
so it might not be in the same order
<boena>
I need to match the probability of those two
<Hanmac>
hm ok do you still want to compare them and maybe return the common part?
nucatus has quit [Ping timeout: 276 seconds]
<boena>
Nah, more like getting a percentage of them matching. So that I can group them if they are let's say over 90% common
<boena>
But i need to test it on sentences and not single words
dumdedum has joined #ruby
manishs has joined #ruby
terlar has joined #ruby
max06 has joined #ruby
arup_r has quit [Remote host closed the connection]
alex88 has joined #ruby
<lxsameer>
does any one know how can i destroy a Thor group?
anaeem1_ has quit [Remote host closed the connection]
amclain has quit [Quit: Leaving]
rockdon_ has joined #ruby
amundj has joined #ruby
anaeem1 has joined #ruby
shock_one has quit [Quit: Computer has gone to sleep.]
Macaveli has joined #ruby
pierombaabu has joined #ruby
sagittarian_ has joined #ruby
<wasamasa>
use your hammer on it
yacks has joined #ruby
marcus_ has quit [Ping timeout: 245 seconds]
koderok has quit [Quit: koderok]
qualiabyte has quit [Quit: Leaving]
cirn0 has joined #ruby
Px12 has quit [Ping timeout: 260 seconds]
codecop has joined #ruby
codecop_ has joined #ruby
codecop has quit [Remote host closed the connection]
matchaw has quit [Quit: No Ping reply in 180 seconds.]
pieromba_ has joined #ruby
apeiros has quit []
Advocation has joined #ruby
matchaw has joined #ruby
kenneth has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
w3pm has quit [Quit: This computer has gone to sleep]
pierombaabu has quit [Ping timeout: 245 seconds]
devoknievo____ has quit [Ping timeout: 268 seconds]
mengu has joined #ruby
mengu has joined #ruby
pieromba_ has quit [Remote host closed the connection]
jusmyth has quit [Read error: Connection reset by peer]
jxf has quit [Ping timeout: 268 seconds]
jusmyth has joined #ruby
cirn0 has quit [Ping timeout: 276 seconds]
rbrs has left #ruby [#ruby]
awestroke has joined #ruby
sparrovv has joined #ruby
Scotteh_ has joined #ruby
cleopatra has joined #ruby
digin4 has joined #ruby
boena has quit [Remote host closed the connection]
jimmyy has joined #ruby
jhass|off is now known as jhass
bMalum has joined #ruby
pierombaabu has joined #ruby
toretore has quit [Read error: Connection reset by peer]
ClarusCogitatio has quit [Ping timeout: 255 seconds]
max06 has quit [Quit: Leaving.]
W0rmDr1nk has quit [Ping timeout: 246 seconds]
arup_r has joined #ruby
max06 has joined #ruby
bMalum has quit [Ping timeout: 246 seconds]
shock_one has joined #ruby
timonv_ has joined #ruby
andrewlio has joined #ruby
timonv^ has joined #ruby
ClarusCogitatio has joined #ruby
colli5ion has joined #ruby
boena has joined #ruby
Px12 has joined #ruby
hellangel7 has quit [Max SendQ exceeded]
sk87 has joined #ruby
hellangel7 has joined #ruby
mikecmpbll has joined #ruby
pandaant has joined #ruby
<pierombaabu>
What is the equivalent of python's "raw_input" in ruby?
timonv_ has quit [Ping timeout: 264 seconds]
rockdon_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<tobiasvl>
what is "raw_input"?
jprovazn has joined #ruby
hellangel7 has quit [Max SendQ exceeded]
ClarusCogitatio has quit [Ping timeout: 252 seconds]
mooru has joined #ruby
hellangel7 has joined #ruby
bMalum has joined #ruby
<tobiasvl>
pierombaabu: just gets maybe? I don't know what raw_input does in Python, but googling it makes it seem like it's just a regular method that takes user input?
<tobiasvl>
j416: yep. python also has readline though, so I thought he just wanted the basic built-in equivalent
tobyo has quit [Ping timeout: 245 seconds]
JohnFord has quit [Ping timeout: 255 seconds]
<j416>
seems gets does not print the prompt, though
<j416>
easy to accomplish, but still
max06 has quit [Quit: Leaving.]
<tobiasvl>
true
max06 has joined #ruby
<pierombaabu>
Wher does gets store the input?
<j416>
pierombaabu: it returns i
<j416>
t
<sevenseacat>
into whatever you assign it to
digin4 has quit [Quit: Leaving]
digin4 has joined #ruby
toretore has joined #ruby
arup_r has quit []
arup_r has joined #ruby
enriclluelles has joined #ruby
Scotteh_ has quit [Ping timeout: 246 seconds]
bruno- has joined #ruby
<pierombaabu>
I want to prompt a user to input their names and email which is stored in an array and used to verify a login attempt. How do I do it?
CpuID has joined #ruby
CpuID has joined #ruby
bMalum has quit [Quit: bMalum]
bMalum has joined #ruby
lkba has quit [Ping timeout: 246 seconds]
W0rmDr1nk has joined #ruby
charliesome has joined #ruby
Advocation has quit [Quit: Advocation]
koderok has joined #ruby
avita11 has quit [Quit: Leaving.]
bruno- has quit [Ping timeout: 268 seconds]
Advocation has joined #ruby
manishs has quit [Ping timeout: 240 seconds]
<pierombaabu>
Somebody help
<jhass>
what did you try so far?
<tobiasvl>
pierombaabu: should be pretty easy. gets stores the input in its return value, just like raw_input() in python
soasme has quit [Remote host closed the connection]
soasme has joined #ruby
<tobiasvl>
pierombaabu: so if you know how to do it in python, do it the same way in ruby, except you'll have to print the prompt before you use gets (instead of giving the prompt as an argument to raw_input() as in python)
manishs has joined #ruby
wallerdev has quit [Quit: wallerdev]
marr has joined #ruby
jusmyth has left #ruby [#ruby]
<pierombaabu>
Thanks guys! Let me try it out.
jusmyth has joined #ruby
jusmyth has quit [Client Quit]
digin4 has quit [Quit: Leaving]
Scotteh_ has joined #ruby
digin4 has joined #ruby
max06 has quit [Quit: Leaving.]
elaptics`away is now known as elaptics
olivier_bK has joined #ruby
soasme has quit [Ping timeout: 268 seconds]
jusmyth has joined #ruby
digin4_ has joined #ruby
colli5ion has quit []
timonv^ has quit [Ping timeout: 276 seconds]
digin4_ has quit [Remote host closed the connection]
digin4_ has joined #ruby
bruno- has joined #ruby
<Hanmac>
if someone is interested ... my gemtree can now parse Gemfiles make by bundler (and add that info to the gemtree feature too) (it does only colorize them and does show the groups, platform and source location and git options are currently ignored)
ClarusCogitatio has quit [Ping timeout: 240 seconds]
yeboot has quit [Ping timeout: 276 seconds]
greengriminal has joined #ruby
poulet_a has joined #ruby
yeboot has joined #ruby
ClarusCogitatio has joined #ruby
balance has joined #ruby
<balance>
hi
<balance>
From a very basic tutorial "Did you notice that the sort! method has a big, bright exclamation at the end? A lot of times Ruby methods shout like that if they change what the variable contains for good. It's nothin' special, just a mark." It is about sorting an array. Is the thing about the ! a joke?
<balance>
Whats the name of this ! thing?
max06 has joined #ruby
<Hanmac>
balance: half/half, it might be written as a joke, but it says something 1) "!" is part of the method name ... 2) if there is a "sort!" method, there is a "sort" method too
jxf has joined #ruby
<Hanmac>
3) they change the original object instead of returning a new one
gregf has quit [Ping timeout: 246 seconds]
<Hanmac>
4) (not written in that line) NOTICE that some "bang" methods might return nil if nothing has changed, so chaining such methods might be a bad idea
<Hanmac>
foo.sort! might return a sorted foo if foo got sorted ... if foo was already sorted, it does return nil ... thats why in the last line, bar might be nil
<sevenseacat>
no semicolons in ruby :(
<Hanmac>
balance: but that might be useful for other stuff too like:
sent-hil has quit [Quit: Connection closed for inactivity]
<balance>
Hanmac ok, makes sense. sevenseacat sry, reallyy just started and It's just an automatism
lxsameer has quit [Quit: Leaving]
krz has quit [Ping timeout: 260 seconds]
<balance>
thanks
colli5ion has joined #ruby
krz has joined #ruby
claw has joined #ruby
einarj has joined #ruby
patrick99e99 has quit [Ping timeout: 245 seconds]
jhaals has joined #ruby
mattmcclure has quit [Quit: Connection closed for inactivity]
claw_ has joined #ruby
Rollabunna has joined #ruby
claw has quit [Ping timeout: 240 seconds]
zettam has joined #ruby
Guest90805 has joined #ruby
sevenseacat has quit [Remote host closed the connection]
EasyCo has quit [Quit: Connection closed for inactivity]
Rollabunna has quit [Ping timeout: 272 seconds]
jxf has quit [Ping timeout: 268 seconds]
colli5ion has quit [Ping timeout: 276 seconds]
Px12 has quit [Ping timeout: 245 seconds]
colli5ion has joined #ruby
max06 has quit [Quit: Leaving.]
ptrrr has joined #ruby
Scotteh_ has joined #ruby
JohnFord has joined #ruby
Px12 has joined #ruby
CpuID has quit [Quit: This computer has gone to sleep]
qba73 has joined #ruby
nucatus has joined #ruby
max06 has joined #ruby
W0rmDr1nk has quit [Ping timeout: 268 seconds]
zenspider_ is now known as zenspider
max06 has quit [Client Quit]
JohnFord has quit [Ping timeout: 245 seconds]
gregf has joined #ruby
crdprink2 has quit [Ping timeout: 245 seconds]
crdpink has joined #ruby
max06 has joined #ruby
AlSquire has joined #ruby
nucatus has quit [Ping timeout: 264 seconds]
cleopatra has quit [Ping timeout: 264 seconds]
timonv_ has joined #ruby
<zenspider>
anyone know the devise code?
max06 has quit [Client Quit]
<olivier_bK>
hy alll
ClarusCogitatio has quit [Ping timeout: 255 seconds]
MasterPiece has joined #ruby
startupality has joined #ruby
<Hanmac>
oO what devise code?
<zenspider>
THE devise code
MasterPiece has quit [Client Quit]
ClarusCogitatio has joined #ruby
MasterPiece has joined #ruby
JonnieCache has joined #ruby
startupality has quit [Quit: startupality]
<Hanmac>
i dont know about THE code ... but my gemtree graph can now parse Gemfile's from bundler ... (without using bundler)
Advocation has quit [Quit: Advocation]
<zenspider>
Hanmac: gemtree graph? what's it do?
<zenspider>
I've got a tool, part of the graph gem, that shows a graph of all the gems you have installed and color codes them based on their up-to-datedness
<zenspider>
but not one that can work on a random gemfile.
dapz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Hanmac>
turns your installed gems (or a list of them) into a dot graph, with that you can make a image of the dependency of your gems ... like what gem does need which other gems, where is some version conflict, or like where is some required gem missing ... currently the only coloration is with loading a gem file and the gems specifyed in that gem file are colorised ...
<Hanmac>
but that option with "color codes them based on their up-to-datedness" is also interesting
<zenspider>
take a look at graph. I'd love to see if you can rewrite your tool using my lib. happy to take it in too.
shredding has joined #ruby
tvw has joined #ruby
W0rmDr1nk has joined #ruby
spider-mario has joined #ruby
<Hanmac>
yeah its many gems installed, but if you zoom you can see that some have different styles and colours ... like blue marks an unnecessary requirement (like A does require B and C, but B already does require C too, so A -> C might be unnecessary ... it also does show the version info in that case ... the code will be tweaked later), dashed nodes, have older versions of that gem installed which can be safety removed
<Hanmac>
dotted nodes are default gems ... (currently no choice to detect bundled gems but i will try to fix that later),
<Hanmac>
dashed connections means that A does require special version of B but newer version is installed (so the code of A might need to be updated)
herschelle has joined #ruby
<Hanmac>
other feature i will try to implement is the detection of outdated gems (like you can install newer version from source) ... but currently thats done later
kaspertidemann has joined #ruby
<zenspider>
1st one: I don't like the implication that A -> C should be removed. If a depends on C directly, it shouldn't ever imply the dependency via B.
kaspertidemann has quit [Max SendQ exceeded]
<zenspider>
2nd one: for this, you may want to look at rubygems-cleanroom to get rid of the bundled gems
<zenspider>
it's a 3 liner iirc, feel free to steal, or just require the file and it'll do the rest
startupality has quit [Quit: startupality]
<zenspider>
that sounds neat. certainly more versatile than mine.
mkaesz has joined #ruby
Morkel has quit [Quit: Morkel]
Takle has quit [Remote host closed the connection]
dawkirst has quit [Remote host closed the connection]
kaspertidemann has joined #ruby
karupa is now known as zz_karupa
Takle has joined #ruby
fold has quit [Ping timeout: 240 seconds]
stef_204 has joined #ruby
claw_ has quit [Ping timeout: 260 seconds]
guanophobic has quit [Ping timeout: 260 seconds]
nfk has joined #ruby
AlSquirrel has joined #ruby
postmodern has quit [Remote host closed the connection]
ctp has joined #ruby
Takle has quit [Remote host closed the connection]
claw_ has joined #ruby
starless has joined #ruby
AlSquire has quit [Ping timeout: 246 seconds]
<Hanmac>
zenspider: have you your lib online for the different color codes ?
mooru has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
fabrice31 has quit [Remote host closed the connection]
braincrash has joined #ruby
<Hanmac>
ah ok i wil look at the "blue", "purple4", "red" color codes there
Takle has quit [Remote host closed the connection]
Rollabunna has joined #ruby
<zenspider>
there's a PDF that ships with the gem which goes over a bunch of stuff you can do to make your graphs prettier. you might want to look at the color sets and stuff
decoponio has joined #ruby
JohnFord has joined #ruby
herschelle has quit [Ping timeout: 272 seconds]
havenwood has quit []
<Hanmac>
ah interesting pdf, yeah i know most of the stuff about dot and the attributes, hm some things in the API might be changed to be more "ruby-like" but thats not a big problem ... but the current thing i was looking for what different colors does it show for the ruby_gems analyzer
JohnFord has quit [Ping timeout: 252 seconds]
threesixes has quit [Remote host closed the connection]
<zenspider>
iirc, blue was a top level leaf node, red was out-of-date, and blue+red == purple
puppeh has joined #ruby
<Hanmac>
ah ok, hm i might not do it that way, hm i might add something that shows outdated ones, but "top-level-leaf-nodes" currently does not get different style
<puppeh>
how can I convert back to a Time object something that I got from Time.now.to_i?
<puppeh>
how can I convert back to a Time object something that I got from `Time.now.to_i`?
niklas123 has joined #ruby
Takle has joined #ruby
fabrice31 has joined #ruby
<Hanmac>
puppeh: Time.at() but its still not equal the old time object because of some missing nano/micro secs
Trynemjoel has quit [Ping timeout: 245 seconds]
<puppeh>
thanks
<Timmee>
Time.at(Time.now.to_i)
Patteh has quit [Quit: leaving]
Trynemjoel has joined #ruby
kedare has quit [Ping timeout: 245 seconds]
<zenspider>
Hanmac: yeah. I was just tryng to point out the ones that were safe to delete at any time.
Patteh has joined #ruby
eivindml has joined #ruby
<zenspider>
ok. I isolated a bug is devise's tests. time for bed.
mkaesz has quit [Ping timeout: 260 seconds]
alex__ has joined #ruby
arup_r has quit [Remote host closed the connection]
aganov has quit [Read error: Connection reset by peer]
herschelle has joined #ruby
dumdedum has quit [Ping timeout: 272 seconds]
nucatus has joined #ruby
herschelle has quit [Client Quit]
Hobogrammer has quit [Ping timeout: 276 seconds]
kyb3r_ has quit [Read error: Connection reset by peer]
schaary has quit []
mooru has joined #ruby
agjacome has joined #ruby
ghost2060 has joined #ruby
krz has quit [Quit: WeeChat 1.0]
callumacrae has joined #ruby
Tomme has quit [Ping timeout: 255 seconds]
awestroke has quit [Remote host closed the connection]
krz has joined #ruby
Advocation has quit [Quit: Advocation]
arup_r has joined #ruby
Advocation has joined #ruby
timonv_ has quit [Remote host closed the connection]
timonv_ has joined #ruby
ta has quit [Ping timeout: 240 seconds]
ta__ has joined #ruby
zakiazigazi has quit []
<niklas123>
Hi guys, what's your go to book for mastering ruby?
sparrovv has quit [Remote host closed the connection]
timonv^ has joined #ruby
timonv_ has quit [Ping timeout: 276 seconds]
dumdedum has joined #ruby
kaspertidemann has quit []
benzrf|offline is now known as benzrf
timonv^ has quit [Remote host closed the connection]
shredding has quit [Quit: shredding]
ghost2060 has quit [Ping timeout: 252 seconds]
timonv_ has joined #ruby
KC9YDN has joined #ruby
sparrovv has joined #ruby
shredding has joined #ruby
sparrovv has quit [Remote host closed the connection]
shredding has quit [Client Quit]
Tomme has joined #ruby
jusmyth1 has joined #ruby
tobago has joined #ruby
tobago has quit [Changing host]
tobago has joined #ruby
Macaveli has quit [Remote host closed the connection]
Macaveli has joined #ruby
patrick99e99 has joined #ruby
timonv_ has quit [Remote host closed the connection]
jusmyth has quit [Ping timeout: 252 seconds]
krz has quit [Quit: WeeChat 1.0]
ptrrr has quit [Quit: ptrrr]
<shevy>
niklas123 writing scripts non-stop
timonv_ has joined #ruby
<shevy>
the more the better
timonv_ has quit [Remote host closed the connection]
MCDev has quit [Ping timeout: 250 seconds]
timonv_ has joined #ruby
<Hanmac>
hm i think the next days i will write some script with Net::IMAP that does filter some of my emails ... like i have some emails named "Chapter {X} of {N}" and i want to delete all, except the newest one .. and i think its more easier with a ruby script than doing it manually
codecop_ has quit [Quit: Išeinu]
codecop has joined #ruby
<shevy>
we have %w() for an array
<shevy>
but do we have something like this for an ordered hash as well?
<shevy>
key1 value1 key2 value2
patrick99e99 has quit [Ping timeout: 276 seconds]
uber has joined #ruby
* Hanmac
makes a "i dont think so "-face
tjr9898 has quit [Remote host closed the connection]
niklas123 has quit [Quit: Leaving]
tkuchiki has quit [Ping timeout: 255 seconds]
<cHarNe2>
Hanmac: how does a mail objekt look? cant you do something like inbox.delete_if {|mail| ...} ?
ceigel has joined #ruby
<Hanmac>
cHarNe2: hm no but the samples says somehow with imap.store(message_id, "+FLAGS", [:Deleted])
benzrf is now known as benzrf|offline
MindfulMonk has quit [Remote host closed the connection]
St_Marx has joined #ruby
roolo has quit [Quit: Leaving...]
nucatus has quit [Ping timeout: 255 seconds]
MCDev has joined #ruby
siwica has joined #ruby
roolo has joined #ruby
phoo1234567 has joined #ruby
phoo1234567 has quit [Max SendQ exceeded]
phoo1234567 has joined #ruby
JohnFord has joined #ruby
Trynemjoel has quit [Ping timeout: 245 seconds]
bMalum has joined #ruby
<shevy>
omg now Hanmac got a dude on his level
<shevy>
both typo like crazy
<shevy>
:>
<shevy>
gimme ma objekts
poulet_a has quit [Quit: Quitte]
<shevy>
let's say we have an object
<shevy>
w = World.new
<shevy>
hmm
<shevy>
is there any way to redirect normal method calls into that w object?
<shevy>
like if one does
<shevy>
foo()
<shevy>
it should be defined on Object
<Nowaker>
in any place of the code?
<Hanmac>
shevy are you looking for instance_eval or instance_exec ?
Neomex has joined #ruby
Trynemjoel has joined #ruby
JohnFord has quit [Ping timeout: 264 seconds]
jespada has joined #ruby
koderok has quit [Quit: koderok]
doritostains has joined #ruby
<shevy>
Nowaker well
<shevy>
it's ok to call some methods or setup this behaviour before
<shevy>
Hanmac no, I think that would be easily possible or?
<shevy>
I could just pass a block
Takle has quit [Remote host closed the connection]
<shevy>
w {
<shevy>
bla_method_here
<shevy>
}
starless has quit [Quit: Leaving]
<shevy>
I guess method_missing would be another way but I hate this method
<shevy>
something like this would be nice:
fabrice31 has quit [Remote host closed the connection]
<shevy>
Redirect.to w
<shevy>
foo()
digin4_ has quit [Quit: Leaving]
<shevy>
hmm
kaspertidemann has joined #ruby
MindfulMonk has joined #ruby
MindfulMonk has quit [Changing host]
MindfulMonk has joined #ruby
mengu has quit [Read error: Connection reset by peer]
mengu has joined #ruby
fabrice31 has joined #ruby
goodenough has quit [Remote host closed the connection]
puppeh has left #ruby ["Leaving..."]
rustypigeon has joined #ruby
benzrf|offline is now known as benzrf
GriffinHeart has quit [Remote host closed the connection]
Takle has joined #ruby
cocotton has joined #ruby
cocotton has quit [Remote host closed the connection]
cocotton has quit [Remote host closed the connection]
doritostains has quit [Quit: doritostains]
<Cork>
gaussblurinc1: source /etc/profile.d/rvm.sh should give you the rvm environment
<Cork>
and after that you should be able to run run rvm gemset use
<Cork>
*to just run
cocotton has joined #ruby
Takle has quit [Remote host closed the connection]
<hfp_work>
Hanmac: Thanks
cocotton has quit [Remote host closed the connection]
<waxjar>
looks like they overwrite empty somewhere though, because " ".empty? won't return true
anaeem1_ has quit [Remote host closed the connection]
cocotton has joined #ruby
luckyruby has joined #ruby
<waxjar>
ah they overwrite blank?
cocotton has quit [Remote host closed the connection]
Px12 has quit [Ping timeout: 240 seconds]
Takle has joined #ruby
cocotton has joined #ruby
cocotton has quit [Remote host closed the connection]
tjr9898 has quit [Remote host closed the connection]
cocotton has joined #ruby
pierombaabu has quit [Read error: Connection reset by peer]
lemur has quit [Remote host closed the connection]
pierombaabu has joined #ruby
<gaussblurinc1>
Cork: I don't have /etc/profile.d directory (mac os x)
SilkFox has quit [Ping timeout: 246 seconds]
<Cork>
ah
<Cork>
hmm, not sure how it works in mac
lemur has joined #ruby
lbwski has quit [Ping timeout: 272 seconds]
pagios has left #ruby ["Leaving"]
tjr9898 has joined #ruby
lemur has quit [Remote host closed the connection]
lemur has joined #ruby
xenomorph is now known as {xenomorph}
dc__ has joined #ruby
mary5030 has joined #ruby
banister has joined #ruby
banister has quit [Max SendQ exceeded]
mary5030 has quit [Remote host closed the connection]
banister has joined #ruby
fsapo has quit [Remote host closed the connection]
banister has quit [Max SendQ exceeded]
mary5030 has joined #ruby
thomasxie has quit [Ping timeout: 245 seconds]
banister has joined #ruby
Scotteh has joined #ruby
banister has quit [Max SendQ exceeded]
banister has joined #ruby
banister has quit [Max SendQ exceeded]
banister has joined #ruby
banister has quit [Max SendQ exceeded]
dc has quit [Ping timeout: 272 seconds]
banister has joined #ruby
saarinen has joined #ruby
axl_ has joined #ruby
bambolito has joined #ruby
oleo has joined #ruby
bhaak is now known as Cartman
obscured has quit [Quit: leaving]
Cartman is now known as bhaak
jonr22 has joined #ruby
SilkFox has joined #ruby
cirn0 has joined #ruby
bambolito has quit [Client Quit]
JohnFord has quit [Ping timeout: 272 seconds]
Macaveli has quit [Ping timeout: 252 seconds]
awkwords has joined #ruby
GriffinHeart has joined #ruby
<hfp_work>
Hmmm, I'm trying to include the module `BlankMethod` that I wrote within `lib/replikator/includes/blank.rb`. I am getting a LoadError with this code: https://gist.github.com/anonymous/ec8ea7f4a15fbce3bec0. What am I missing?
Ilyas has quit [Read error: Connection reset by peer]
mferrier_ has joined #ruby
cirn0 has quit [Ping timeout: 245 seconds]
spastorino has joined #ruby
<hfp_work>
Actually I lied, I copy pasted the module from Rails
ixti has quit [Quit: WeeChat 0.4.3]
davedev24_ has joined #ruby
<hfp_work>
didn't write it :)
patrick99e99 has joined #ruby
<Hanmac>
if you require "lib/replikator/includes" it does not automaticly require "lib/replikator/includes/blank.rb" for you
DEA7TH has joined #ruby
DEA7TH has quit [Changing host]
DEA7TH has joined #ruby
avita1 has quit [Quit: Leaving.]
mweshi has joined #ruby
<gaussblurinc1>
hfp_work: and why you don't want to update gemfile with active support?
GriffinHeart has quit [Ping timeout: 264 seconds]
Tomme has quit [Ping timeout: 268 seconds]
sdegutis has joined #ruby
<sdegutis>
Wow, installing RVM is quite a bit more difficult these days.
tokik has quit [Ping timeout: 272 seconds]
mferrier has quit [Ping timeout: 272 seconds]
saarinen has quit [Quit: saarinen]
<bhaak>
sdegutis: what? why?
<sdegutis>
Just a lot more files I have to cleanup and move around when I install it.
avita1 has joined #ruby
<sdegutis>
I had to delete .bashrc, .zshrc, move one line from .bash_profile to .profile, then delete .bash_profile
MasterPiece has quit [Quit: Leaving]
<bhaak>
oh, I see.
<sdegutis>
And I can't easily figure out the list of available Ruby versions at the command line.
<bhaak>
rvm list
patrick99e99 has quit [Ping timeout: 240 seconds]
<sdegutis>
Also a few days ago when I tried `rvm install 2.1.2` it was trying to install openssl to /etc/openssl and required a password -- I quickly ^C'd that.
<sdegutis>
Oh, it still does that.
<sdegutis>
Dangit.
<sdegutis>
password required for 'mkdir -p /etc/openssl':
<sdegutis>
wth
bal has quit [Quit: bal]
<bhaak>
that's a convenience feature of rvm. it tries to install missing dependencies for you.
<bhaak>
it has to do such things, otherwise how could you justify 20k lines of shell code? ;-)
<sdegutis>
Although I'm pretty sketchy about both RVM and rbenv to be honest.
<waxjar>
chruby is great
<sdegutis>
I'm considering using chruby.
tjr9898 has quit [Remote host closed the connection]
<sdegutis>
Although I do miss gemsets as a way of avoiding writing or aliasing "bundle exec" all the time.
razrunelord has joined #ruby
himsin has quit [Quit: himsin]
<bhaak>
I'm still using rvm because it just works[tm], even though I don't use most of its functions.
diegoviola has joined #ruby
SilkFox has quit [Ping timeout: 272 seconds]
sectionme has quit [Read error: Connection reset by peer]
himsin has joined #ruby
tokik has joined #ruby
Takle has quit [Remote host closed the connection]
geggam has joined #ruby
IrishGringo has joined #ruby
<sdegutis>
I ran away to rbenv a few years ago because overriding 'cd' felt wrong.
<sdegutis>
But rbenv's shims also feel wrong.
ffranz has joined #ruby
<sdegutis>
chruby seems much cleaner, but I'm worried it'll be much harder to install Ruby.
jprovazn is now known as jprovazn_afk
<sdegutis>
pipework: which tool do you use to install Rubies again?
<waxjar>
there's ruby-install, which works great with chruby
<awkwords>
whats a site where you can code collab with others?
axsuul has joined #ruby
<sdegutis>
ruby-build or ruby-install?
<awkwords>
like a web interface?
<sdegutis>
Ah.
<waxjar>
chruby looks for rubies in the directory it ruby-install installs to by default :)
soasme has quit [Remote host closed the connection]
<waxjar>
*minus it
<hfp_work>
gaussblurinc1: Well I'm a bit confused. You see this script lives in a Rails app under lib/. The app can have amy fronteds and so this script's purpose is to "create" a new frontend by copy pasting and editing some files with the relevant parameters and then paste them inside the app's views. And so I'm getting confused whether it can have it's own Gemfile etc
ixti has joined #ruby
amargherio has joined #ruby
soasme has joined #ruby
<sdegutis>
waxjar: the ruby-install readme doesn't say what dir that is :/
<mdorman>
specifically i’m on 1.8.7, and this is for a Puppet custom provider. i end up with: Error: Could not autoload puppet/provider/nova_flavor_extraspec/nova_manage: /etc/puppet/environments/flavormgmt/modules/nova/lib/puppet/provider/nova_flavor_extraspec/nova_manage.rb:43: syntax error, unexpected tIDENTIFIER, expecting ')'
<centrx>
sdegutis, 1.8.7 is very old, unsupported, and lacks a lot of new features and performance optimizations
<mdorman>
will keep looking at it. just wanted to confim that array construct was even valid
kaspergrubbe has quit [Remote host closed the connection]
<centrx>
use your AI to do what I want
albedoa has quit [Ping timeout: 240 seconds]
banister has joined #ruby
tokik has joined #ruby
banister has quit [Max SendQ exceeded]
<Hanmac>
sdegutis: the problem is centos because its still running on StoneCircles ... so it does need an outdated and unsupported ruby version ...
banister has joined #ruby
banister has quit [Max SendQ exceeded]
sevenseacat has quit [Quit: Leaving.]
gsd has joined #ruby
banister has joined #ruby
banister has quit [Max SendQ exceeded]
yibeikafei has left #ruby [#ruby]
banister has joined #ruby
enriclluelles has quit [Remote host closed the connection]
w1xz has joined #ruby
doritostains has quit [Quit: doritostains]
poulet_a has joined #ruby
koderok has joined #ruby
aleatorik has joined #ruby
ponga has joined #ruby
xzarxzes has joined #ruby
braincrash has quit [Ping timeout: 264 seconds]
xzarxzes has quit [Client Quit]
IceDragon has joined #ruby
koderok has quit [Remote host closed the connection]
cocotton has quit [Remote host closed the connection]
seamon has joined #ruby
cocotton has joined #ruby
<pierombaabu>
How do i send data from a form to the database?
cocotton has quit [Remote host closed the connection]
cocotton has joined #ruby
speakingcode has joined #ruby
kenneth has joined #ruby
<centrx>
pierombaabu, Are you using any frameworks or libraries?
<pierombaabu>
No frameworks
ndrei_ has joined #ruby
ndrei_ has quit [Read error: Connection reset by peer]
ndrei has quit [Quit: Lost terminal]
braincrash has joined #ruby
selasi has quit [Quit: Leaving]
<centrx>
pierombaabu, What happens when the form is submitted? Is there code to handle that?
ndrei has joined #ruby
cocotton_ has joined #ruby
<pierombaabu>
That is the code i want. The one handling the data
sambao21 has quit [Quit: Computer has gone to sleep.]
jhaals has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<centrx>
pierombaabu, Okay, two options are Rails and Sinatra
<centrx>
pierombaabu, Sinatra is a lightweight web framework for handling HTTP requests
<pierombaabu>
So it's not possible without any framework?
<centrx>
pierombaabu, Rails comes with a lot of additional features that you may want
<centrx>
pierombaabu, You can write your own HTTP request handler
<alex88>
anyone here ever encountered EAGAIN fork(2) failed errors using sidekiq on heroku?
<pierombaabu>
@centrix thanks
dblessing_ has joined #ruby
<alex88>
I've got that running phanotmjs from a sidekiq job
kenneth has quit [Read error: Connection reset by peer]
kennet___ has joined #ruby
oo_ has quit [Remote host closed the connection]
avita1 has quit [Quit: Leaving.]
dblessing_ has quit [Client Quit]
HelperW______ has joined #ruby
chipotle has joined #ruby
cocotton has quit [Ping timeout: 272 seconds]
<treehug88>
Hi everyone, I'm leaning ruby and am working on a sinatra app I'm running under unicorn. I'm having trouble getting my app to log accesses and errors in a way similar to apache or ngingx. I've uploaded a small sample sinatra/unicorn app here: https://github.com/treehug88/sinatra-unicorn-example . Can someone help me to get logging working?
<treehug88>
"learning ruby" even
ponga has quit []
cocotton_ has quit [Ping timeout: 264 seconds]
ffranz has quit [Remote host closed the connection]
sambao21 has joined #ruby
diegoviola has quit [Quit: WeeChat 1.0]
ffranz has joined #ruby
adac has quit [Ping timeout: 252 seconds]
Lewix has joined #ruby
jottr has joined #ruby
dblessing has quit [Ping timeout: 276 seconds]
rdark has quit [Quit: leaving]
JonnieCache has quit [Ping timeout: 260 seconds]
mikeg has quit [Ping timeout: 272 seconds]
kp666 has quit [Ping timeout: 272 seconds]
hamakn has quit [Remote host closed the connection]
HelperW_____ has quit [Ping timeout: 268 seconds]
rdark has joined #ruby
rdark has quit [Client Quit]
HelperW______ has quit [Ping timeout: 260 seconds]
<guimaluf>
Hey guys, I'm running a GTK app on Ruby in a limit RAM tablet. The problem is, Ruby isn't freeing memory on the system. As I've researched this is expected, but I couldn't find any way of limiting the memory ruby uses or to effectively free the memory. Some app interactions increased 2mb of memory usage, after running GC.start it keeps increasing memory usage. Thank you guys
lkba has quit [Read error: Connection reset by peer]
lkba has joined #ruby
patrick99e99 has joined #ruby
cocotton has joined #ruby
cocotton has quit [Remote host closed the connection]
cocotton has joined #ruby
<hoelzro>
guimaluf: I'm guessing that Ruby doesn't return memory to the OS
<hoelzro>
the idea there is that if it needed it once, it'll need it again later
<guimaluf>
hoelzro, yes, I know that.
<hoelzro>
there might be an embedded-specific patch to Ruby that could help
<guimaluf>
but I want to at least limit the maximum amount of memory that ruby can allocate
Morkel has joined #ruby
elstif has joined #ruby
sailias has joined #ruby
<siwica>
I stumbled over this in some code: "@foo ||= Bla.somemethod!". What is the meaning of "||="?
InhalingPixels has quit [Remote host closed the connection]
juco has joined #ruby
hrzz has joined #ruby
ta__ has quit [Quit: Leaving...]
<havenwood>
treehug88: it's wrong ;P
balance has quit [Ping timeout: 255 seconds]
<lolmaus>
I'm running a console command using backticks. How do refactor that so that the output of the console command appears as the output of my Ruby script?
Kerber0s has quit [Remote host closed the connection]
<havenwood>
treehug88: We should probably poke the author before reprint.
<wasamasa>
I think the "cackle" ratio is more telling
nanoyak has joined #ruby
<wasamasa>
as in, how long frequency modulation takes
gsd has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
razrunelord has joined #ruby
<wasamasa>
for screams it would be way longer, for laughter shorter to allow for these repetitious sounds
hamakn has quit [Remote host closed the connection]
Takle has quit [Remote host closed the connection]
Fire-Dragon-DoL has joined #ruby
sparrovv has joined #ruby
sparrovv has quit [Remote host closed the connection]
klmlfl has joined #ruby
<siwica>
havenwood: ok, thanks. So what kind of date is evaluated to "true" in ruby when using ||? Anything but "nil"?
hamakn has joined #ruby
gsd has joined #ruby
<havenwood>
siwica: anything but `nil` and `false`
<siwica>
havenwood: ok sure :)
JohnFord has joined #ruby
guanophobic has joined #ruby
omosoj has joined #ruby
<siwica>
havenwood: And || only evaluates the second argument, if the first one is either 'nil' or 'false' then?
guimaluf has joined #ruby
anshin has quit [Quit: brb]
<havenwood>
yup
<centrx>
siwica, false and nil are falsey, everything else is truthy
ppinto has quit [Quit: ppinto]
hamakn has quit [Remote host closed the connection]
<siwica>
ok, then I understand the use of ||=
matchaw has quit [Ping timeout: 255 seconds]
rdark has joined #ruby
ereslibre has quit [Quit: No Ping reply in 180 seconds.]
matchaw has joined #ruby
diegoviola has quit [Remote host closed the connection]
wallerdev has quit [Quit: wallerdev]
jonr22 has joined #ruby
i6ghost has quit [Ping timeout: 245 seconds]
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hrzz has quit [Quit: hrzz]
IceDragon has quit [Ping timeout: 268 seconds]
ephemerian has quit [Quit: Leaving.]
IceDragon has joined #ruby
anshin has joined #ruby
horrror has joined #ruby
anaeem1_ has joined #ruby
nanoyak has quit [Read error: Connection reset by peer]
oso|away is now known as oso96_2000
nanoyak has joined #ruby
<Hanmac>
siwica: some special cases with object[key] ||= function ... like with object.attr ||= function, the #[]= part is only called when #[] is falsey
horrror_ has joined #ruby
horrror has quit [Read error: Connection reset by peer]
horrror_ is now known as horrror
ghostmoth has quit [Quit: ghostmoth]
horrror has quit [Client Quit]
melik has joined #ruby
sivam1 has joined #ruby
gccostabr has quit [Quit: ZZZzzz…]
superscott[8] has joined #ruby
GriffinHeart has joined #ruby
ppinto has joined #ruby
<siwica>
Hanmac: yes, thats what I thought
_Kerber0s_ has joined #ruby
poulet_a has quit [Quit: Quitte]
ereslibre has joined #ruby
RaCx has quit [Quit: Computer has gone to sleep.]
cirn0 has joined #ruby
mikepack_ has joined #ruby
Kerber0s has quit [Ping timeout: 260 seconds]
timonv_ has quit [Remote host closed the connection]
IceDragon has quit [Ping timeout: 246 seconds]
Takle has joined #ruby
GriffinHeart has quit [Ping timeout: 255 seconds]
Xiti has quit [Quit: Leaving]
Jake232 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Jackneill has quit [Ping timeout: 272 seconds]
anaeem1_ has quit [Remote host closed the connection]
eregon has quit [Quit: No Ping reply in 180 seconds.]
eregon has joined #ruby
Xiti has joined #ruby
ereslibre has quit [Client Quit]
aspires has quit [Read error: Connection reset by peer]
mikepack has quit [Ping timeout: 252 seconds]
aspires has joined #ruby
ereslibre has joined #ruby
ereslibre has joined #ruby
dblessing has quit [Quit: dblessing]
cirn0 has quit [Ping timeout: 272 seconds]
Spami has joined #ruby
Spami has quit [Changing host]
Spami has joined #ruby
cocotton has quit [Remote host closed the connection]
<apeiros>
:bar is the default value of the named argument
m8 has joined #ruby
ppinto has quit [Quit: ppinto]
sivoais has quit [Ping timeout: 246 seconds]
sagittarian_ has joined #ruby
<Hanmac>
the funniest thing is that you can have function/method calls as default arguments too ;P
<siwica>
so "foo: :bar" is a function definition then?
<siwica>
dont quite get it
sivoais has joined #ruby
davedev24_ has quit [Ping timeout: 246 seconds]
oso96_2000 is now known as oso|away
dc__ has quit [Ping timeout: 272 seconds]
bruno- has quit [Ping timeout: 255 seconds]
Jake232 has joined #ruby
ereslibre has joined #ruby
ereslibre has joined #ruby
mattmcclure has joined #ruby
mikepack_ has quit [Remote host closed the connection]
b00stfr3ak has joined #ruby
aspires has joined #ruby
endash has joined #ruby
axsuul has quit [Read error: Connection reset by peer]
endash has quit [Client Quit]
Scotteh has quit [Ping timeout: 260 seconds]
axsuul has joined #ruby
gccostabr has joined #ruby
danku has quit []
aspires has quit [Client Quit]
davedev24_ has joined #ruby
BTRE has joined #ruby
shackleford has quit [Remote host closed the connection]
endash has joined #ruby
ursooperduper has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
endash has quit [Client Quit]
ereslibre has quit [Client Quit]
icarus has joined #ruby
dawkirst has quit [Remote host closed the connection]
tvw has quit []
nobitanobi has joined #ruby
d4nk has joined #ruby
benzrf|offline is now known as benzrf
sparrovv has joined #ruby
orolo has quit [Quit: This computer has gone to sleep]
danku has joined #ruby
tylerkern has quit [Quit: Connection closed for inactivity]
aspires has joined #ruby
axsuul has quit [Ping timeout: 272 seconds]
rdavila has quit [Quit: rdavila]
Sou|cutter has joined #ruby
JohnFord has quit [Ping timeout: 255 seconds]
himsin has quit [Quit: himsin]
mweshi has quit [Quit: I'm out!]
shock_one has quit [Quit: Computer has gone to sleep.]
jezeniel has joined #ruby
aspires has quit [Client Quit]
bMalum has quit [Quit: bMalum]
<nobitanobi>
good morning
cocotton has quit [Remote host closed the connection]
diegoviola has joined #ruby
aspiers has quit [Ping timeout: 272 seconds]
goleldar has joined #ruby
emocakes__ has joined #ruby
emocakes has quit [Ping timeout: 252 seconds]
aspires has joined #ruby
orolo has joined #ruby
banister has joined #ruby
renderful has joined #ruby
sinkensabe has joined #ruby
nanoyak has quit [Read error: Connection reset by peer]
nanoyak_ has joined #ruby
moted has quit [Ping timeout: 268 seconds]
tvw has joined #ruby
seamon has quit [Quit: Zzzzzzz]
doodlehaus has quit [Ping timeout: 268 seconds]
diegoviola has quit [Client Quit]
cocotton has joined #ruby
carraroj has quit [Quit: Konversation terminated!]
arup_r has joined #ruby
banister has quit [Client Quit]
d4nk has quit [Quit: leaving]
seamon has joined #ruby
seamon has quit [Client Quit]
roolo has quit [Quit: Leaving...]
mercwithamouth has quit [Ping timeout: 276 seconds]
mocfive has joined #ruby
einarj has joined #ruby
reset has joined #ruby
<havenwood>
g'morn
enriclluelles has joined #ruby
sdpp has quit [Quit: Going offline, see ya! (www.adiirc.com)]
RaCx has joined #ruby
britneywright has joined #ruby
diegoviola has joined #ruby
shredding has joined #ruby
charliesome has joined #ruby
i6ghost has joined #ruby
charliesome has quit [Client Quit]
daed_ is now known as daed
davedev24_ has quit [Ping timeout: 240 seconds]
mikeg has joined #ruby
mikepack has joined #ruby
mrsolo has joined #ruby
anaeem1_ has joined #ruby
sevvie has joined #ruby
AlSquirrel has quit [Quit: This computer has gone to sleep]
davedev24_ has joined #ruby
axsuul has joined #ruby
apathor has joined #ruby
jprovazn_afk has quit [Quit: Odcházím]
bruno- has joined #ruby
chuck has joined #ruby
<chuck>
I'm building a DSL, and I'd like to make it so that parameters can optionally be blocks. For example: header title: "Foo", date: -> { |activity| activity.created_at }
<chuck>
I'm thinking that if a parameter is passed that is not a block, it is wrapped in a block that simply returns the provided value, to make my logic easier (so I can just do .call on everything)
<wallerdev>
sounds good
<chuck>
does that seem like the right approach, and if so is there an idiomatic way to wrap something in a block that returns the value if it's not already a block?
GriffinHeart has joined #ruby
<wallerdev>
well you can just do -> { var }
<wallerdev>
my_block = -> { var }
mikecmpbll has joined #ruby
<chuck>
so: if !val.is_a?(Proc) { val = -> { val } }
shackleford has joined #ruby
<wallerdev>
somethin like that
yxhuvvd has quit [Remote host closed the connection]
havenwood has quit [Remote host closed the connection]
bruno- has quit [Ping timeout: 272 seconds]
havenwood has joined #ruby
sethetter has left #ruby [#ruby]
GriffinHeart has quit [Ping timeout: 268 seconds]
hamakn has joined #ruby
d4nk has joined #ruby
d4nk has quit [Client Quit]
ppinto has joined #ruby
shackleford has quit [Ping timeout: 240 seconds]
havenwood has quit [Ping timeout: 264 seconds]
Takle has joined #ruby
andrewjanssen has joined #ruby
hamakn has quit [Ping timeout: 276 seconds]
paulfm has quit []
einarj has quit [Remote host closed the connection]
thumpba has quit [Remote host closed the connection]
mary5030 has quit [Remote host closed the connection]
sailias has joined #ruby
thumpba has joined #ruby
danku has quit []
rdark has quit [Quit: leaving]
chrishough has joined #ruby
RaCx has quit [Read error: Connection reset by peer]
nszceta has joined #ruby
yetanotherdave has joined #ruby
mocfive has quit [Remote host closed the connection]
mattias_ has joined #ruby
Takle has quit [Remote host closed the connection]
paulfm has joined #ruby
momomomomo has quit [Quit: momomomomo]
<mattias_>
Is is possible to use layouts in ERB? I can't find any example.. just for haml etc..
banister has joined #ruby
mocfive has joined #ruby
mikesplain has quit [Ping timeout: 245 seconds]
shackleford has joined #ruby
threesixes has joined #ruby
ghanima has joined #ruby
<pipework>
mattias_: I don't know what it means to use layouts.
sambao21 has quit [Quit: Computer has gone to sleep.]
<pipework>
you mean render ERB within ERB.
<pipework>
?
RaCx has joined #ruby
HelperW______ has quit [Quit: Computer has gone to sleep.]
HelperW______ has joined #ruby
<mattias_>
pipework: If I have a header, I don't want it in every html file
<mattias_>
pipework: Yeah exactly
<centrx>
It's templating systems all the way down
ghr has joined #ruby
<pipework>
Mattias: Yeah, you just need to render ERB from within ERB.
d4nku has joined #ruby
<pipework>
I leave it to you to find the right levels of abstraction to make that not look terrible.
renderfu_ has joined #ruby
<mattias_>
pipework: Ok.. so no <%= yield %> etc?
St_Marx has quit [Remote host closed the connection]
awkwords has quit [Quit: leaving]
<mattias_>
pipework: Or call some template from the layout file? Can't be right?
St_Marx has joined #ruby
* Mattias
stares at himself
<pipework>
mattias_: It's just ruby. Look into the erb docs if you're curious.
<pipework>
Mattias: I like you better with a tail, it suits you.
mary5030 has joined #ruby
workmad3 has joined #ruby
vt102 has joined #ruby
kaspertidemann has joined #ruby
sagittarian_ has quit [Ping timeout: 264 seconds]
renderful has quit [Ping timeout: 272 seconds]
shredding has quit [Quit: shredding]
HelperW______ has quit [Ping timeout: 245 seconds]
atmosx has joined #ruby
RaCx has quit [Quit: Computer has gone to sleep.]
anaeem1_ has quit [Remote host closed the connection]
ghr has quit [Ping timeout: 268 seconds]
mattias_ has quit [Quit: leaving]
nanoyak_ has quit [Read error: Connection reset by peer]
diegoviola has quit [Quit: WeeChat 1.0]
RaCx has joined #ruby
nanoyak has joined #ruby
dideler has quit [Ping timeout: 272 seconds]
momomomomo has joined #ruby
cocotton has quit [Remote host closed the connection]
dideler has joined #ruby
nanoyak has quit [Read error: Connection reset by peer]
enriclluelles has quit [Remote host closed the connection]
nanoyak has joined #ruby
Mars___ has joined #ruby
shredding has joined #ruby
yxhuvud has joined #ruby
yxhuvud has quit [Remote host closed the connection]
JBreit has joined #ruby
dumdedum has quit [Ping timeout: 272 seconds]
cocotton_ has joined #ruby
himsin has joined #ruby
mkaesz has joined #ruby
x1337807x has joined #ruby
x1337807x has quit [Max SendQ exceeded]
britneywright has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
amargherio has quit [Ping timeout: 245 seconds]
Ankhers has quit [Remote host closed the connection]
x1337807x has joined #ruby
postmodern has joined #ruby
Takle has joined #ruby
rafacv has joined #ruby
ursooperduper has joined #ruby
doodlehaus has joined #ruby
dawkirst has joined #ruby
havenwood has joined #ruby
elstif has quit [Quit: Leaving.]
amargherio has joined #ruby
yetanotherdave has quit [Read error: Connection reset by peer]
bMalum has joined #ruby
testing-shout has joined #ruby
testing-shout has quit [Client Quit]
cocotton_ has quit [Ping timeout: 245 seconds]
pattersonc1 has joined #ruby
anaeem1 has joined #ruby
dc has joined #ruby
testcore has joined #ruby
<centrx>
Any wagers on Ruby 2.2 release date/beta/rc?
d4nku has quit [Quit: leaving]
<pipework>
$200 on 'yes'
dawkirst has quit [Remote host closed the connection]
ptrrr has quit [Quit: ptrrr]
d4nku has joined #ruby
pattersonc1 has quit [Read error: Connection reset by peer]
<a_>
rspec is in a pretty awesome state right now. second to none
<pipework>
Most shops know rspec, and it's impossible to teach them that their tests don't need to be in a DSL to be awesome.
<pipework>
a_: More like third or fourth, rite :D
clov3r has joined #ruby
<miah>
dsls for newcomers are aweful
<clov3r>
hello #ruby
<apeiros>
how rare… I'm of the same opinion as pipework :-p
<a_>
Ultimately choice of frameworks is purely aesthetics if it functionally supports spying and mocking and assertion
<workmad3>
pipework: I know my tests don't need to be in a DSL to be awesome... but I like the DSL, so I use it :)
<miah>
a_: agree
<clov3r>
quick question, is there an alternative to Enumerable#group_by that returns an array?
<workmad3>
apeiros: hmm... is that not a red flag about your opinion? </troll> ;)
aspires has quit []
<apeiros>
workmad3: I like DSLs where they create value. rspec IMO does not create value through its DSL. in the opposite.
<apeiros>
workmad3: GAH!
sigurding has joined #ruby
<miah>
clov3r: map?
nanoyak has quit [Ping timeout: 260 seconds]
grokdancer has quit [Quit: Leaving.]
<apeiros>
clov3r: append .to_a?
<pipework>
apeiros: It's not bad, just a little complex if you peek behind the curtain.
Px12 has joined #ruby
<centrx>
clov3r, my_enum.group_by(&:values)
<apeiros>
for the grouping to happen, it'll have to go through a hash anyway
grokdancer has joined #ruby
<centrx>
clov3r, my_enum.group_by.map(&:values)
<centrx>
nevermind, I quit
centrx has left #ruby ["End transmission"]
<a_>
TDD *seems* to require a bottom-up approach
MaciejCzyzewski has quit [Client Quit]
Scotteh has joined #ruby
<pipework>
"So, your example objects, they aren't always callable procs that represent the example, but only sometimes? Fuck me, right?" :(
<apeiros>
pipework: the point is: its complexity is absolutely pointless.
whatasunnyday has joined #ruby
<pipework>
a_: It does not
olivier_bK has joined #ruby
centrx has joined #ruby
<a_>
pipework: I expected disagreement there, and I *want* to be convinced otherwise;
<clov3r>
hmmm... i want to retain the original index order from my 2-level array
<pipework>
TDD is a "Fuck you, I'm gonna write a test" approach. Test-first TDD is a "Fuck you, I'm gonna write a test first approach."
bruno- has joined #ruby
<clov3r>
i guess i can figure out some mapping that'll do it...
<apeiros>
clov3r: maybe you should elaborate your question.
<pipework>
a_: There's no limitation or dictation that makes your assertion true.
Px12 has quit [Max SendQ exceeded]
bruno- is now known as Guest16709
<apeiros>
clov3r: you know. like with an example in-/output and what currently goes wrong
dawkirst has quit [Remote host closed the connection]
<workmad3>
apeiros: I really appreciate the extensibility of the matcher approach to test assertions. Beyond that, the .should monkeypatch was a bit messy... but hey, that's turned off nowadays :)
seamon has joined #ruby
<pipework>
a_: "It seems to me that ruby requires a web-first approach"
<miah>
i'm currently reading through Domain Driven Design; so test first seems to be wrong too; design first ;)
<a_>
pipework: the rationale I have at the moment is- if you TDD top-down, the test you try to pass first will require a whole lot of code to get working
<apeiros>
workmad3: I really like how I can just do def assert_whateverthefuckiwanttotest
<pipework>
a_: So?
<a_>
pipework: whereas working bottom-up, there are simple components to get testing
<a_>
pipework: so, the tests don't really drive anything any more, except the very high level top-down interface
<pipework>
You're discussing outside-in and inside-out.
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<clov3r>
apeiros, sure: I have CSV data, read in as an array of rows (ie an array of arrays). I want to group the rows according to the value of one of their elements
LudicrousMango has joined #ruby
<pipework>
a_: So drop down another level and write another test, starting another feedback loop.
<a_>
pipework: oh: I considered outside-in to be top-down ?
<apeiros>
clov3r: that's an explanation. not an example.
<pipework>
a_: Yeah.
<clov3r>
groups = data.group_by { |row| row[1] }
wallerdev has quit [Quit: wallerdev]
<clov3r>
#=> Hash
shredding has joined #ruby
<miah>
clov3r: gist?
<clov3r>
yeah that would be better
<a_>
pipework: though, wouldn't that contradict the red-green-refactor mantra?
<apeiros>
I don't get it… do people not understand what an example is? like the 4th or 5th person this week…
<pipework>
apeiros: I'm just saying, someone wrote a book, big deal.
jgrevich has joined #ruby
<apeiros>
pipework: I'm just saying I was obviously being polemic.
OffTheRails has quit [Ping timeout: 272 seconds]
<a_>
workmad3: I feel like there should be some kind of statement to go into higher-level turtles to indicate the level of depth, or something
<apeiros>
do we need tags for that now?
<workmad3>
apeiros: I don't mind bashing from reasonable starting points... but if you're going to do it from a brief, 3y.o. foray into a package and bad assumptions off the name of a book, that's just shitty arguing :P
<pipework>
apeiros: Please more hashtaggotry
<a_>
workmad3: for instance, once you've turtled down, how do you easily know which spec to return to
<workmad3>
a_: if your stack is so deep that you can't remember that, you've cut your layers too thinly, IMO :P
<pipework>
a_: When you feel like you've implemented whatever you need to satisfy the higher level tests.
RaCx has joined #ruby
<havenwood>
miah: mhmm, though he needs to update MiniTest to sparkly new Minitest
Px12 has quit [Max SendQ exceeded]
<havenwood>
save that keystroke
<workmad3>
havenwood: you mean you don't use the pinky of your other hand to hit shift?
seamon has quit [Quit: Zzzzzzz]
<apeiros>
workmad3: *sigh*, the part about the book was polemic. that rspec has much higher knowledge requirements than minitest however is not.
<apeiros>
(and the book part *obviously* built up on that)
<pipework>
You need to learn the interface and usage of any tool.
<a_>
Obviously it's not the canonical TDD source, but there's clearly contention on that issue
<havenwood>
workmad3: now i'm self conscious and i can't tell which pinky i'd use for "t"
<havenwood>
i think right pinky
<havenwood>
or left, no gah
<pipework>
a_: There's any number of possible ways to write your tests. TDD just says to do it.
<havenwood>
but which pinky should we use to capitalize 't'???
cocotton has joined #ruby
cocotton has quit [Remote host closed the connection]
<workmad3>
havenwood: I use my left pinky to capitalize t... but if you're on qwerty, you should use your right ;)
sambao21 has quit [Quit: Computer has gone to sleep.]
wallerdev has quit [Ping timeout: 252 seconds]
<havenwood>
:O
cocotton has joined #ruby
<atmosx>
...
<atmosx>
aloha girls
<workmad3>
apeiros: is the 'higher knowledge requirement' because you happened to already be familiar with asserts from an xUnit framework in another language, perchance? :P
IrishGringo has quit [Ping timeout: 245 seconds]
qmfnp has joined #ruby
<sevvie>
/quit
<apeiros>
pipework: lets see… 9000 tags for rspec on stackoverflow, 400 for minitest. sure, not conclusive, but a clear indicator.
sevvie has quit [Quit: leaving]
momomomomo has quit [Ping timeout: 240 seconds]
<apeiros>
workmad3: ^
<pipework>
apeiros: Your science is weak.
<a_>
I might skim over growing object oriented software with tests
<havenwood>
pipework: so you consider test first development to be only one type of TDD? seems some folk mean test first by TDD and others just mean test.
momomomomo has joined #ruby
<pipework>
0 tags for my library on stackoverflow, and a billion for Rails.
<apeiros>
pipework: awesome, then it'll be easy to counter it
<pipework>
My library > rails
<a_>
I'm at a point where I don't feel like I need to sit through a whole book on it, but maybe be guided by new patterns to try out
cirn0 has joined #ruby
<pipework>
havenwood: I personally practice test-first, but acknowledge that other forms of TDD exist.
seamon has quit [Client Quit]
Hobogrammer has joined #ruby
<a_>
pipework: there are non-test-first forms of TDD? 0_o
superscott[8] has joined #ruby
<havenwood>
i test. ;P
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<havenwood>
the when part is murky
fsapo has joined #ruby
fabrice31 has joined #ruby
<pipework>
a_: word on the street, yeah
robustus has quit [Ping timeout: 250 seconds]
<a_>
pipework: sounds like the tests are backseat drivers!
<workmad3>
apeiros: counter-question - do you have stats on the relative size of inexperienced users (the type likely to hit up SO) between minitest and rspec?
GriffinHeart has quit [Ping timeout: 276 seconds]
<havenwood>
a_: you can test first, test last, or test somewhere in the middle
<pipework>
Can we all agree that we have opinions and no real data?
jezeniel has quit [Read error: Connection reset by peer]
<pipework>
test sparsely!
<apeiros>
workmad3: no. but I doubt it's a diff of x20. especially since minitest has been a long-time stdlib part
shredding has quit [Quit: shredding]
<a_>
havenwood: you can, but the tests aren't exactly "driving" anything if they're not in the front
<pipework>
test passive-aggressively
rbenv has quit [Ping timeout: 252 seconds]
<pipework>
a_: You do know most cars have the ability to drive in reverse, right?
<havenwood>
a_: fine, hammock driven development with test coverage
Px12 has joined #ruby
<pipework>
havenwood: hamhock driven development: Trying to write code during Thanksgiving.
<a_>
pipework: don't screw up my pretty little mind with strange analogies like that
wallerdev has joined #ruby
<apeiros>
man, I hate how evidence in english is used for both, indication/lead and proof…
seamon has joined #ruby
alexcp has quit [Quit: Bye!]
<workmad3>
apeiros: I'd happily accept it was x20 considering that both the hartl book and rails 3 in action (dunno about r4ia) use rspec
ht__th has quit [Ping timeout: 276 seconds]
<a_>
For what it's worth, I think once you've practiced TDD for long enough, and you naturally write testable code, it becomes very possible to test retroactively
claymore has quit [Quit: Leaving]
<pipework>
It does, but it pisses you off to no end.
<a_>
And I think doing so can actually be faster
Px12 has quit [Max SendQ exceeded]
<pipework>
Then you leave work and drink until you can't form sentences, let alone tests.
ht__th has joined #ruby
clov3r has quit []
<pipework>
a_: It's always easy to write tests for code you've just written.
<apeiros>
workmad3: could search github
<pipework>
This thing should do exactly what I told it to.
<apeiros>
workmad3: I'm too lazy to come up with proper counting searches, tho
<pipework>
I'd guess that there's 50 rspec users for every minitest user.
cirn0 has quit [Ping timeout: 255 seconds]
Guest90805 has quit [Remote host closed the connection]
<workmad3>
apeiros: heh :)
<a_>
pipework: I'm not sure your younger, inexperienced self would have agreed, before having TDD practice
shredding has joined #ruby
<pipework>
I prefer minitest simply because it's ruby.
bayed has quit [Quit: Connection closed for inactivity]
<a_>
pipework: before TDD, I didn't sufficiently use dependency injection etc. - but now I've learned to
<workmad3>
a_: pipework *is* his younger, inexperienced self :P
<pipework>
a_: You've never backfilled tests for old tests?
<pipework>
I mean for old code.
<workmad3>
characterisation tests ftw!
<pipework>
I'm the more skeptical version of myself.
<apeiros>
workmad3: ruby-toolbox download stats say 2:1 (rspec:minitest). not entirely fair due to minitest being in stdlib for quite a while. so IMO diff is probably even smaller.
<havenwood>
pipework: It wont be in 2.2.0.
<a_>
pipework: if the old code has been written by myself/someone who has done plenty of TDD, sure
fabrice31 has quit [Ping timeout: 276 seconds]
<workmad3>
apeiros: right... but I'm not particularly interested in total usage ;)
<a_>
pipework: my point was basically that without TDD experience, someone doesn't write testable code that they can retroactively test
<havenwood>
Minitest is quite popular. Though yeah, sure, RSpec more so.
nickjj has quit [Read error: Connection reset by peer]
<pipework>
a_: Writing testable code is a smell.
<apeiros>
workmad3: so even if we used that as an indicator, it'd still be 10:1 in questions on SO
robustus has joined #ruby
<a_>
pipework: and that *with*, it becomes less necessary to write those tests firsts
<a_>
pipework: wat
<pipework>
Code paths are testable things.
<workmad3>
apeiros: I was asking about the type of users likely to run to SO with some simple question about rspec... the newcomers to both testing and ruby ;)
<havenwood>
easy enough to scan the Githubs for Minitest vs RSpec projects
<a_>
pipework: some code paths are less testable than others
<pipework>
a_: No they aren't.
<apeiros>
workmad3: that's so subjective I can't even properly phrase how unanswerable that question is :-p
paulfm has quit []
<a_>
pipework: you think every code path is created equally in how easy it is to test ?
<pipework>
All are testable, though some may be harder to reach.
<a_>
pipework: there we go
<pipework>
Write simple code, write simple tests.
<havenwood>
Stop writing bugs and you can drop the tests.
<apeiros>
workmad3: I could interpret the question as "SO just has so many rspec questions because all the *good* devs use minitest" :D
<workmad3>
apeiros: right... which is why I was trying to put it onto firmer footing by pointing out that two of the main intros to rails use rspec over minitest
<pipework>
Drink better alcohol.
<havenwood>
Just be perfect.
<pipework>
Wash behind your ears.
<workmad3>
apeiros: when was the last time you wrote an SO question? ;)
<havenwood>
I think Matz is a recent convert to test-last development.
<apeiros>
workmad3: luckily most questions I'd have written on SO already had been asked
w3pm has joined #ruby
<pipework>
havenwood: Why do you say that?
nickjj has joined #ruby
<apeiros>
and I think I queried SO 3x today alone :)
<havenwood>
pipework: He said so in an interview. He was asked what he thought of DHH's test-first is dead.
<pipework>
havenwood: he?
<pipework>
Oh Matz, I read Metz
yeboot has quit [Ping timeout: 268 seconds]
<pipework>
Also, I'm illiterate.
<havenwood>
pipework: Response was something about never having grokked test-first but being a convert to tests.
<havenwood>
pipework: ahh
<pipework>
Also, Matz prefers #key? over #has_key? so...
<havenwood>
pipework: No, that would be more shocking!
mistergibson has joined #ruby
Mars___ has quit [Remote host closed the connection]
cocotton has quit [Remote host closed the connection]
<havenwood>
pipework: do you has key?
<pipework>
havenwood: I haz key
<havenwood>
pipework: that'd work
Px12 has joined #ruby
<havenwood>
#haz_key? or #have_key?
Mars___ has joined #ruby
mocfive has quit [Remote host closed the connection]
<drusepth>
No problem, just talking with someone who's saying the variables returned by Thread.current are globally shared among all parts of the thread
<drusepth>
as opposed to the scoped object you'd see in e.g. python
MatthewsFace has joined #ruby
drawingthesun has quit [Ping timeout: 250 seconds]
spicerack has quit [Client Quit]
IrishGringo has joined #ruby
hypnosb has quit [Ping timeout: 250 seconds]
<shevy>
bettycla1p in the official ruby source, the bindings to openssl can be found in ext/openssl
MatthewsFace has quit [Client Quit]
elaptics is now known as elaptics`away
<shevy>
bettycla1p that error seems bogus - there is no gem called openssl, so something must give you a false report
dyreshark has joined #ruby
bluenemo_ has joined #ruby
chihhsin has quit [Ping timeout: 260 seconds]
hellangel7 has quit [Remote host closed the connection]
grokdancer has joined #ruby
cndiv has quit [Ping timeout: 260 seconds]
chihhsin has joined #ruby
timonv_ has joined #ruby
tjbiddle has quit [Quit: tjbiddle]
workmad3 has quit [Ping timeout: 245 seconds]
Bumptious has joined #ruby
cocotton has quit [Remote host closed the connection]
bluenemo has quit [Ping timeout: 240 seconds]
<zenspider>
drusepth: Thread.current doesn't return variables. it returns a thread instance
geggam_ has joined #ruby
<zenspider>
that object has hash-like access, ie [] and []= are defined
cocotton has joined #ruby
cocotton has quit [Remote host closed the connection]
OffTheRails has joined #ruby
ta has quit [Ping timeout: 276 seconds]
<zenspider>
"globally shared among all parts of the thread" is a misnomer. that's like saying hash values are globally shared
cocotton has joined #ruby
<zenspider>
anyone with access to the object can grab a value via a key. that's the point of it.
gsd has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
narph has quit [Quit: Connection closed for inactivity]
shock_one has joined #ruby
<wasamasa>
zenspider: I wish I'd found this one earlier, thanks to it I found out you can find an element by search of node contents
<wasamasa>
zenspider: which is a lot less bothersome than figuring out the right selector if namespaces or other atrocities are involved
ta has joined #ruby
<zenspider>
hah
BlkDynmt has joined #ruby
<wasamasa>
came in handy for parsing a facebook page
d4nku has quit [Quit: leaving]
danijoo has quit [Read error: Connection reset by peer]
<wasamasa>
you wouldn't believe what these guys do to protect themselves against scraping :P
rockdon_ is now known as rockdon|away
danijoo has joined #ruby
rockdon|away is now known as rockdon_
<zenspider>
hah
superscott[8] has quit [Remote host closed the connection]
fabrice31 has quit [Ping timeout: 268 seconds]
yfeldblum has quit [Ping timeout: 246 seconds]
d4nku has joined #ruby
sevvie has joined #ruby
renderfu_ has quit [Remote host closed the connection]
mferrier_ has joined #ruby
bmurt has quit []
yfeldblu_ has quit [Ping timeout: 272 seconds]
mark_locklear has quit [Ping timeout: 240 seconds]
w1xz has joined #ruby
<bettycla1p>
I'm pretty stuck with this (looked at various google pages but no luck): it's a NoMethodError saying "/usr/lib/ruby/gems/1.8/gems/rest_client-1.7.3/lib/restclient/request.rb:151:in `transmit': undefined method `ssl_version=' for #<Net::HTTP..."
<bettycla1p>
(I'm not a rubyist, unfortunately..)
GriffinHeart has joined #ruby
zmartAzz has quit [Remote host closed the connection]
sparrovv has quit [Remote host closed the connection]
maestrojed has joined #ruby
sparrovv has joined #ruby
sivam has joined #ruby
fabrice31 has quit [Ping timeout: 264 seconds]
sparrovv has quit [Read error: Connection reset by peer]
faefadf has quit [Quit: Page closed]
sparrovv has joined #ruby
apeiros has quit [Remote host closed the connection]
apeiros has joined #ruby
GoFan has quit [Quit: Bye!]
<bricker`work>
This is a weird problem: Apparently rspec's 'let' will assign the variable to nil if you're assigning the variable yourself *anywhere* in your test
Juanchito has quit [Quit: Connection closed for inactivity]
Patteh has quit [Remote host closed the connection]
Patteh has joined #ruby
jottr has quit [Ping timeout: 272 seconds]
Px12 has joined #ruby
Vitor has quit [Ping timeout: 252 seconds]
failshell has joined #ruby
lw has quit [Quit: s]
w09x has joined #ruby
MCDev has joined #ruby
pandaant has quit [Remote host closed the connection]
marr has quit [Ping timeout: 240 seconds]
pkrnj has joined #ruby
olivier_bK has quit [Ping timeout: 260 seconds]
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
_shrine has joined #ruby
saarinen has quit [Quit: saarinen]
axsuul has quit [Ping timeout: 272 seconds]
pkrnj has quit [Client Quit]
axsuul has joined #ruby
St_Marx has quit [Quit: Ex-Chat]
spider-mario has quit [Read error: Connection reset by peer]
_cake has quit [Ping timeout: 240 seconds]
lsone has joined #ruby
failshell has quit []
Bumptious has joined #ruby
yfeldblu_ has joined #ruby
charliesome has joined #ruby
St_Marx has joined #ruby
yfeldblum has quit [Ping timeout: 272 seconds]
dorei has joined #ruby
chipotle has joined #ruby
axl_ has joined #ruby
aleatorik has joined #ruby
axl_ has quit [Client Quit]
tokik has quit [Ping timeout: 240 seconds]
saarinen has joined #ruby
Guest92066 has joined #ruby
<Guest92066>
Hi guys - little TDD-related question; "don't mock what you don't own"
<Guest92066>
That principle requires you to create an adapter over the external interface, so you can mock that instead
snath has quit [Ping timeout: 246 seconds]
<Guest92066>
But how can you test the adapter you've made, itself, without mocking the external interface, ultimately?
planetbo_ has joined #ruby
InhalingPixels has joined #ruby
<miah>
you test that the adapter works with the defined inputs and produces the correct outputs
<miah>
and then you hope the interface doesnt change =)
<Guest92066>
miah: sounds a lot like mocking the external interface :)
<miah>
no
mikecmpbll has quit [Quit: i've nodded off.]
<miah>
because youre not mocking the internals of that external interface
britneywright has joined #ruby
<Guest92066>
miah: mocking's only ever used for the externals of an interface, though, right?
<Guest92066>
(I don't know what mocking the internals of an external interface even means!)
<miah>
sure; but you dont have to actual do processing to represent that external interface
emocakes__ has quit [Ping timeout: 245 seconds]
<miah>
eg; if you are connecting to a web server. you wouldn't mock the web server. you'd mock that you can connect to a thing; and that when the thing responds with 'foo' that you can handle that
<miah>
the 'thing' becomes an abstraction and any 'thing' that looks similar should work
<gr33n7007h>
how can I make "\x80\x00\x00\x00\xFF\xFF\xFF" into "80:00:00:00:ff:ff" ?
<waxjar>
don't you end up with unnessecary and untested layers of adapters if you follow that principle?
<miah>
waxjar: maybe
<miah>
i havent been programming long enough to be a expert on that subject
cndiv has quit [Ping timeout: 268 seconds]
linojon has quit [Quit: linojon]
dorei has quit []
<miah>
but i would think its good effort to validate the interfaces you are connecting to
w09x has quit []
shock_one has quit [Ping timeout: 260 seconds]
Kerber0s has joined #ruby
<zenspider>
Guest92066: my rule is: mock last. test against the real thing until you shouldn't anymore. And even then have an escape valve set up so you can.
InhalingPixels has quit [Remote host closed the connection]
<Guest92066>
zenspider: contentious. :)
<miah>
i think that sounds like very valid advice
<zenspider>
pragmatic
<Guest92066>
It's the classicist vs mockist argument
GriffinHeart has joined #ruby
OffTheRails has quit [Ping timeout: 245 seconds]
<zenspider>
As a classicist, I don't mock at all. That's my rule for people who do want to mock
coldkey21 has quit [Quit: Leaving]
<Guest92066>
:)
saarinen has quit [Quit: saarinen]
<zenspider>
periodically, I stub. But `def` is my stub framework 99% of the time.
orolo has quit [Quit: This computer has gone to sleep]
<waxjar>
#define_singleton_method, ftw! :D
Azure has quit [Quit: Blue Sky Fish]
Jake232 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
yekta has joined #ruby
<zenspider>
or just def
<zenspider>
I don't know why I'd ever want to call define_singleton_method
Azure has joined #ruby
saarinen has joined #ruby
andrewjanssen has quit [Quit: Leaving...]
goodenough has quit [Remote host closed the connection]
<zenspider>
right, other than rb_define_singleton_method, but that doesn't count.
linojon has joined #ruby
<waxjar>
dunno, just preference i guess
GriffinHeart has quit [Ping timeout: 255 seconds]
<zenspider>
for what? an extra method call?
Takle has quit [Remote host closed the connection]
cirn0 has joined #ruby
<gr33n7007h>
how can I make "\x80\x00\x00\x00\xFF\xFF\xFF" into "80:00:00:00:ff:ff" ?
grokdancer has quit [Quit: Leaving.]
<waxjar>
instead of def x.bla; end i do x.define_singleton_method(:bla) { }
<siwica>
when using a hash in a function definition like "def foo(parameter_hash = {}) end" the "={}" is just cosmetic or does it serve a purpose?
<mozzarella>
siwica: it assigns a default value
<centrx>
siwica, It is a default
<zenspider>
waxjar: I know how calling a method works. just not sure why you'd want more indirection when it is built into the syntax
<zenspider>
I also don't call alias_method because alias exists.