<wedgie>
hello, i'm working with chef and frequently see loops of the form 'something.each do |foo, bar|' in examples. I can't for the life of me find the documentation for what the 'bar' actually means. Can anyone provide a link? I'm just failing at finding it somehow
ReK2 has joined #ruby
ReK2 has joined #ruby
ReK2 has quit [Changing host]
preyalone has quit [Quit: Connection closed for inactivity]
ReK2 has quit [Remote host closed the connection]
<wrkrcoop>
how do i create a class with a class variable?
ReK2 has joined #ruby
ReK2 has joined #ruby
ReK2 has quit [Changing host]
<Mirubiri>
wrkrcoop: Constant = Class.new
mdw has quit [Ping timeout: 276 seconds]
mdw has joined #ruby
flashpoint9 has quit [Remote host closed the connection]
<Mirubiri>
wedgie: what do you mean? don't you know what the word 'bar' means, or what it should contain?
flashpoint9 has joined #ruby
<wedgie>
Mirubiri: what it should contain.
<Mirubiri>
wedgie: it depends on the 'something'
<Mirubiri>
on what something yields
rcvalle has quit [Quit: rcvalle]
Danny_ has quit []
RegulationD has quit [Remote host closed the connection]
macsteps has quit [Remote host closed the connection]
<Mirubiri>
oh wedgie
<Mirubiri>
sitename and data
flashpoint9 has quit [Ping timeout: 250 seconds]
<Mirubiri>
sitename i guess is the url of the site, and 'data' is a hash containing some information about that site
<Mirubiri>
like the 'port'
flashpoint9 has joined #ruby
<Mirubiri>
node yields sitename and data, and that's the way to extract that info
<wedgie>
... i think i'm being unclear in my question. From the context i can kinda see what's happening, but i'm unsure of the semantics of the ruby syntax. I'd like to understand better what ruby is actually doing. I see .each do |foo| all over the place, but no docs for when there is a second item inside the pipes e.g., |foo, bar|
<wedgie>
Mirubiri: ok, so check my understanding: the .each in this case is returning a hash and the key is being put into sitename, and the value (which appens to be an array(?)) is put into data?
ReK2 has joined #ruby
ReK2 has quit [Changing host]
ReK2 has joined #ruby
flashpoint9 has quit [Remote host closed the connection]
flashpoint9 has joined #ruby
<Mirubiri>
wedgie: nope, it is returning two variables, an url and a hash
<wedgie>
i apologize if this is getting chef-specific, but what kind of structure is being defined here: default["lamp-stack"]["sites"]["example.com"] = { "port" => 80, "servername" => "example.com", "serveradmin" => "webmaster@example.com" }
<wedgie>
cause it looks like it's treating "example.com" as sitename, and then port, servername, etc as some sort of hash in "data"
<Mirubiri>
wedgie: in this case default looks like a hash of hashes
AndrewIsHere has quit [Remote host closed the connection]
AndrewIsHere has joined #ruby
cd-rum_ has joined #ruby
antgel has joined #ruby
cd-rum has quit [Ping timeout: 272 seconds]
ghr has joined #ruby
User458764 has quit [Ping timeout: 260 seconds]
xall_ has quit [Read error: Connection reset by peer]
xall_ has joined #ruby
AndrewIsHere has quit [Ping timeout: 250 seconds]
flashpoint9 has joined #ruby
SilverKey has quit [Quit: Halted.]
ghr has quit [Ping timeout: 240 seconds]
enterprisey has joined #ruby
cyphase has quit [Ping timeout: 240 seconds]
CloCkWeRX has joined #ruby
User458764 has joined #ruby
ghr has joined #ruby
antgel has quit [Ping timeout: 258 seconds]
zeroDi has quit [Quit: WeeChat 1.5]
RegulationD has joined #ruby
cyphase has joined #ruby
saneax is now known as saneax_AFK
zacstewart has quit [Ping timeout: 250 seconds]
karapetyan has joined #ruby
zacts has joined #ruby
blackgoat has quit [Ping timeout: 244 seconds]
RegulationD has quit [Ping timeout: 272 seconds]
karapetyan has quit [Ping timeout: 240 seconds]
ghr has quit [Ping timeout: 240 seconds]
moeabdol3 has joined #ruby
<Radar>
?offtopic MOgolid
<ruby[bot]>
MOgolid: this seems to be off-topic. Please move your discussion to #ruby-offtopic, to keep this channel free for Ruby related problems. Thanks!
A_Drone has joined #ruby
ghr has joined #ruby
nankyokusei has joined #ruby
Bira has quit [Quit: Leaving]
moeabdol3 has quit [Ping timeout: 240 seconds]
rodorgas has joined #ruby
iceden has quit [Ping timeout: 276 seconds]
ghr has quit [Ping timeout: 240 seconds]
nankyokusei has quit [Ping timeout: 240 seconds]
jenrzzz has quit [Ping timeout: 272 seconds]
Walter-4 has quit [Remote host closed the connection]
A_Drone has quit [Remote host closed the connection]
hellcode has joined #ruby
ghr has joined #ruby
arescorpio has joined #ruby
memorasus has quit [Ping timeout: 258 seconds]
jaguarmagenta has quit [Remote host closed the connection]
jaguarmagenta has joined #ruby
A_Drone has joined #ruby
ghr has quit [Ping timeout: 240 seconds]
cdg has quit [Remote host closed the connection]
cdg has joined #ruby
blackmesa has joined #ruby
jaguarmagenta has quit [Ping timeout: 240 seconds]
hutch34 has joined #ruby
coyo has quit [Read error: Connection reset by peer]
ghr has joined #ruby
cdg has quit [Ping timeout: 276 seconds]
singalaut has joined #ruby
blackmesa has quit [Ping timeout: 240 seconds]
flashpoint9 has quit [Remote host closed the connection]
roamingdog has quit [Read error: Connection reset by peer]
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
MOgolid has quit [Quit: Leaving]
jsdfkl has joined #ruby
SilverKey has joined #ruby
jsdfkl is now known as NorstaR
ghr has quit [Ping timeout: 240 seconds]
xall_ has quit [Ping timeout: 272 seconds]
roamingdog has joined #ruby
techietrash has quit [Quit: Bye! <(^_^<)]
techietrash has joined #ruby
underplank has joined #ruby
sdothum has joined #ruby
paradisaeidae_ has joined #ruby
ghr has joined #ruby
A_Drone has quit [Ping timeout: 272 seconds]
nettoweb has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
A_Drone has joined #ruby
xall_ has joined #ruby
ekinmur has joined #ruby
underplank has quit [Quit: underplank]
AndrewIsHere has joined #ruby
GNUYawk has quit [Quit: GNUYawk]
A_Drone_ has joined #ruby
A_Drone has quit [Ping timeout: 240 seconds]
SilverKey has quit [Quit: Halted.]
hellcode has quit [Ping timeout: 240 seconds]
ghr has quit [Ping timeout: 240 seconds]
A_Drone_ has quit [Read error: Connection reset by peer]
AndrewIsHere has quit [Ping timeout: 250 seconds]
A_Drone has joined #ruby
JeanCarloMachado has quit [Ping timeout: 276 seconds]
zacstewart has joined #ruby
ghr has joined #ruby
hellcode has joined #ruby
c355e3b has quit [Quit: Connection closed for inactivity]
ghr has quit [Ping timeout: 240 seconds]
zacstewart has quit [Ping timeout: 276 seconds]
xall_ has quit [Read error: Connection reset by peer]
<shevy>
perhaps via mruby there may be some new interest in a ruby OS again
<shevy>
until then I guess the best, simplest and most sustainable way would be to write as much ruby code as possible and enable whatever may be useful in a modular, lego-brick like fashion
saneax_AFK is now known as saneax
<leea>
oh i meant open source, not operating system
<shevy>
aha
<shevy>
now that will have a lot more projects that may need help
<shevy>
leea btw if you can not find any project to add code to, it may also be useful if you will test some promising projects and supply feedback to the author - that one of course depends on an author willing to listen too, before you can do so, otherwise it may be wasted effort
bokayio has quit [Read error: Connection reset by peer]
Madplatypus has quit [Quit: Connection closed for inactivity]
<leea>
is there an index of these projects?
<shevy>
hmmm
<shevy>
I don't think so in the sense of an index or a page where you can see which projects may need help
<shevy>
perhaps scanning on https://www.ruby-toolbox.com/ may be useful, in particular for when projects are semi-popular and semi-active or more than that
blackmesa has joined #ruby
A_Drone has quit [Read error: Connection reset by peer]
A_Drone has joined #ruby
bokayio has joined #ruby
ghr has quit [Ping timeout: 240 seconds]
saneax is now known as saneax_AFK
AndrewIsHere has joined #ruby
LoneHermit has joined #ruby
blackmesa has quit [Ping timeout: 252 seconds]
A_Drone has quit [Read error: Connection reset by peer]
A_Drone has joined #ruby
astrobun_ has quit [Remote host closed the connection]
alfiemax has quit [Ping timeout: 272 seconds]
astrobun_ has joined #ruby
ghr has joined #ruby
LoneHermit has quit [Ping timeout: 252 seconds]
Es0teric has quit [Quit: Computer has gone to sleep.]
enterprisey has quit [Ping timeout: 250 seconds]
AndrewIsHere has quit [Remote host closed the connection]
<shevy>
I don't know the data structure and objects used there, but perhaps via .select
rodfersou has quit [Quit: leaving]
Guest60828 has joined #ruby
ekinmur has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mattwashere has quit [Ping timeout: 260 seconds]
vdamewood has quit [Quit: Life beckons.]
ghr has quit [Ping timeout: 240 seconds]
connor_goodwolf has quit [Ping timeout: 244 seconds]
skweek has joined #ruby
drtwo has left #ruby [#ruby]
connor_goodwolf has joined #ruby
CloCkWeRX has quit [Remote host closed the connection]
CloCkWeRX has joined #ruby
arescorpio has quit [Quit: Leaving.]
ghr has joined #ruby
yadobujo has joined #ruby
hk238 has joined #ruby
daffy_duck_2 has joined #ruby
djbkd has joined #ruby
RegulationD has joined #ruby
daffy_duck has quit [Ping timeout: 240 seconds]
ghr has quit [Ping timeout: 240 seconds]
wald0 has quit [Ping timeout: 250 seconds]
skweek has quit [Ping timeout: 252 seconds]
ewilliam has joined #ruby
RegulationD has quit [Ping timeout: 250 seconds]
xall_ has joined #ruby
ghr has joined #ruby
zacstewart has joined #ruby
A_Drone has quit [Read error: Connection reset by peer]
rumia has joined #ruby
araujo__ has quit [Quit: Leaving]
devbug has joined #ruby
ghr has quit [Ping timeout: 240 seconds]
postmodern has quit [Quit: Leaving]
zacstewart has quit [Ping timeout: 272 seconds]
chequers has left #ruby [#ruby]
whathappens has joined #ruby
Hyuk has joined #ruby
astrobu__ has joined #ruby
saneax_AFK is now known as saneax
tmtwd has quit [Ping timeout: 258 seconds]
ElFerna has quit [Ping timeout: 244 seconds]
ghr has joined #ruby
astrobun_ has quit [Ping timeout: 276 seconds]
pabs has quit [Ping timeout: 258 seconds]
dkam has joined #ruby
ghr has quit [Ping timeout: 240 seconds]
tmtwd has joined #ruby
A_Drone has joined #ruby
Mia has quit [Read error: Connection reset by peer]
skweek has joined #ruby
ReK2GnULinuX has joined #ruby
ReK2 has quit [Ping timeout: 276 seconds]
pabs has joined #ruby
ghr has joined #ruby
vuoto has joined #ruby
devbug has quit [Quit: ZZZzzz…]
rann has joined #ruby
blackmesa has joined #ruby
devbug has joined #ruby
aries_liuxueyang has quit [Ping timeout: 252 seconds]
ghr has quit [Ping timeout: 240 seconds]
aries_liuxueyang has joined #ruby
blackmesa has quit [Ping timeout: 252 seconds]
LoneHermit has joined #ruby
shinnya has joined #ruby
ghr has joined #ruby
nerium has quit [Read error: Connection reset by peer]
isberg has quit [Read error: Connection reset by peer]
nerium has joined #ruby
HammyJammy has joined #ruby
l4v2 has quit [Quit: l4v2]
LoneHermit has quit [Ping timeout: 252 seconds]
JammyHammy has quit [Ping timeout: 258 seconds]
AndrewIsHere has joined #ruby
dminuoso has joined #ruby
ghr has quit [Ping timeout: 240 seconds]
AndrewIsHere has quit [Ping timeout: 250 seconds]
Hyuk has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ghr has joined #ruby
Hyuk has joined #ruby
<leea>
shevy I'm looking into fpm, do you use it?
Es0teric has joined #ruby
ur5us has quit []
hutch34 has quit [Ping timeout: 276 seconds]
harfangk has joined #ruby
skweek has quit [Ping timeout: 240 seconds]
ghr has quit [Ping timeout: 240 seconds]
HammyJammy has quit [Ping timeout: 240 seconds]
Hyuk has quit [Client Quit]
strongcode has quit [Ping timeout: 244 seconds]
Hyuk has joined #ruby
A_Drone has quit [Read error: Connection reset by peer]
yfeldblum has quit [Remote host closed the connection]
Silthias has joined #ruby
ghr has joined #ruby
armyriad has quit [Read error: Connection reset by peer]
armyriad has joined #ruby
alfiemax has joined #ruby
Beverage has joined #ruby
yadobujo has quit [Remote host closed the connection]
Hyuk has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dminuoso has quit [Ping timeout: 240 seconds]
enterprisey has quit [Quit: Leaving]
Sucks has joined #ruby
roamingdog has joined #ruby
ghr has quit [Ping timeout: 240 seconds]
Wsewolod has quit [Ping timeout: 258 seconds]
Silthias1 has joined #ruby
Silthias has quit [Ping timeout: 240 seconds]
whathappens has quit [Remote host closed the connection]
whathappens has joined #ruby
skweek has joined #ruby
ghr has joined #ruby
craigp has joined #ruby
A_Drone has joined #ruby
Hyuk has joined #ruby
Technodrome has joined #ruby
wald0 has joined #ruby
vuoto has quit [Remote host closed the connection]
whathappens has quit [Ping timeout: 250 seconds]
nankyokusei has joined #ruby
Hyuk has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ghr has quit [Ping timeout: 240 seconds]
Cohedrin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
wrkrcoop has joined #ruby
A_Drone has quit [Read error: Connection reset by peer]
<wrkrcoop>
how can i go about getting audio from a user using ruby?
<wrkrcoop>
i want to write a function that turns on the mic and lets the user record something
nankyokusei has quit [Ping timeout: 258 seconds]
ghr has joined #ruby
Sashimi has joined #ruby
Mon_Ouie has quit [Ping timeout: 264 seconds]
yeticry has quit [Quit: leaving]
yeticry has joined #ruby
wrkrcoop has quit [Quit: wrkrcoop]
lxsameer has joined #ruby
Mirubiri has quit [Quit: Mirubiri]
futilegames has joined #ruby
futilegames has quit [Client Quit]
A_Drone has joined #ruby
ghr has quit [Ping timeout: 240 seconds]
Sashimi has quit [Client Quit]
nerium has quit [Ping timeout: 240 seconds]
Sashimi has joined #ruby
futilegames has joined #ruby
djbkd has quit [Quit: My people need me...]
aupadhye has joined #ruby
Sashimi has quit [Client Quit]
futilegames has quit [Client Quit]
Hyuk has joined #ruby
Sashimi has joined #ruby
ghr has joined #ruby
A_Drone has quit [Ping timeout: 260 seconds]
nerium has joined #ruby
blackmesa has joined #ruby
edwinvdgraaf has quit [Remote host closed the connection]
Sashimi has quit [Client Quit]
ninjaaron has joined #ruby
Sashimi has joined #ruby
davedev2_ has joined #ruby
Hyuk has quit [Client Quit]
futilegames has joined #ruby
futilegames has left #ruby [#ruby]
fredolinhares has quit [Quit: WeeChat 1.5]
ghr has quit [Ping timeout: 240 seconds]
tmtwd has quit [Ping timeout: 240 seconds]
<ninjaaron>
Quick question about the ruby data model: Is it like Python, where every name is just a reference to an anonymous object, or is it more like Perl, where variables are bound more closely to the object unless they are explicitely made to be references?
davedev24 has quit [Ping timeout: 258 seconds]
Sashimi has quit [Client Quit]
blackmesa has quit [Ping timeout: 244 seconds]
<ninjaaron>
(i.e. can you do the same shenanigans with mutible objects as in python)
dminuoso has joined #ruby
A_Drone has joined #ruby
Sashimi has joined #ruby
dionysus69 has joined #ruby
leea has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
govg has quit [Ping timeout: 276 seconds]
Hyuk has joined #ruby
<ninjaaron>
I have hardly any experience with Ruby, but my gut says it's more like everything is a reference to an anonymous object.
Sashimi has quit [Client Quit]
xall_ has quit [Ping timeout: 272 seconds]
govg has joined #ruby
<ninjaaron>
but my google-foo is bad with regards to this topic.
<harfangk>
see if this discussion answers your uery
Sashimi has joined #ruby
ghr has joined #ruby
JammyHammy has joined #ruby
jameswatling has quit []
Sashimi has quit [Client Quit]
A_Drone_ has joined #ruby
Sashimi has joined #ruby
A_Drone has quit [Read error: Connection reset by peer]
Cohedrin has joined #ruby
shinnya has quit [Ping timeout: 258 seconds]
ghr has quit [Ping timeout: 240 seconds]
<ninjaaron>
harfangk: Yes. looks like Ruby is the same as Python in this regard. The more I learn Ruby, the more I feel like it's... the same as Python; I mean, with blocks instead of comprehensions and regex literals, and more emphasis on OO design patterns.
<ninjaaron>
But a lot the same.
Dimik-- has joined #ruby
<harfangk>
haha yeah hence they're often discussed in the same context
<harfangk>
they have slightly different philosphies tho
<harfangk>
my favorite analogy is this:
xall_ has joined #ruby
c0mrad3 has quit [Quit: Connection closed for inactivity]
ericsupreme has joined #ruby
<harfangk>
if you like playing with lego, go with python; if you like playing with clay or playdough, go with ruby
<dminuoso>
As pretty as that analogy may be, it is also utterly useless.
Macaveli has joined #ruby
Mon_Ouie has joined #ruby
<dminuoso>
ninjaaron: Can you elaborate on your initial question?
blaxter has joined #ruby
<ninjaaron>
I feel like the main philosophical difference is that python focuses on readability, where ruby focuses on writeablility (though, there is a lot of overlap in those two goals)
<ninjaaron>
dminuoso: I think I understand now.
<ninjaaron>
I was just wondering if everything in Ruby is like a pointer, or more like a real value.
yfeldblum has joined #ruby
<ninjaaron>
Sounds like they are more like pointers.
<dminuoso>
ninjaaron: The word "reference" majorly sucks though, because its meaning depends on the context. (Java for example uses the term reference on opposite terms from C++ perspective)
<dminuoso>
It's probably better to say all variables/parameters/constants behave like pointers.
<ninjaaron>
dminuoso: yeah.
xall_ has quit [Read error: Connection reset by peer]
ghr has joined #ruby
<ninjaaron>
dminuoso: I assume that goes for class and function names as well?
<dminuoso>
ninjaaron: classes are just objects like anything else.
A_Drone_ has quit [Read error: Connection reset by peer]
A_Drone has joined #ruby
<dminuoso>
The fact that you (usually) use upper case names for them, just makes it a constant holding a class object
<dminuoso>
ninjaaron: and methods (ruby has no "functions") are a bit tricky, in a nutshell invoking a method is just object.send(:method)
yfeldblum has quit [Ping timeout: 250 seconds]
<dminuoso>
(A feat inherited from Smalltalk I believe)
ghr has quit [Ping timeout: 240 seconds]
amclain has quit [Quit: Leaving]
<dminuoso>
Methods in Ruby are not first-class functions.
<ninjaaron>
I see.
<ninjaaron>
Are there first-class functions?
pawnbox_ has joined #ruby
<dminuoso>
ninjaaron: Generally you mean?
<ninjaaron>
Uh, yes?
roamingdog has quit [Remote host closed the connection]
<ninjaaron>
Like, there must be a way to write a closure.
<ninjaaron>
I'm sure I read about it somewhere.
<dminuoso>
ninjaaron: Sure, either you use a Proc or you can build a Method from an actual method
<dminuoso>
(That last bit shows that you can actually turn Ruby methods into first-class citizens after all)
woodruffw has quit [Ping timeout: 276 seconds]
<dminuoso>
In short: There is 3 things that are not immediate objects. Variables, blocks and methods.
pawnbox has quit [Ping timeout: 260 seconds]
<ninjaaron>
Ok, so it is a bit different from Python in that way.
mistermocha has joined #ruby
<ninjaaron>
(Sorry for thinking about everything in terms of Python)
<dminuoso>
ninjaaron: Though the Ruby way uses blocks generally for closures - which is its trademark.
moeabdol has joined #ruby
<dminuoso>
for example: array.map { |e| e * 2 }
ghr has joined #ruby
A_Drone has quit [Read error: Connection reset by peer]
RegulationD has joined #ruby
<ninjaaron>
I see. Blocks are something I'm still figuring out. I know some cases where you use them, but I wouldn't say I grok them. Probably needs more practice.
<dminuoso>
ninjaaron: Once you get the hang out of them they become quite natural. It's a fairly elegant solution at inline lambdas basically.
<dminuoso>
One that is readable, writeable and chainable!
<ninjaaron>
I do have a penchant for chainable code structures. I'm all into shell pipes, and I sort of wish everything worked that way. Streem looks like a very exciting concept to me.
RegulationD has quit [Ping timeout: 264 seconds]
<havenwood>
|> \o/
<dminuoso>
>> [1,2,3,4,5,6,7,8,8].select { |e| e % 2 == 0 }.map { |e| e * 2 }.any? { |e| e > 10 }
A_Drone has quit [Read error: Connection reset by peer]
KnownSyntax has quit [Ping timeout: 272 seconds]
aryaching has quit [Ping timeout: 250 seconds]
zacstewart has joined #ruby
UserInNeed has joined #ruby
dminuoso_ has joined #ruby
<dminuoso_>
Still have to get used to having so much free WiFi on trains. :-)
woodruffw has joined #ruby
woodruffw has quit [Excess Flood]
firstdayonthejob has joined #ruby
woodruffw has joined #ruby
ninjaaron has quit [Quit: WeeChat 1.5]
ghr has joined #ruby
dminuoso has quit [Ping timeout: 260 seconds]
<dminuoso_>
ninjaaron: The way that Ruby works with blocks and other things also easily allows for DSLs to be implemented, if that is your sort of things.
yfeldblum has joined #ruby
conta has joined #ruby
Sashimi has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
zacstewart has quit [Ping timeout: 260 seconds]
A_Drone has joined #ruby
Sashimi has joined #ruby
ghr has quit [Ping timeout: 240 seconds]
NorstaR has joined #ruby
mistermocha has quit [Remote host closed the connection]
mistermocha has joined #ruby
Sashimi has quit [Client Quit]
Sashimi has joined #ruby
dionysus69 has quit [Ping timeout: 250 seconds]
blackgoat has joined #ruby
PaulCapestany has quit [Read error: Connection reset by peer]
Sashimi has quit [Client Quit]
mistermocha has quit [Ping timeout: 250 seconds]
NorstaR has quit [Ping timeout: 272 seconds]
ghr has joined #ruby
Sashimi has joined #ruby
ur5us has joined #ruby
PaulCapestany has joined #ruby
Sashimi has quit [Client Quit]
roamingdog has quit []
Guest95553 has quit [Ping timeout: 276 seconds]
Sashimi has joined #ruby
dionysus69 has joined #ruby
nuck has joined #ruby
firstdayonthejob has quit [Ping timeout: 272 seconds]
mark_66 has joined #ruby
nuck is now known as Guest39581
Sucks has quit [Ping timeout: 264 seconds]
AlexJakeGreen has joined #ruby
MikeIon has joined #ruby
Sashimi has quit [Client Quit]
Sashimi has joined #ruby
jishankai has joined #ruby
ghr has quit [Ping timeout: 240 seconds]
Sashimi has quit [Client Quit]
TomyWork has joined #ruby
blackmesa has joined #ruby
Sashimi has joined #ruby
AlexJakeGreen has quit [Quit: This computer has gone to sleep]
dminuoso_ has quit [Remote host closed the connection]
paradisaeidae_ has left #ruby [#ruby]
thoraxe has quit [Ping timeout: 240 seconds]
Sashimi has quit [Client Quit]
nerium has quit [Ping timeout: 264 seconds]
Sashimi has joined #ruby
LoneHermit has joined #ruby
AlexJakeGreen has joined #ruby
blackmesa has quit [Ping timeout: 240 seconds]
skweek has quit [Ping timeout: 240 seconds]
ghr has joined #ruby
Sashimi has quit [Client Quit]
atom_ has joined #ruby
Sashimi has joined #ruby
miskatonic has joined #ruby
LoneHermit has quit [Ping timeout: 250 seconds]
edwinvdgraaf has joined #ruby
anisha has joined #ruby
ghr has quit [Ping timeout: 240 seconds]
Sashimi has quit [Client Quit]
AndrewIsHere has joined #ruby
Sashimi has joined #ruby
LoneHerm_ has joined #ruby
livcd has joined #ruby
dminuoso has joined #ruby
ur5us has quit [Remote host closed the connection]
<livcd>
Hi guys. Why do you think Rubymotion is not more popular ?
finnnnnnnnnnn has joined #ruby
finnnnnnnnnnn has quit [Client Quit]
c0mrad3 has joined #ruby
ejnahc has quit [Ping timeout: 264 seconds]
Sashimi has quit [Client Quit]
ejnahc has joined #ruby
A_Drone_ has joined #ruby
ghr has joined #ruby
A_Drone has quit [Read error: Connection reset by peer]
<ICantCook>
does that use Ruboto?
AndrewIsHere has quit [Ping timeout: 250 seconds]
sarlalian_ has quit [Ping timeout: 272 seconds]
Hounddog has joined #ruby
<ICantCook>
I played around with Ruboto last year. Seemed clunky having to install the Ruboto app on the phone to get my app to work
watersoul_ has quit [Remote host closed the connection]
anisha has quit [Quit: This computer has gone to sleep]
watersoul has joined #ruby
<dminuoso>
livcd: There is a long list of things that don't make it ideal, to buggy even.
Sashimi has joined #ruby
Cohedrin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sarlalian has joined #ruby
<ICantCook>
yeah, unfortunately; Ruby seems to be getting niche
<dminuoso>
livcd: Debugging RubyMotion applications is tricky and there are no tools to really help you, there are unfixed bugs where objects are GCed too early, etc.
<ICantCook>
with the lack of support in AWS Lambda, lack of ML and polished mobile support
<shevy>
sounds like a buggy software
aganov has joined #ruby
Madplatypus has joined #ruby
<dminuoso>
livcd: Another thing, it cant hide things like Cocoa from you.
<dminuoso>
For other things than quickly prototyping example software, I do not see RubyMotion to have a serious use in production apps.
A_Drone_ has quit [Read error: Connection reset by peer]
A_Drone has joined #ruby
Technodrome has quit [Ping timeout: 276 seconds]
vdamewood has joined #ruby
anisha has joined #ruby
ghr has quit [Ping timeout: 240 seconds]
raeoks has joined #ruby
A_Drone_ has joined #ruby
A_Drone has quit [Read error: Connection reset by peer]
anisha has quit [Client Quit]
<dminuoso>
jhass: Okay, I'm sold. Crystal is sexy.
anisha has joined #ruby
<dminuoso>
Overloading is what convinced me to try out Crystal now. :)
xall_ has joined #ruby
Devalo has quit [Ping timeout: 276 seconds]
ghr has joined #ruby
jaguarmagenta has quit [Remote host closed the connection]
thoraxe has joined #ruby
Mon_Ouie has quit [Ping timeout: 244 seconds]
blackmesa has joined #ruby
LoneHerm_ has quit [Remote host closed the connection]
ghr has quit [Ping timeout: 240 seconds]
<livcd>
dminuoso: Is it really that clunky ?
<dminuoso>
livcd: Id say just give it a try. There is nothing wrong with it immediately.
<jhass>
dminuoso: <3
<dminuoso>
livcd: It took Trolltech and others over 25 years to produce a cross-platform framework that works reliably and feels right. RubyMotion is extremely new, so I guess I should be careful to judge it too early.
<dminuoso>
(Qt)
ghr has joined #ruby
zacstewart has joined #ruby
solars has joined #ruby
A_Drone has joined #ruby
pawnbox_ has quit [Remote host closed the connection]
A_Drone_ has quit [Ping timeout: 252 seconds]
pawnbox has joined #ruby
antgel has joined #ruby
pawnbox has quit [Remote host closed the connection]
nankyokusei has joined #ruby
pawnbox has joined #ruby
zacstewart has quit [Ping timeout: 252 seconds]
A_Drone_ has joined #ruby
Mon_Ouie has joined #ruby
vdamewood has quit [Quit: Life beckons.]
tvw has joined #ruby
AlexJakeGreen has quit [Quit: This computer has gone to sleep]
drewo has quit [Ping timeout: 272 seconds]
A_Drone has quit [Read error: Connection reset by peer]
Devalo has joined #ruby
nankyokusei has quit [Ping timeout: 258 seconds]
A_Drone_ has quit [Read error: Connection reset by peer]
A_Drone has joined #ruby
cyphase has quit [Ping timeout: 272 seconds]
cd-rum has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ghr has quit [Ping timeout: 240 seconds]
troulouliou_div2 has joined #ruby
cyphase has joined #ruby
AlexJakeGreen has joined #ruby
ghr has joined #ruby
A_Drone has quit [Ping timeout: 252 seconds]
ericlee has joined #ruby
A_Drone has joined #ruby
k3rn31 has quit [Quit: Computer has gone to sleep.]
<al2o3-cr>
ericlee: match against string not integer
<ericlee>
al2o3-cr, so how can I fix that?
CloCkWeRX has quit [Quit: Leaving.]
<al2o3-cr>
if match == "1"
troulouliou_div2 has quit [Remote host closed the connection]
<ericlee>
oh this I have tried, does not work/
<al2o3-cr>
well then the match is not what you think it is
miskatonic has quit [Quit: miskatonic]
<ericlee>
al2o3-cr, let me show u
ghr has quit [Ping timeout: 240 seconds]
<al2o3-cr>
ok
<hanmac>
ericlee: you need to strip it first before you compare it with "1"
k3rn31 has joined #ruby
<ericlee>
hanmac, oh damn, the '\n'
<al2o3-cr>
hanmac: good call
<hanmac>
hm or use Integer() to transform it, but that might be not safe from crashs
iMadper has joined #ruby
multi_io has quit [Ping timeout: 272 seconds]
<dminuoso>
ericlee: Here is a tip: Install pry, and then drop in a binding.pry at a code position where you are getting an error or unexpected behavior from.
<dminuoso>
You can then interactively inspect the environment and related objects and try out what might be wrong with it.
<dminuoso>
(You could also do this with plain irb if you wanted)
<shevy>
like a doctor fixing patients!
multi_io has joined #ruby
blackgoat has quit [Ping timeout: 250 seconds]
ghr has joined #ruby
<peteretep>
Are there other common ways - other than `rake test` to run a test suite made up of say RSpec and Test::Unit tests?
the_drow has joined #ruby
A_Drone has quit [Read error: Connection reset by peer]
A_Drone has quit [Read error: Connection reset by peer]
A_Drone has joined #ruby
<manveru>
peteretep: you mean both at the same time?
<peteretep>
Sure
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
<manveru>
that's gonna be a bit difficult :)
<peteretep>
Why?
<manveru>
can you look at the test task?
troulouliou_div2 has quit [Ping timeout: 276 seconds]
armyriad has quit [Ping timeout: 240 seconds]
<peteretep>
I guess my question really is: "Do people always rely on `rake` to run their test suites" and the answer seems to mostly be yes
edwinvdg_ has joined #ruby
<dminuoso>
peteretep: I just use the rspec binstub, being completely ignorant about what it does.
<peteretep>
Do you do that in Jenkins, too?
<peteretep>
eg shell out to that as part of your build?
haxrbyte has quit [Read error: Connection reset by peer]
<dminuoso>
I don't do Jenkins.
biberu has joined #ruby
haxrbyte has joined #ruby
ericsupreme has quit [Quit: Leaving]
moei has quit [Quit: Leaving...]
edwinvdgraaf has quit [Ping timeout: 240 seconds]
armyriad has joined #ruby
<peteretep>
Man, Ruby is weird
<dminuoso>
peteretep: You have no idea.
* peteretep
is writing a comparative piece about Ruby/Python/Perl testing
<dminuoso>
peteretep: Most of the quirks and weirdnesses are not very apparent though.
<dminuoso>
My biggest headache came from a simple bug, where I accidentally used super instead of super().
<peteretep>
I think there's this heirachy of Python -> Perl -> Ruby, where people think "there are some cool features in that language, but it's being used by KIDS"
<peteretep>
Python is dull as all shit, but largely sensible
<peteretep>
Perl has some cool features but encourages people to be less sensible
<peteretep>
Ruby has some cooler features still, but WTF.
haxrbyte_ has joined #ruby
<dminuoso>
What WTF are you getting from Ruby?
roshanavand has joined #ruby
<peteretep>
Well the fact that there are 4 or 5 completely uninteroperable testing libraries
<dminuoso>
Most of the quirks that I have seen are contributed to historical reasons and a tendency to keep backwards compatiblity high.
<peteretep>
Python and Perl testing libraries put a large focus on interoperability
<dminuoso>
peteretep: interoperability between what?
<peteretep>
At its most basic level, let's say you've written a testing assertion that looks at - say - Levenstein distance between two strings
<peteretep>
And you can say "If differences are > 5 then fail"
<peteretep>
But you've also written some sensible debug stuff for it
<peteretep>
In Ruby, you then have to integrate that assertion differently in to each testing library
<dminuoso>
Different frameworks are used differently. I don't know what your point is.
<peteretep>
in Perl, you'd get Test::Differences::Levenstein and Perl's Cucumber library would be able to use it, Perl's Capybara equivalent would be able to use it, Perl's RSpec library would be able to use it, Perl's xUnit library would be able to use it
<dminuoso>
Would you try compiling Qt with Gtk header directories as your include directories? Probably not.
weaksauce has quit [Excess Flood]
<peteretep>
You could run a test suite using the whole thing with the single unified test runner, and get the output as JUnit or HTML or anything else
<peteretep>
Python is almost the same
haxrbyte has quit [Ping timeout: 276 seconds]
<peteretep>
That's what I mean by interoperable
<dminuoso>
peteretep: Im not sure how you see 4 or 5 testing libraries though.
kedare has joined #ruby
<dminuoso>
Realistically there is only 2 (well 3 if you count test-unit) frameworks.
<peteretep>
What do you think the 2 are?
<dminuoso>
rspec and minitest?
<peteretep>
Why wouldn't you include test-unit?
<dminuoso>
It's not widely used.
frozengeek has joined #ruby
RegulationD has joined #ruby
frozengeek has quit [Remote host closed the connection]
yeticry has quit [Read error: Connection reset by peer]
<dminuoso>
From the top off my head I can come up with only one well known project that uses it.
<manveru>
all my projects use either rspec or bacon :)
<peteretep>
Is bacon compatible with other RSpec tools?
<manveru>
no
tmtwd has joined #ruby
<dminuoso>
peteretep: bacon is a mini rspec clone.
<peteretep>
I know
<manveru>
you can make them compatible usually without much effort though
jaruga___ has joined #ruby
<peteretep>
Let's say you've written a nice test summary tool that outputs HTML
jaruga___ is now known as jaruga____
<peteretep>
If you want to use it with bacon, you have to write a special adaptor
DoubleMalt has joined #ruby
<manveru>
of course
<peteretep>
You say "of course", but that's not true for Python and Perl
<peteretep>
Which is my point :-)
A_Drone has quit [Read error: Connection reset by peer]
<manveru>
like you'd have to do if you want to use it with minitest, test::unit, or spinach...
<dminuoso>
peteretep: If you feel like this could be a useful thing, then go write some adaptor library that lets you interface with any supported framework the way you like
<peteretep>
manveru: yep
<manveru>
for the web there's rack, but no such thing exists for testing
pandaant has joined #ruby
<peteretep>
dminuoso: I suspect that ship has sailed, and there's too much code written to make it feasible
<manveru>
which is sad, but not something i've spent more than a few hours on in the past years
Dimik-- has quit [Ping timeout: 260 seconds]
LoneHerm_ has joined #ruby
edwinvdg_ has quit [Remote host closed the connection]
<peteretep>
Anyway, that's the Ruby WTF I had in mind :)
<manveru>
hehe
RegulationD has quit [Ping timeout: 260 seconds]
<peteretep>
What I have discovered is across all three languages, most developers don't really know how their testing tools work
<peteretep>
And also don't have any visibility of how the testing tools in other languages work
<manveru>
that's kinda sad indeed :|
Devalo has quit [Remote host closed the connection]
<peteretep>
Which makes this a great basis for my MSc project :D
<manveru>
maybe take a look at go and elixir testing too
<dminuoso>
peteretep: That is not a Ruby WTF.
<manveru>
they're kinda cool
<dminuoso>
peteretep: That is a library WTF.
<dminuoso>
peteretep: So place the blame where it belongs.
Couch has joined #ruby
<peteretep>
The core team who added and removed test-unit like 10 times in the last 10 years? :D
yeticry has joined #ruby
<manveru>
?
<manveru>
it's been in stdlib for as long as i can remember
<kermal>
Hi, when trying to call "Hash.new" I run into a NPE (ailure/Error: Unable to find org.jruby.ir.operands.CurrentScope.retrieve(CurrentScope.java to read failed line
<kermal>
Java::JavaLang::NullPointerException)"
<shevy>
is this a jruby problem, in this case you should try on #jruby possibly so
AndrewIsHere has joined #ruby
<kermal>
alright, thanks
DaniG2k has quit [Quit: leaving]
drewo has quit [Ping timeout: 240 seconds]
GodFather has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
AndrewIsHere has quit [Ping timeout: 250 seconds]
blackgoat has joined #ruby
anisha has joined #ruby
dstarh has joined #ruby
stardiviner has joined #ruby
edwinvdgraaf has joined #ruby
yfeldblum has quit [Ping timeout: 250 seconds]
yfeldblum has joined #ruby
dstarh has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
AlexJakeGreen has joined #ruby
stardiviner has left #ruby [#ruby]
AlexJakeGreen has quit [Client Quit]
dionysus69 has joined #ruby
jaguarmagenta has joined #ruby
kermal has quit [Quit: Leaving]
Snowy has quit [Quit: ragequit]
JeanCarloMachado has joined #ruby
mistermocha has joined #ruby
jaguarmagenta has quit [Ping timeout: 260 seconds]
blackmesa has joined #ruby
mistermocha has quit [Ping timeout: 240 seconds]
zacstewart has joined #ruby
hanmac has quit [Ping timeout: 258 seconds]
blackmesa has quit [Ping timeout: 276 seconds]
nankyokusei has joined #ruby
ur5us has quit [Remote host closed the connection]
zacstewart has quit [Ping timeout: 276 seconds]
nankyokusei has quit [Ping timeout: 250 seconds]
madgen has joined #ruby
LoneHerm_ has joined #ruby
codecop has joined #ruby
ldnunes has joined #ruby
nettoweb has joined #ruby
xall_ has quit [Ping timeout: 264 seconds]
hanmac has joined #ruby
karapetyan has joined #ruby
mdw has quit [Quit: Sleeping Zzzzz]
drewo has joined #ruby
hk238 has joined #ruby
LoneHerm_ has quit [Remote host closed the connection]
karapetyan has quit [Ping timeout: 258 seconds]
webus has quit [Quit: goodbye]
AngryBuzzy has joined #ruby
k3rn31 has quit [Quit: Computer has gone to sleep.]
ghr has quit [Ping timeout: 240 seconds]
drewo has quit [Ping timeout: 264 seconds]
umdstu has joined #ruby
ghr has joined #ruby
conta1 has joined #ruby
conta has quit [Ping timeout: 252 seconds]
conta1 is now known as conta
nando293921 has joined #ruby
AlexJakeGreen has joined #ruby
pdoherty has joined #ruby
AlexJakeGreen has quit [Client Quit]
karapetyan has joined #ruby
eizua has joined #ruby
nando293921 has quit [Ping timeout: 250 seconds]
nando293921 has joined #ruby
nando293921 has quit [Client Quit]
karapety_ has joined #ruby
AlexJakeGreen has joined #ruby
karapetyan has quit [Ping timeout: 258 seconds]
jmignault has joined #ruby
nando293921 has joined #ruby
ixti has joined #ruby
karapety_ has quit [Remote host closed the connection]
ixti has quit [Client Quit]
yfeldblum has quit [Ping timeout: 250 seconds]
karapetyan has joined #ruby
ponga has joined #ruby
synthroid has joined #ruby
AngryBuzzy has quit [Quit: This computer has gone to sleep]
<ziyan_>
Hi there. I am wondering if there is a way to assign in an if condition and use it in as a return. Ex: `a = { 'new' => 10, 'used' => 0 }; %w(new used).map{ |i| val if (val = a[i]) > 0 }`
c355e3b has joined #ruby
<shevy>
hmm
<shevy>
I have not tested it but this should work right ziyan_?
<jhass>
ziyan_: should work, weird way to write .values.select {|v| v > 0 } though
<dminuoso>
jhass: Well, it's almost the same. This will leave nil for the elements less than 0.
<dminuoso>
But I just assume that your solution is what he actually wanted.
<ziyan_>
shevy: jhass: i get this error 'undefined local variable or method `val' for main:Object' (just tried it in the console)
<dminuoso>
ziyan_: yes, that is a result of how variables are implemented in Ruby.
<dminuoso>
ziyan_: A variable is only a variable if an assignment to it appears lexigraphically first.
<jhass>
ah, right
<ziyan_>
dminuoso: makes sense, thought as much
<ziyan_>
thanks a lot
<jhass>
ziyan_: does that actually resemble your actual code though? there's likely a nicer way
<ziyan_>
jhass: that is not my actual code. i think you are saying about select, goign to give it a try
flashpoint9 has quit [Remote host closed the connection]
<chrisseaton>
Live talk, not like talk
<jhass>
ziyan_: well, if you share your actual input(s) and the desired output we might find something nice ;)
<dminuoso>
ziyan_: You can use a little trick though by specifying val to be a block parameter.
<dminuoso>
i.e. .map { |i, v| v if (v = a[i]) > 0 }
<jhass>
.map {|i; v| } rather, the way to declare block locals
<dminuoso>
chrisseaton: Expected duration?
hutch34 has joined #ruby
<ziyan_>
i was going to test it before i wrote, just was curioud
<ziyan_>
dminuoso: jhass: will give it a look, thanks
<ziyan_>
works, great!!! thanks guys
pdoherty has quit [Ping timeout: 276 seconds]
swills has quit [Ping timeout: 240 seconds]
drewo has joined #ruby
<chrisseaton>
dminuoso: 30 mins I guess
aazsdk has quit [Quit: aazsdk]
<jhass>
ziyan_: I still think it's ugly though ;)
<dminuoso>
chrisseaton: Fair enough. By the way, we talked about JIT and some project you were working on a while ago.
<dminuoso>
How is that going?
<chrisseaton>
dminuoso: had some bigger fish to fry for a while, still working on it though
<dminuoso>
Very well, Ill stay tuned then. :)
JakFrist has joined #ruby
tamole has quit [Quit: away]
cd-rum has joined #ruby
ElFerna has quit [Ping timeout: 260 seconds]
drewo has quit [Ping timeout: 252 seconds]
blackgoat has quit [Quit: WeeChat 1.5]
ledestin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Madplatypus has quit [Quit: Connection closed for inactivity]
cd-rum has quit [Client Quit]
matp has quit [Remote host closed the connection]
jmignault has quit [Read error: Connection reset by peer]
Macaveli has quit [Ping timeout: 240 seconds]
matp has joined #ruby
mattwashere has joined #ruby
alfiemax has quit [Ping timeout: 240 seconds]
karapetyan has quit [Remote host closed the connection]
troulouliou_div2 has joined #ruby
andikr has quit [Remote host closed the connection]
AndrewIsHere has joined #ruby
jishankai has quit [Ping timeout: 258 seconds]
<ziyan_>
jhass: ha ha, fortunately i didn't need it, just a `map` and a `compact`.
* jhass
still is in the select.map camp
Macaveli has joined #ruby
eljimbo has quit [Quit: This computer has gone to sleep]
<ziyan_>
this is what i ended doing... `%w(new used rent).map{ |condition, price| condition if rush.send("#{ condition }_price") > 0 }.compact`. Given an object has methods like 'new_price' 'used_price' etc... I need the 'conditions' (ex: new, used) etc which have a price > 0
<ziyan_>
jhass: ^^
<dminuoso>
ziyan_: So yes. use .select
AndrewIsHere has quit [Ping timeout: 250 seconds]
tamole has joined #ruby
<jhass>
what's with the , price?
xall_ has joined #ruby
<jhass>
%w(new used rent).select {|condition| rush.public_send("#{condition}_price") }
<jhass>
are new_price, used_price, rent_price implemented manually or backed by a hash or similar?
<ziyan_>
jhass: its a product (AR object) record.
<jhass>
%w(new used rent).select {|condition| rush["#{condition}_price"] } then
Macaveli has quit [Ping timeout: 244 seconds]
<ziyan_>
let me try,
ChiefAlexander has joined #ruby
chip_ has joined #ruby
<dminuoso>
ziyan_: It's cleaner to simply use %i(new_price used_price rent_price).select { |c| rush.public_send(c) }
troulouliou_div2 has quit [Ping timeout: 276 seconds]
<jhass>
s/public_send/[]/
<dminuoso>
Yeah.
karapetyan has joined #ruby
<dminuoso>
Either way, this weird string interpolation is unnecessary and makes it less readable.
ramortegui has joined #ruby
ericlee has quit [Ping timeout: 250 seconds]
synthroi_ has joined #ruby
xall_ has quit [Ping timeout: 260 seconds]
synthro__ has joined #ruby
karapetyan has quit [Remote host closed the connection]
karapetyan has joined #ruby
fmcgeough has joined #ruby
synthroid has quit [Ping timeout: 264 seconds]
<ziyan_>
dminuoso: Thanks, looks nice (y), learnt some new stuff today. the fields are defaulted to 0, and 0 is evaluated kind of true so had to do a comparison there. `%i(new_price used_price rent_price).select { |c| rush.public_send(c) > 0 }`
synthroi_ has quit [Ping timeout: 258 seconds]
<dminuoso>
ziyan_: Like jhass said, %w(new_price used_price rent_price).select { |c| rush[c] > 0 } is even cleaner.
codecop has quit [Remote host closed the connection]
jaguarmagenta has joined #ruby
speakingcode has joined #ruby
nerium has joined #ruby
isberg has joined #ruby
ekinmur has joined #ruby
yfeldblum has quit [Ping timeout: 250 seconds]
jaguarmagenta has quit [Ping timeout: 276 seconds]
hutch34 has quit [Ping timeout: 240 seconds]
dvinciguerra_ has joined #ruby
troulouliou_div2 has joined #ruby
Wildfyr has quit [Ping timeout: 258 seconds]
conta1 has joined #ruby
yfeldblum has joined #ruby
<dminuoso>
chrisseaton: That was a great and informative talk, thank you. Now that I have a rough idea of what graal/truffle is - I am genuinely interested.
blackmesa has joined #ruby
conta has quit [Ping timeout: 240 seconds]
conta1 is now known as conta
aegis3121 has joined #ruby
mikejw has joined #ruby
<mikejw>
mailcatcher doens't seem to run properly on port 25
<mikejw>
*doesn't
<mikejw>
I'm getting /usr/lib/ruby/2.1.0/net/smtp.rb:541:in `initialize': Connection refused - connect(2) for "127.0.0.1" port 1025 (Errno::ECONNREFUSED) from /usr/lib/ruby/2.1.0/net/smtp.rb:541:in `open'
zacstewart has joined #ruby
<jhass>
1025 != 25 ?
<mikejw>
even though I'm starting mailcatcher with --smtp-port 25
<mikejw>
php is configured to connect to sendmail on port 25
<jhass>
what exactly is producing that error message?
<mikejw>
and I'm using sendmail_path = /usr/bin/env catchmail -f --smtp-port 25 some@cat.example.org
conta1 has joined #ruby
nankyokusei has joined #ruby
<mikejw>
the error is coming through the apache logs
yadobujo has quit [Remote host closed the connection]
<huesaurus>
4 is the correct value, is it because it's a string ?
<jhass>
maybe the plugin is not the right one?
rodorgas has quit [Quit: rodorgas]
<jhass>
for the structure you have
skade has quit [Quit: Computer has gone to sleep.]
<jhass>
it expects something like {"foo": {"keys": "and", "values": "you", "want": "to return"}, "possibly": "other stuff"}
<jhass>
there root key would be foo
blackmesa has quit [Ping timeout: 276 seconds]
<huesaurus>
oh, I don't have a root key like "foo", just {"keys": "and", "values": "you", "want": "to return"} and when I did a mock test with a root key it also returned with an error
nankyokusei has quit [Ping timeout: 244 seconds]
cdg has joined #ruby
SilverKey has joined #ruby
<jhass>
well, it certainly can't work with a flat key
mattwashere has quit [Remote host closed the connection]
<huesaurus>
oh metricname::jsonkey ?
<jhass>
yes
troulouliou_div2 has quit [Ping timeout: 276 seconds]
skade has joined #ruby
<huesaurus>
weird, it just returns nothing :/
madgen has quit [Ping timeout: 240 seconds]
mattwashere has joined #ruby
<jhass>
probably wrong parameters ;)
workmad3_ has quit [Ping timeout: 258 seconds]
<huesaurus>
right
tophat has joined #ruby
DaniG2k has joined #ruby
bathtub_shark has quit [Ping timeout: 264 seconds]
<huesaurus>
guess it also needs a root key, Check failed to run: undefined method `each' for "3":String,
mostlybadfly has quit [Quit: Connection closed for inactivity]
workmad3 has joined #ruby
<jhass>
shouldn't
AndrewIsHere has joined #ruby
<jhass>
only if you give object
<jhass>
but it's optional
<huesaurus>
oh
<jhass>
or I guess that was the intention
<jhass>
the code is quite terrible tbh
dminuoso has quit [Read error: Connection reset by peer]
<huesaurus>
currently that's what i'm passing it for a test /opt/sensu/embedded/bin/metrics-http-json.rb -u 'http://echo.jsontest.com/key/3/one/4' -s hostname.name -m 'ametric::key,one'
<huesaurus>
yeah :/
<jhass>
I think there's a missing else between line 84 and 85
<huesaurus>
lol
xall_ has joined #ruby
[Butch] has joined #ruby
drewo has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
rodorgas has joined #ruby
PostApo has joined #ruby
PostApo has quit [Client Quit]
xall_ has quit [Ping timeout: 272 seconds]
troulouliou_div2 has joined #ruby
postapocallyptic has quit [Ping timeout: 264 seconds]
isberg has joined #ruby
mwlang has quit [Quit: mwlang]
DaniG2k has quit [Quit: leaving]
Es0teric has quit [Ping timeout: 240 seconds]
DaniG2k has joined #ruby
davedev24 has joined #ruby
mistermocha has joined #ruby
davedev24 has quit [Read error: Connection reset by peer]
davedev2_ has quit [Ping timeout: 258 seconds]
bnjf has quit [Ping timeout: 264 seconds]
aep-shoutlet has joined #ruby
davedev24 has joined #ruby
<shevy>
saurier always go via if clauses, never via the else clauses
<shevy>
that is why they went extinct
Es0teric has joined #ruby
huesaurus has quit [Quit: Ex-Chat]
kedare has quit [Quit: Leaving]
dennisvennink has joined #ruby
karapetyan has quit [Remote host closed the connection]
aryaching has quit [Ping timeout: 240 seconds]
whathapp_ has joined #ruby
whathapp_ has quit [Read error: Connection reset by peer]
AnoHito has quit [Ping timeout: 272 seconds]
karapetyan has joined #ruby
SilverKey has quit [Quit: Halted.]
SilverKey has joined #ruby
whathappens has joined #ruby
karapetyan has quit [Remote host closed the connection]
treaki__ has quit [Ping timeout: 276 seconds]
LoneHermit has joined #ruby
harfangk has joined #ruby
aegis3121 has quit [Ping timeout: 250 seconds]
karapetyan has joined #ruby
Es0teric has quit [Ping timeout: 240 seconds]
karapetyan has quit [Remote host closed the connection]
`tim` has quit [Ping timeout: 276 seconds]
rodfersou is now known as rodfersou|lunch
AlexJakeGreen has quit [Quit: This computer has gone to sleep]
AnoHito has joined #ruby
madgen has joined #ruby
dminuoso has joined #ruby
mark_66 has quit [Quit: Leaving.]
kab has quit [Quit: Leaving]
karapetyan has joined #ruby
DaniG2k has quit [Quit: leaving]
macsteps has joined #ruby
JakFrist has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Es0teric has joined #ruby
omphe has joined #ruby
isberg has quit [Remote host closed the connection]
troulouliou_div2 has quit [Ping timeout: 276 seconds]
Silthias has quit [Quit: Leaving.]
Silthias has joined #ruby
mistermocha has quit [Remote host closed the connection]
iceden has quit [Ping timeout: 258 seconds]
RegulationD has joined #ruby
senayar has quit []
Ishido has joined #ruby
karapetyan has quit [Remote host closed the connection]
rodorgas has quit [Quit: rodorgas]
macsteps has quit [Remote host closed the connection]
iceden has joined #ruby
karapetyan has joined #ruby
astrobunny has quit [Read error: Connection reset by peer]
rodorgas has joined #ruby
astrobunny has joined #ruby
fredolinhares has joined #ruby
xue has quit [Ping timeout: 240 seconds]
karapetyan has quit [Remote host closed the connection]
karapetyan has joined #ruby
mistermocha has joined #ruby
troulouliou_div2 has joined #ruby
blackmesa has joined #ruby
Cohedrin has joined #ruby
xue has joined #ruby
zacts has quit [Ping timeout: 250 seconds]
SCHAAP137 has joined #ruby
pawnbox_ has quit [Remote host closed the connection]
Couch has quit [Ping timeout: 272 seconds]
Es0teric has quit [Quit: Computer has gone to sleep.]
yfeldblum has quit [Remote host closed the connection]
aryaching has joined #ruby
yfeldblum has joined #ruby
dennisvennink has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rbr has quit [Ping timeout: 252 seconds]
pawnbox has joined #ruby
wald0 has joined #ruby
ramfjord has joined #ruby
roamingdog has joined #ruby
mikecmpbll has quit [Ping timeout: 240 seconds]
aryaching has quit [Ping timeout: 244 seconds]
karapetyan has quit [Remote host closed the connection]
mistermo_ has joined #ruby
mistermocha has quit [Ping timeout: 264 seconds]
snory has quit [Remote host closed the connection]
kriskropd has joined #ruby
mistermo_ has quit [Ping timeout: 250 seconds]
craigp has joined #ruby
LoneHermit has quit [Remote host closed the connection]
rodorgas has quit [Quit: rodorgas]
Diabolik has quit [Ping timeout: 264 seconds]
LoneHerm_ has joined #ruby
LoneHerm_ has quit [Remote host closed the connection]
vuoto has quit [Remote host closed the connection]
SilverKey has quit [Quit: Halted.]
ziyan_ has quit [Ping timeout: 250 seconds]
karapetyan has joined #ruby
spiette has joined #ruby
ziyan_ has joined #ruby
antgel has quit [Ping timeout: 264 seconds]
duoi has quit [Excess Flood]
aryaching has joined #ruby
duoi has joined #ruby
RegulationD has quit [Remote host closed the connection]
drewo has quit [Ping timeout: 260 seconds]
zacts has joined #ruby
dn` has quit [Quit: dn`]
arnonhongklay has joined #ruby
arnonhongklay has quit [Remote host closed the connection]
mistermocha has joined #ruby
karapetyan has quit [Remote host closed the connection]
jaguarma_ has quit [Remote host closed the connection]
kab has joined #ruby
mattwashere has quit [Remote host closed the connection]
zacts_raincity has quit [Read error: Connection reset by peer]
Dimik has joined #ruby
zacts_pi has joined #ruby
xall_ has joined #ruby
mattwashere has joined #ruby
flashpoint9 has joined #ruby
pdoherty has quit [Ping timeout: 276 seconds]
TomyWork has quit [Ping timeout: 276 seconds]
hahuang61 has joined #ruby
zacts has quit [Ping timeout: 250 seconds]
HULK_SMASH has joined #ruby
yfeldblum has quit [Ping timeout: 272 seconds]
zacts_pi has quit [Ping timeout: 240 seconds]
spudowiar has joined #ruby
skade has joined #ruby
Silthias1 has joined #ruby
djbkd has joined #ruby
Silthias has quit [Ping timeout: 258 seconds]
nhhc has joined #ruby
kavanagh has joined #ruby
dennisvennink has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nerium has joined #ruby
sepp2k has joined #ruby
blaxter has quit [Quit: foo]
Vingador has quit [Remote host closed the connection]
CharlesN has quit [Quit: Ex-Chat]
weaksauce has joined #ruby
bathtub_shark has joined #ruby
karapetyan has joined #ruby
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Cohedrin has quit [Ping timeout: 240 seconds]
malconis has joined #ruby
johnmilton has quit [Remote host closed the connection]
jackjackdripper has quit [Quit: Leaving.]
cyphase has quit [Ping timeout: 264 seconds]
karapetyan has quit [Remote host closed the connection]
karapetyan has joined #ruby
Cohedrin has joined #ruby
wald0 has quit [Ping timeout: 276 seconds]
macsteps has quit [Remote host closed the connection]
zacts has joined #ruby
cyphase has joined #ruby
RegulationD has joined #ruby
roamingdog has quit [Remote host closed the connection]
kirun has joined #ruby
ramfjord_ has joined #ruby
roamingdog has joined #ruby
zacts has quit [Read error: Connection reset by peer]
speakingcode has joined #ruby
ramfjord has quit [Ping timeout: 240 seconds]
zacts has joined #ruby
ekinmur has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
codecop has joined #ruby
ekinmur has joined #ruby
irregular has joined #ruby
ramfjord_ has quit [Ping timeout: 264 seconds]
<irregular>
Hi guys, I have a class API with @cached_ids instance variable, is there a way to access the instance variable outside the class? i.e. API.cached_ids (this doesn't work though) or do I have to add a getter method
mistermo_ has quit [Remote host closed the connection]
rodfersou|lunch is now known as rodfersou
mistermocha has joined #ruby
mistermocha has quit [Remote host closed the connection]
mistermocha has joined #ruby
aegis3121 has quit [Ping timeout: 258 seconds]
leea has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
zacts has quit [Quit: WeeChat 1.4]
zacts has joined #ruby
aegis3121 has joined #ruby
<shevy>
irregular have you tried .instance_variable_get() yet?
ericsupreme has quit [Quit: Leaving]
devbug has joined #ruby
<jhass>
irregular: if you consider it public API to read the variable you should add a getter
<zacts>
I'm working on RSpec right now, but via the pluralsight tutorials and not the outdated book
<irregular>
shevy:just tried it, thank you!!
<shevy>
\o/
<zacts>
(dude, I even know ruby books so well now to know that the RSpec book is officially outdated by pragmatic)
<zacts>
I'm the channel ruby bibliophile
<irregular>
jhass:it will only be used in one place so for now I will just use instance variable get
<jhass>
irregular: bad reason
xall_ has quit [Ping timeout: 240 seconds]
<shevy>
high quality books are awesome but most books I found are sorta average or just slightly above average. I liked the original pickaxe in 2005 or so. Did not like any books afterwards really. The worst was a rails book ... how to build a webshop, it was so boring that I did not make it to page 100
<zacts>
shevy: which rails book was it?
<zacts>
was it by hartl?
<zacts>
I'm making a list of books I don't like to save other's time too
<shevy>
zacts I don't even remember the name
<shevy>
I think it was... from 2007 or 2008 or so
<ineb>
shevy: i know what book youre talking about. and the same happened to me there. dont know exactly were i stopped, but it was definitely below page 100
<ineb>
alas i forgot the title aswell
Bish has quit [Ping timeout: 252 seconds]
anisha has quit [Quit: This computer has gone to sleep]
<zacts>
I think eventually it gets to a point to where you just read official doc rather than books
<shevy>
precisely!
<shevy>
or, no more docs reading and just wild tinkering
<zacts>
shevy: eventually just pure perfect coding the 1st time, and no bugs. (as linus claims he can do...)
<zacts>
(don't quote me on it though)
<ineb>
using ed as editor.
Bish has joined #ruby
brianpWins has joined #ruby
rodferso1 has joined #ruby
Hounddog has quit [Ping timeout: 272 seconds]
astrobunny has quit [Read error: Connection reset by peer]
astrobunny has joined #ruby
rodfersou has quit [Ping timeout: 252 seconds]
moeabdol has quit [Ping timeout: 260 seconds]
pdoherty has joined #ruby
dionysus69 has quit [Remote host closed the connection]
dionysus69 has joined #ruby
CodeAleks has joined #ruby
et09 has joined #ruby
conta has quit [Quit: conta]
mdw has joined #ruby
<et09>
im having a really weird problem, i define a proc and then do myarray.map{|x| myproc.call(x)} - and every item in the result array is based on the last item in the source array
<ruby[bot]>
If you cannot share your code, we cannot help you. Create a complete, executable example that you can share and that reproduces your issue, or hire a consultant.
TheHodge has quit [Quit: Connection closed for inactivity]
aegis3121 has quit [Ping timeout: 264 seconds]
chosen1 has joined #ruby
pandaant has quit [Quit: Lost terminal]
dionysus69 has quit [Remote host closed the connection]
dionysus69 has joined #ruby
zeroDi has joined #ruby
chosen1_ has quit [Ping timeout: 258 seconds]
dunpeal has quit [Ping timeout: 240 seconds]
ElFerna has joined #ruby
smathy has joined #ruby
ElFerna has quit [Client Quit]
mistermocha has joined #ruby
SilverKey has joined #ruby
karapetyan has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
jackjackdripper has joined #ruby
mistermocha has quit [Ping timeout: 260 seconds]
ekinmur has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ziyan_ has quit [Remote host closed the connection]
banisterfiend has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dikaio has joined #ruby
Beverage has joined #ruby
banisterfiend has joined #ruby
djbkd has quit [Remote host closed the connection]
djbkd has joined #ruby
Beverage has quit [Client Quit]
roamingdog has quit [Read error: Connection reset by peer]
kappy has quit [Quit: Lost terminal]
roamingdog has joined #ruby
<irregular>
for @array[:variable], how can do that but with variable actually being a variable (with different values)?
Wsewolod has quit [Ping timeout: 258 seconds]
<irregular>
I can do @array[variable] but the resulting array is slightly different than I want
Mirubiri has joined #ruby
<elomatreb>
If you're absolutely sure it's what you want, you can do [variable.to_sym]
* jhass
has a dejavu
<elomatreb>
Ah, it's a array, I'm an idiot
<jhass>
irregular: what do you get, what do you expect?
djbkd has quit [Ping timeout: 252 seconds]
aegis3121 has joined #ruby
<irregular>
jhass:actually I'm not sure if this is the problem but each time I do @array[:id] = someid then that same thing again, it doesn't override the previous :id like a map, but appends to it hmm
Es0teric has joined #ruby
Es0teric has quit [Max SendQ exceeded]
<jhass>
{this: is, a: hash}, [this, is, an, array]
<jhass>
what do you have?
Es0teric has joined #ruby
<jhass>
what's p @array.class ?
Es0teric has quit [Max SendQ exceeded]
tmtwd has quit [Ping timeout: 264 seconds]
<elomatreb>
If you're doing @var[:something] = ... and it doesn't error, you likely have a Hash
Es0teric has joined #ruby
Es0teric has quit [Max SendQ exceeded]
fmcgeough has quit [Quit: fmcgeough]
<irregular>
when I print it out it looks like {"startDate"=>"2016-06-01", "startTime"=>"10:00", "durationMinutes"=>60, :startDate=>"2016-7-19", :startTime=>"15:19", :durationMinutes=>1}
Mirubiri has quit [Quit: Mirubiri]
zacts has quit [Read error: Connection reset by peer]
fmcgeough has joined #ruby
Es0teric has joined #ruby
<jhass>
that's ah hash
<elomatreb>
That's a Hash, not an Array
<jhass>
but please answer my question
Mirubiri has joined #ruby
<jhass>
what's p @array.class ?
ekinmur has joined #ruby
<jhass>
oh I think I see
<irregular>
h/o let me print that out
<jhass>
do you expect @whatever[:startDate] = whatever to overwrite "startDate"=>"2016-06-01" ?
<jhass>
>> "startDate" == :startDate
tomchapin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<irregular>
I want one to override the other, either one is fine
<jhass>
no, you don't
<jhass>
just use @whatever["startDate"] = whatever
ekinmur has quit [Client Quit]
tomchapin has joined #ruby
<irregular>
jhass:how would I have it the other way around? overriding the :key
<jhass>
there's no :key, you add it by doing @whatever[:startDate] = whatever
<jhass>
so no need to overwrite it
<elomatreb>
:startDate is a symbol, a data type basically like a string, but slightly different
ekinmur has joined #ruby
<irregular>
the key is passed in as a variable to a function then @array[key] is done, how would I turn that key into a :key?
astrobunny has quit [Read error: Connection reset by peer]
<jhass>
its usecases are largely orthogonal to strings, comparison to it just confuses people who didn't understand symbols yet IME
<eam>
irregular: to_sym
<jhass>
wrong direction.
astrobunny has joined #ruby
<jhass>
if you do indeed get passed a symbol and _cannot change that_, call .to_s
<elomatreb>
jhass: Are you sure? I found symbols to be very confusing, until I understood that they're basically lighter strings
<irregular>
jhass:we're using factory girl and there's already code utilizing :keyorsymbol so I think i'll try the to_sym to fit into that
swills has quit [Remote host closed the connection]
<jhass>
elomatreb: yes, comparing it to enums works better IME
<jhass>
or magic numbers/values
postmodern has joined #ruby
<jhass>
because that's what they are, named magic numbers
banisterfiend has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<jhass>
and that's what they're best used for
<jhass>
if people start to think of them as strings, they end up doing string operations on them
<elomatreb>
I guess if you have previous programming experience, you're right. I got into Ruby just knowing how to write HTML and CSS
<eam>
ENUM, really
banisterfiend has joined #ruby
<elomatreb>
If you don't have that experience, I doubt I'd understand why magic numbers warrant a special data type
astrobunny has quit [Read error: Connection reset by peer]
mdw has quit [Quit: Sleeping Zzzzz]
xall_ has quit [Read error: Connection reset by peer]
astrobunny has joined #ruby
xall_ has joined #ruby
moeabdol has joined #ruby
kavanagh has joined #ruby
leea has joined #ruby
karapetyan has quit [Remote host closed the connection]
[Butch] has quit [Quit: I'm out . . .]
<irregular>
actually it was the other way around, the keys were "key" already but newly added (overlapping keys) were being put in as :key. I had to do @array["#{key}"] to properly override the "key" value
<irregular>
there mustve been some implicit conversion or something idk
Tempesta has quit [Ping timeout: 250 seconds]
jaguarmagenta has joined #ruby
karapetyan has joined #ruby
jaguarmagenta has quit [Remote host closed the connection]
<jhass>
irregular: just .to_s
karapetyan has quit [Remote host closed the connection]
<jhass>
"#{key}" -> key.to_s
Dimik has quit [Ping timeout: 276 seconds]
LoneHermit has joined #ruby
tomaz_b has joined #ruby
dionysus69 has quit [Ping timeout: 244 seconds]
<irregular>
thanks!
dionysus69 has joined #ruby
mistermocha has joined #ruby
ChiefAlexander has quit [Remote host closed the connection]
<irregular>
would you know if there's a method to turn all the keys to string keys from symbol keys?
pwnd_nsfw has quit [Ping timeout: 258 seconds]
LoneHermit has quit [Remote host closed the connection]
LoneHerm_ has joined #ruby
mistermocha has quit [Remote host closed the connection]
mistermocha has joined #ruby
dionysus69 has quit [Remote host closed the connection]
dionysus69 has joined #ruby
karapetyan has joined #ruby
<havenwood>
irregular: Is Rails involved or are you otherwise using ActiveSupport?
<havenwood>
irregular: with ActiveSupport: {'aim' => true}.symbolize_keys
ecnalyr has joined #ruby
crystal77 has joined #ruby
djbkd has quit [Remote host closed the connection]
GodFather has joined #ruby
djbkd has joined #ruby
ur5us has joined #ruby
madgen has joined #ruby
macsteps has joined #ruby
<finnnnnnnnnnn>
good evening all, anyone have any advice on best pracise then filtering models? I have a series of select boxes listing my model IDs and I want to submit them with a GET to a controller that reads the IDs and then returns the filtered set of models. I’m wondering how to contruct the form. I’m using check_box_tag but I’ve read it’s not best practise to pass an array in params using check_box_tag/
<irregular>
actually it may be better if I change this yml file. the initial array values are loaded from YAML.load_file("path/to/file"), the file looks like startDate: "2016-06-01", and a few more key value pairs, is there a way to modify the yml file so that the resulting array looks like :startDate=>"2016-06-01" instead of "startDate"=>"2016-06-01"
solars has joined #ruby
Es0teric has quit [Quit: Computer has gone to sleep.]
<Mon_Ouie>
ruby-lang795: Where does that string come from?
Guest60828 has joined #ruby
istrasci has joined #ruby
<ruby-lang795>
It comes from a database text field using ActiveRecord::Base
<ruby-lang795>
The app isn't using Rails though so I don't think serialize is an option
<Mon_Ouie>
Why are you storing a hash like that in a database?
dunpeal has joined #ruby
<ruby-lang795>
Good question, wish I could have asked the guy myself :/
ses1984 has joined #ruby
Xiti has joined #ruby
<istrasci>
Using ruby 2.3.1, why is
<istrasci>
> {'a': 1} == {'a' => 1}
<istrasci>
=> false
<Mon_Ouie>
istrasci: The first one has a symbol as a key, the second one uses a string.
<et09>
is it a ruby hash to begin with?
<istrasci>
So using the : syntax in a Hash forces the key to be a symbol?
<et09>
or a json hash perhaps?
LoneHerm_ has quit [Remote host closed the connection]
<ruby-lang795>
I believe it's a ruby hash to begin with
<et09>
n/m i see nil, not null
<istrasci>
Ruby
LoneHerm_ has joined #ruby
jaguarmagenta has joined #ruby
<Mon_Ouie>
ruby-lang795: The real solution would be to use a more suitable way to encode your data, but if you have to deal with this encoding, there are no safe built-in methods to read Ruby literals
finnnnnnnnnnn has quit [Quit: finnnnnnnnnnn]
<ruby-lang795>
Ah ok, that's what I was afraid of. Thank you for the help! I'll probably start some refactoring haha
<Mon_Ouie>
You could build a parser that only parses some literals without running dangerous code, but that's quite a bit of work (not sure if there are gems doing this)
kirun has quit [Remote host closed the connection]
<et09>
how many records are you dealing with
JeanCarloMachado has quit [Quit: Lost terminal]
<ruby-lang795>
only a few 100 for now
<et09>
then change the code dealing with their format asap
Xeago has joined #ruby
<et09>
if you're using postgresql you can use json/jsonb types
<havenwood>
ruby-lang795: which db?
<et09>
automatically (de)serialized to activerecord and vice versa
<ruby-lang795>
mysql :/
<et09>
they have it too now
<et09>
as of 5.7.8
devbug has quit [Quit: ZZZzzz…]
<ruby-lang795>
Nice! shouldn't be too difficult to get it switched and migrated then
aryaching has quit [Remote host closed the connection]
<et09>
yeah
<et09>
since you can visually inspect the data set, you can easily run eval against it during the migration, if you determine it's safe (which god knows it prob is)
LoneHerm_ has quit [Read error: Connection reset by peer]
LoneHerm_ has joined #ruby
troulouliou_div2 has quit [Quit: Leaving]
smathy is now known as smathy_afk
nando293921 has quit [Ping timeout: 276 seconds]
dennisvennink has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
crystal77 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
firstdayonthejob has quit [Ping timeout: 258 seconds]
crystal77 has joined #ruby
macsteps has joined #ruby
polishdub has quit [Quit: Leaving]
dminuoso has quit [Quit: Lost terminal]
dminuoso has joined #ruby
banisterfiend has quit [Ping timeout: 276 seconds]
eljimbo has joined #ruby
macsteps has quit [Remote host closed the connection]
chipotle has quit [Quit: cheerio]
spider-mario has quit [Remote host closed the connection]
edwinvdgraaf has quit [Remote host closed the connection]
karapetyan has quit [Remote host closed the connection]
karapetyan has joined #ruby
fmcgeough has joined #ruby
fmcgeough has quit [Client Quit]
steve has quit [Ping timeout: 250 seconds]
l4v2 has joined #ruby
DeltaHeavy has joined #ruby
<DeltaHeavy>
I have a Jekyll project and I'm wondering if the things in my Gemfile will be installed system wide. If so do I want this? Generally things should be for the specific repo no?
et09 has quit [Quit: leaving]
edwinvdgraaf has joined #ruby
<DeltaHeavy>
Ah, --path
finisherr has quit [Quit: finisherr]
<havenwood>
DeltaHeavy: or set BUNDLE_PATH or use --deployment for ./vendor/bundle
<havenwood>
DeltaHeavy: But the Bundle will ensure you're using the correct versions even if they're installed in GEM_PATH.
<DeltaHeavy>
havenwood Is using --path not enough?
isberg has joined #ruby
smathy_afk is now known as smathy
dennisvennink has joined #ruby
<havenwood>
DeltaHeavy: --path should do the trick - just remember it's a "remembered" setting so it'll end up in your bundler conf file
crystal77 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
MrBusiness2 has joined #ruby
<havenwood>
so just omitting --path won't go back to system, but maybe that's what you want
<havenwood>
bundle config path
<DeltaHeavy>
havenwood Got it, I figured it's best to have all my gems specific to this project local as I do with other platforms. If that's different for Ruby let me konw.
blackmesa has quit [Ping timeout: 276 seconds]
<havenwood>
DeltaHeavy: Some folk just use the gem install location since Bundler will still select the exact gems and versions from the Gemfile.lock.
<havenwood>
DeltaHeavy: It's perfectly fine to install the gems locally to the project as well though.
davedev24 has joined #ruby
<leea>
shevy do you have any advice on how to get used to a codebase of such size like fpm?
smathy has quit [Ping timeout: 250 seconds]
Bish has quit [Ping timeout: 240 seconds]
SCHAAP137 has quit [Quit: Leaving]
giz|work has quit [Ping timeout: 272 seconds]
devster31 has quit [Ping timeout: 264 seconds]
Bish has joined #ruby
davedev24 has quit [Ping timeout: 250 seconds]
sepp2k has quit [Read error: Connection reset by peer]
dennisvennink has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
edwinvdgraaf has quit [Remote host closed the connection]
dennisvennink has joined #ruby
edwinvdgraaf has joined #ruby
Vingador has joined #ruby
<shevy>
leea haha :)
<shevy>
I struggle with that myself... it's on my todo list
<shevy>
leea in the past I tried to adapt the style to my style
<shevy>
but that requires a lot of time to invest so that is not good
biberu has quit [Read error: Connection reset by peer]
mistermocha has quit [Remote host closed the connection]
<leea>
I mean there are a lot of moving parts
<shevy>
yep
mistermocha has joined #ruby
<leea>
hmm do you have any thoughts on a better workflow than
<shevy>
not really, I struggle with this on my big projects too
<leea>
nvm
<shevy>
for small projects this is usually simple
<leea>
do you have any tools you like to use for debug?
<shevy>
like "do one thing and do it well"
<shevy>
I am like tenderlove here! let me fetch the post he wrote about debugging...
<elomatreb>
Not strictly a debug tool, but I really enjoy occasionally running my apps through stackprof
<shevy>
I tend to use pp though, and colourize the problem + output the line and class of what is going awry. And I try to have code so dumb that I never have to guess what it does
<drbrain>
↑ good techniques here
<elomatreb>
Also, a "real" debugger like byebug is a blessing, imo
<shevy>
oh actually, he also outputs a spacer, from the blog:
<shevy>
puts "#" * 90
<shevy>
:)
<shevy>
I never got into that breakpoints-business of debugging
<elomatreb>
Neither did I in other languages, I just use byebug like a much more convenient print statement
LoneHerm_ has quit [Read error: Connection reset by peer]
mistermocha has quit [Ping timeout: 240 seconds]
<leea>
not sure if i should ask here on on #fpm, but how would i run this thing? since it's a gem
<leea>
or it builds into a gem
aries_liuxueyang has quit [Ping timeout: 252 seconds]
<DeltaHeavy>
Is Jekyll kinda dead?
<elomatreb>
Jekyll is one of those OS projects that you could almost call "finished"
JammyHammy has quit [Read error: Connection reset by peer]
kitikonti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
LoneHerm_ has joined #ruby
rodorgas has quit [Quit: rodorgas]
SuperLag has quit [Ping timeout: 240 seconds]
macsteps has joined #ruby
SuperLag has joined #ruby
hutch34_ has quit [Ping timeout: 260 seconds]
mikecmpbll has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Mirubiri has quit [Quit: Mirubiri]
Bish has quit [Ping timeout: 250 seconds]
Bish has joined #ruby
rodorgas has joined #ruby
<shevy>
leea if it is a gem, "gem install fpm" should work
<shevy>
leea https://rubygems.org/gems/fpm - you can also try the updated github source, "download as zip", extract it... then, well, you can install it as a gem if you build it or you can use setup.rb - I personally use setup.rb, it is not as clean, since you have to do a manual removal but this I can do easily... I go into the site dir of ruby and remove fpm/ and fpm.rb
<shevy>
but it was just one example, perhaps you can find smaller projects
Mirubiri has joined #ruby
<leea>
I'll make at least 1 PR :)
pdoherty has joined #ruby
<shevy>
I mentioned it largely because being able to generate .deb .rpm etc... is on my todo list... so I would either have to do it on my own from scratch or make use of something that already exists
rcvalle has quit [Quit: rcvalle]
SuperLag has quit [Ping timeout: 264 seconds]
SuperLag_ has joined #ruby
<leea>
I mean I'll probably deal with this in industry right? learning new big code bases
dminuoso has quit [Ping timeout: 250 seconds]
cZk is now known as czk
<shevy>
yeah, not a lot of fun IMO :\
<shevy>
actually
vdamewood has quit [Quit: Life beckons.]
<shevy>
if your goal is heavily inspired by industry, you may try to get good at testing
drewo has quit [Ping timeout: 260 seconds]
<leea>
what do you mean by testing? like rspec and that?
<shevy>
I remember perhaps 3 years ago or so, for a ruby job in milano, it was pointed out that writing specs/tests was mandatory
<shevy>
yeah
rodorgas has quit [Quit: rodorgas]
<shevy>
it still was a niche area though, related to bioinformatics. there is evidently more going on in the www/rails world