<endzYme>
anyone really experienced with writing pure ruby applications? I am trying to find a design pattern for integration configurations that makes sense for a Grape API - any recommended reading?
OrbitalKitten has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Takle has quit [Read error: Connection reset by peer]
Takle has joined #ruby
DerisiveLogic has quit [Ping timeout: 272 seconds]
Sawbones has joined #ruby
teddyp1cker has quit [Ping timeout: 246 seconds]
x1337807x has quit [Ping timeout: 250 seconds]
razieliyo has joined #ruby
razieliyo has joined #ruby
<endzYme>
mwlang: yes that's the framework I'm using. I am wondering if there is a general pattern around handling configs loaded from an outside file. I've been seeing a lot of articles mention making a separate module for storage and reading and also seen metions of writing a dsl for configs
<endzYme>
didn't know if there's some preferred reading im just totally missing
<endzYme>
or maybe overcomplicating it
<rrrutr>
hi, i installed new version ruby with RVM, how can i import gems from previous version of ruby?
<mwlang>
endzYme: Just store config data in yaml files.
nahtnam has joined #ruby
<endzYme>
mwlang: and just use a basic yaml.load_file in scope with the grape app?
<mwlang>
yes. That’s what I would normally do. if the environment matters (development, production, test, etc.) then I’d follow the same convention with rails’ database.yml file.
iliketurtles has quit [Quit: zzzzz…..]
kaiZen has joined #ruby
nateberkopec has quit [Quit: Leaving...]
justin_pdx has quit [Quit: justin_pdx]
dstarh has joined #ruby
nateberkopec has joined #ruby
Crazy_Atheist has joined #ruby
<jhass>
rrrutr: rvm help gemset, I think there was a migrate option or something. Check by in #rvm for details
baweaver has joined #ruby
Beoran_ has joined #ruby
tuelz has joined #ruby
charliesome has joined #ruby
mleung has quit [Quit: mleung]
tkuchiki has joined #ruby
IrishGringo has quit [Ping timeout: 265 seconds]
hcnewsom has quit [Quit: hcnewsom]
Megtastique has joined #ruby
<endzYme>
mwlang: thanks man - i think i was over complicating it
Megtastique has quit [Max SendQ exceeded]
MatthewsFace has quit [Remote host closed the connection]
Megtastique has joined #ruby
a5i has joined #ruby
PapaFrog has joined #ruby
<rrrutr>
what is size of ruby team?
<PapaFrog>
rugby?
oo_ has quit [Remote host closed the connection]
<Bankzy>
15 on the field
hcnewsom has joined #ruby
<centrx>
1500 pounds. 4500 pounds when in Sumo mode
bim_ has quit [Remote host closed the connection]
<Bankzy>
small pack there
ismaelga has quit [Remote host closed the connection]
rrrutr has quit [Quit: Leaving]
DavidDudson has quit [Quit: Goodbye all, and thankyou.]
apeiros_ has quit [Remote host closed the connection]
<mwlang>
jhass: I’m not surprised. It takes quite a bit of dedication to really get good at multiple tools and development environments to build a better language.
apeiros_ has joined #ruby
<jhass>
dunno, programming languages are just programs after all
ghostpl_ has joined #ruby
<jhass>
it's not really more complex than rails for example
<wallerdev>
a lot of fixes came in patch files that were reviewed
scripore has quit [Quit: Leaving]
<jhass>
and there's plenty of stdlib to maintain
aiguu has joined #ruby
<mwlang>
jhass: not saying “more complex” so much as mastering say, both C and Ruby
ponga has quit [Remote host closed the connection]
mistermocha has quit [Ping timeout: 244 seconds]
aiguu has quit [Client Quit]
<jhass>
still, 35 vs 2,3k for rails? seems way off
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<mwlang>
If I did both C and Ruby every day, I’d probably be good at contributing to Ruby, but I don’t….I do Ruby, HTML, JavaScript, and SQL every day.
<jhass>
Crystal has already 28
<mwlang>
LoC?
jonr22 has joined #ruby
<mwlang>
At least Crystal is moving more and more towards everything written in Crystal.
<jhass>
contributors
<mwlang>
Ah.
<jhass>
Crystal already is entirely written in itself
DavidDudson has quit [Read error: Connection reset by peer]
<mwlang>
time flies when you’re not paying attention. :-)
bigmac has quit [Read error: Connection reset by peer]
mistergibson has joined #ruby
tkuchiki_ has joined #ruby
nii2361 has joined #ruby
eshy has quit [Ping timeout: 240 seconds]
bigmac has joined #ruby
karmatr0n has joined #ruby
eshy has joined #ruby
<mwlang>
anyway, I’m just sayin’ most developers don’t feel comfortable going into the bowels of Ruby, but by contrast, if everything in a library is in their core language, then they’re more apt to dig in and perhaps contribute. That’s the diff, IMHO between contributing to Rails and to Ruby.
ghostpl_ has quit [Ping timeout: 245 seconds]
kalusn has quit [Remote host closed the connection]
Bankzy has quit [Ping timeout: 264 seconds]
<centrx>
yeah Rails is all written in Ruby so lowers barrier to entry
<mwlang>
or they’re like me: don’t have the stomach for mastering algos and being rigorous with their discovery, publishing to the community for feedback and then meticulously implementing the PR.
sivsushruth has quit [Ping timeout: 256 seconds]
juanpablo_ has joined #ruby
havenwood has quit [Remote host closed the connection]
dfinninger has joined #ruby
amclain has joined #ruby
livingstn has joined #ruby
eshy has quit [Max SendQ exceeded]
eshy has joined #ruby
Rephiax has joined #ruby
eshy has quit [Client Quit]
bigmac has quit [Read error: Connection reset by peer]
bigmac has joined #ruby
juanpablo_ has quit [Ping timeout: 264 seconds]
iteratorP has joined #ruby
dfinninger has quit [Ping timeout: 245 seconds]
bigmac has quit [Read error: Connection reset by peer]
sevenseacat has joined #ruby
tris has quit [Ping timeout: 256 seconds]
karmatr0n has quit [Remote host closed the connection]
maximski has joined #ruby
rocknrollmarc has quit [Ping timeout: 244 seconds]
towski__ has joined #ruby
cjim_ has joined #ruby
rocknrollmarc has joined #ruby
tris has joined #ruby
jm0 has left #ruby [#ruby]
towski_ has quit [Ping timeout: 256 seconds]
rocknrollmarc has quit [Max SendQ exceeded]
towski__ has quit [Client Quit]
rocknrollmarc has joined #ruby
maximski has quit [Client Quit]
startupality has quit [Quit: startupality]
startupality has joined #ruby
startupality has quit [Client Quit]
baweaver has quit [Read error: Connection reset by peer]
baweaver has joined #ruby
baweaver has quit [Remote host closed the connection]
baweaver has joined #ruby
towski_ has joined #ruby
greenbagels has quit [Read error: Connection reset by peer]
rocknrollmarc has quit [Ping timeout: 240 seconds]
rocknrollmarc has joined #ruby
x1337807x has joined #ruby
rocknrollmarc has quit [Max SendQ exceeded]
bricker has quit [Quit: leaving]
rocknrollmarc has joined #ruby
atomiccc has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Sawbones has quit [Remote host closed the connection]
frem has quit [Quit: Connection closed for inactivity]
pontiki has joined #ruby
arrubin has joined #ruby
dstarh has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
DavidDudson has joined #ruby
bim has joined #ruby
Sawbones has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
tris has quit [Quit: Leaving]
bim has quit [Remote host closed the connection]
DavidDud_ has quit [Ping timeout: 256 seconds]
narcan has quit [Quit: -[AppDelegate installMalware]: unrecognized selector sent to instance 0x156109c0]
oo_ has joined #ruby
bogeyd6 has joined #ruby
graydot has quit [Quit: graydot]
graydot has joined #ruby
kobain has quit [Ping timeout: 240 seconds]
<reactormonk>
try rubinius then :-)
kaiZen has quit [Quit: ..]
amystephe has quit [Quit: amystephe]
kobain has joined #ruby
jonr22 has joined #ruby
marr has quit []
kobain has quit [Max SendQ exceeded]
kobain has joined #ruby
kobain has quit [Max SendQ exceeded]
lordkryss has quit [Quit: Connection closed for inactivity]
starless has joined #ruby
blackmesa has quit [Ping timeout: 256 seconds]
Megtastique has quit []
Takle has quit [Remote host closed the connection]
tjohnson has quit [Quit: Connection closed for inactivity]
tier has quit [Remote host closed the connection]
Megtastique has joined #ruby
nii2361 has quit [Ping timeout: 256 seconds]
maletor has quit [Quit: Computer has gone to sleep.]
jottr has joined #ruby
d10n-work has quit [Quit: Connection closed for inactivity]
nii2361 has joined #ruby
KevinPath has joined #ruby
<KevinPath>
Hello all
<ramfjord>
hello KevinPath
_2_monalisa has joined #ruby
_2_monalisa has left #ruby [#ruby]
<KevinPath>
Hey I was pushed this way because I am currently in the process of learning Ruby
fmcgeough has quit [Quit: fmcgeough]
crdpink2 has joined #ruby
narcan has joined #ruby
crdpink has quit [Ping timeout: 256 seconds]
<KevinPath>
How long have you been programming in Ruby
cjim_ has quit [Quit: (null)]
martin_work_ has joined #ruby
robustus has quit [Ping timeout: 264 seconds]
ARCADIVS has joined #ruby
martin_work has quit [Ping timeout: 265 seconds]
martin_work_ is now known as martin_work
nii2361 has quit [Ping timeout: 246 seconds]
_djbkd has quit [Quit: My people need me...]
ponga has joined #ruby
Sawbones has quit [Remote host closed the connection]
Megtastique has quit []
robustus|Off has joined #ruby
VBlizzard is now known as _blizzy_
robustus|Off is now known as robustus
patrick99e99 has quit [Read error: Connection reset by peer]
tbon has quit [Ping timeout: 265 seconds]
maletor has joined #ruby
martin_work has quit [Client Quit]
nii2361 has joined #ruby
SegFaultAX has quit [Excess Flood]
baweaver has quit [Read error: Connection reset by peer]
jottr has quit [Ping timeout: 250 seconds]
<jhass>
if you have a question, just ask, no need for formalities ;)
ponga has quit [Ping timeout: 240 seconds]
n80 has joined #ruby
SegFaultAX has joined #ruby
rocknrollmarc has quit [Ping timeout: 252 seconds]
patrick99e99 has joined #ruby
zachrab has quit [Remote host closed the connection]
zachrab has joined #ruby
juanpablo_ has joined #ruby
jerematic has joined #ruby
kobain has joined #ruby
KevinPath has quit [Quit: Page closed]
nii2361 has quit [Ping timeout: 256 seconds]
MatthewsFace has joined #ruby
zachrab has quit [Ping timeout: 246 seconds]
ponga has joined #ruby
jerematic has quit [Ping timeout: 245 seconds]
IrishGringo has joined #ruby
juanpablo_ has quit [Ping timeout: 245 seconds]
jeromelanteri has joined #ruby
dseitz has joined #ruby
martin_work has joined #ruby
n80 has quit [Ping timeout: 252 seconds]
slyv has joined #ruby
fgo has joined #ruby
Megtastique has joined #ruby
freerobby has joined #ruby
apoplexy has joined #ruby
Sawbones has joined #ruby
jenrzzz has joined #ruby
sevvie has quit [Ping timeout: 240 seconds]
_honning_ has joined #ruby
wallerdev has quit [Quit: wallerdev]
nii2361 has joined #ruby
boshhead has quit [Quit: Reconnecting]
boshhead has joined #ruby
slyv has quit [Remote host closed the connection]
RegulationD has joined #ruby
MatthewsFace has quit [Remote host closed the connection]
maletor has quit [Quit: Computer has gone to sleep.]
shadoi1 has quit [Quit: Leaving.]
nii2361 has quit [Ping timeout: 252 seconds]
ItSANgo has joined #ruby
Regulati_ has joined #ruby
RegulationD has quit [Remote host closed the connection]
shadeslayer has quit [Ping timeout: 240 seconds]
unreal_ has joined #ruby
bruno- has quit [Ping timeout: 250 seconds]
teddyp1cker has joined #ruby
Hirzu has joined #ruby
icarus has quit [Ping timeout: 252 seconds]
reinaldob has quit [Remote host closed the connection]
unreal has quit [Ping timeout: 246 seconds]
Regulati_ has quit [Ping timeout: 264 seconds]
RegulationD has joined #ruby
nii2361 has joined #ruby
sevvie has joined #ruby
ismaelga has quit [Remote host closed the connection]
jonr22 has quit [Remote host closed the connection]
waxjar has quit [Ping timeout: 264 seconds]
tubuliferous has quit [Ping timeout: 272 seconds]
rtlong has joined #ruby
coderhs has joined #ruby
krz has joined #ruby
phutchins has quit [Ping timeout: 265 seconds]
nateberkopec has joined #ruby
The_Phoenix has joined #ruby
centrx has quit [Quit: Shutting down, Please wait...]
jlast has joined #ruby
n008f4g_ has quit [Ping timeout: 252 seconds]
ghostpl_ has quit [Ping timeout: 264 seconds]
coderhs has quit [Ping timeout: 264 seconds]
pullphinger has joined #ruby
pullphinger15 has joined #ruby
pullphinger15 has quit [Client Quit]
Sembei has quit [Read error: Connection reset by peer]
tjohnson has joined #ruby
graydot has joined #ruby
havenwood has joined #ruby
hiyosi has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Sembei has joined #ruby
tuelz has joined #ruby
Beoran_ has quit [Ping timeout: 245 seconds]
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tus has quit []
graydot has quit [Ping timeout: 256 seconds]
DavidDudson has quit [Quit: Goodbye all, and thankyou.]
nateberkopec has quit [Quit: Leaving...]
justin_pdx has joined #ruby
tcrypt has quit [Ping timeout: 246 seconds]
oo_ has quit [Remote host closed the connection]
lemur has joined #ruby
pheona has joined #ruby
echevemaster has quit [Read error: Connection reset by peer]
claptor has joined #ruby
razieliyo has quit [Ping timeout: 240 seconds]
ramfjord has quit [Ping timeout: 256 seconds]
rbennacer has quit [Remote host closed the connection]
bigkevmc_ has joined #ruby
bigkevmcd has quit [Ping timeout: 264 seconds]
rbennacer has joined #ruby
Beoran_ has joined #ruby
oo_ has joined #ruby
silkfox has quit [Ping timeout: 265 seconds]
bruno- has joined #ruby
justin_pdx has quit [Quit: justin_pdx]
DavidDudson has joined #ruby
jefus has quit [Ping timeout: 264 seconds]
bruno- has quit [Ping timeout: 256 seconds]
claptor has quit [Quit: this channel is bakas]
Rephiax__ has joined #ruby
nateberkopec has joined #ruby
nateberkopec has quit [Client Quit]
neanderslob has joined #ruby
Rephiax has quit [Ping timeout: 264 seconds]
rtlong has quit [Quit: Leaving...]
jottr has joined #ruby
livingstn has quit [Ping timeout: 256 seconds]
audiodude has joined #ruby
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
rbennacer has quit [Remote host closed the connection]
mleung has joined #ruby
adriancb has quit [Remote host closed the connection]
_honning_ has quit [Ping timeout: 250 seconds]
rbennacer has joined #ruby
tbon has joined #ruby
yfeldblum has quit [Remote host closed the connection]
narcan has quit [Quit: -[AppDelegate installMalware]: unrecognized selector sent to instance 0x156109c0]
Yzguy_ has joined #ruby
firedragon has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
tuelz has quit [Quit: WeeChat 1.0]
Megtastique has quit []
Volsus has quit [Ping timeout: 256 seconds]
lumidragon has quit [Ping timeout: 255 seconds]
sevvie has quit [Ping timeout: 252 seconds]
Rephiax__ has quit []
Dreamer3 has joined #ruby
jottr has quit [Ping timeout: 250 seconds]
acl_ has joined #ruby
DerisiveLogic has joined #ruby
Channel6 has joined #ruby
adamjleonard has quit [Quit: Leaving...]
avleen has joined #ruby
kblake has quit [Remote host closed the connection]
mistermocha has joined #ruby
<avleen>
hi folks. i have a long string, which sometimes ends in a bunch of: 'key="value" key="some value" key="blah blah"'. I need a faster option than String.scan() to find and pull out the key/quoted-value pairs.
<avleen>
someone suggested using substr to find the first =, and then working backwards and forward
<avleen>
but that seems more complex and possible slower
<avleen>
anyone have any suggestions?
zachrab has joined #ruby
apoplexy has quit [Ping timeout: 256 seconds]
juanpablo_ has joined #ruby
Yzguy_ has quit [Quit: I'm sleeping, go away.]
Sembei has quit [Read error: Connection reset by peer]
freerobby has quit [Quit: Leaving.]
mistermocha has quit [Ping timeout: 240 seconds]
kapil___ has joined #ruby
_gautam_ has joined #ruby
mleung has quit [Quit: mleung]
jottr has joined #ruby
yfeldblum has joined #ruby
davedev24_ has quit []
juanpablo_ has quit [Ping timeout: 256 seconds]
maximski has joined #ruby
Sembei has joined #ruby
adamjleonard has joined #ruby
Matthews_ has joined #ruby
The_Phoenix has quit [Read error: Connection reset by peer]
MatthewsFace has quit [Read error: Connection reset by peer]
mistermocha has joined #ruby
jottr has quit [Ping timeout: 256 seconds]
sevvie has joined #ruby
keen__________84 has joined #ruby
keen__________83 has quit [Ping timeout: 246 seconds]
DavidDud_ has joined #ruby
rocknrollmarc has joined #ruby
jottr has joined #ruby
DavidDudson has quit [Ping timeout: 252 seconds]
DavidDud_ has quit [Client Quit]
ziyadb has quit [Quit: Connection closed for inactivity]
jlast has quit [Remote host closed the connection]
Sawbones has quit [Remote host closed the connection]
RegulationD has joined #ruby
silkfox has joined #ruby
wldcordeiro has joined #ruby
RegulationD has quit [Ping timeout: 244 seconds]
silkfox has quit [Ping timeout: 272 seconds]
DavidDudson has joined #ruby
bruno- has joined #ruby
maletor has joined #ruby
braincrash has quit [Quit: bye bye]
boshhead has quit [Ping timeout: 246 seconds]
maximski has quit []
bruno- has quit [Ping timeout: 240 seconds]
teddyp1cker has joined #ruby
acl_ has quit [Remote host closed the connection]
poguez_ has quit [Quit: Connection closed for inactivity]
jonathanwallace has quit [Ping timeout: 245 seconds]
<shevy>
I once tried to rewrite the old tutorial from chris pine "learn to program", and add new stuff
<shevy>
but that is really a *lot* of work...
<sevenseacat>
indeed.
<sevenseacat>
writing is hard work.
<arup_r>
Radar: yes... that's a good idea.. and I would like to be a review member of the book.. Spree is awesome unless some one is getting the pulse of it.
tomengland has joined #ruby
<Radar>
The idea would be to show a more complex application than in any Rails book.
<arup_r>
Radar: Or like a community book like Pro Git..
<Radar>
But show it starting from scratch and evolve it to contain complexity.
<sevenseacat>
it would be a long book
<Radar>
Yes, that's my fear too. It'll be long.
<shevy>
hehe
<havenwood>
arup_r: Remove the `export PATH=~/bin:$PATH` line and add `~/bin` to /etc/paths in the order you want it.
<sevenseacat>
i looked at the amount of content we have in rails 4 in action, and then how much i wanted to put in the rails book i wanted to write.... i had so, so much more for my book
karmatr0n has quit [Remote host closed the connection]
<havenwood>
arup_r: Otherwise you're good.
<arup_r>
havenwood: I never added those path manually... May be Homebrew did it for me.. so I don't know in which order they should appear
<havenwood>
arup_r: You may also want to check `brew doctor` and adjust /etc/paths accordingly.
Volsus has quit [Remote host closed the connection]
<riceandbeans>
havenwood: were you the one helping me out the other day on stypi?
<havenwood>
riceandbeans: i think so
<riceandbeans>
havenwood: you're alright man
<riceandbeans>
:)
<havenwood>
arup_r: so the remaining prepended stuff is: /Users/shreyas/google-cloud-sdk/bin:/usr/local/Cellar/postgresql/9.3.4/bin:/Users/shreyas/bin:
<arup_r>
~/bin not in the PATH havenwood
<riceandbeans>
and I'm buszed
<havenwood>
riceandbeans: ;)
RegulationD has joined #ruby
justin_pdx has quit [Quit: justin_pdx]
<havenwood>
arup_r: you can either move that ^ stuff to the end of PATH, remove it from PATH, or leave it where it is an silence the warning.
<arup_r>
that will be a good idea to off the warning.. How to do that ?
neanderslob has quit [Remote host closed the connection]
<riceandbeans>
havenwood: you in LA?
<havenwood>
riceandbeans: yup
<riceandbeans>
wish I was man
<havenwood>
arup_r: add `rvm_silence_path_mismatch_check_flag=1` to your ~/.rvmrc
<riceandbeans>
I miss LA
neanderslob has joined #ruby
<arup_r>
ok
<riceandbeans>
bay area sucks
<riceandbeans>
good job market, bad everything else
tubuliferous_ has joined #ruby
Regulati_ has joined #ruby
Musashi007 has quit [Quit: Musashi007]
zapata has quit [Quit: leaving]
<riceandbeans>
havenwood: you ever meet people online that you help get into your company?
<norc>
Hi. I have various XML documents with known structures, and would like to have a library that lets me describe that structure, and create hashes or objects from the XML based on my description.
<norc>
arup_r: Does Nokogiri have a mechanism beyond xpath to accomplish this?
<arup_r>
yes CSS
psychopath_mind has quit [Ping timeout: 246 seconds]
<arup_r>
It allows to create a XML/HTML doc or if you have already one.. then it will allow you to chew it as much as you want..
<norc>
arup_r: I will take a look at it thank you. I mean I have a simplistic case without any properties in nodes (It is just nodes and text values)
<certainty>
moin
<arup_r>
o/ certainty
hanmac1 has joined #ruby
slackbotgz has quit [Remote host closed the connection]
tlarevo has joined #ruby
fantazo has joined #ruby
nicolastarzia has joined #ruby
yfeldblum has joined #ruby
tris has joined #ruby
lioninawhat has quit [Remote host closed the connection]
mdibound has quit [Quit: Be back later ...]
yfeldblu_ has joined #ruby
mdibound has joined #ruby
<arup_r>
havenwood: there ?
astrobunny has quit [Remote host closed the connection]
yfeldblum has quit [Ping timeout: 272 seconds]
<havenwood>
ya
wicope has joined #ruby
digitalextremist has quit [Ping timeout: 246 seconds]
<arup_r>
Well.. I need this to install http://mailcatcher.me/ what this line is doing I understood partially rvm default@mailcatcher --create do gem install mailcatcher
<arup_r>
can you bit ?
narcan has quit [Quit: -[AppDelegate installMalware]: unrecognized selector sent to instance 0x156109c0]
<havenwood>
i don't actually use gemsets, i'd just: gem install mailcatcher
mdibound has quit [Ping timeout: 246 seconds]
jerematic has joined #ruby
DerisiveLogic has quit [Ping timeout: 250 seconds]
<arup_r>
ok
<arup_r>
then let me go that away
<arup_r>
**way
juanpablo_ has joined #ruby
<havenwood>
if you want to use RVM without gemsets just add `export rvm_ignore_gemsets_flag=1` to your .rvmrc.
<arup_r>
havenwood: I use gemsets for rails
<havenwood>
arup_r: some people like gemsets and swear by them. i find i get by fine with Bundler.
<sevenseacat>
some people also like stapling things to their faces.
<sevenseacat>
there's no explaining some people.
Azure has quit [Ping timeout: 264 seconds]
<agent_white>
I like to dance. But who doesn't like dancing?!
* agent_white
boogies
<havenwood>
i don't like stapling things to my face. i get by just fine wearing sunglasses.
Mon_Ouie has quit [Ping timeout: 244 seconds]
<sevenseacat>
:P
jerematic has quit [Ping timeout: 272 seconds]
juanpablo_ has quit [Ping timeout: 264 seconds]
nicolastarzia has quit [Ping timeout: 246 seconds]
tris has quit [Ping timeout: 256 seconds]
<flughafen>
moin sevenseacat arup_r certainty
<arup_r>
flughafen: o/
<sevenseacat>
guten Morgen
Macaveli has joined #ruby
tris has joined #ruby
<flughafen>
du sprichst so gut deutsch sevenseacat
<flughafen>
\o
<sevenseacat>
hah
<flughafen>
meetings so many meetings
IrishGringo has quit [Ping timeout: 265 seconds]
<arup_r>
flughafen: I don't have a single one.. I'm useless
<sevenseacat>
ich spreche deutsch... schlecht
<flughafen>
i like it when you speak deutsch to me
polysics has joined #ruby
<flughafen>
arup_r: normally i'm not invited to meetings unless it's our agile stuff
<flughafen>
so don't think ik'
<arup_r>
ok
<flughafen>
i'm cool enough to have meetings
<sevenseacat>
ich lerne langsam.
digitalextremist has joined #ruby
Azure has joined #ruby
<flughafen>
arup_r: you're german?
<arup_r>
no.. Indian
<flughafen>
or no, it's wasamasa that's german
livathinos has joined #ruby
<flughafen>
meeting time, l8r dudes and dudettes
<sevenseacat>
auf wiedersehn.
wottam has joined #ruby
<wasamasa>
yes I am
<norc>
So. Here is a random thought, is there a way to force irb into a mode where everything is "public" (all instance methods etc) ?
nii2361 has joined #ruby
<norc>
Some kind of debug mode that makes introspection easier
<norc>
*instance variables that is
<norc>
:p
Matadoer_ has quit [Ping timeout: 250 seconds]
tris has quit [Ping timeout: 256 seconds]
matadoer has joined #ruby
Hirzu_ has joined #ruby
Morkel has quit [Quit: Morkel]
relix has joined #ruby
tjohnson has quit [Quit: Connection closed for inactivity]
Hirzu has quit [Ping timeout: 256 seconds]
Joufflu has quit [Read error: Connection reset by peer]
fantazo has quit [Ping timeout: 252 seconds]
astrobunny has joined #ruby
ki0 has joined #ruby
towski_ has joined #ruby
wldcordeiro has joined #ruby
adamjleonard has quit [Quit: Leaving...]
<shevy>
norc since irb follows ruby model
<shevy>
the keyword public issued at the beginning should turn all subsequent method definitions into public
Hobogrammer has quit [Ping timeout: 256 seconds]
<shevy>
@instance_variables itself have nothing to do with public - only methods have, which can return @ivars
<shevy>
sevenseacat you speak cat-german!
towski_ has quit [Ping timeout: 252 seconds]
<shevy>
sort of weird to have someone with a nick called "flughafen" (airport)
<sevenseacat>
i speak only as much as i learnt from like two levels of duolingo
martianixor has quit [Quit: Leaving]
tris has joined #ruby
AlexRussia has quit [Ping timeout: 245 seconds]
hs366 has joined #ruby
ki0 has quit []
Spami has joined #ruby
rocknrollmarc has quit [Ping timeout: 245 seconds]
andikr has joined #ruby
Beliq has joined #ruby
fantazo has joined #ruby
ta has quit [Remote host closed the connection]
Alina-malina has joined #ruby
crazydiamond has joined #ruby
tlarevo_ has joined #ruby
ki0 has joined #ruby
tubuliferous has joined #ruby
RegulationD has joined #ruby
adamjleonard has joined #ruby
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tlarevo has quit [Ping timeout: 265 seconds]
bigkevmc_ is now known as bigkevmcd
adamjleonard has quit [Client Quit]
fabrice31 has joined #ruby
jonr22 has joined #ruby
tubuliferous has quit [Ping timeout: 265 seconds]
RegulationD has quit [Ping timeout: 255 seconds]
dumdedum has joined #ruby
AlexRussia has joined #ruby
jenrzzz has joined #ruby
ptrrr has quit [Quit: ptrrr]
dEPy has joined #ruby
jonr22 has quit [Ping timeout: 265 seconds]
codecop has joined #ruby
wald0 has joined #ruby
ramfjord has joined #ruby
tris has quit [Quit: Leaving]
bigkevmcd has quit [Quit: Outta here...]
DavidDudson has joined #ruby
arup_r has quit [Remote host closed the connection]
rbennacer has joined #ruby
DavidDudson has quit [Client Quit]
ghostpl_ has joined #ruby
relix has joined #ruby
DavidDudson has joined #ruby
harfangk has quit [Quit: This computer has gone to sleep]
rbennacer has quit [Ping timeout: 240 seconds]
_Andres has quit [Quit: My Mac Pro has gone to sleep. ZZZzzz…]
jasabella has joined #ruby
<jasabella>
hi
strixd has joined #ruby
shaquile has joined #ruby
mdibound has joined #ruby
harfangk has joined #ruby
<shaquile>
Anyone looking for a job opening in Stockholm, please pm me. We are in urgent need for ruby developers.
ghostpl_ has quit [Ping timeout: 265 seconds]
roolo has quit [Ping timeout: 240 seconds]
aswen has joined #ruby
* wasamasa
wonders whether the need of job places for developers or the need of developers for money is greater
ta has joined #ruby
razieliyo has joined #ruby
tris has joined #ruby
mdibound has quit [Ping timeout: 245 seconds]
martinbmadsen has quit [Ping timeout: 252 seconds]
lessless has quit [Ping timeout: 250 seconds]
amundj has joined #ruby
einarj has joined #ruby
einarj has quit [Remote host closed the connection]
einarj has joined #ruby
rdark has joined #ruby
Takle has joined #ruby
<jasabella>
shaquile... will the employer sponsor a junior? :D
thebastl has joined #ruby
rdark has quit [Client Quit]
rdark has joined #ruby
ta has quit [Remote host closed the connection]
chandryee90 has joined #ruby
govg has quit [Quit: leaving]
thebastl has quit [Quit: Leaving...]
alex88 has joined #ruby
arup_r has joined #ruby
blueOxigen has joined #ruby
danjordan has joined #ruby
<SebastianThorn>
shaquile: Sinch?
keen__________84 has quit [Read error: Connection reset by peer]
relix has quit [Read error: Connection reset by peer]
relix_ has joined #ruby
marr has joined #ruby
The_Phoenix has joined #ruby
keen__________84 has joined #ruby
bluOxigen has quit [Ping timeout: 240 seconds]
wldcordeiro has quit [Ping timeout: 256 seconds]
teddyp1c_ has quit [Remote host closed the connection]
thebastl has joined #ruby
teddyp1cker has joined #ruby
Morkel has joined #ruby
Morkel has left #ruby [#ruby]
silkfox has joined #ruby
chandreyee90 has joined #ruby
teddyp1cker has quit [Ping timeout: 246 seconds]
apoplexy has joined #ruby
yfeldblu_ has quit [Ping timeout: 265 seconds]
lolmaus has quit [Remote host closed the connection]
digitalextremist has quit [Remote host closed the connection]
silkfox has quit [Ping timeout: 265 seconds]
fantazo has quit [Ping timeout: 256 seconds]
fgo has quit [Ping timeout: 264 seconds]
coderhs has quit [Ping timeout: 240 seconds]
jud has quit [Quit: Leaving]
slackbotgz has joined #ruby
Soda has joined #ruby
_Andres has joined #ruby
Soda has quit [Max SendQ exceeded]
DavidDudson has quit [Quit: Goodbye all, and thankyou.]
Soda has joined #ruby
imanzarrabian has joined #ruby
DavidDudson has joined #ruby
Soda has quit [Max SendQ exceeded]
Soda has joined #ruby
narcan has joined #ruby
blackmesa has joined #ruby
bal1 has joined #ruby
kalusn has quit [Remote host closed the connection]
bal has quit [Ping timeout: 252 seconds]
Soda has quit [Max SendQ exceeded]
Soda has joined #ruby
Takle has quit [Remote host closed the connection]
leafybasil has quit [Remote host closed the connection]
Soda has quit [Max SendQ exceeded]
Karpuragauram has joined #ruby
Soda has joined #ruby
Soda has quit [Max SendQ exceeded]
Soda has joined #ruby
<shevy>
would we be more productive in ruby if ruby would be simpler?
thebastl has quit [Quit: Leaving...]
bweston92 has quit [Remote host closed the connection]
<SebastianThorn>
shevy: i think that ruby is kinda simple
<lxsameer>
shevy: simpler than this ?
bal has joined #ruby
roolo has joined #ruby
fantazo has joined #ruby
bal1 has quit [Ping timeout: 252 seconds]
<SebastianThorn>
shevy: any specific area that you'd like to be more simple?
CustosLimen has joined #ruby
sevenseacat has quit [Remote host closed the connection]
piotrj has joined #ruby
bruno- has joined #ruby
<shevy>
yeah
<shevy>
lots of small things - Dir[] vs. Dir.glob()
<shevy>
different ways to use regexes; MatchData, =~ //
<SebastianThorn>
shevy: the regex is true, agree on that :)
<shevy>
the artificial distinction between class and modules; include can be applied on modules, not classes but subclassing is sort of similar to include-functionality
<shevy>
then there are things like Proc.new and lambda - when to best use that?
<shevy>
@@class_vars
weckl has joined #ruby
lkba_ has joined #ruby
<shevy>
a newcomer has quite a lot to learn
chandreyee90 has quit [Quit: Page closed]
doritostains has joined #ruby
Soda has quit [Remote host closed the connection]
<shevy>
there is .class_eval .instance_eval also .module_eval I think ... let me search
<shevy>
I did not know about .module_eval a few weeks ago :)
arup_r_ has joined #ruby
bruno- has quit [Ping timeout: 246 seconds]
<shevy>
the distinction seems arbitrary to me though
geefolk has joined #ruby
kaleido has quit [Ping timeout: 265 seconds]
<shevy>
you also have .class_eval
arup_r_ has quit [Remote host closed the connection]
<shevy>
SebastianThorn I think if I have to name a single area, then I think it would be documentation. The documentation of ruby should be much much better
juanpablo_ has joined #ruby
shaquile has quit [Ping timeout: 244 seconds]
<SebastianThorn>
i think i dont use ruby as much as you do :)
lkba has quit [Ping timeout: 264 seconds]
rdark has quit [Ping timeout: 252 seconds]
ta has joined #ruby
spiderbyte has quit [Ping timeout: 252 seconds]
<shevy>
well
<shevy>
I sort of use a subset of ruby
adaedra has joined #ruby
shaquile has joined #ruby
<shevy>
like, use the good pieces
Takle has joined #ruby
<shevy>
I love blocks!
geefolk has quit [Read error: Connection reset by peer]
<shevy>
include is also cool
arup_r has quit [Ping timeout: 246 seconds]
geefolk has joined #ruby
joonty has joined #ruby
rdark has joined #ruby
crazydiamond has quit [Remote host closed the connection]
ghostpl_ has joined #ruby
juanpablo_ has quit [Ping timeout: 272 seconds]
vtunka has joined #ruby
bweston92 has joined #ruby
davedev24_ has quit [Remote host closed the connection]
rdark has quit [Ping timeout: 245 seconds]
<hanmac1>
shevy did you know that /regex/ =~ under special circumstances can create local variables?
<shevy>
I forgot why I needed to have a @mode variable there though lateron
<shevy>
the docu is weird really
<shevy>
"Sets the instance variable named by symbol to the given object, thereby frustrating the efforts of the class's author to attempt to provide proper encapsulation."
<shevy>
ruby did not have strong encapsulation because the philosophy is that people should be able to do what they want to, if they want to
blackmesa has quit [Ping timeout: 252 seconds]
<shevy>
hence why .send() used to be able to invoke everything, until someone suggested to see a distinction between private and public, so .public_send() was added (which I hate, it's way too long to type!)
workmad3 has joined #ruby
avril14th has joined #ruby
dmolina has joined #ruby
tris has quit [Quit: Leaving]
chandryee90 has quit [Quit: Page closed]
<avril14th>
hello
norc has quit [Ping timeout: 246 seconds]
tubuliferous has joined #ruby
nicolastarzia has joined #ruby
RegulationD has joined #ruby
huddy has joined #ruby
narcan has quit [Quit: -[AppDelegate installMalware]: unrecognized selector sent to instance 0x156109c0]
fgo has quit [Ping timeout: 264 seconds]
narcan has joined #ruby
tris has joined #ruby
vtunka has quit [Quit: Leaving]
astrobunny has quit [Remote host closed the connection]
DavidDudson has quit [Quit: Goodbye all, and thankyou.]
<arup_r>
well.. I see the price is the one.. How would i add it to the dynamic format string >
rdark has joined #ruby
<workmad3>
arup_r: and considering that just a couple of lines up, you're giving format_string 6 arguments, then you're constructing another string with those 6 and an extra arg, but only passing one format parameter...
<workmad3>
arup_r: tbh, I can't quite see why you're embedding format_string in that line
<workmad3>
arup_r: so your format_string isn't correct... debug it and figure it out :P
<arup_r>
humm
fabrice31 has joined #ruby
joonty has joined #ruby
fabrice31 has quit [K-Lined]
fgo has joined #ruby
varunwachaspati has quit [Ping timeout: 252 seconds]
startupality has joined #ruby
fabrice31 has joined #ruby
r3Dk1nG has joined #ruby
Takle has quit [Remote host closed the connection]
<arup_r>
All <spaces> are being compressed into one single space...
lolmaus has quit [Quit: Konversation terminated!]
lolmaus has joined #ruby
imanzarrabian has quit [Ping timeout: 240 seconds]
roolo has quit [Remote host closed the connection]
elimS has joined #ruby
elimS has left #ruby [#ruby]
doodlehaus has joined #ruby
startupality has quit [Quit: startupality]
krz has quit [Ping timeout: 244 seconds]
startupality has joined #ruby
startupality has quit [Client Quit]
tris has quit [Read error: No route to host]
AlexRussia has quit [Ping timeout: 252 seconds]
tris has joined #ruby
mdibound has joined #ruby
apoplexy has quit [Ping timeout: 250 seconds]
DavidDudson has quit [Quit: Goodbye all, and thankyou.]
juanpablo_ has joined #ruby
mdibound has quit [Ping timeout: 255 seconds]
fabrice31 has quit [Remote host closed the connection]
gfawcettpq has joined #ruby
harfangk has joined #ruby
juanpablo_ has quit [Ping timeout: 252 seconds]
_5kg has quit [Ping timeout: 265 seconds]
mathie has quit [Quit: Quitting...]
melmouss has joined #ruby
<shevy>
that is efficient
<shevy>
imagine all humans being compressed into one
DEA7TH has quit [Changing host]
DEA7TH has joined #ruby
<arup_r>
Oh! god not able to manage it
<shevy>
you could store them on a USB stick right away!
<arup_r>
me??
<shevy>
yes if you can store them into one :)
<adaedra>
I come back and read about compressing all humains into an USB stick
<adaedra>
I’m confused
marr has quit [Ping timeout: 252 seconds]
dukz has joined #ruby
marr has joined #ruby
<workmad3>
shevy: ah, the classic compression idea that just doesn't work (because of quantum)
<shevy>
the schroedinger cat is for real, I tell you
dukz has quit [Remote host closed the connection]
<shevy>
you just don't know in which state it is until you get to see her
bim has joined #ruby
<workmad3>
shevy: oh great, I now have in my head the 'transgender schroedinger cat experiment'... you don't know what gender the cat is until you open the box
<shevy>
haha
<shevy>
transgender
<shevy>
you may be the first to wonder about a transgender schroedinger cat
Takle has joined #ruby
tris has quit [Read error: No route to host]
kedare has quit [Read error: Connection reset by peer]
<workmad3>
shevy: but the thought experiment I was referring to was more along the lines of - imagine you can create a coding scheme for all human knowledge that turns it into a single number (which we know is possible)... now take that number and turn it into a fraction between 0 and 1... now cut a 1 metre long stick to *exactly* that fraction of a metre, you've just stored the entirety of human knowledge in that one
<workmad3>
stick
tris has joined #ruby
jonr22 has joined #ruby
<workmad3>
shevy: of course, it's a thought experiment that relies on a classical physics perspective, where the idea of being able to cut a stick to a perfectly exact length isn't complete nonsense :)
bogeyd6_ has quit [Ping timeout: 250 seconds]
<shevy>
now I am confused
<arup_r>
workmad3: Noit able to figure.. the email engine compressing all the spaces to a single spacwe
<workmad3>
arup_r: did you look at your format string?
bogeyd6_ has joined #ruby
<arup_r>
yes..
<workmad3>
arup_r: before you've performed any substitutions
dblessing has joined #ruby
<workmad3>
arup_r: and did you then double-check your format specifiers and flags against the sprintf docs?
<workmad3>
arup_r: i.e. the very first thing you should do when you encounter a format string that isn't formatting as you expected
<workmad3>
arup_r: ok, so the answer to my previous questions was unanimously 'no'
<workmad3>
arup_r: you haven't checked what your unsubstituted format_string is, you haven't double-checked it against docs... you've done 0 work on figuring it out
_Andres has quit [Quit: My Mac Pro has gone to sleep. ZZZzzz…]
<arup_r>
yes.. As the simple ones are not working .. so I got confused.
fabrice31 has joined #ruby
Hirzu_ has joined #ruby
pullphinger has quit []
nii2361 has quit [Ping timeout: 264 seconds]
<arup_r>
inspecting width first... Lets see what's going on there..
tris has quit [Ping timeout: 265 seconds]
rodfersou has joined #ruby
bogeyd6_ has quit [Quit: Leaving]
sdothum has joined #ruby
lanemeyer has quit [Ping timeout: 256 seconds]
tris has joined #ruby
martinbmadsen has quit [Ping timeout: 252 seconds]
Hirzu has quit [Ping timeout: 252 seconds]
tris has quit [Client Quit]
<arup_r>
workmad3: this is the format string I am getting "26%s7%s4%s4%s5%s"
<workmad3>
arup_r: and what do you notice wrong with that? :P
<arup_r>
adaedra: leave format string.. see the plain vanila string...
<arup_r>
that's got compressed
arup_r has quit [Remote host closed the connection]
joast has quit [Ping timeout: 246 seconds]
<adaedra>
and he left.
hs366 has quit [Ping timeout: 252 seconds]
_5kg has joined #ruby
OrbitalKitten has joined #ruby
mikecmpbll has joined #ruby
Asher1 has joined #ruby
Asher has quit [Ping timeout: 256 seconds]
roolo has joined #ruby
Rephiax has joined #ruby
livathinos has joined #ruby
codegate has quit [Ping timeout: 246 seconds]
krandi has joined #ruby
unizen has joined #ruby
aimada has joined #ruby
mdibound has joined #ruby
timonv has quit [Ping timeout: 252 seconds]
silkfox has joined #ruby
andikr has quit [Ping timeout: 246 seconds]
arup_r has joined #ruby
<adaedra>
arup_r: what are you generating ? A web page ?
cpt_yossarian has quit [Ping timeout: 246 seconds]
<arup_r>
No.. text email
mdibound has quit [Ping timeout: 264 seconds]
silkfox has quit [Ping timeout: 256 seconds]
<adaedra>
Your gist is generated text or copied/pasted from a web client ?
<adaedra>
-web +mail
jespada has joined #ruby
<arup_r>
copy pasted from the mailcatcher web interface
<adaedra>
which is html
<arup_r>
I am using mailcatcher to test emails format in developement mode
<adaedra>
so spaces are squeezed
<arup_r>
no.. it is text
jonr2219 has joined #ruby
Takle has quit [Remote host closed the connection]
hs366 has joined #ruby
<adaedra>
try to output the mail directly to console if possible
<adaedra>
I think your interface displays it as HTML and so squeeze spaces
jenrzzz has joined #ruby
<arup_r>
would you like to see screenshot ?
<adaedra>
Or
<adaedra>
Look in the page source code if you have the spaces
freerobby has joined #ruby
phutchins has joined #ruby
<adaedra>
Because the unasked spaces being squeezed make me think of that
mostlybadfly has joined #ruby
<arup_r>
humm.. I'am also thinking so.. I did check view source there is nothing as it is plain/text version
<adaedra>
But I see MailCatcher has plain text display tab, it should display correctly there
<adaedra>
mmmh
jenrzzz has quit [Ping timeout: 245 seconds]
<arup_r>
humm... but not displaying which are inside the ERB tag
<adaedra>
?
<adaedra>
can you, before the mail is sent, dump it verbatim to a file and check the contents there ?
jonr22 has quit [Quit: WeeChat 0.4.2]
phutchins has quit [Client Quit]
jonr2219 has quit []
jonr22 has joined #ruby
jasabella has quit [Ping timeout: 256 seconds]
<adaedra>
By the way, your method to compute column widths seems off to me
ntln has quit [Quit: No Ping reply in 180 seconds.]
slackbotgz has joined #ruby
norc has joined #ruby
<arup_r>
adaedra: Well.. But now all concern is white spaces
<arup_r>
how those are getting squeezed
hanmac1 has quit [Quit: Leaving.]
<adaedra>
Have you the raw mail dump?
hanmac1 has joined #ruby
ntln has joined #ruby
yfeldblum has quit [Ping timeout: 256 seconds]
aimada has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bruno- has joined #ruby
Mon_Ouie has joined #ruby
aclearman037 has joined #ruby
vtunka has joined #ruby
timonv has joined #ruby
sgambino has joined #ruby
revoohc has quit [Quit: revoohc]
rhllor has joined #ruby
krz has joined #ruby
MissionCritical has quit [Ping timeout: 252 seconds]
lordkryss has joined #ruby
CodingFree has joined #ruby
CodingFree has left #ruby [#ruby]
joonty has quit [Quit: joonty]
thebatu1 has quit [Ping timeout: 246 seconds]
joonty has joined #ruby
polysics has joined #ruby
claptor has quit [Quit: this channel is bakas]
tris has joined #ruby
decoponio has joined #ruby
Mission-Critical has joined #ruby
<arup_r>
adaedra: no
<arup_r>
how to get it
<arup_r>
?
<adaedra>
I don’t know what is your stack, but you should be able to place the mail content in a file at some point, no ?
Takle has joined #ruby
hgl has quit [Ping timeout: 245 seconds]
sambao21 has joined #ruby
ki0 has quit [Read error: Connection reset by peer]
ki0 has joined #ruby
<arup_r>
I am using Rails
n008f4g_ has joined #ruby
<arup_r>
let me check in normal plain file
jerematic has joined #ruby
hgl has joined #ruby
<workmad3>
arup_r: hmm... is the template in your project really a .html.erb file?
Mission-Critical is now known as MissionCritical
<workmad3>
arup_r: like you're showing in the gist?
doodlehaus has quit [Remote host closed the connection]
<shevy>
I can show pics!
DavidDudson has quit [Quit: Goodbye all, and thankyou.]
<arup_r>
no
<arup_r>
.text.erb
<arup_r>
in the gist it is my typo.. came through habbit.. but it is .text.erb
<adaedra>
but mails are HTML by default
jespada has quit [Ping timeout: 245 seconds]
<adaedra>
Anyway, if your goal is to send mails, why not just output an HTML table ? It should be way easier - of course, if you don’t require plain output
<arup_r>
workmad3: so.. I'll now push this code.. to the stage.. and will check how is it coming inside the Gmail..
<arup_r>
does it make sense?
<arup_r>
After all my code is not crashing..
<arup_r>
so I can push it..
<adaedra>
or just change the smtp server in your local instance ?
<arup_r>
I don't know what else options are there to test emails...
<arup_r>
I found only this mailcatcher
dstarh has joined #ruby
Rephiax has quit [Read error: Connection reset by peer]
juanpablo_ has quit [Ping timeout: 246 seconds]
<workmad3>
arup_r: if you're in dev mode, you could always have a look at the logs, where the email gets echoed out
<adaedra>
you can use your ISP or regular mail server to send mails
<workmad3>
arup_r: and if you're viewing through a mail client, you could also see if there's a 'view original' or 'view source' option in it too
<arup_r>
workmad3: let me see
<adaedra>
Or, if you have access to outbound 25 port, just rely on sendmail.
tkuchiki has joined #ruby
<workmad3>
arup_r: so basically, lots of options
<adaedra>
Yeah, there are the logs too, I forgot they got printed there :x
adriancb has joined #ruby
<workmad3>
adaedra: it's what I tend to use, tbh :)
<adaedra>
The logs ?
<adaedra>
Yeah, I used that for a while while testing password resets
<adaedra>
But I got tired of it and used letter_opener
<arup_r>
workmad3: Humm.. I am runing production instance on my local to test.. I took data from prod DB and copied it on my local prod db and started server rails s -e production :)
<workmad3>
arup_r: ok... why?
<arup_r>
I got lot of data free to test inspect... etc..
<workmad3>
arup_r: yes... but why run in prod mode?
<arup_r>
I didn't think what you meant to say.. that's why :(
<workmad3>
arup_r: why not point your development db at that data and start in dev mode, so you actually have sane debugging
<arup_r>
I could copy the data to developement table too I see
<arup_r>
can I temporary on logs in production mode too ? workmad3:
<workmad3>
arup_r: probably... but it would take you longer than editing database.yml to point to the prod db
<adaedra>
Juste use development mode ?
<adaedra>
It’s made for development, after all
<workmad3>
^^
godd2 has joined #ruby
OrbitalKitten has joined #ruby
Zai00 has joined #ruby
<arup_r>
Ok ok
<arup_r>
I'll again load data there..
hgl has quit [Max SendQ exceeded]
hgl has joined #ruby
<workmad3>
arup_r: I repeat, you don't need to do any data reloading
<workmad3>
arup_r: just edit database.yml so that your development database is the one with data in
joast has joined #ruby
<arup_r>
ok
<arup_r>
good idea
<arup_r>
let me point
<workmad3>
arup_r: it's literally less than a minutes work, and it's taken me longer to repeat it... multiple times... than it would take to do it!
bruno- has quit [Read error: Connection reset by peer]
gaussblurinc1 has joined #ruby
sanguisdex has quit [Quit: Leaving.]
<gaussblurinc1>
hi! I use guard for running tests. How could I exclude some files from watching?
Guest9281 is now known as jalcine
jalcine is now known as Guest83805
MasterPiece`` has joined #ruby
<jhass>
guard has comprehensive docs, did you check them?
plashchynski has joined #ruby
plashchynski has quit [Client Quit]
firedragon is now known as lumidragon
sanguisdex has joined #ruby
thebastl has joined #ruby
Guest83805 has quit [Quit: Later]
dcarmich has joined #ruby
DouweM has joined #ruby
lioninawhat has joined #ruby
lyuben_ has joined #ruby
aiguu has quit [Ping timeout: 250 seconds]
lyuben_ has left #ruby [#ruby]
jalcine_ has joined #ruby
LJT has joined #ruby
Abhijit has quit [Quit: Bye.]
jalcine_ is now known as jalcine
Rephiax has joined #ruby
Takle has quit [Remote host closed the connection]
<gaussblurinc1>
jhass: nope, ok, will look at it, thanks!
freerobby has quit [Quit: Leaving.]
piotrj has joined #ruby
MasterPiece`` has quit [Changing host]
MasterPiece`` has joined #ruby
Gadgetoid has quit [Ping timeout: 245 seconds]
Dreamer3 has quit [Quit: Leaving...]
Takle has joined #ruby
psychopath_mind has joined #ruby
joonty has quit [Quit: joonty]
piotrj has quit [Remote host closed the connection]
ndrei has quit [Ping timeout: 255 seconds]
MasterPiece`` is now known as MasterPiece
piotrj has joined #ruby
Rephiax has quit [Ping timeout: 264 seconds]
jerius has joined #ruby
Pupeno_ has quit [Quit: Leaving...]
tubuliferous_ has joined #ruby
matchaw has joined #ruby
ych4k3r has joined #ruby
bigkevmcd has quit [Quit: Outta here...]
zenith_ has joined #ruby
RegulationD has joined #ruby
tbon has quit [Ping timeout: 256 seconds]
Gadgetoid has joined #ruby
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
xcombelle has joined #ruby
AlexRussia has joined #ruby
iamninja_ has quit [Read error: Connection reset by peer]
tubuliferous_ has quit [Ping timeout: 255 seconds]
hcnewsom has joined #ruby
it0a has joined #ruby
jespada has quit [Read error: Connection reset by peer]
<gaussblurinc1>
jhass: ok, ignore works pretty well, but, how to exclude files (rspec) for both manual and guard testing? Some options in Rspec config?
harfangk has quit [Quit: This computer has gone to sleep]
RegulationD has quit [Ping timeout: 265 seconds]
Beliq has quit [Quit: My computer has gone to sleep. ZZZzzz…]
teddyp1cker has joined #ruby
<jhass>
probably, did you check rspec docs?
enebo has joined #ruby
harfangk has joined #ruby
werelivinginthef has joined #ruby
aspiers has joined #ruby
Beliq has joined #ruby
teddyp1cker has quit [Ping timeout: 250 seconds]
_maes_ has joined #ruby
<gaussblurinc1>
jhass: oh, I checked it, yes, it said about RSpec.configure. Also, I had troubles with web-browsing :(
<gaussblurinc1>
jhass: thanks a lot! I wish internet provider would fix browsing soon
<surs>
Hi, I'm debugging a ruby script that configures another (compiled) application. Now some output isn't going where it's supposed to and I need to debug the ruby script. Is there something I can put into the ruby script that puts me into debug mode?
layke has joined #ruby
drakhu has left #ruby [#ruby]
<surs>
I don't have a separate ruby environment to test it
psychopath_mind has quit [Ping timeout: 246 seconds]
chinmay_dd has joined #ruby
<gaussblurinc1>
surs: ruby -d
<jhass>
surs: can you install additional tools / gems?
<surs>
no, unfortunately I can't
<jhass>
then try ^
<surs>
I just put that on top of the script?
<jhass>
eh actually I'm not sure that even launches a debugger
bayed has joined #ruby
<surs>
I don't call ruby. the call is app.exe foo.rb
<surs>
the app holds a ruby 1.9.3 environment apparently
chinmay_dd has quit [Client Quit]
chinmay_dd has joined #ruby
<arup_r>
I'm really worried that String#% can't add anything to the trailing ,.,, all it does right padding.. :(
<jhass>
okay, I hope you're aware that there will be no security updates to that version anymore
livathin_ has quit [Remote host closed the connection]
livathinos has joined #ruby
lumidragon has quit [Quit: WeeChat 1.0.1]
boadie has joined #ruby
livingstn has joined #ruby
Soda has quit [Max SendQ exceeded]
giuseppesolinas has joined #ruby
jlast has joined #ruby
t_p has joined #ruby
blueOxigen has joined #ruby
Soda has joined #ruby
mdibound has joined #ruby
bluOxigen has quit [Ping timeout: 272 seconds]
Takle has quit [Remote host closed the connection]
Takle has joined #ruby
<mwlang>
I’m getting timestamps from LDAP using the net-ldap gem. Any idea what format this timestamp (string literal) is in? "20150304212145.0Z"
Cust0sLim3n has quit [Ping timeout: 252 seconds]
ta has joined #ruby
<workmad3>
mwlang: looks like iso8601
startupality has joined #ruby
AdamMeghji_ is now known as AdamMeghji
teddyp1cker has joined #ruby
tvon has quit [Quit: leaving]
otisZart has quit [Ping timeout: 264 seconds]
cazrin has joined #ruby
pardusf has quit []
Cust0sLim3n has joined #ruby
User458764 has joined #ruby
Mives has quit [Quit: WeeChat 1.1.1]
parduse has joined #ruby
<mwlang>
workmad3: thanks. Its missing the separators for iso8601, but it does appear to be following that spec otherwise.
danrik has joined #ruby
<danrik>
/usr/share/rubygems/rubygems/dependency.rb:298:in `to_specs': Could not find 'sass' (~> 3.2.17) - did find: [sass-3.3.8] (Gem::LoadError)
centrx has joined #ruby
<danrik>
^could someone help?
<workmad3>
mwlang: iso8601 allows you to remove the separators
bluOxigen has joined #ruby
<jhass>
danrik: using what command?
<mwlang>
workmad3: I didn’t know that!
crueber has joined #ruby
eonbluez has joined #ruby
<danrik>
jhass, im just trying to run gulp - and it complains about could not find sass.
<eonbluez>
Ahoy ninjas!
<workmad3>
mwlang: YYYYMMDD is allowed for dates, hhmmss.sss is allowed for times, and the 'T' separating the two is 'permitted to be omitted by mutual agreement'
narcan has quit [Quit: -[AppDelegate installMalware]: unrecognized selector sent to instance 0x156109c0]
<danrik>
jhass, fedora 21 - I've installed compass and sass via package manager....
<surs>
err.. how do I tell pry to step in/out/over ??
<mwlang>
workmad3: and Time.parse "20150304212145.0Z" works just fine. Life couldn’t be easier this fine morning.
<danrik>
jhass, I don't know ruby at all - do people usually install sass and compass form pacakage managers? or via gem commands?
<workmad3>
mwlang: woo :)
Guest73 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<workmad3>
mwlang: enjoy your easy zulu time while you can ;)
<jhass>
danrik: "gem commands" but which one exactly depends on the project setup
blueOxigen has quit [Ping timeout: 265 seconds]
SouL has joined #ruby
jottr has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<adaedra>
danrik: usually gem
User458764 has joined #ruby
<adaedra>
except many deployment in some places
<adaedra>
maybe*
boadie has quit [Remote host closed the connection]
niik00 has left #ruby [#ruby]
Guest73 has joined #ruby
freerobby has quit [Quit: Leaving.]
<jhass>
danrik: so not sure if you answered my question yet... ;)
jusmyth has quit [Quit: Leaving.]
<jhass>
danrik: do you see Gemfile?
<danrik>
jhass, im just trying to use gulp. which in turn requires sass and compass.
<adaedra>
What commande gives you this error ?
freerobby has joined #ruby
<jhass>
danrik: thing is gulp itself has not a single line of ruby code as far as I can tell
<helpa>
Hi Daneel. We in #ruby would really appreciate it if you did not use pastebin during your time with us.
<helpa>
Pastebin is not good because it loads slowly for most, has ads which are distracting and has terrible formatting. Please use Gist (http://gist.github.com) or Pastie (http://pastie.org) instead. Thanks!
Guest24536 has quit [Ping timeout: 256 seconds]
dfinninger has quit [Remote host closed the connection]
alex88 has quit []
urtokk has joined #ruby
tgunr has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Daneel>
and it looks to exist also value "function"
antgel has quit [Ping timeout: 256 seconds]
mjuszczak has quit []
kobain has joined #ruby
kobain has quit [Max SendQ exceeded]
hiyosi has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<jhass>
that page has a single mention of the word function and it's completely unrelated, so maybe you can understand that I'm not following you there
tubuliferous_ has quit [Remote host closed the connection]
<Daneel>
yes i used function with code to explain it is not function
<Daneel>
s/code/quote/
tubuliferous_ has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<Daneel>
better to say method ?
<jhass>
yes, but I'm not sure that's relevant here
<jhass>
Do you know what a string is and what a local variable is?
<Daneel>
in the page i linked they use h.key(100)
<jhass>
yes
<Daneel>
key is a method that return the key associated with the value 100
<jhass>
yes
<eam>
h.key(LOCAL_MACHINE)
<Daneel>
i what the method to get the value associated with a key
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mistermocha has quit [Remote host closed the connection]
gaussblurinc1 has joined #ruby
<Daneel>
it works
<Daneel>
i fetched values
<Daneel>
thank you guys
mistermocha has joined #ruby
govg has joined #ruby
gaussblurinc1 has quit [Client Quit]
teddyp1cker has quit [Ping timeout: 264 seconds]
ta has joined #ruby
iwaffles has joined #ruby
yekta has joined #ruby
martin_work has left #ruby [#ruby]
cazrin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
epistrephein has quit []
<Daneel>
bye bye have a nice day
Daneel has quit [Quit: Page closed]
claw has quit [Ping timeout: 256 seconds]
graydot has joined #ruby
casadei has joined #ruby
leafybasil has quit [Remote host closed the connection]
mjuszczak has quit []
baweaver has quit [Remote host closed the connection]
jespada has quit [Ping timeout: 256 seconds]
claw has joined #ruby
spider-mario has joined #ruby
leat1 has quit [Ping timeout: 272 seconds]
ta has quit [Ping timeout: 256 seconds]
iamjarvo has joined #ruby
teddyp1cker has joined #ruby
govg has quit [Ping timeout: 264 seconds]
govg_ has joined #ruby
slackbotgz has quit [Remote host closed the connection]
sevvie has quit [Ping timeout: 246 seconds]
slackbotgz has joined #ruby
<hackeron>
hey, I have a long running process that uses eventmachine and the amqp gem. For some reason, the memory of this process is leaking around 1% memory per day - it is currently at 6% memory and growing :/ - any ideas what I can do to try to detect the cause of the leak of the running process?
Takle has quit [Remote host closed the connection]
basmoura has joined #ruby
towski_ has joined #ruby
jespada has joined #ruby
kartouch has quit [Ping timeout: 250 seconds]
gfawcettpq has quit [Ping timeout: 264 seconds]
sambao21 has quit [Quit: Computer has gone to sleep.]
tcrypt has quit [Remote host closed the connection]
tcrypt has joined #ruby
<jhass>
hackeron: have a look at ruby-prof or rbkit
tcrypt has quit [Client Quit]
dumdedum has quit [Quit: foo]
lioninawhat has quit [Remote host closed the connection]
<hackeron>
jhass: any examples how to use either on a running process?
ramfjord has joined #ruby
kobain has joined #ruby
aryaching_ has joined #ruby
tier_ has quit [Read error: Connection reset by peer]
kartouch has joined #ruby
tier has joined #ruby
<jhass>
uh, doubt you can unless you have a way to inject arbitrary ruby code
kalusn has quit [Remote host closed the connection]
<jhass>
best would be to find a repro in a test env
<hackeron>
jhass: yeh, I can't reproduce in a test environment :/
mary5030 has joined #ruby
layke has quit [Ping timeout: 240 seconds]
aryaching has quit [Ping timeout: 245 seconds]
sevvie has joined #ruby
iamninja has joined #ruby
iliketurtles has joined #ruby
tubuliferous_ is now known as tubuliferous
RegulationD has quit [Remote host closed the connection]
_djbkd has quit [Remote host closed the connection]
yfeldblum has joined #ruby
Hijiri has joined #ruby
lxsameer has quit [Ping timeout: 246 seconds]
roolo has joined #ruby
jottr_ has joined #ruby
ramfjord has joined #ruby
<hackeron>
bradland: hmm, this is not custom background jobs, this is message processing - so now quite sure where to add the newrelic in this code: http://pastie.org/10021479 -- any ideas?
<hackeron>
not*
_djbkd has joined #ruby
momomomomo has joined #ruby
ta has joined #ruby
sargas has joined #ruby
buub has joined #ruby
jottr has quit [Ping timeout: 250 seconds]
Hirzu has quit [Ping timeout: 255 seconds]
banisterfiend has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<bradland>
in that case, you'll have to do your own custom metrics
teddyp1cker has quit [Remote host closed the connection]
chinmay_dd has quit [Ping timeout: 246 seconds]
zapata has quit [Remote host closed the connection]
teddyp1cker has joined #ruby
shredding has joined #ruby
davejlong has quit []
zapata has joined #ruby
shredding has quit [Remote host closed the connection]
Hijiri has quit [Quit: WeeChat 1.0.1]
Crazy_Atheist has joined #ruby
dfinninger has joined #ruby
lordkryss has quit [Quit: Connection closed for inactivity]
aryaching_ has joined #ruby
HOrangeJewce has quit [Quit: Leaving.]
enebo has quit [Quit: enebo]
relix_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
martin_work has joined #ruby
aryaching has quit [Ping timeout: 252 seconds]
RegulationD has joined #ruby
martin_work has quit [Client Quit]
teddyp1cker has quit [Ping timeout: 255 seconds]
zz_Outlastsheep is now known as Outlastsheep
jarjar_prime has quit [Quit: Ready? Set? Go!]
HOrangeJewce has joined #ruby
amishPa has joined #ruby
otisZart has joined #ruby
bootstrappm has joined #ruby
unizen has quit [Ping timeout: 252 seconds]
elfuego has joined #ruby
momomomomo has joined #ruby
mdibound has joined #ruby
uri_ has joined #ruby
bradleyprice has joined #ruby
martinbmadsen has quit [Ping timeout: 244 seconds]
hmsimha has joined #ruby
SegFaultAX has quit [Excess Flood]
martin_work has joined #ruby
SegFaultAX has joined #ruby
phale has joined #ruby
aryaching_ has quit [Ping timeout: 264 seconds]
<phale>
"If you repeat a lie often enough, people will believe it, and you will even come to believe it yourself."
baweaver has joined #ruby
<elfuego>
i’m using Net::HTTP.post_form(uri, params) to post to an endpoint but its returning a 302, when I use the raw url from a rest client I get a 200
<phale>
elfuego: is any chance the uri you're using http but it's actually https?
<havenwood>
elfuego: the latter is following the redirect
amishPa has left #ruby [#ruby]
<havenwood>
elfuego: you have to manually follow redirects with Net::HTTP
thumpba_ has quit [Ping timeout: 245 seconds]
Notte has quit [Remote host closed the connection]
<phale>
exactly, that's how unextensible it is
<phale>
afk
<elfuego>
havenwood: how can I follow the redirect?
martin_work has quit [Client Quit]
<elfuego>
with Net::HTTP
checkit has joined #ruby
<mwlang>
is carrierwave’s documentation on testing out of date? I can’t seem to use the have_dimensions, be_no_larger_than, etc. matchers as described.
nettoweb has joined #ruby
lanemeyer has quit [Ping timeout: 250 seconds]
<havenwood>
elfuego: check the response and when it redirects manually proceed to the response['location']
freerobby has quit [Quit: Leaving.]
nicolastarzia has joined #ruby
<phale>
mwlang: "be_no_larger_than"
<phale>
sounds like shitty variable naming
<havenwood>
elfuego: or use a Net::HTTP wrapper like RestClient that does redirection for you
<phale>
or method
_2_lalala has joined #ruby
<jhass>
phale: how so?
<mwlang>
either that or rspec is causing the uploader to return a string rather than the uploader itself because its giving me this error: expected http://placehold.it/346x421 to respond to `has_dimensions?`
<phale>
jhass: well look at it
<phale>
it pains my eyes to look at it
<jhass>
I did
<jhass>
how so?
<phale>
it's lengthy for no reason
<mwlang>
phale: heh, take that one up with carrierwave folks. :-p
<havenwood>
elfuego: or something not based on Net::HTTP like HTTP, HTTPClient, Excon, Typhoeus or others.
<phale>
mwlang: sure whats their mailing list
<elfuego>
thank havenwood will check it out
Lingo_ has joined #ruby
<elfuego>
thanks*
<havenwood>
elfuego: no prob
_2_lalala has quit [Remote host closed the connection]
<phale>
def !> #not larger than end
huddy has quit [Quit: Connection closed for inactivity]
klmlfl has quit [Remote host closed the connection]
<havenwood>
elfuego: I like to use HTTP or HTTPClient rather than deal with Net::HTTP. Others just love the stdlib so they backbend a bit.
User458764 has joined #ruby
<havenwood>
Lovely gems are lovely.
klmlfl has joined #ruby
<phale>
I dont get gems
<phale>
how can you view their source code
kuroro has joined #ruby
ismaelga has quit [Remote host closed the connection]
<jhass>
phale: $EDITOR $(gem which gemname)
<phale>
hmm
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<mwlang>
so anyway….back to my issue…if I change the expectation to look at the uri instead of using “has_dimensions” then I get back the actual uploader instance as I was originally expecting!
<phale>
also, I tried to do: s = gets.chomp
<phale>
but if I EOF i will get a nomethoderror, this is normal, ruby handles the exception
LJT has joined #ruby
<phale>
how do i get rid of that
<jhass>
don't chomp when it's nil
<havenwood>
phale: `gem open gem_name_here` to open in an editor
<phale>
while s = gets.chomp != nil
<havenwood>
phale: gem contents gem_name_here
<phale>
havenwood: what about the rest of the files?
<havenwood>
phale: ^ contents
<phale>
ah
duncannz has joined #ruby
<havenwood>
phale: e.g.: cat `gem contents rake`
<phale>
seems a lot of work just to edit a file
<mwlang>
phale: how about reading it all at once: lines = File.read(‘some_file.txt’).split(“\n”)
<phale>
mwlang: i'm not reading a file
<havenwood>
phale: this is a lot of work?: gem open gem_name
<havenwood>
phale: oh
maletor has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mitchellhenke has quit [Quit: Computer has gone to sleep.]
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
tier_ has joined #ruby
mitchellhenke has joined #ruby
<phale>
sounds like ruby isn't my kind of language anymore :-(
Soda has joined #ruby
mdibound has quit [Quit: Be back later ...]
rdark has quit [Quit: leaving]
<havenwood>
was going to say, you can shorten it to `gem op gem_name` but that's as short and sweet as it gets, but you're talking about #gets
duncannz has quit [Read error: Connection reset by peer]
<havenwood>
phale: why aren't you fickle?
mdibound has joined #ruby
<phale>
havenwood: i'm using C
<phale>
i just dont feel at home with ruby
iamjarvo has joined #ruby
tgunr has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
duncannz has joined #ruby
<havenwood>
phale: Ruby is the pride and joy of C hackers.
GothAlice has joined #ruby
<havenwood>
phale: But maybe not your thing.
GothAlice has left #ruby ["Quitting."]
<havenwood>
phale: Matz is a C hacker.
<phale>
while (s = gets.chomp) != nil
duncannz has quit [Read error: Connection reset by peer]
<phale>
this probably wont work
<phale>
still gives me an exception
duncannz has joined #ruby
<wasamasa>
havenwood: so is tenderlove
<weaksauce>
phale a check for nil is not needed
relix has joined #ruby
<weaksauce>
there are only two falsey values nil and false in ruby
chrishough has joined #ruby
tier has quit [Ping timeout: 245 seconds]
bim has joined #ruby
bihi has joined #ruby
mdibound has quit [Client Quit]
<weaksauce>
and it will not ever end phale because "" is never false
mdibound has joined #ruby
<jhass>
weaksauce: gets returns nil on EOF (Ctrl+D) actually
maletor has joined #ruby
<weaksauce>
I was thinking from interactive
lele has quit [Quit: Coyote finally caught me]
bluOxigen has quit [Ping timeout: 264 seconds]
lele has joined #ruby
r3Dk1nG has quit [Remote host closed the connection]
<phale>
yeah
<phale>
i just want to handle this all my self
tvw has quit []
bluOxigen has joined #ruby
<weaksauce>
phale why not read a file line by line using ruby idioms?
<jhass>
as said, just don't call chomp on nil
<jhass>
it's gets that returns nil, not chomp
klmlfl has quit [Remote host closed the connection]
<phale>
weaksauce: seriously what the fuck
<phutchins>
Anyone good with decoding binary? I'm trying to reverse engineer an encoded mongo BSON::ObjectId and get the data out of it. I'm able to get an array of bytes which looks something like [84, 179, 17, 54, 145, 19, 0, 107, 190, 0, 0, 17] but not sure what the next step is...
nicolastarzia has quit [Remote host closed the connection]
<pontiki>
ruby is not for you!
<phutchins>
There is a date, hostname and pid encoded in that string... :)
<baweaver>
phutchins: ASCII?
<jhass>
phutchins: do you have the actual values your example should transform to?
<havenwood>
phale: do you get what jhass is saying?
<adaedra>
there’s pack and unpack for that, no ?
<bihi>
hi people, do you know if there's any reason Object methods are defined in Kernel which is included in Object, instead of directly in Object?
<weaksauce>
phale while s = gets.chomp is c written in ruby
GaryOak_ has quit [Remote host closed the connection]
<phutchins>
jhass: So I can get the date from built in methods so I coudl get that. And I know where the code is that creates the strings...
<weaksauce>
thinking about it like you are doing null terminated strings
<phutchins>
baweaver: Thats partially where i'm struggling is identifying what i'm getting back so I can get to the next step... I start with a BSON::ObjectId that looks like this.. .ObjectId("54b311369113006bbe000011")
<phale>
how the hell is that easy to confuse with files?
shadoi1 has joined #ruby
<phale>
im not even using an argument for file input or anything
<havenwood>
phale: don't chomp nil
<apeiros_>
banister: not much. killing a headache. and you?
<phale>
havenwood: yeah
<phale>
but how do i avoid doing that
<baweaver>
Looks like Hex
<phutchins>
phale: check for nil before doing chomp
<banister>
apeiros need help with polymorphis associations :(
<banister>
apeiros heh, ok, basically i want my User models to be both something that can be commented ON and also the author of comments (where comments are polymorphic)
<phale>
yeah this looks like nonsense
<baweaver>
it's touchy on occasion.
<banister>
apeiros comments BY a user i want to just access via user.comments but comments ABOUT a user i want to access via user.notes
<banister>
apeiros cos comments can be on many different things, aside from users
<baweaver>
jhass wins
<havenwood>
phutchins: if you're doing explicit #nil? checks you can probably make it more concise and idiomatic by using truthyness
bMalum has joined #ruby
bMalum has quit [Remote host closed the connection]
patrick99e99 has quit [Read error: Connection reset by peer]
einarj has joined #ruby
* baweaver
never deals with pack / unpack, wonders the reason to bother.
rrichardsr3 is now known as rrichardsr3_away
<havenwood>
baweaver: was just doing a manual #pack #unpack "Q*" in Crystal and really missed the shortcut
synt_ has joined #ruby
<synt_>
like i was saying, all software/programs and hardware sucks
<synt_>
not trying to offend anyone though even my programs suck
Notte has joined #ruby
<havenwood>
synt_: standing on the shoulders of giants
<mwlang>
baweaver: yeah, two days in a row this subject comes up…unless you’re talking to your serial port on a Raspberry Pi, I don’t quite fathom the point.
<adaedra>
synt_: thank you
<phutchins>
jhass: AH! Ok closer. I get an array of int's back. no hostname tho :) maybe thats what the hostname was entered as tho
<jhass>
synt_: show us some of your ruby though!
<synt_>
there are things that are less shittier than others, thats why we use it
<synt_>
okay
<apeiros_>
banister: seems fine, what's the problem?
<phutchins>
havenwood: yeah could definitely be more concise
enebo has joined #ruby
<jhass>
phutchins: machine_id != hostname I'd say
<baweaver>
impostor syndrome is a bad trap to fall into
<baweaver>
Yeah, I tend to only bother with high level ruby so very rarely does that come up for me.
<jhass>
phutchins: so it's the MD5 hash of the hostname
mbwe1 has quit [Client Quit]
mbwe has joined #ruby
<synt_>
as you can see
<synt_>
my code is absolutely horrific
<jhass>
phutchins: 32 bits of it that is
<phutchins>
jhass: ah yes! ok so i'd have to know the hostnames and compare...
freerobby has joined #ruby
<adaedra>
>> puts ”Hello World!”
leat1 has quit [Ping timeout: 245 seconds]
<baweaver>
best piece of advice: You are not your code.
<synt_>
did you just insult me?
<Outlastsheep>
synt_: he reassured you cx
* baweaver
sighs
JaViD84 has left #ruby ["Leaving"]
<Outlastsheep>
You said it was horrific, he said you are not.
mjuszcza_ has joined #ruby
<synt_>
exactly
phale has quit [Ping timeout: 245 seconds]
Hirzu has joined #ruby
mjuszcza_ has quit [Client Quit]
<baweaver>
Mate, the amount of my early code that I've burned and buried is just as vast as any
<phutchins>
jhass: so the fun part about this is that I'm dealing with a forked version of the BSON library that does decode the hostname string in the mongo object id :)
<baweaver>
It's about where you go from there that matters.
patrick99e99 has joined #ruby
ibaqew has quit [Remote host closed the connection]
<phutchins>
jhass: so i'm trying to learn how the orig version works and then figure out how to pull the hostname string from the modified version i'm working with now
<baweaver>
bemoaning your current skill does little good, you just need to press on
mjuszczak has quit [Ping timeout: 240 seconds]
Takle has joined #ruby
<jhass>
phutchins: it would help to know the original hostname, but I doubt there's a full one in the bytes you've shown, it's a bit short for that
<phutchins>
jhass: the one I'm workign with decodes the substring like so... return Math.floor(BinaryParser.decodeInt(this.id.substring(7,9), 16, false, false));
<banister>
apeiros so that code looks correct?
juanpaucar has quit [Remote host closed the connection]
<phutchins>
(this is javascript, yes i know)
<banister>
apeiros nothing, i haven't tried it yet
xlogic has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<apeiros_>
odd choice of mongo for an object id
mordocai has joined #ruby
<apeiros_>
it's 19 byte as far as I understand - so longer than a UUID and less good
<jhass>
yeah, it's seems to be a badly executed UUID
<jhass>
I'm sure yorick can explain why it exists :P
benlieb has joined #ruby
x1337807x has joined #ruby
klmlfl has joined #ruby
rhllor has joined #ruby
dseitz has joined #ruby
<benlieb>
Hey folks, I'm having trouble installing chruby on my new ubuntu machine at work. The install instructions here seem to "suceed" and yet, chruby is not available https://github.com/postmodern/chruby
<apeiros_>
jhass: I'm sure yorick can explain how and in how many ways it sucks :D
<benlieb>
Is this a known problem with a workaround, or am I a sad unicorn
jenrzzz has joined #ruby
<baweaver>
Here's a slight curiosity: why is Ruby less used for system administration at companies like Apple and Facebook? I get Google with Guido on staff.
<baweaver>
It's not even really used much around here except on our team.
<shadoi1>
baweaver: I work at apple. Just sayin.
momomomomo has quit [Quit: momomomomo]
<baweaver>
I was seeing Python in one of their requirements
<baweaver>
though it may be that they're as fragmented as us in that regard :P
kalusn has joined #ruby
* baweaver
is at Sony in SF
<shadoi1>
very.
<baweaver>
Had a recruiter pinging me for a devops role over there
<baweaver>
another one over at facebook
<baweaver>
just noticed python is getting mentioned a lot more often
<baweaver>
Not that I don't know it, I just tend to prefer Ruby.
<shadoi1>
You can thank openstack for that
* baweaver
googles
<postmodern>
benlieb, make sure you have chruby loaded
<postmodern>
benlieb, and restart the terminal
<baweaver>
that'd do it
meatherly has quit [Remote host closed the connection]
<baweaver>
You'd think Chef and friends would have a bit of pull on that
kuroro has quit [Remote host closed the connection]
<shadoi1>
they do, but a LOT of people think it's insane to run ruby as root. ;)
<baweaver>
and AWS is about as neutral as you can be on APIs (Ruby, JS, Python, etc)
<baweaver>
granted.
<baweaver>
though I think it's insane to run anything as root
<baweaver>
but that's a different matter
* baweaver
puts on tinfoil hat
<shadoi1>
yeah
<phutchins>
jhass: Ok, this all makes sense now. The way it's encoded now is not in string format as I was told, it is also an md5 of the hostname... So i wasn going down the wrong path.
<phutchins>
jhass: thanks a ton for the help! And anyone else that chimed in :)
<phutchins>
this was an interesting one...
<baweaver>
Pretty sure we're the only team at Sony using Ruby though
benlieb has left #ruby ["Leaving"]
benlieb has joined #ruby
<arup_r>
baweaver: Sony means?
<baweaver>
company
<arup_r>
those who build TV ?
<baweaver>
among other things, yes
checkit has quit [Ping timeout: 264 seconds]
<arup_r>
wow
<benlieb>
postmodern: I did, and no dice
Outlastsheep is now known as zz_Outlastsheep
<arup_r>
they do use Ruby.. cool
<jhass>
didn't they build those singing robots? "popstars" or something was the brand name I think
<baweaver>
though I'm at SNEI on the PS4 team. Most teams seem to use Python or JS
<baweaver>
Vocaloids, not sure.
Jackneill has quit [Read error: Connection reset by peer]
<benlieb>
postmodern: I can also see that /usr/local/share/chruby is not executable
startupality has quit [Quit: startupality]
<postmodern>
benlieb, that might be an issue
<benlieb>
I'd like to recommend the tool to my whole team
<baweaver>
I could put a shameless plug on a posting we have :D
<benlieb>
but the install isn't really working
startupality has joined #ruby
<postmodern>
benlieb, make sure the dir is +rx and the files within it are +r
<benlieb>
postmodern: where would I start debugging? The install process seemed to say all succeeded
Notte has quit [Remote host closed the connection]
<postmodern>
benlieb, sounds like the permissions of /usr/local/share are too strict
startupality has quit [Client Quit]
EllisTAA has joined #ruby
<postmodern>
benlieb, ls -l /usr/local/share/chruby
agrinb has joined #ruby
ItSANgo has joined #ruby
spyderman4g63 has quit []
<arup_r>
baweaver: I'll apply for job then there..
<baweaver>
they're all normally posted on LinkedIn.
<EllisTAA>
I wrote this code but when i look at it i think "this looks noobish, you need to refactor it". can anyone give me tips on how to approach this with the goal of refactoring it? https://gist.github.com/ellismarte/269e58273bcfca355686
<baweaver>
I know my team was looking for a senior Rails/Angular type for a lead spot.
<postmodern>
benlieb, chruby is a function that lives in chruby.sh, so you must source chruby.sh in your shell's configuration. Can you `source /usr/local/share/chruby/chruby.sh` from the command-line?
<wallerdev>
reduce makes so much more sense than inject
<EllisTAA>
jhass: why are they in square brackets?
<baweaver>
of course tail recursion in ruby isn't the best idea
<jhass>
baweaver: but available as a compile time flag :P
<_blizzy_>
oh, ok, it's binary. thanks, jhass.
<baweaver>
still feels dirty...
<_blizzy_>
thanks, baweaver.
<baweaver>
no problem mate.
<baweaver>
Kinda wish they'd just put in TCO already
LJT has quit [Quit: Sleeping...]
<elfuego>
havenwood: I use this to make the post http://www.codeshare.io/zC6WF, but I don’t have access to objects returned by post, I just see #<Net::HTTPOK 200 OK readbody=true> when I inspect
<baweaver>
Just jump through SICP or Learn You a Haskell
<_blizzy_>
I learned fold through haskell.
<zenspider>
I prefer to push ppl at little schemer before SICP
<zenspider>
it's a good compare & contrast
ozzloy has joined #ruby
<baweaver>
fair enough
<baweaver>
that and not as dense in general
blazes816 has joined #ruby
havenwood has quit []
<baweaver>
zenspider: I use both, see if I can note anything.
bigkevmcd has quit [Quit: Outta here...]
leat1 has quit [Ping timeout: 252 seconds]
leat1 has joined #ruby
slackbotgz has quit [Remote host closed the connection]
slackbotgz has joined #ruby
<zenspider>
I actually like the little schemer better from a pedagogy standpoint. that and I think the metacircular interpreter in ch 10 is cleaner than SICP's... but it was written 5-8 years later iirc.
<zenspider>
don't get me wrong _blizzy_... they're BOTH classics and BOTH worth going through
<zenspider>
hoelzro: throw in a 's/_% /% _/' comment for me please
<hoelzro>
zenspider: sure thing
LJT has quit [Quit: Sleeping...]
Dreamer3 has joined #ruby
<baweaver>
Disqus has spoiled me something fierce ;)
jespada has quit [Ping timeout: 252 seconds]
blazes816 has quit [Ping timeout: 256 seconds]
LJT has joined #ruby
<hoelzro>
there, done
<baweaver>
thanks mate.
<hoelzro>
sure thing
<hoelzro>
happy to help!
revoohc has quit [Quit: revoohc]
<postmodern>
benlieb, got it working?
lioninawhat has joined #ruby
lanemeyer has joined #ruby
ghostpl_ has joined #ruby
reset has joined #ruby
Thaxll has joined #ruby
ismaelga has joined #ruby
reset has quit [Client Quit]
m8 has quit [Quit: Sto andando via]
<Thaxll>
Hi, I'm trying to do something and I'm not sure if it
<Thaxll>
it's possible*
<Thaxll>
Is there an easy way to split a utf-8 string by bytes into an array but making sure that we don't cut in the middle of a character?
<jhass>
that doesn't make sense
<Thaxll>
Why that?
<jhass>
what do you expect the output to be for a multi byte char?
tier_ has quit [Ping timeout: 245 seconds]
<shevy>
jhass can not solve a utf-8 problem!
Asher has quit [Quit: Leaving.]
<Thaxll>
well that's my problem, I want to cut before if we do cut in a mutli byte char
<baweaver>
:O
<shevy>
what is the middle of a character anyway
<jhass>
Thaxll: so you don't want bytes, you want codepoints?
<shevy>
will a 'n' become two 'i'? ii
<jhass>
>> "aüb".codepoints
<jhass>
right
<zenspider>
Thaxll: you mean by character, not by byte?
<Thaxll>
shevy: if i use unpack() it will unpack in the middle of the "bytes"
<shevy>
the bot won't accept utf!
<jhass>
try that
<baweaver>
my_string.chars.map whateverunpackhere
<jhass>
.codepoints
<jhass>
simple as that
LJT has quit [Quit: Sleeping...]
mdibound has joined #ruby
<Thaxll>
juste some background here, I'm receiving some messages that i have to output somewhere, that somewhere doesn't accept message bigger than 32K so I have to split large messagrinto small ones
thumpba_ has quit [Remote host closed the connection]
ldnunes has quit [Remote host closed the connection]
Morkel has quit [Quit: Morkel]
thumpba has joined #ruby
<Thaxll>
jhass: I'm going to look at that tank you
<jhass>
"മലയാണ്മ".codepoints
<jhass>
try it
coderhs has joined #ruby
ghostpl_ has quit [Ping timeout: 252 seconds]
teddyp1cker has joined #ruby
EllisTAA has quit [Quit: EllisTAA]
SOLDIERz has quit [Quit: Be back later ...]
<Thaxll>
( I'm running my code into jruby ) ;o
HOrangeJewce has joined #ruby
jerematic has quit [Remote host closed the connection]
<jhass>
well, maybe he has a reason to not slice into the middle of a character?
The_Phoenix has quit [Read error: Connection reset by peer]
<Thaxll>
yes
HOrangeJewce has quit [Client Quit]
<jhass>
like no control over the assembling process?
<bradland>
in his problem description, he says he needs to limit messages to 32K
<bradland>
i wouldn't split multi-byte chars, personally
<Thaxll>
I have to slice because the output is limited by the size of the message ( 32k ) and if I slice in the middle it won't encode to json
<bradland>
that way each message is atomic
<Thaxll>
because json is utf-8 only so my cut in the middle will break the utf-8 char and won't encode and then won;t flush
Alives has quit [Ping timeout: 276 seconds]
Doc_X has joined #ruby
<jhass>
bradland: I guess you missed the initial one
mdibound has quit [Quit: Be back later ...]
roolo has quit [Remote host closed the connection]
Ankhers has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
<bradland>
yeah, as usual, i'm doing a drive by :)
<Thaxll>
( it's a logstash pluging btw )
pushpak has joined #ruby
<jhass>
Thaxll: so with .chars.map(&:bytes) you can simply build up a new message, counting how many bytes you added and aborting if current_bytes.size + char.size > limit
<jhass>
serialize the char again with .pack("C")
<_blizzy_>
so, is there a difference between [1,2].reduce(&:^) and [1,2].reduce(:^)
ramfjord has quit [Ping timeout: 250 seconds]
<jhass>
_blizzy_: the former is slightly slower since it creates an extra proc object
<_blizzy_>
jhass, oh ok. thanks.
<jhass>
while the later form uses send directly I believe
<_blizzy_>
that makes sense. thxs.
sepp2k has quit [Quit: Konversation terminated!]
jerius has quit [Quit: /quit]
<bradland>
heh, so byteslice will bisect a multi-byte character :\
<bradland>
i guess that makes sense
baweaver has joined #ruby
Dr3amc0d3r|away has quit [Ping timeout: 245 seconds]
rkjaer has quit []
<jhass>
Thaxll: or actually I guess no need for the map(&:bytes), just count along with .bytesize
<Thaxll>
jhass: I think that's what I did first but it was slow compare to unpack, gonna try again!
jottr has joined #ruby
_djbkd has quit [Remote host closed the connection]
dstarh has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
iwaffles has joined #ruby
yekta has quit [Quit: yekta]
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
lioninawhat has quit [Remote host closed the connection]
xcombelle has quit [Quit: Quitte]
Asher has joined #ruby
duggiefresh has quit []
Soda has quit [Remote host closed the connection]
DerisiveLogic has quit [Ping timeout: 250 seconds]
elfuego has quit [Quit: elfuego]
Eiam has quit [Quit: ╯°□°)╯︵ǝpouǝǝɹɟ]
pietr0 has quit [Remote host closed the connection]
maximski has joined #ruby
pietr0 has joined #ruby
DouweM has joined #ruby
x1337807x has joined #ruby
ramfjord has joined #ruby
<Senjai>
_blizzy_: Generally if a method accepts a symbol instead of a block, just always send it the symbol
it0a has quit [Quit: WeeChat 1.1.1]
<Senjai>
It may just call to_proc on it anyway, but it might do something different or more optimized
Eiam has joined #ruby
<Senjai>
a symbol is more versitile than a block
<Senjai>
s/block/proc
ojacobson has quit [Quit: Leaving...]
DerisiveLogic has joined #ruby
patrick99e99 has quit [Ping timeout: 246 seconds]
<jhass>
Thaxll: super ugly but I think it works :P taken = 0; chunks = (s * 123).chars.slice_before {|c| taken += c.bytesize; (taken > 20).tap {|overflow| taken = c.bytesize if overflow } }.map(&:join)
<Thaxll>
wtf
<Thaxll>
I thought my unpack one liner was horrible: longMessage = event[@source_field].unpack("a#{@length}"*((size/@length)+((size%@length>0)?1:0)))
mistermocha has quit [Ping timeout: 252 seconds]
lioninawhat has joined #ruby
<Thaxll>
jhass: what does your thing does i have some problem following the code lol it's my second day of ruby
mistermocha has joined #ruby
CustosLimen has joined #ruby
<jhass>
it splits the input into individual characters (.chars)
<jhass>
then it iterates over them counting the bytes
elowing has joined #ruby
<jhass>
if taking that character would overflow, return false so slice_before starts a new chunk
<jhass>
and reset the counter
<jhass>
so 20 is the limit
<jhass>
(s * 123) is just the input
<Thaxll>
in bytes right?
<jhass>
right
<Thaxll>
ok let me try that
<jhass>
using 3 byte chars as input I get 6 chars per chunk, so 18 bytes
<jhass>
+ 3 == 21 that would overflow so it starts a new one
<jhass>
might be more efficient with replacing .chars. by .each_char. actually
doodlehaus has quit [Remote host closed the connection]
<Thaxll>
jhass: damned it seems to work
<Thaxll>
:D
leafybasil has joined #ruby
lw has quit [Quit: s]
DavidDudson has joined #ruby
brb3 has quit [Quit: <.<]
klmlfl has quit [Remote host closed the connection]
thumpba has quit [Read error: Connection reset by peer]
dfinninger has quit [Remote host closed the connection]
<helpa>
Hi Thaxll. We in #ruby would really appreciate it if you did not use pastebin during your time with us.
<helpa>
Pastebin is not good because it loads slowly for most, has ads which are distracting and has terrible formatting. Please use Gist (http://gist.github.com) or Pastie (http://pastie.org) instead. Thanks!
baweaver has quit [Remote host closed the connection]
reinaldob has joined #ruby
reinaldob has quit [Read error: Connection reset by peer]
reinaldob has joined #ruby
<jhass>
Thaxll: exactly 20 bytes each ;)
Notte has joined #ruby
DavidDud_ has quit [Read error: Connection reset by peer]
<jhass>
and 13 for the last one
mdibound has joined #ruby
<jhass>
you can check with .map(&:bytesize)
DavidDud_ has joined #ruby
razieliyo has quit [Remote host closed the connection]
kalusn has quit [Remote host closed the connection]
tbon has joined #ruby
enebo has quit [Quit: enebo]
jud has joined #ruby
jud has joined #ruby
jespada has quit [Ping timeout: 244 seconds]
Matthews_ has joined #ruby
jenrzzz has quit [Ping timeout: 264 seconds]
MatthewsFace has quit [Read error: Connection reset by peer]
d10n-work has quit [Quit: Connection closed for inactivity]
Dolphi has quit [Ping timeout: 244 seconds]
jespada has joined #ruby
cvtsx has joined #ruby
ghostpl_ has joined #ruby
MasterPiece has joined #ruby
MasterPiece is now known as Guest74211
hcnewsom has quit [Quit: hcnewsom]
maximski has quit []
ki0 has joined #ruby
Guest74211 has quit [Remote host closed the connection]
riotjone_ has joined #ruby
mikeric has joined #ruby
razrunelord has quit [Remote host closed the connection]
MasterPiece`` has joined #ruby
rrrutr has joined #ruby
Notte has quit [Remote host closed the connection]
sgambino has quit [Remote host closed the connection]
Hirzu has joined #ruby
riotjones has quit [Ping timeout: 245 seconds]
lxsameer has quit [Quit: Leaving]
pontiki has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
fryguy9 has joined #ruby
ghostpl_ has quit [Ping timeout: 255 seconds]
jenrzzz has joined #ruby
jenrzzz_ has quit [Ping timeout: 256 seconds]
freerobby has quit [Quit: Leaving.]
tjohnson has quit [Quit: Connection closed for inactivity]
<bradland>
this is pretty interesting
Hirzu has quit [Ping timeout: 256 seconds]
Lingo has joined #ruby
Lingo has quit [Client Quit]
<bradland>
unicode is designed such that the first two bits of a byte will tell you whether it is A) the first byte of a multibyte sequence, or B) part of a multi-byte sequence
<bradland>
so if you find that you need more optimization, Thaxll, you could use unpack and friends, so long as you range-check the bytes to make sure they're not part of a multi-byte character
<helpa>
Hi Lingo. We in #ruby would really appreciate it if you did not use pastebin during your time with us.
<helpa>
Pastebin is not good because it loads slowly for most, has ads which are distracting and has terrible formatting. Please use Gist (http://gist.github.com) or Pastie (http://pastie.org) instead. Thanks!
<Lingo>
it is reaching the server like so: body:{"{\"key\":\"XXXXXXX\",\"message\":\"Hello dan your prescription is ready for pickup!\",\"to\":\"YYYYYYY\"}":""}
<Lingo>
why is that?
CrazyM4n has joined #ruby
mdibound has joined #ruby
rhllor has quit [Quit: rhllor]
kaiZen- has joined #ruby
casadei has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
CrazyM4n has quit [Remote host closed the connection]
<shevy>
Lingo that looks as if something tries to turn this into a complete string
<agrinb>
So I'm given a string of mixed numbers and words, I need to return the string sorted, but the numbers and strings must stay in their respective indices. I just built an array and as I iterated through my array(composed of string elements originally) I would append a 'num
reinaldob has quit [Remote host closed the connection]
<agrinb>
' or 'str' to the tracking array
<Senjai>
agrinb: Why do the numbers have to stay at their indicies?
<agrinb>
i will explain
crueber has quit [Quit: Leaving.]
crazydiamond has joined #ruby
thumpba has quit [Remote host closed the connection]
<agrinb>
then I iterated over the array of 'num'/'str' and for every 'num' I would shift from the sorted numbers array, same for strings and append to my final array
thumpba has joined #ruby
_djbkd has quit [Remote host closed the connection]
sevvie has quit [Ping timeout: 246 seconds]
<agrinb>
now I have analyze my algo vs others I could have used
<agrinb>
but I can't really think of anything else
lucianosousa has joined #ruby
Axy has joined #ruby
Axy has joined #ruby
Mia has quit [Read error: Connection reset by peer]
jottr has quit [Ping timeout: 256 seconds]
<Diabolik>
but Senjai
<Diabolik>
you're still naming the block
<Diabolik>
do_stuff
<agrinb>
Senjai: the term of the problem is that you return a string with where numbers and strings are in the same order so '4 2 apple 6 berry' is returned as '2 4 apple 6 berry'
<Senjai>
Diabolik: No, the block is anonymouse
<Senjai>
anonymous
davedev24_ has quit []
RegulationD has quit [Remote host closed the connection]
<Senjai>
I can call the same thing with, do_stuff(a, ->{|number| puts number + 1})
_djbkd has joined #ruby
<Senjai>
Thats not syntactically correct
crazydiamond has quit [Remote host closed the connection]
<Senjai>
but it should make my point
Rayford has joined #ruby
<Senjai>
agrinb: !code
<helpa>
agrinb: We cannot help you with your problem if you don't show us your code. Please put it on http://gist.github.com and give us the URL so we can see it.
crazydiamond has joined #ruby
lioninawhat has quit [Remote host closed the connection]
_djbkd has quit [Remote host closed the connection]
<Senjai>
el.to_i.to_s != el
sevvie has joined #ruby
<Senjai>
what
<Senjai>
This is way over complicated
PaulCapestany has quit [Quit: .]
<Senjai>
array_map(['5', '4', 'dog', '1', 'cat']) << Given this, what output do you expect?
jespada has joined #ruby
<agrinb>
["1", "4", "cat", "5", "dog"]
<Senjai>
And why does this have to be sorted like this again? Homework?
<agrinb>
Code screen
juanpaucar has joined #ruby
<agrinb>
but I did the code screen
<Senjai>
Code screen?
PaulCapestany has joined #ruby
<agrinb>
for getting a job
<agrinb>
I obviously have the algo
<Senjai>
Let me poke at it
<agrinb>
my question is, are there other ways to do this
<agrinb>
worse, better
<Senjai>
sec
crazydiamond has quit [Remote host closed the connection]
juanpaucar has quit [Remote host closed the connection]
lw has joined #ruby
lw has quit [Max SendQ exceeded]
enterprisedc has quit [Ping timeout: 246 seconds]
crazydiamond has joined #ruby
crazydiamond has quit [Remote host closed the connection]
<agrinb>
actually in my python script I don't do this nonsense el.to_i.to_s != el
<agrinb>
I just used a try block
aagdbl has quit [Quit: Connection closed for inactivity]
<Senjai>
agrinb: It'll take me a minute to do this
Rayford has quit [Quit: Rayford]
juanpablo__ has quit [Quit: (null)]
<agrinb>
only if you want to do it
<Senjai>
sure
<agrinb>
I'm just curious about the approach
juanpablo__ has joined #ruby
<zenspider>
this problem seems ill-defined
<zenspider>
what happens with numbers of different lengths?
<Senjai>
zenspider: They just keep their place
psychopath_mind_ has joined #ruby
<zenspider>
not if they sort differently
<zenspider>
given "123 12", obviously the indicies are going to change
<Senjai>
Oh sorry
<Senjai>
what
yourwebdevguy has quit [Quit: Leaving]
<Senjai>
Okay
psychopath_mind has quit [Ping timeout: 255 seconds]
yourwebdevguy has joined #ruby
yourwebdevguy has quit [Changing host]
yourwebdevguy has joined #ruby
psychopath_mind_ is now known as psychopath_mind
<agrinb>
'123 12' would turn into '12 123'
<Senjai>
why
<zenspider>
and the indicies would be different
<Senjai>
[123, 12] ?
<Senjai>
or ['123 12']
<Senjai>
because the latter is a string
<Senjai>
not an integer
<zenspider>
please go read the description again
<agrinb>
you should interpret numbers as integers '1' = 1
dfinninger has quit [Remote host closed the connection]
<zenspider>
"given a string of mixed numbers and words, I need to return the string sorted, but the numbers and strings must stay in their respective indices"
juanpablo__ has quit [Ping timeout: 255 seconds]
jonr2219 has joined #ruby
jonr22 has quit [Ping timeout: 264 seconds]
<agrinb>
a = ['5', '4', 'dog', '1', 'cat'] should return ["1", "4", "cat", "5", "dog"] a[0] is a integer, a[1] is an integer, a[2] is a string, a[3] integer, a[4] string
<agrinb>
and I'm sorry for confusing you with using numbers and integers interchangably
<apeiros_>
partition, sort, merge
charliesome has joined #ruby
<apeiros_>
also given that you treat strings as numbers, you should probably define numbers precisely.
<agrinb>
the bottom line is that '1' and 1 should be treated the same, but '1' and 'one' should not be treated the same
<agrinb>
aperios_: what do you mean by partition?
max96at is now known as max96at|off
<apeiros_>
agrinb: nice touch with the trailing _, but really, use tab completion for nicks. avoids typos.
casadei has joined #ruby
<apeiros_>
I mean Enumerable#partition
slackbotgz has quit [Remote host closed the connection]
<Senjai>
apeiros_: I was waiting for you to do your apeiros_ thing
<apeiros_>
^ basic building blocks of my solution
<Senjai>
apeiros_: Woudlnt that treat "1sdfsafa" as an int?
<apeiros_>
no
<Senjai>
nvm
<Senjai>
I was silly
<Senjai>
\z
<apeiros_>
but that's what I meant when I said "00:11 apeiros_: also given that you treat strings as numbers, you should probably define numbers precisely."
<Senjai>
Transpose is interesting
iliketurtles has quit [Quit: zzzzz…..]
<apeiros_>
there's tons of different possible valid definitions for number
einarj has quit [Remote host closed the connection]
<Senjai>
Aye
Hirzu has joined #ruby
<Senjai>
In my solution, I just determined it if Integer could convert it
<Senjai>
without an issue
hiyosi has joined #ruby
<Senjai>
I would eventually do something like your solution
<Senjai>
and research the issue
<apeiros_>
that's a viable approach
<Senjai>
but I wouldnt come up with that offhand
<apeiros_>
creating an array from indices and values… hm… I have a way, but not sure I like it.
<Senjai>
reserved_indicies does not even need to be a hash
<Senjai>
xD
<Senjai>
could just be an array
<apeiros_>
anyway, I estimate my solution to be ~10 LoC
sevvie has quit [Ping timeout: 252 seconds]
<Senjai>
apeiros_: Want to take a shot at it?
<Senjai>
I'd like to look at yours
<Senjai>
save me from researching shorter ways of doing it