pharma_joe has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dhollinger has quit [Client Quit]
dhollinger has joined #ruby
dhollinger has quit [Client Quit]
dhollinger has joined #ruby
cdg has joined #ruby
ResidentBiscuit has quit [Ping timeout: 252 seconds]
cdg has quit [Ping timeout: 240 seconds]
ta_ has quit [Remote host closed the connection]
sp4rrow has joined #ruby
leah2 has joined #ruby
nunchuck has joined #ruby
Mon_Ouie has quit [Ping timeout: 260 seconds]
sp4rrow has quit [Ping timeout: 246 seconds]
cdg has joined #ruby
pharma_joe has joined #ruby
ozcanesen has quit [Quit: ozcanesen]
cdg has quit [Ping timeout: 246 seconds]
Mon_Ouie has joined #ruby
griffindy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
wlycdgr1 has quit [Ping timeout: 260 seconds]
paranoicsan has joined #ruby
raynold has quit [Quit: Connection closed for inactivity]
aupadhye has joined #ruby
nobody has quit [Read error: Connection reset by peer]
mochiyoda_ has joined #ruby
uZiel has joined #ruby
Antiarc has quit [Ping timeout: 246 seconds]
Antiarc has joined #ruby
mochiyoda has quit [Ping timeout: 246 seconds]
howdoi has joined #ruby
twillkens has quit [Ping timeout: 252 seconds]
bronson has joined #ruby
mark_on_the_moon has quit [Quit: Konversation terminated!]
Macaveli has joined #ruby
bronson has quit [Ping timeout: 248 seconds]
AndBobsYourUncle has joined #ruby
nofxxx has joined #ruby
nofxxxx has quit [Ping timeout: 240 seconds]
Jey has joined #ruby
jameser has quit [Ping timeout: 260 seconds]
Bock has joined #ruby
AndBobsYourUncle has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jameser has joined #ruby
cdg has joined #ruby
getsum has joined #ruby
oleo has quit [Quit: irc client terminated!]
<getsum>
Is there a size guideline for when to use StringIO vs File?
Mon_Ouie has quit [Ping timeout: 260 seconds]
<getsum>
I'm creating a CSV to upload to an external service and like the simplicity of StringIO, but am concerned about memory management (which I don't have much background on)
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
cdg has quit [Ping timeout: 252 seconds]
snickers has joined #ruby
agent_white has quit [Read error: Connection reset by peer]
anisha has joined #ruby
conta has joined #ruby
agent_white has joined #ruby
jinie has quit [Ping timeout: 255 seconds]
jinie has joined #ruby
ana_ has joined #ruby
biberu has joined #ruby
aufi has joined #ruby
sp4rrow has joined #ruby
ur5us has quit [Remote host closed the connection]
harfangk has quit [Ping timeout: 240 seconds]
uZiel has quit [Ping timeout: 268 seconds]
sp4rrow has quit [Ping timeout: 246 seconds]
web_nanners has quit [Ping timeout: 252 seconds]
webnanners has joined #ruby
kapil___ has quit [Quit: Connection closed for inactivity]
conta has quit [Quit: conta]
andikr has joined #ruby
jenrzzz has quit [Ping timeout: 260 seconds]
aupadhye has quit [Ping timeout: 240 seconds]
[reed] has quit [Ping timeout: 248 seconds]
CrazyEddy has quit [Remote host closed the connection]
conta has joined #ruby
Mortomes|Work has joined #ruby
TheMoonMaster has quit [Ping timeout: 260 seconds]
<prutheus>
Problem: How do I get the MicrophoneInput on linux with alsa/pulseaudio?
TheMoonMaster has joined #ruby
tvw has joined #ruby
<neeya>
join
getsum has quit [Quit: Page closed]
cdg has joined #ruby
dstrunk has quit [Ping timeout: 255 seconds]
pharma_joe has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<neeya>
Am I allowed to ask non-technical questions here on IRC? What are the best websites where I can find ruby on rails freelancer for our web application?
Ishido has quit [Ping timeout: 240 seconds]
cdg has quit [Ping timeout: 255 seconds]
[reed] has quit [Ping timeout: 248 seconds]
ascarter has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nahra` has quit [Remote host closed the connection]
aupadhye has joined #ruby
ascarter has joined #ruby
<havenwood>
neeya: You're welcome to ask non-technical questions. If they're not Ruby-related there's a #ruby-offtopic channel.
Azure has quit [Ping timeout: 240 seconds]
<havenwood>
neeya: There's also a #RubyOnRails channel for Rails devs.
<havenwood>
neeya: You might want to put together a Gist with some details and paste a link here and in #RubyOnRails.
prutheus has quit [Quit: Page closed]
<havenwood>
?rails neeya
<ruby[bot]>
neeya: Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
Ishido has joined #ruby
[reed] has joined #ruby
[reed] has quit [Changing host]
[reed] has joined #ruby
guille-moe has joined #ruby
saneax___ has quit [Quit: Bye!]
<neeya>
havenwood: thank you
danguita has joined #ruby
Mon_Ouie has joined #ruby
alex`` has joined #ruby
AndBobsYourUncle has joined #ruby
sanjayu has joined #ruby
ta_ has joined #ruby
wlycdgr1 has joined #ruby
conta has quit [Remote host closed the connection]
sysvalve has joined #ruby
sp4rrow has joined #ruby
neeya has quit [Ping timeout: 260 seconds]
simmaniac has joined #ruby
conta has joined #ruby
ur5us has joined #ruby
sysvalve has quit [Ping timeout: 248 seconds]
sp4rrow has quit [Ping timeout: 264 seconds]
cdg has joined #ruby
mark_66 has joined #ruby
cdg has quit [Ping timeout: 240 seconds]
ltd has quit [Quit: leaving]
claudiuinberlin has joined #ruby
ltd has joined #ruby
ltd has quit [Client Quit]
Stickwalker has joined #ruby
cconstantine has joined #ruby
ltd has joined #ruby
mtkd has quit [Ping timeout: 240 seconds]
djbkd has quit [Remote host closed the connection]
djbkd has joined #ruby
mtkd has joined #ruby
claudiuinberlin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
AndBobsYourUncle has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cdg has joined #ruby
Stickwalker has quit [Quit: Leaving]
bronson has joined #ruby
cdg has quit [Ping timeout: 246 seconds]
claudiuinberlin has joined #ruby
bronson has quit [Ping timeout: 240 seconds]
konos5 has joined #ruby
konos5 has quit [Client Quit]
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jameser has joined #ruby
ascarter has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rabajaj has joined #ruby
enterprisey has quit [Read error: Connection reset by peer]
rabajaj has quit [Client Quit]
rabajaj has joined #ruby
Dimik has quit [Ping timeout: 248 seconds]
conta has quit [Remote host closed the connection]
conta has joined #ruby
jackjackdripper1 has joined #ruby
jackjackdripper has quit [Ping timeout: 240 seconds]
brent__ has joined #ruby
ascarter has joined #ruby
Silthias has joined #ruby
mikecmpbll has joined #ruby
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Silthias1 has joined #ruby
charliesome has joined #ruby
conta has quit [Quit: conta]
Burgestrand has joined #ruby
brent__ has quit [Ping timeout: 240 seconds]
mkali has quit [Quit: mkali]
lele has quit [Ping timeout: 252 seconds]
Silthias has quit [Ping timeout: 240 seconds]
mim1k has joined #ruby
charliesome has quit [Client Quit]
jameser has joined #ruby
lele has joined #ruby
charliesome has joined #ruby
sp4rrow has joined #ruby
djbkd has quit []
Burgestrand has quit [Client Quit]
cdg has joined #ruby
sp4rrow has quit [Ping timeout: 246 seconds]
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cconstantine has quit [Ping timeout: 255 seconds]
cdg has quit [Ping timeout: 248 seconds]
mkali has joined #ruby
Takumo is now known as TakumoKatekari
claudiuinberlin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dionysus69 has joined #ruby
minimalism has quit [Quit: minimalism]
Burgestrand has joined #ruby
jameser has joined #ruby
jameser has quit [Client Quit]
sepp2k has joined #ruby
sleetdrop has joined #ruby
glcx has joined #ruby
tvw has quit [Ping timeout: 255 seconds]
paranoicsan is now known as paranoicsan[Away
rhyselsmore has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
selim has quit [Ping timeout: 240 seconds]
claudiuinberlin has joined #ruby
selim has joined #ruby
ascarter has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bronson has joined #ruby
jameser has joined #ruby
funkytwig has quit [Remote host closed the connection]
mikecmpbll has quit [Read error: Connection reset by peer]
<rahul_bajaj>
and i want to understand what a param does
ahrs has joined #ruby
milardovich has joined #ruby
<rahul_bajaj>
and what it means ?
<rahul_bajaj>
so how should i go ahead ?
<rahul_bajaj>
it is actually a generic question
<rahul_bajaj>
i want to know about param how they work, what is thier purpose
<TastyTrout>
ah i see. the method `param` is not standard Ruby, it's part of a DSL used by "foreman_discovery". i'm not sure where it comes from but maybe either: Foreman::Controller::Parameters::DiscoveredHost, Foreman::Controller::DiscoveredExtensions, or ::Api::V2::BaseController
ramfjord has joined #ruby
<rahul_bajaj>
TastyTrout, thanks for your input, i though it was a general thing :)
<kke>
so it's for api documentation and perhaps parameter validation
bronson has joined #ruby
claudiuinberlin has joined #ruby
roshanavand has quit [Quit: roshanavand]
kapil___ has joined #ruby
bronson has quit [Ping timeout: 246 seconds]
<rahul_bajaj>
kke, understood. thanks :) was a great help.
<kapil___>
hello i have nested commponents. i have grid > row > column > data. I loop through each of them but i only want first two only if column <= 4. please help.
<kapil___>
blocks.
fredrik is now known as de-staat
ta_ has quit [Remote host closed the connection]
knight33 has joined #ruby
laphoraig92 has quit [Ping timeout: 246 seconds]
tomphp has joined #ruby
tomphp has quit [Client Quit]
griffindy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Guest182734 has joined #ruby
<Guest182734>
hey guys, I am trying to solve a little problem, I have a random float, like 1.2345 and I need to get only the 0.0045 part (like applying a mask 0.00xx to keep only the 'x's)
claudiuinberlin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
paranoicsan[Away is now known as paranoicsan
<elomatreb>
Guest182734: Unless you want to work with strings you pretty quickly run into precision problems with floats like that
ledestin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cajone has quit [Read error: Connection reset by peer]
milardovich has quit [Remote host closed the connection]
milardovich has joined #ruby
hlmjr has quit [Quit: Konversation terminated!]
cajone has joined #ruby
herbmillerjr has joined #ruby
alex`` has joined #ruby
anisha has quit [Ping timeout: 240 seconds]
crst has joined #ruby
<crst>
Hi, how can I make this work? = f.submit (current_page?(user_path) ? : "t" : "f")
milardovich has quit [Ping timeout: 240 seconds]
milardovich has joined #ruby
<dminuoso>
crst: :w<Enter>
<dminuoso>
What is that supposed to do
snickers has quit [Ping timeout: 240 seconds]
rahul_bajaj has quit [Quit: Leaving]
<crst>
dminuoso: it should give either f.submit "t" or f.submit "f"
tomphp has joined #ruby
anisha has joined #ruby
<tbuehlmann_>
crst: why's there a space?
<dminuoso>
why is there a colon?
<crst>
maybe this is better, i tried so much already: f.submit current_page?(user_path) ? "t" : "f"
* dminuoso
steals tbuehlmann_ toy car
milardovich has quit [Ping timeout: 246 seconds]
<dminuoso>
crst: And where is the problem with that?
noblehelm has joined #ruby
quobo has quit [Quit: Connection closed for inactivity]
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<crst>
oh, it does work now...
<crst>
thanks :)
<crst>
dminuoso: how is your lambda calculus going?
umaaji has quit [Quit: Leaving...]
<dminuoso>
Too busy playing with monads currently.
<dminuoso>
And category theory.
<crst>
cool, keep up the good work :)
de-staat has quit [Ping timeout: 248 seconds]
noblehelm has quit [Quit: leaving]
claudiuinberlin has joined #ruby
noblehelm has joined #ruby
oleo has joined #ruby
noblehelm has quit [Client Quit]
moei has joined #ruby
johnml has joined #ruby
uZiel has quit [Ping timeout: 268 seconds]
chouhoulis has joined #ruby
frozengeek has joined #ruby
sp4rrow has joined #ruby
laphoraig92 has joined #ruby
sp4rrow has quit [Ping timeout: 246 seconds]
harfangk has quit [Ping timeout: 248 seconds]
milardovich has joined #ruby
imperator has joined #ruby
Burgestrand has quit [Quit: Closing time!]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
charliesome has joined #ruby
__main__ has joined #ruby
mostlybadfly has quit [Quit: Connection closed for inactivity]
roshanavand has joined #ruby
charliesome has quit [Client Quit]
<LyndsySimon>
I'm looking for a generic way to convert an objects externally accessible instance variables into a hash. Is there some way to introspect Object that I'm not seeing?
__main__ has quit [Read error: Connection reset by peer]
_main_0 has quit [Ping timeout: 240 seconds]
<matthewd>
LyndsySimon: "externally accessible instance variables" isn't really a thing
_main_ has joined #ruby
cadillac_ has quit [Read error: Connection reset by peer]
klaas has quit [*.net *.split]
snapcase has quit [*.net *.split]
__main__ has joined #ruby
_aeris_ has quit [Ping timeout: 268 seconds]
cadillac_ has joined #ruby
__main__ has quit [Read error: Connection reset by peer]
<LyndsySimon>
matthewd: I'm well aware of the ability to "reach in to" objects and access instance variables directly. :)
_main_ has quit [Read error: Connection reset by peer]
<matthewd>
It doesn't so much help as illustrate my point
<matthewd>
A method #foo that returns @foo isn't really distinguishable from a method #foo that does something else
frozengeek_ has joined #ruby
__main__ has joined #ruby
milardovich has quit [Remote host closed the connection]
milardovich has joined #ruby
frozengeek has quit [Ping timeout: 246 seconds]
<LyndsySimon>
I get that, I'm just surprised that there isn't an Array kept somewhere of calls to attr_reader/attr_accessor
raul782 has joined #ruby
Rapture has joined #ruby
kyle__ has quit [Remote host closed the connection]
_aeris_ has joined #ruby
<matthewd>
I wondered if you could take a hint from source_location, but apparently not
kyle1 has joined #ruby
<LyndsySimon>
Fair enough. I can write a concern that implements this
zack6849 has quit [Ping timeout: 252 seconds]
milardovich has quit [Ping timeout: 240 seconds]
Bilge has quit [Ping timeout: 246 seconds]
kyle1 is now known as kyle__
bmurt has joined #ruby
<dminuoso>
LyndsySimon: Sounds to me like you want static typing.
mtkd has quit [Ping timeout: 252 seconds]
zack6849 has joined #ruby
zack6849 has joined #ruby
zack6849 has quit [Changing host]
mtkd has joined #ruby
eroux has joined #ruby
<konsolebox>
LyndsySimon: a method created with attr_reader is not different from a method created manually. so are you only interested with those created by attr_reader?
Bilge has joined #ruby
Neo95 has joined #ruby
aspiers has quit [Ping timeout: 255 seconds]
<LyndsySimon>
dminuoso: I don't see how would help in this particular case... but yes, I would prefer static typing for this project.
<LyndsySimon>
konsolebox: Yes. If there isn't a built-in method to do this, I can write one easily enough.
lupine has quit [Ping timeout: 276 seconds]
bruno- has quit [Ping timeout: 240 seconds]
<konsolebox>
well good luck with that. it sounds too hacky to me.
Macaveli has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
lupine has joined #ruby
<dminuoso>
LyndsySimon: It was just an observation,
nowhere_man has quit [Remote host closed the connection]
orbyt_ has quit [Read error: Connection reset by peer]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
orbyt_ has joined #ruby
JazzH has left #ruby ["Leaving"]
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
jinie has quit [Ping timeout: 240 seconds]
lxsameer has quit [Ping timeout: 240 seconds]
ramfjord_ has joined #ruby
ramfjord has joined #ruby
nowhere_man has joined #ruby
charliesome has joined #ruby
jinie has joined #ruby
anisha has quit [Ping timeout: 240 seconds]
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
balazs has joined #ruby
mikecmpbll has quit [Ping timeout: 248 seconds]
nowhere_man has quit [Remote host closed the connection]
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bvcosta has quit [Remote host closed the connection]
bvcosta has joined #ruby
DaveTaboola has quit [Ping timeout: 240 seconds]
bruno-_ has joined #ruby
__Yiota has joined #ruby
anisha has joined #ruby
bruno- has quit [Ping timeout: 248 seconds]
wlycdgr1 has quit [Ping timeout: 240 seconds]
bvcosta_ has joined #ruby
bvcosta has quit [Read error: Connection reset by peer]
ResidentBiscuit has quit [Quit: Critical Miss]
bronson has joined #ruby
anisha has quit [Ping timeout: 260 seconds]
bronson has quit [Ping timeout: 252 seconds]
uZiel has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nowhere_man has joined #ruby
AndBobsYourUncle has joined #ruby
yaewa has joined #ruby
Antiarc has quit [Read error: Connection reset by peer]
moei has quit [Ping timeout: 246 seconds]
Antiarc has joined #ruby
guille-moe has quit [Ping timeout: 252 seconds]
enterprisey has joined #ruby
uZiel has quit [Remote host closed the connection]
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bvcosta_ has quit [Remote host closed the connection]
mson has joined #ruby
bvcosta has joined #ruby
ramfjord_ has quit [Ping timeout: 240 seconds]
ramfjord has quit [Ping timeout: 240 seconds]
crst has quit [Quit: Leaving...]
bvcosta has quit [Ping timeout: 252 seconds]
wlycdgr1 has joined #ruby
milardovich has quit [Remote host closed the connection]
milardovich has joined #ruby
charliesome has joined #ruby
vondruch has quit [Quit: vondruch]
jottr has quit [Ping timeout: 240 seconds]
mim1k has quit [Ping timeout: 240 seconds]
milardovich has quit [Ping timeout: 248 seconds]
wlycdgr1 has quit [Ping timeout: 248 seconds]
vondruch has joined #ruby
zachk has joined #ruby
__Yiota has joined #ruby
milardovich has joined #ruby
jottr has joined #ruby
anisha has joined #ruby
Xeago has quit [Ping timeout: 240 seconds]
kapil___ has quit [Quit: Connection closed for inactivity]
dviola has joined #ruby
Xeago has joined #ruby
ramfjord has joined #ruby
milardovich has quit [Remote host closed the connection]
vondruch has quit [Quit: vondruch]
milardovich has joined #ruby
vondruch has joined #ruby
TimApple has joined #ruby
cschneid_ has joined #ruby
eckhardt has joined #ruby
daveomcd has joined #ruby
sysvalve has quit [Quit: Leaving]
guille-moe has joined #ruby
ramfjord has quit [Ping timeout: 240 seconds]
uZiel has joined #ruby
Neo95 has joined #ruby
milardovich has quit [Ping timeout: 240 seconds]
frozengeek_ is now known as frozengeek
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
InfinityFye has quit [Quit: Leaving]
uZiel has quit [Ping timeout: 268 seconds]
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
orbyt_ has quit [Excess Flood]
jottr has quit [Ping timeout: 255 seconds]
bvcosta has joined #ruby
mtkd has quit [Ping timeout: 255 seconds]
eightlimbed has joined #ruby
jinie has quit [Ping timeout: 240 seconds]
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
mtkd has joined #ruby
bvcosta has quit [Ping timeout: 240 seconds]
jinie has joined #ruby
govg has joined #ruby
claudiuinberlin has joined #ruby
anisha has quit [Ping timeout: 248 seconds]
cconstantine has joined #ruby
jordanm has quit [Ping timeout: 240 seconds]
anisha has joined #ruby
chromis has left #ruby [#ruby]
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
conta has joined #ruby
__Yiota has joined #ruby
minimalism has joined #ruby
ramfjord has joined #ruby
balazs has quit [Ping timeout: 260 seconds]
guille-moe has quit [Ping timeout: 240 seconds]
aswen has joined #ruby
jottr has joined #ruby
ramfjord_ has joined #ruby
conta has quit [Ping timeout: 252 seconds]
jordanm has joined #ruby
balazs has joined #ruby
orbyt_ has joined #ruby
claudiuinberlin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
claudiuinberlin has joined #ruby
tcopeland has joined #ruby
snapcase has joined #ruby
klaas has joined #ruby
imode has joined #ruby
cr3 has joined #ruby
<cr3>
is it bad practice to do something like my_list.each {|x| call_function(x)} just to call_function and not use the return value?
bronson has joined #ruby
<TastyTrout>
cr3: in ruby, no not really. but people can argue any point. it hints at code that depends on side effects but it's not the end of the world
selim has quit [Ping timeout: 248 seconds]
selim has joined #ruby
<cr3>
TastyTrout: in python, that would be like [call_function(x) for x in my_list] but, if the return value is not used, they recommend for x in my_list: call_function(x). In ruby, since everything returns a value, I guess the distinction is moot.
wlycdgr1 has joined #ruby
eightlimbed has quit [Ping timeout: 246 seconds]
Neo95 has quit [Ping timeout: 240 seconds]
<TastyTrout>
yeah. doesn't really apply to ruby.
eightlimbed has joined #ruby
<TastyTrout>
some people use "do; end" and "{}" to express that intent but honestly i couldn't be bothered
mtkd has quit [Ping timeout: 240 seconds]
lxsameer has joined #ruby
FahmeF has quit [Remote host closed the connection]
<dminuoso>
cr3, is that function a lambda/proc by any chance?
kapil___ has joined #ruby
wlycdgr1 has quit [Ping timeout: 248 seconds]
alex`` has quit [Quit: WeeChat 1.9]
FahmeF has joined #ruby
Karthick has joined #ruby
mtkd has joined #ruby
cadillac_ has quit [Ping timeout: 246 seconds]
Silthias1 has quit [Quit: Leaving.]
Bock has quit [Ping timeout: 260 seconds]
cdg has joined #ruby
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
orbyt_ has quit [Ping timeout: 260 seconds]
jaruga has quit [Quit: jaruga]
cdg_ has quit [Ping timeout: 260 seconds]
cconstantine has quit [Quit: cconstantine]
cdg has quit [Ping timeout: 248 seconds]
nobitanobi has joined #ruby
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
anisha has quit [Ping timeout: 246 seconds]
<nobitanobi>
Given I have an array of values such as: [{level: 'danger', age: 20}, {level: 'warning', age: 23}, {level: 'good', age: 40}] - what is the best way to shift one of those hashes at the beginning of the array based on the level value? Assuming I am dinamically given the level, and sometimes it won't have a match in any of the hashes
bvcosta has joined #ruby
<nobitanobi>
I checked `unshift` but it uses exact value, and I just know the key
<konsolebox>
nobitanobi: doesn't unshift add a new value?
Neo95 has joined #ruby
<nobitanobi>
yep, you are right, sorry. So that won't work.
<Papierkorb>
nobitanobi: Given the above example, what operation do you intend to call (how?), and what output do you expect to happen?
<Papierkorb>
nobitanobi: Or in other words, what input parameters do you have, and what output do you want to see
<nobitanobi>
and another option if the level given doesn't match any levels on the hashes: order_by_level([{level: 'danger', age: 20}, {level: 'warning', age: 23}, {level: 'good', age: 40}], 'unexistent') => [{level: 'danger', age: 20}, {level: 'warning', age: 23}, {level: 'good', age: 40}]
<nobitanobi>
returns same array
bvcosta has quit [Ping timeout: 240 seconds]
<Papierkorb>
Ah, so first the hashes with the matching level, and then all others after that? Check out `Enumerable#sort_by`
<konsolebox>
nobitanobi: how about using find_index and delete_at
<nobitanobi>
I will look at both of those options, thanks :) I will come back if I'm stuck
<Papierkorb>
nobitanobi: Another possibility, which may be do, is using `Enumerable#partition` to get all matching hashes first, and all non-matching later. You get two lists, which you can simply combine again through `+`
tomphp has quit [Read error: Connection reset by peer]
<nobitanobi>
something I should have added is that we know all hashes have distinct levels, so they can't be repeated.
tomphp has joined #ruby
<konsolebox>
then my suggestion would work, but i'm not sure if there's a more efficient or simpler alternative
<Papierkorb>
nobitanobi: Add `Array#uniq` into the mix, in the yielding version like this `list.uniq{|hsh| hsh[:level]}`
<nobitanobi>
Papierkorb: the problem with sort_by is that I don't want to sort by the level field, but rather by the level field when it equals something.
Neo95 has quit [Ping timeout: 248 seconds]
balazs_ has joined #ruby
tsia has joined #ruby
balazs has quit [Ping timeout: 264 seconds]
<nobitanobi>
ok, solved it with sort_by :) Thanks guys! I ended up doing this: arr.sort_by { |element| element[:level] == given_level ? 0 : 1 }
goyox86 has quit [Ping timeout: 248 seconds]
<Papierkorb>
nobitanobi: As small excercise, try to build the same through `Enumerable#partition`. Decide then which solution you like more
<nobitanobi>
perfect, thanks Papierkorb
anisha has joined #ruby
cconstantine has joined #ruby
lxsameer has quit [Ping timeout: 255 seconds]
<cconstantine>
Could someone here help me with a macosx native extension loading issue? I’m building a gem with a native extension and it all works in linux (the .so is generated and loadable), but it isn’t working in macosx. The .dylib builds, but I can’t seem to get ruby to require it into the process.
anisha has quit [Ping timeout: 240 seconds]
BSab has joined #ruby
milardovich has joined #ruby
WeiJunLi has joined #ruby
<cconstantine>
Is there something special I need to do in macosx to get a dylib to load?
nahra has joined #ruby
<matthewd>
cconstantine: I think you want a .bundle ?
anisha has joined #ruby
BSAlb has quit [Ping timeout: 240 seconds]
<cconstantine>
I’ve never heard of such a thing. Can you tell me more?
<cconstantine>
oh yeah, I see a `sqlite3_native.bundle` in the contents of the sqlite3 gem, and no .dylib
<matthewd>
Nope, sorry... I don't think I've ever had to get too deep in the weeds on macos + ext gem builds
<cconstantine>
ok, I think that’s a great hint. I’ll poke at it more after lunch
tsia has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<cconstantine>
thanks :)
<matthewd>
But yeah, all my native extensions seem to have a .bundle only
<matthewd>
You're welcome :)
Xiti has quit [Quit: Xiti]
tsia has joined #ruby
eckhardt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
wlycdgr1 has joined #ruby
MarkBilk_ has joined #ruby
wlycdgr1 has quit [Ping timeout: 240 seconds]
Karthick has quit [Quit: Leaving]
Xiti has joined #ruby
cagomez has quit [Remote host closed the connection]
MarkBilk has quit [Ping timeout: 240 seconds]
cagomez has joined #ruby
eightlimbed has quit [Ping timeout: 248 seconds]
<clemens3>
cconstantine: are you using rvm?
Neo95 has joined #ruby
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
<clemens3>
i am on a mac and with rvm e.g. installing sqlite3 gem was no problem..
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
Neo95 has quit [Ping timeout: 240 seconds]
harfangk has joined #ruby
ShekharReddy has quit [Quit: Connection closed for inactivity]
Cohedrin_ has joined #ruby
AndBobsYourUncle has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Neo95 has joined #ruby
vondruch has quit [Client Quit]
vondruch has joined #ruby
mkali has quit [Quit: mkali]
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
FahmeF has quit [Remote host closed the connection]
enterprisey has quit [Ping timeout: 240 seconds]
oaao1 has quit [Quit: Leaving]
bvcosta has joined #ruby
Neo95 has quit [Ping timeout: 240 seconds]
eckhardt has joined #ruby
roshanavand has quit [Quit: roshanavand]
milardovich has quit [Remote host closed the connection]
theRoUS has joined #ruby
theRoUS has quit [Changing host]
theRoUS has joined #ruby
milardovich has joined #ruby
AndBobsYourUncle has joined #ruby
cagomez has quit [Ping timeout: 255 seconds]
bvcosta has quit [Ping timeout: 240 seconds]
milardovich has quit [Ping timeout: 240 seconds]
dionysus69 has joined #ruby
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
__Yiota has joined #ruby
aswen has quit [Quit: WeeChat 1.6]
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
Dimik has joined #ruby
chouhoul_ has joined #ruby
FrostCandy has quit []
orbyt_ has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cdsh has joined #ruby
lizard2010 has joined #ruby
sbstudios has joined #ruby
sbstudios has left #ruby [#ruby]
jenrzzz has quit [Ping timeout: 240 seconds]
lizard2010 has quit [Read error: Connection reset by peer]
chouhoulis has quit [Ping timeout: 248 seconds]
PaulCapestany has quit [Quit: .]
raul782 has quit [Remote host closed the connection]
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
raul782 has joined #ruby
tsia has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
PaulCapestany has joined #ruby
ROCARTER_ has joined #ruby
Cohedrin_ has quit [Read error: Connection reset by peer]
cdg has joined #ruby
Cohedrin_ has joined #ruby
laphoraig92 has quit [Ping timeout: 246 seconds]
raul782 has quit [Ping timeout: 252 seconds]
cdg_ has joined #ruby
mikecmpbll has joined #ruby
biberu has quit []
harfangk has quit [Remote host closed the connection]
wlycdgr1 has joined #ruby
ROCARTER_ has quit [Remote host closed the connection]
cdg has quit [Ping timeout: 260 seconds]
Neo95 has joined #ruby
t-recx has quit [Quit: t-recx]
guille-moe has joined #ruby
wlycdgr1 has quit [Ping timeout: 240 seconds]
rhyselsmore has joined #ruby
laphoraig92 has joined #ruby
milardovich has joined #ruby
goyox86 has joined #ruby
__Yiota has joined #ruby
goyox86 has quit [Client Quit]
SeepingN has joined #ruby
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
Neo95 has quit [Ping timeout: 240 seconds]
<cconstantine>
clemens3: yes
<cconstantine>
ah, I’m not having problems installing gems with native extensions. I’m trying to write a gem with native extensions
Neo95 has joined #ruby
brent__ has quit [Remote host closed the connection]
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bvcosta has joined #ruby
mtkd has quit [Ping timeout: 240 seconds]
mtkd has joined #ruby
cagomez has joined #ruby
bvcosta has quit [Ping timeout: 252 seconds]
CrazyEddy has joined #ruby
guille-moe has quit [Ping timeout: 260 seconds]
cagomez has quit [Client Quit]
Cohedrin_ has quit [Read error: Connection reset by peer]
Cohedrin_ has joined #ruby
milardovich has quit [Remote host closed the connection]
cagomez has joined #ruby
milardovich has joined #ruby
__Yiota has joined #ruby
milardovich has quit [Ping timeout: 255 seconds]
<cconstantine>
Hmm, I’m having a hard time getting cmake to generate a makefile to generate a .bundle
dionysus69 has quit [Ping timeout: 240 seconds]
brent__ has joined #ruby
raul782 has joined #ruby
<matthewd>
Do you actually need cmake?
mjolnird has quit [Remote host closed the connection]
<cconstantine>
kinda yeah
<matthewd>
Letting mkmf handle things seems likely to be much easier
<cconstantine>
I’m trying to integrate a kind of big c++ library that already has a working cmake
<matthewd>
.. statically? :/
chouhoul_ has quit [Remote host closed the connection]
<cconstantine>
The library’s CMakeLists.txt exports a static library
chouhoulis has joined #ruby
cagomez has quit [Remote host closed the connection]
<cconstantine>
from what I understand mkmf uses cmake under the hood. I’d be happy with mkmf if I could use it for the glue code, AND link in with the library’s cmake setup
mjolnird has joined #ruby
cagomez has joined #ruby
<matthewd>
I'm 99% sure mkmf uses make
BSab has quit [Read error: Connection reset by peer]
<cconstantine>
It 100% makes a Makefile, but I keep seeing cmake as a requirement (and cmake isn’t even really a build system, it’s used to make Makefile(s))
ldnunes has quit [Ping timeout: 248 seconds]
<michael_mbp>
hi all
<matthewd>
Actually.. I recall recently having to install cmake to build a gem... rugged, I think?
<michael_mbp>
Do singletons support class vars?
<michael_mbp>
matthewd: most likely needed to do a native compile.
raul782 has quit [Remote host closed the connection]
lxsameer has joined #ruby
milardovich has joined #ruby
<cconstantine>
matthewd: So it looks like their extconf.rb builds the cmake program to the static lib, then uses mkmf to build the glue. I’ll give it a shot. Do you happen to know other gems that do that so I can look at how they do it?
milardovich has quit [Remote host closed the connection]
Cohedrin_ has quit [Read error: Network is unreachable]
cconstantine has left #ruby [#ruby]
cconstantine has joined #ruby
milardovich has joined #ruby
BSab has quit [Read error: Connection reset by peer]
Cohedrin_ has joined #ruby
milardovich has quit [Remote host closed the connection]
<matthewd>
michael_mbp: Class variables are confusing at the best of times, but.. I don't think so?
<matthewd>
michael_mbp: I mean.. a singleton class can include a module that uses class variables, so.. maybe? It depends what you want... though I'd generally advise that what you want is "not class variables".
enterprisey has joined #ruby
<michael_mbp>
matthewd: aye
<michael_mbp>
especially since I'm working with redis and workers.
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
wlycdgr1 has quit [Ping timeout: 240 seconds]
ldnunes has joined #ruby
Cohedrin_ has quit [Read error: Connection reset by peer]
bruno- has joined #ruby
milardovich has quit []
TomyLobo has quit [Ping timeout: 264 seconds]
anisha has quit [Quit: This computer has gone to sleep]
bruno-_ has quit [Ping timeout: 248 seconds]
enterprisey has quit [Ping timeout: 240 seconds]
Cohedrin_ has joined #ruby
cconstantine has quit [Quit: cconstantine]
Cohedrin_ has quit [Client Quit]
cconstantine has joined #ruby
Cohedrin_ has joined #ruby
ornerymoose has quit [Ping timeout: 260 seconds]
andikr has quit [Remote host closed the connection]
ur5us has joined #ruby
ldnunes has quit [Quit: Leaving]
raul782 has joined #ruby
cagomez has joined #ruby
Cohedrin_ has quit [Read error: Connection reset by peer]
ta_ has joined #ruby
cconstantine has quit [Quit: cconstantine]
bvcosta has joined #ruby
Cohedrin_ has joined #ruby
skweek has quit [Ping timeout: 240 seconds]
bvcosta has quit [Ping timeout: 260 seconds]
tcopeland has quit [Quit: tcopeland]
FahmeF has quit [Remote host closed the connection]
WeiJunLi has quit [Ping timeout: 248 seconds]
skweek has joined #ruby
tcopeland has joined #ruby
raul782 has quit [Remote host closed the connection]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Bhootrk_ has joined #ruby
cagomez has quit [Remote host closed the connection]
AndBobsYourUncle has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mark_on_the_moon has joined #ruby
chouhoulis has quit [Remote host closed the connection]
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
chouhoulis has joined #ruby
AndBobsYourUncle has joined #ruby
jordanm has quit [Ping timeout: 240 seconds]
nobitanobi has quit []
wlycdgr1 has joined #ruby
chouhoulis has quit [Ping timeout: 240 seconds]
Cohedrin_ has quit [Read error: Connection reset by peer]