charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nfk has quit [Quit: yawn]
charliesome has joined #ruby
zcreative has joined #ruby
Briareos1 has quit [Remote host closed the connection]
asdkfjk has quit []
funktor has quit [Ping timeout: 245 seconds]
* DreamingRainne
thought mkmf was part of the standard library.
Hobogrammer has quit [Ping timeout: 245 seconds]
morenoh149 has joined #ruby
ehc has quit [Quit: ehc]
deens has quit [Remote host closed the connection]
deens has joined #ruby
deens has quit [Read error: Connection reset by peer]
morenoh153 has quit [Ping timeout: 252 seconds]
charliesome has quit [Ping timeout: 245 seconds]
<Hytosys>
zorak8: you need the ruby-dev package
deens has joined #ruby
RaptorJesus has joined #ruby
<shevy>
god
<shevy>
zorak8 install from source
<Hytosys>
(or use rvm)
astrofog has quit [Quit: Nisam tu]
<shevy>
source
<shevy>
he will learn more
<shevy>
and abandon his noob status
<shevy>
afterwards he can use rvm
<zorak8>
installing ruby-dev
<shevy>
zorak8 cannot load such file -- mkmf <-- this error means that the debian developers crippled your ruby install, you must uncriplle and install mkmf
<shevy>
or whatever is the name the debian dictators gave to that crippled package
bradhe has quit [Remote host closed the connection]
<zorak8>
what you use shevy ??
<zorak8>
arch?
<shevy>
zorak8 the base system was slackware, but about 98% is compiled from source
<shevy>
nope
snath has quit [Ping timeout: 245 seconds]
<shevy>
if there would be any single one distribution it would be gobolinux
<zorak8>
gobolinux? first time a heard it
bradhe_ has joined #ruby
<shevy>
it uses appdirs
morenoh149 has quit [Ping timeout: 245 seconds]
zcreative has quit [Ping timeout: 240 seconds]
sdouglas has joined #ruby
jamto11 has quit [Remote host closed the connection]
Deele has quit [Ping timeout: 255 seconds]
nichtdiebohne1 has joined #ruby
morenoh149 has joined #ruby
jan1337z has quit [Ping timeout: 252 seconds]
Kilo`byte has quit [Ping timeout: 252 seconds]
nichtdiebohne has quit [Ping timeout: 240 seconds]
zcreative has joined #ruby
zcreative has quit [Remote host closed the connection]
pietr0 has quit [Quit: pietr0]
jan1337z has joined #ruby
metamaterial has quit [Quit: Leaving.]
gizmore has joined #ruby
Kilo`byte has joined #ruby
vlad_starkov has joined #ruby
pu22l3r has joined #ruby
kitak has quit [Ping timeout: 240 seconds]
i_s has quit [Remote host closed the connection]
sambao21 has quit [Quit: Computer has gone to sleep.]
nateberkopec has quit [Quit: Leaving...]
vlad_starkov has quit [Ping timeout: 245 seconds]
kanaki has quit [Ping timeout: 276 seconds]
bean has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
lolmaus has quit [Ping timeout: 252 seconds]
olivier_bK has quit [Ping timeout: 246 seconds]
bradhe_ has quit [Remote host closed the connection]
chipotle has joined #ruby
sdouglas has quit [Remote host closed the connection]
jamto11 has joined #ruby
sdouglas has joined #ruby
momomomomo has joined #ruby
jlast has quit [Remote host closed the connection]
crystal77 has quit [Quit: Computer has gone to sleep.]
chrisseaton has quit []
Nukepuppy has quit [Ping timeout: 276 seconds]
codabrink has quit [Ping timeout: 250 seconds]
mercwithamouth has joined #ruby
omosoj has quit [Ping timeout: 245 seconds]
sdouglas has quit [Ping timeout: 250 seconds]
dawkirst has quit [Remote host closed the connection]
dik_dak has quit [Quit: Leaving]
maletor_ has joined #ruby
oo_ has joined #ruby
zz_karupa is now known as karupa
Drewch has quit [Quit: Computer has gone to sleep.]
maletor has quit [Ping timeout: 265 seconds]
Celm has quit [Remote host closed the connection]
Beoran_ has quit [Ping timeout: 258 seconds]
oo_ has quit [Remote host closed the connection]
endash__ has quit [Quit: endash__]
iamjarvo has quit [Ping timeout: 240 seconds]
sdouglas has joined #ruby
cephalopod has joined #ruby
cephalopod has left #ruby [#ruby]
Celm has joined #ruby
senayar_ has joined #ruby
ner0x has joined #ruby
helpD has quit [Remote host closed the connection]
lw has joined #ruby
ce_afk is now known as cescalante
Celm has quit [Remote host closed the connection]
maroloccio has joined #ruby
bahar has quit [Ping timeout: 240 seconds]
senayar has quit [Ping timeout: 258 seconds]
jamto11 has quit [Remote host closed the connection]
timonv has joined #ruby
zcreative has joined #ruby
Shidash has joined #ruby
crucify_me has joined #ruby
chipotle has quit [Quit: cya]
sepp2k has quit [Quit: Leaving.]
lw has quit [Ping timeout: 245 seconds]
nemesit|znc has quit [Ping timeout: 252 seconds]
poikon_ has quit [Read error: Connection reset by peer]
Lewix has joined #ruby
poikon has joined #ruby
crucify_me has quit [Client Quit]
chrisseaton has joined #ruby
<shevy>
timgauthier I ported two classes and the core module so far, and have added about 15 tests now
<timgauthier>
sweet
<timgauthier>
i untucked the css for my menu
<timgauthier>
unfucked*
timonv has quit [Ping timeout: 276 seconds]
<timgauthier>
which is impressive with how badly i am typing right now :|
evenix_ has quit [Remote host closed the connection]
evenix has quit [Remote host closed the connection]
codebro has quit [Ping timeout: 240 seconds]
roland_ has quit [Ping timeout: 276 seconds]
nemesit|znc has joined #ruby
evenix_ has joined #ruby
evenix has joined #ruby
crucify_me has joined #ruby
TigerWolf has joined #ruby
Beoran_ has joined #ruby
arubin has joined #ruby
<shevy>
lol
<crucify_me>
hi this is a book example. would anyone give a quick explanation for obscuring reference as pertains to this prog? thanks http://pastie.org/9086328
emaxi_ has quit [Remote host closed the connection]
mr_snowf1ake has joined #ruby
emaxi has joined #ruby
lolmaus has joined #ruby
oo_ has joined #ruby
dorei has quit []
dima_ has quit [Remote host closed the connection]
<shevy>
extract, run extconf.rb or install.rb and there you go
Fractional_ has quit [Read error: Connection reset by peer]
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<shevy>
oh, it is setup.rb, ok so do: "ruby setup.rb"
twiceaday has joined #ruby
moritzs has quit [Ping timeout: 258 seconds]
<wallerdev>
if you want to do ruby development i wouldnt recommend using apt to manage your ruby install
<shevy>
:-)
benzrf|offline is now known as benzrf
toastynerd has quit [Remote host closed the connection]
<zorak8>
in ruby 1.9
<zorak8>
shevy: im a noob, i can try to dont be one, two months ago i dont even know what a method is
<zorak8>
are*
<zorak8>
im much better know, but still a noob
Cooler_ has quit [Remote host closed the connection]
danshultz has quit [Remote host closed the connection]
Cooler_ has joined #ruby
<wallerdev>
is*
avree has joined #ruby
<wallerdev>
or was* probably
danshultz has joined #ruby
<shevy>
zorak8 yeah, with enough time you will be able to abandon your noob status
i_s_ has quit [Ping timeout: 245 seconds]
<avree>
I'm trying to install ruby 2.1.1 in rbenv and getting a build failure (error 2)
danshultz has quit [Read error: Connection reset by peer]
<shevy>
the problem is that you are using a debian based system, but now you are not using apt, but you still have the mixed old ruby system
<avree>
can provide more detail but was curious if anyone had suggestions on where to look
<avree>
to get it going, using OS X
twiceday has quit [Ping timeout: 240 seconds]
danshultz has joined #ruby
<zorak8>
wallerdev: i try update gem with gem update --system, but debian told me that this wold overwrite the rubygems folder and can break all the sistem
crucify_me has quit []
<wallerdev>
yeah thats why you dont use apt-get to install your ruby version lol
<zorak8>
and suggest me to use apt-get to update
<wallerdev>
debian repos are gonna be out of date
<zorak8>
what do you suggest, unnistall ruby with apt-get and installed it in other way?
mary5030 has joined #ruby
Doppp has quit [Ping timeout: 250 seconds]
<wallerdev>
yeah if nothing else depended on it on your system id probably do that haha
larissa has quit [Quit: Leaving]
Doppp has joined #ruby
<zorak8>
i dont think
<zorak8>
rails maybe
dawkirst has joined #ruby
<wallerdev>
you installed rails with apt-get?
<zorak8>
but i can re install everything again
<zorak8>
nope
<zorak8>
with gem
<zorak8>
gem install rails
senayar_ has quit [Remote host closed the connection]
<shevy>
zorak8 also, debian puts your gems into /var/lib which is non-default
<shevy>
zorak8 but why are you so anxious? copy all your gems somewhere where you can backup, reinstall ruby, install the gems locally via gem install *gem
piv has joined #ruby
<postmodern>
zorak8, package manager, ruby-build, ruby-install, manually from source
<zorak8>
this can explain all the errors trying to run my ruby excersices
<wallerdev>
yeah, i think debian tried to put gems into their package manager at one point, not sure if they still try to do that
<wallerdev>
but their package manager is wayy out of date all the time
<shevy>
if they would be in the right directory you would not even have to reinstall the gems really, save for native extensions perhaps
nisstyre has joined #ruby
<shevy>
the truth is that debian hates enemy package managers
Hanmac has joined #ruby
<zorak8>
i use aptitude, not apt-get
<shevy>
why is it that we only get people with debian based system for such problems but you wont see gentoo or arch or slack users have such problems
<DreamingRainne>
Oh, you're testing a bot, not trying to leave yourself?
meatherly has joined #ruby
vlad_starkov has quit [Ping timeout: 245 seconds]
vc7 has joined #ruby
franco has joined #ruby
cashnguns has joined #ruby
<DreamingRainne>
(If so, do so in your own channel, would you?)
<gizmore>
,reload
<ricer>
gizmore: Reloading ricer code and plugins.
<ricer>
gizmore: Everything reloaded and ready to crash.
<gizmore>
,part #ruby
<ricer>
gizmore: Ruby Exception: "undefined method `part_channel' for #<Ricer::Irc::Server:0x000000042eacd0>" in app/models/ricer/plugin/channel/partu.rb:26:in `part'.
<franco>
hello
<gizmore>
geezes sorry
franco has quit [Client Quit]
<gizmore>
,reload
<ricer>
gizmore: Reloading ricer code and plugins.
<ricer>
gizmore: Everything reloaded and ready to crash.
<gizmore>
,part #ruby
ricer has left #ruby [#ruby]
<gizmore>
finally
saarinen has quit [Quit: saarinen]
<DreamingRainne>
Mine would just abruptly "Client Exited" and spew that stuff into an xterm. Hehe.
snath has joined #ruby
<gizmore>
i go the rails way
<gizmore>
i catch exceptions and reply error messages
<gizmore>
channel is #wechall
<DreamingRainne>
I tried to get mine to do that, but for some reason it doesn't work.
JoeGaudet has quit [Quit: Computer has gone to sleep.]
franco has joined #ruby
<gizmore>
mine is multi network
<franco>
hello
<benzrf>
gizmore: just use supybot
<gizmore>
wb franco
<benzrf>
it Just Werks™
<gizmore>
benzrf: mine is better
<benzrf>
and python is pretty good
<franco>
whats good people
<gizmore>
my bot is good
<franco>
python rocks
<benzrf>
just use limnoria
<gizmore>
ruby is python done right
<franco>
not as oop as ruby though, a downfall perhaps
<franco>
yes
<DreamingRainne>
I think the approach I took was to try to catch it in the "call event handlers" part of the IO.select loop and have it at least send a /quit message out. Quit messages are dodgy things for some reason.
* DreamingRainne
shrugs.
<franco>
What do you people think of PHP
<DreamingRainne>
More important is having it not crash in the first place, though. Hehe.
<InfraRuby>
SteveBenner09: what are you trying to do?
<SteveBenner09>
I've hit a wall with the build process in Rhodes, as they are compiling ERB files using a binary they include with the package, MacRuby
thomasxie has quit [Quit: Leaving.]
jameswlane has joined #ruby
etqqkoiflwhb has joined #ruby
<SteveBenner09>
and the compilation is failing, but the strange part is the error
<InfraRuby>
ok
jameswlane has quit [Max SendQ exceeded]
<SteveBenner09>
it's in Bundler - it fails to load 'pathname'
cassioscabral has joined #ruby
<InfraRuby>
is that a gem?
<SteveBenner09>
I worked hard to set up my paths and environments correctly but man...
<SteveBenner09>
no, its a module included in Ruby
<SteveBenner09>
and the whack thing is, that I don't get
<SteveBenner09>
it requires 'pathname.so'
jameswlane has joined #ruby
<SteveBenner09>
in the ruby module file
davispuh has quit [Read error: Connection reset by peer]
<SteveBenner09>
I found out those are shared object libs, and there are NO FILES OF THIS NAME
<SteveBenner09>
so how in the world is pathname.rb even using this file in the first place?
jameswlane has quit [Max SendQ exceeded]
<InfraRuby>
what version of ruby do you have installed?
<havenwood>
SteveBenner09: Sounds like you're somehow using 1.8. Make sure bundler is installed in 1.9? Already prefixing `bundle exec` before commands?
<SteveBenner09>
and my own build script uses 2.1, but it's calling the Rhodes software from a bash script so that I can change ruby environments
thomasxie has joined #ruby
<SteveBenner09>
correct
jameswlane has quit [Max SendQ exceeded]
<SteveBenner09>
nowhere on my machine!
<SteveBenner09>
yes yes
cj3kim_ has joined #ruby
<SteveBenner09>
I think the problem is the Rhodes ruby binary, because obviously they are not using the paths I have passed to the script
<SteveBenner09>
I tested the environment from right before it calls the 'MacRuby' executable, and it is behaving as expected
braincrash has quit [Quit: bye bye]
<SteveBenner09>
so I assume they have bundled some older ruby which requires this file?
RowdyChildren is now known as RowdyChild|Away
<SteveBenner09>
its odd..
BadQuanta has joined #ruby
eyeamaye has quit [Quit: Leaving.]
cj3kim_ has quit [Read error: Connection reset by peer]
<SteveBenner09>
I was able to build the software with RVM but when I switched to chruby and using Bundler for all the gems, for some reason I think Bundler is causing this issue
<BadQuanta>
Don't want to re-invent the wheel so I'm wondering if there is already a gem that provides what I can best describe as "Module Scope Constant Enumeration."
cj3kim_ has joined #ruby
<SteveBenner09>
I am about to attempt deleting my system ruby installation, haha. That's how desperate I am
<havenwood>
I don't know about Rhodes.
AlexRussia has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
<havenwood>
exit
<BadQuanta>
My google/rubygem searches are not coming up with anything.
zellio has joined #ruby
<zellio>
what is the module version of klass generally ?
<InfraRuby>
zellio: umm. what?
braincrash has joined #ruby
<zellio>
InfraRuby: like, when you are generating a class you use klass as the variable
<zellio>
in this case i'm generating a module
<InfraRuby>
zellio: pastie
<zellio>
if there a like "standard" for what to call it
<zellio>
the variable i mean
<zellio>
hang on
<SteveBenner09>
havenwood: thx anyway
<InfraRuby>
oh the name of a local variable for a module?
<agent_white>
shevy: When I used to play video games and couldn't think of a character name, I would bang on the keyboard and then delete letters until I could sound out the word.
<agent_white>
Do that!
Gooder` has joined #ruby
pu22l3r has joined #ruby
<shevy>
omg
rakm has quit [Quit: Connection closed for inactivity]
SCommette has quit [Quit: SCommette]
<DreamingRainne>
Nowadays, there are random name generators.
<agent_white>
DreamingRainne: pfft, I have those built into my limbs.
<jacky>
Is it possible to prevent the download of a unsigned gem in rubygems?
billy_ran_away has quit [Ping timeout: 252 seconds]
Dude007 has quit [Read error: Connection reset by peer]
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Dude007 has joined #ruby
bluefin has quit [Quit: Leaving]
<mbuf>
pontiki, inside the begin block gets called cleanly. I tried to use object.stub(:function).and_raise(Exception) but, it doesn't enter the rescue block
<mbuf>
pontiki, stackoverflow are against using rescue Exception => e, but, the tests pass when I use this
apeiros_ is now known as apeiros
shevy has joined #ruby
dunkel2 has joined #ruby
<dunkel2>
hello
agent_white has quit [Read error: Connection reset by peer]
fgo has quit [Remote host closed the connection]
kobain_ has joined #ruby
kobain has quit [Ping timeout: 240 seconds]
JohnBat26 has joined #ruby
kitak has quit [Remote host closed the connection]
fgo has joined #ruby
fuhgeddaboudit has quit [Ping timeout: 240 seconds]
agent_white has joined #ruby
codebro has quit [Ping timeout: 276 seconds]
<certainty>
tagrudev: moin moin
m104 has quit [Quit: brb]
sigurding has joined #ruby
panga has joined #ruby
<tagrudev>
certainty, yolo
apeiros has quit [Remote host closed the connection]
eyeamaye has quit [Ping timeout: 240 seconds]
apeiros has joined #ruby
sdouglas has quit [Remote host closed the connection]
funburn has quit [Quit: funburn]
kitak has joined #ruby
apeiros has quit [Ping timeout: 240 seconds]
tectonic has quit []
metamaterial has quit [Remote host closed the connection]
panga has quit [Ping timeout: 258 seconds]
renderful has joined #ruby
Xeago has joined #ruby
akonny has joined #ruby
yfeldblum has joined #ruby
crystal77 has joined #ruby
nhmood has quit [Quit: Connection closed for inactivity]
Spami has joined #ruby
sski has quit [Remote host closed the connection]
sski has joined #ruby
luriv has joined #ruby
yarou has joined #ruby
ce_afk is now known as cescalante
sski has quit [Ping timeout: 258 seconds]
cadesun has joined #ruby
afreidah4 has quit [Ping timeout: 240 seconds]
dunkel2 has quit [Quit: dunkel2]
cadesun has quit [Client Quit]
craigp has joined #ruby
bal has joined #ruby
dkamioka has joined #ruby
dkamioka has quit [Remote host closed the connection]
yarou has quit []
psyko666 has quit [Quit: Leaving]
yfeldblum has quit [Remote host closed the connection]
yarou has joined #ruby
yfeldblum has joined #ruby
fgo has quit [Remote host closed the connection]
mois3x has joined #ruby
Macaveli has joined #ruby
cescalante is now known as ce_afk
drjblouse__ has quit [Quit: Connection closed for inactivity]
Xeago has quit [Remote host closed the connection]
<agent_white>
Ello
grzywacz has joined #ruby
droptone has quit [Read error: Operation timed out]
klaut has joined #ruby
droptone has joined #ruby
patteh has joined #ruby
Xeago has joined #ruby
tkuchiki_ has quit [Remote host closed the connection]
tkuchiki has joined #ruby
tvw has quit []
jprovazn has joined #ruby
x77686d has quit [Quit: x77686d]
<InfraRuby>
mbuf: rescue without an exception class uses StandardError by default
<mbuf>
InfraRuby, okay
<InfraRuby>
do you really want to handle every exception?
cj3kim_ has joined #ruby
<mbuf>
InfraRuby, no
erikruthven has joined #ruby
_justin has joined #ruby
<mbuf>
InfraRuby, I am unable to enter into the rescue block without using Exception => e
tvw has joined #ruby
Celm_ has quit [Read error: Connection reset by peer]
<InfraRuby>
mbuf: pastie
Celm has joined #ruby
<InfraRuby>
what expections is your code supposed to handle?
apeiros has joined #ruby
himsin has joined #ruby
pskosinski has joined #ruby
Celm has quit [Remote host closed the connection]
invinceable has joined #ruby
Celm has joined #ruby
helpD has joined #ruby
coderhs has quit [Ping timeout: 250 seconds]
luckyruby has quit [Quit: Leaving...]
jamto11 has joined #ruby
eynj has quit [Read error: Connection reset by peer]
ozzloy has quit [Ping timeout: 245 seconds]
browndawg has left #ruby [#ruby]
Xeago has quit [Remote host closed the connection]
tvw has quit []
helpD has quit [Ping timeout: 265 seconds]
billy_ran_away has quit [Ping timeout: 240 seconds]
jamto11 has quit [Ping timeout: 245 seconds]
ozzloy has joined #ruby
ozzloy has quit [Changing host]
ozzloy has joined #ruby
<mbuf>
InfraRuby, fixed it, had to use raise(FooTimeout) in the stub call
skaflem has joined #ruby
claymore has joined #ruby
fgo has joined #ruby
vlad_starkov has joined #ruby
_justin has quit [Ping timeout: 250 seconds]
dunkel2 has joined #ruby
<dunkel2>
hello
<dunkel2>
im tyring to isntall ruby but im getitng this error make: *** [parse.o] Error 4
crystal77 has quit [Quit: Computer has gone to sleep.]
<dunkel2>
can someone help me?
_justin has joined #ruby
coderhs has joined #ruby
coderhs has quit [Remote host closed the connection]
fabrice31 has joined #ruby
madb055 has quit [Ping timeout: 265 seconds]
<crome>
dunkel2: nope.
fgo_ has joined #ruby
<crome>
at least not with the information you provided
fgo has quit [Ping timeout: 245 seconds]
aganov has joined #ruby
<dunkel2>
the make command doesnt say the error
tkuchiki has quit [Quit: Leaving...]
JohnBat26 has quit [Ping timeout: 245 seconds]
Martxel has quit [Ping timeout: 252 seconds]
kyb3r_ has quit [Ping timeout: 252 seconds]
aemeredith has quit [Remote host closed the connection]
cj3kim_ has quit [Remote host closed the connection]
arietis has quit [Quit: Computer has gone to sleep.]
arietis has joined #ruby
bluehavana has joined #ruby
renderful has quit [Remote host closed the connection]
Mon_Ouie has quit [Quit: WeeChat 0.4.3]
mbuf has quit [Quit: Leaving]
renderful has joined #ruby
dagobah has joined #ruby
tkuchiki has joined #ruby
panga has joined #ruby
jaxxstorm has quit [Ping timeout: 252 seconds]
centrex has joined #ruby
<centrex>
Hi, can someone give me a place on where to start with how to copy over all rotated logs on a system to a backup?
thomasxie has left #ruby [#ruby]
Xeago has joined #ruby
grzywacz has quit [Ping timeout: 276 seconds]
<apeiros>
centrex: take a look at FileUtils
jaxxstorm has joined #ruby
lw has quit [Quit: s]
metamaterial has joined #ruby
billy_ran_away has joined #ruby
anshin has quit [Quit: anshin]
Rhainur has joined #ruby
nadirvardar has quit [Quit: Computer has gone to sleep.]
ironsand has quit [Ping timeout: 240 seconds]
blackmesa has joined #ruby
<Rhainur>
how do I pass a variable into a block e.g I want to filter an array for all items greater than some_variable, so how do I get some_variable into the array.select
<centrex>
apeiros: Yes I saw that, and I did the following for the original files, Fileutils.cp '/var/log/mysql/mysql.err.log', '/tmp/logs/database-logs' if File.exists?('/var/log/mysql/mysql.err.log')
<centrex>
but Im not sure how to do that with wildcards and rotated logs
echevemaster has joined #ruby
zigomir has joined #ruby
<centrex>
also, I'm not sure how to put an if to check if the file exists when copying it so it doesn't give an error if the file doesn't exist
<centrex>
because sometimes it wont exist obviously
<centrex>
or should work if a rotated log isn't there
<InfraRuby>
Rhainur: pastie
<Rhainur>
actually, turns out I'm an idiot, and you can just access the variable directly and don't need to pass it in @_@
IceDragon has quit [Quit: Space~~~]
ekarlso has quit [Remote host closed the connection]
HashNuke has quit [Quit: Connection closed for inactivity]
<dunkel2>
is that correct? or that could be the reason of all my ruby problems?
bean has joined #ruby
himsin has joined #ruby
Riking has joined #ruby
Riking has quit [Excess Flood]
alex88_ has joined #ruby
Riking has joined #ruby
Riking has quit [Excess Flood]
<Hanmac>
dunkel2: hm nope, 1.9.1 is the ABI version of 1.9.3p194 ... (means 1.9.3 is abi-compatible with 1.9.1 ...)
<dunkel2>
oh ok
<dunkel2>
then what is going on with my ruby :(
Riking has joined #ruby
Riking has quit [Excess Flood]
<Hanmac>
its only currios why rvm cant install ruby ... like i dont know why the gcc was killed with "internal compiler error" ... (did you try it again?)
<dunkel2>
ive tried it many times on this minutes
<dunkel2>
rvm installs ruby perfectly
<Hanmac>
hm ok
<dunkel2>
i did it without any issue, the only issue was that the git hook was calling the env ruby
<dunkel2>
and i think rvm doesnt work like that or something becuase i was getting error
crystal77 has quit [Quit: Computer has gone to sleep.]
mgolden has joined #ruby
<dunkel2>
//usr/bin/env: ruby: No such file or directory
Riking has joined #ruby
Riking has quit [Excess Flood]
alex88 has quit [Ping timeout: 265 seconds]
<Hanmac>
hm did you added rvm into your bash after you installed rvm?
<dunkel2>
i added the source /etc/profile to the bashrc
mgolden has left #ruby [#ruby]
<dunkel2>
‘source /etc/profile’
<dunkel2>
and it worked because i was able to run ruby -v each time i log into the console
<dunkel2>
but for an extrange reason the hook wasnt working
lkba has joined #ruby
<dunkel2>
#!/usr/bin/env ruby
fabrice31 has quit [Remote host closed the connection]
<dunkel2>
i have that on the first line
seaned has left #ruby [#ruby]
Hanmac1 has joined #ruby
andrewlio has joined #ruby
<Rhainur>
I have a performance question about symbols. my app requires generation of significant amounts of XML repeatedly, and very little of it is dynamic
<Rhainur>
I am, of course, using the builder gem
<Rhainur>
but should I use strings or symbols for my xml?
bean has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Al__ has joined #ruby
Hanmac has quit [Ping timeout: 265 seconds]
omosoj has quit [Ping timeout: 250 seconds]
Riking has joined #ruby
Riking has quit [Excess Flood]
<Hanmac1>
Rhainur: depends, are the symbols generated, and if yes from user input or your own data?
robbyoconnor has joined #ruby
Guest57711 has joined #ruby
Guest57711 has quit [Excess Flood]
timonv_ has quit [Remote host closed the connection]
<Rhainur>
Hanmac1: it's basically pulling data from the database, but really the majority of the symbols are just flat text
<Rhainur>
no user input involved
<Rhainur>
there are a couple of cases where a string from the database is interpolated into text (a date is interpolated into a folder path)
wallerdev has quit [Quit: wallerdev]
<Rhainur>
my reasoning is that since I am repeatedly generating the same XML, it is preferable to keep those symbols in memory rather than instantiating new strings every time
riking_ has joined #ruby
<Hanmac1>
symbols are always faster than Strings but remind! Symbols are currently not freed from memory -> when there is to much different symbols your program might crash
<dunkel2>
any idea of how to solve this Rhainur :(
<Rhainur>
'might' crash?
donnoc has joined #ruby
panga has quit [Remote host closed the connection]
sigurding has quit [Quit: sigurding]
<Hanmac1>
Rhainur: lets say, trillion different symbols => NoMemoryError
<Rhainur>
right
Doppp has quit [Quit: leaving]
crystal77 has joined #ruby
Doppp has joined #ruby
sameerynho has joined #ruby
gtc has quit [Ping timeout: 276 seconds]
<olivier_bK>
how i can send multiple argument in hash
<olivier_bK>
?
<Hanmac1>
olivier_bK: ... what excaclty do you want to do?
<olivier_bK>
hy I parse file for find some params like uid,dbname and url. what i try to do is to get all value in hash for sending it in csv file
<olivier_bK>
when i parse my hash (res_licence) i only have 3 params like that
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
workmad3 has joined #ruby
jamto11 has joined #ruby
lxsameer has quit [Ping timeout: 245 seconds]
crystal77 has quit [Ping timeout: 250 seconds]
<olivier_bK>
i dont understand why he override
banister has joined #ruby
<DreamingRainne>
olivier_bK: You could start with "res_license = Hash.new", then add to it as you find parameters in the file. if line.include? 'uid'; uid = line.match(/(?=uid)(.*)/); res_license[:uid] = uid; end
<DreamingRainne>
Rather than having to find them all at once.
maletor has joined #ruby
AlSquire has joined #ruby
popl has joined #ruby
popl has quit [Changing host]
popl has joined #ruby
<DreamingRainne>
What's the format for each line? Something like this? uid=12345
kitak has quit [Remote host closed the connection]
poikon_ has joined #ruby
<DreamingRainne>
olivier_bK: Maybe something like this: http://pastie.org/private/9u0miydwczaptvuahk8vg then you'll have config["uid"] etc. Assuming you're trying to get one set of fields out of multiple input files.
oponder has joined #ruby
timonv has joined #ruby
roolo has joined #ruby
<DreamingRainne>
(Er, never mind line 5. Was going to use those names to check for the specific field names you're after, but decided, just hang onto everything. Didn't update line 6 accordingly. Hehe.)
Melpaws has joined #ruby
Al__ has quit [Quit: Al__]
alem0lars has quit [Ping timeout: 265 seconds]
kitak has joined #ruby
mansi has joined #ruby
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Spami has quit [Quit: This computer has gone to sleep]
bluehavana has quit [Quit: Connection closed for inactivity]
<olivier_bK>
no problem
<olivier_bK>
could you explain to me something
<olivier_bK>
why did you write next at line 4 ?
banister has joined #ruby
<DreamingRainne>
Means, skip to the next line (the next iteration of the File.foreach loop) unless that pattern matches the line.
helpD has quit [Remote host closed the connection]
helpD has joined #ruby
billiam_ has quit [Ping timeout: 252 seconds]
<olivier_bK>
i going get some more information about that
centrex has quit [Read error: Connection reset by peer]
mansi has quit [Ping timeout: 265 seconds]
centrex has joined #ruby
billiam_ has joined #ruby
banister is now known as banisterfiend
helpD has quit [Ping timeout: 245 seconds]
arietis has quit [Quit: Computer has gone to sleep.]
emaxi has joined #ruby
ce_afk is now known as cescalante
lkba has quit [Ping timeout: 240 seconds]
helpD has joined #ruby
mcrmfc has joined #ruby
emaxi has quit [Ping timeout: 252 seconds]
luriv has quit [Remote host closed the connection]
blackmesa has joined #ruby
oo_ has quit [Remote host closed the connection]
fgo_ has quit []
raycloud has quit [Remote host closed the connection]
mrmargolis has joined #ruby
canton7-mac has joined #ruby
crzrcn has joined #ruby
JURCZ91 has left #ruby ["Leaving"]
oo_ has joined #ruby
Dr3amc0d3r|away has quit [Ping timeout: 276 seconds]
Geniack_ is now known as Geniack
cescalante is now known as ce_afk
<olivier_bK>
and how do i get for catch the params after uid for example $config["uid"] = 'total';
crzrcn has quit [Ping timeout: 265 seconds]
mrmargolis has quit [Ping timeout: 276 seconds]
<DreamingRainne>
That's what the second capturing group (in the pattern) is for. It's not getting them?
sameerynho has quit [Ping timeout: 276 seconds]
Krajsnick has joined #ruby
<olivier_bK>
no
<olivier_bK>
and sorry for asking you that but i m really not good with regex
helpD has quit [Remote host closed the connection]
panga has joined #ruby
funburn has quit [Quit: funburn]
centrex has quit [Ping timeout: 240 seconds]
Dr3amc0d3r|away has joined #ruby
<DreamingRainne>
Are you using my code? I tested the regex just now; it seems to work.
dideler|work has joined #ruby
Killerkeksdose has quit [Ping timeout: 240 seconds]
<Hanmac1>
DreamingRainne: the regexp can be improved so currently it might get a hiccup from a string like "a'b" or "a \" b" i think that could be made better but still nice for a first try
donnoc has quit [Ping timeout: 240 seconds]
<DreamingRainne>
Ah, true. That sort of stuff is beyond my talent, though.
oo__ has joined #ruby
<DreamingRainne>
I figure it should be enough to pick out simple strings like in his files, and filter out those that shouldn't match.
<Hanmac1>
DreamingRainne: are you shure that the negation is right? it has unless and /^ in the regxp ...
aagdbl has joined #ruby
donnoc has joined #ruby
<DreamingRainne>
Oh. I usually put that in by force of habit. Outside of [these], ^ means "match at start of string" = the line has to begin with the match.
<DreamingRainne>
I suppose it probably shouldn't be there, or it won't match an indented line.
<Hanmac1>
i think the MAIN problem is that he still didnt show us how his input looks like ... it might be complecated when when it has indent
bigkevmcd has quit [Ping timeout: 252 seconds]
Hanmac1 is now known as Hanmac
* Hanmac
still thinks that parsing php files is a bad idea ... ruby should not be contained with this dirty language
<LadyRainicorn>
Is this the same thing from last night?
<DreamingRainne>
Yeah. Unless you need to be fed arbitrary files, you're probably better off manually copying out that information into something more parseable.
oo_ has quit [Ping timeout: 240 seconds]
sameerynho has joined #ruby
<DreamingRainne>
Like, a plain-text file of the form "field=value" in each line. Don't even need regexes to parse that; field, value = line.split("=", 2); config[field] = value; # will do the trick
<canton7-mac>
or json :)
<canton7-mac>
don't even need to write a parser
lolmaus_ has joined #ruby
Deejay_ has quit [Quit: Computer has gone to sleep.]
lolmaus has quit [Ping timeout: 250 seconds]
<DreamingRainne>
I think YAML is the preferred form for Ruby. But I can never remember the rules for when strings need to be quoted, etc., so unless I need something fancy, I just do "herp=derp" files.
<canton7-mac>
meh, json's a yaml subset, so that's fine. I don't know that PHP knows how to output yaml natively
<DreamingRainne>
Or one time I wrote a sorta-parser for a custom format that's more suited for working with for the task in question. *That* was a pain and a half. x_x
fluve has quit []
<Hanmac>
shevy did had/has problems with yaml because of wrong encoding
banisterfiend has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<DreamingRainne>
I do use YAML in one project/library I made, but more for "save/load state" functionality, as opposed to expecting hand-made inputs.
cassioscabral has quit [Ping timeout: 265 seconds]
donnoc has quit [Ping timeout: 240 seconds]
grieg has joined #ruby
agent_white has quit [Quit: gnight]
robbyoconnor has quit [Excess Flood]
ktun has joined #ruby
robbyoconnor has joined #ruby
ionull has joined #ruby
Zai00 has joined #ruby
Celm has joined #ruby
BizarreCake has joined #ruby
Es0teric has quit [Quit: Computer has gone to sleep.]
dima_ has joined #ruby
banister has joined #ruby
Celm has quit [Ping timeout: 258 seconds]
arietis has quit [Quit: Computer has gone to sleep.]
dima_ has quit [Ping timeout: 250 seconds]
chrisseaton has joined #ruby
canton7 has quit [Remote host closed the connection]
canton7 has joined #ruby
fabrice31 has joined #ruby
arietis has joined #ruby
alexherbo2|zZz is now known as alexherbo2
dawkirst has quit [Read error: Connection reset by peer]
arietis has quit [Client Quit]
emaxi has joined #ruby
akonny has joined #ruby
lolmaus_ has quit [Quit: No Ping reply in 180 seconds.]
lolmaus has joined #ruby
karupa is now known as zz_karupa
rvraghav93 has quit [Read error: Connection reset by peer]
dawkirst has joined #ruby
emaxi has quit [Ping timeout: 245 seconds]
arietis has joined #ruby
Al__ has joined #ruby
fabrice31 has quit [Remote host closed the connection]
haroldwu has quit [Ping timeout: 264 seconds]
mechanicles has joined #ruby
ce_afk is now known as cescalante
Killerkeksdose has joined #ruby
centrex has joined #ruby
InfraRuby has quit [Remote host closed the connection]
chrisseaton has quit [Remote host closed the connection]
rvraghav93 has joined #ruby
robustus has quit [Ping timeout: 252 seconds]
crzrcn has joined #ruby
sameerynho is now known as lxsameer
lxsameer has quit [Changing host]
lxsameer has joined #ruby
robustus has joined #ruby
cescalante is now known as ce_afk
mercwithamouth has joined #ruby
caveat- has quit [Ping timeout: 252 seconds]
gigetoo has quit [Ping timeout: 245 seconds]
crzrcn has quit [Ping timeout: 276 seconds]
fabrice31 has joined #ruby
seaned has joined #ruby
caveat- has joined #ruby
gigetoo has joined #ruby
luriv has joined #ruby
Shidash has quit [Ping timeout: 252 seconds]
mostlybadfly has joined #ruby
seaned has left #ruby [#ruby]
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nvrch has quit [Quit: nvrch]
bricker`LA has quit [Ping timeout: 240 seconds]
bricker`LA has joined #ruby
psyko666 has joined #ruby
roolo has quit [Quit: Leaving...]
seaned has joined #ruby
ionull has quit [Remote host closed the connection]
vlad_starkov has quit [Remote host closed the connection]
ionull has joined #ruby
JoeGaudet has quit [Quit: Computer has gone to sleep.]
bluOxigen has joined #ruby
aob has joined #ruby
mehlah has joined #ruby
postmodern has quit [Quit: Leaving]
seaned has left #ruby [#ruby]
<aob>
I want to place a check in a constructor of a class which is instantiated when a certain thor command is run - such that Thing.new will raise an exception tat I can catch and print a message at the thor level. What's the best way to do this? I don't know much about exceptions in ruby
<apeiros>
aob: raise ExceptionClass, "message" # <-- raises an exception
<canton7-mac>
you.... raise an exception in the constructor? I'm afraid I'm missing the difficulty
cibs has quit [Quit: leaving]
<apeiros>
aob: begin … code which might raise …; rescue ExceptionClass => rescued_exception; deal_with(rescued_exception; end # <-- rescue an exception
<Hanmac>
canton7-mac: you can raise inside a parameter too ;P
krz has joined #ruby
<apeiros>
I'd suggest you try it in a small thor project, see how it works. if it doesn't, gist it and ask again
<aob>
apeiros: great - thanks!
jamto11 has joined #ruby
<Hanmac>
canton7-mac: like that:
<Hanmac>
>> def func(a = raise "huch");a;end; p func(3); func
<eval-in_>
Hanmac => /tmp/execpad-5ce86fbc82d5/source-5ce86fbc82d5:2: syntax error, unexpected tSTRING_BEG, expecting keyword_do or '{' or '(' ... (https://eval.in/137847)
banister has joined #ruby
<Hanmac>
>> def func(a = raise("huch"));a;end; p func(3); func
Milly_Bays has quit [Read error: Connection reset by peer]
ndrei has joined #ruby
mrmargolis has joined #ruby
crzrcn has joined #ruby
RowdyChild|Away is now known as RowdyChildren
danshultz has quit [Remote host closed the connection]
andrewlio has quit [Quit: Leaving.]
danshultz has joined #ruby
aganov has quit [Ping timeout: 265 seconds]
cescalante is now known as ce_afk
northfurr has joined #ruby
mrmargolis has quit [Ping timeout: 258 seconds]
crzrcn has quit [Ping timeout: 240 seconds]
HashNuke has joined #ruby
helpD has joined #ruby
Rainicorn has joined #ruby
Rainicorn has quit [Client Quit]
northfurr has quit [Client Quit]
danshultz has quit [Ping timeout: 245 seconds]
thomasxie has left #ruby [#ruby]
LadyRainicorn has quit [Ping timeout: 276 seconds]
senayar has quit [Remote host closed the connection]
lkba has joined #ruby
andrewlio has joined #ruby
_justin has quit [Quit: _justin]
yarou has quit [Read error: Connection reset by peer]
RowdyChildren is now known as RowdyChild|Away
yarou has joined #ruby
Megtastique has joined #ruby
ruby-newbie has quit [Quit: leaving]
dawkirst has quit [Remote host closed the connection]
ylluminate has quit [Ping timeout: 252 seconds]
oo__ has quit [Remote host closed the connection]
workmad3 is now known as wm3|lunch
dawkirst has joined #ruby
Briareos1 has joined #ruby
banister has quit [Ping timeout: 240 seconds]
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
atno has quit [Remote host closed the connection]
skulker has joined #ruby
atno has joined #ruby
oo_ has joined #ruby
dima_ has joined #ruby
bthesorceror has joined #ruby
poikon_ has quit [Remote host closed the connection]
browndawg has joined #ruby
browndawg has quit [Max SendQ exceeded]
browndawg has joined #ruby
browndawg has quit [Max SendQ exceeded]
banister has joined #ruby
banister has quit [Max SendQ exceeded]
rkr090 has joined #ruby
banister has joined #ruby
browndawg has joined #ruby
dima_ has quit [Ping timeout: 258 seconds]
jcs222 has quit [Ping timeout: 245 seconds]
banister has quit [Client Quit]
simono has joined #ruby
webgen has joined #ruby
timgauthier has joined #ruby
phoo1234567 has joined #ruby
<timgauthier>
I loaded into textual to a message saying "Can you upload the PHP file" and I thought i was looking at this room. Almost had a heart attack
thomasxie has joined #ruby
jcs222 has joined #ruby
bigkevmcd has joined #ruby
Celm has joined #ruby
endash_ has joined #ruby
yfeldblum has joined #ruby
endash_ has quit [Client Quit]
tkuchiki has quit [Ping timeout: 252 seconds]
emaxi has joined #ruby
endash_ has joined #ruby
senayar has joined #ruby
Squarepy has joined #ruby
moritzs has quit [Ping timeout: 240 seconds]
Celm has quit [Ping timeout: 258 seconds]
lethjakman has joined #ruby
banister has joined #ruby
_justin has joined #ruby
oo_ has quit [Remote host closed the connection]
<banister>
j
mechanicles has quit [Read error: Connection reset by peer]
banister is now known as banisterfiend
djbender has joined #ruby
<timgauthier>
banisterfiend k
ndrei has quit [Ping timeout: 245 seconds]
yfeldblum has quit [Ping timeout: 265 seconds]
emaxi has quit [Ping timeout: 276 seconds]
aagdbl has quit [Quit: Connection closed for inactivity]
oo_ has joined #ruby
lolmaus has quit [Read error: Connection reset by peer]
bluOxigen has quit [Ping timeout: 240 seconds]
<_bart>
hi banisterfiend, I only just found out you actually live in the same city
<banisterfiend>
_bart leiden?
<_bart>
yup!
nevyn has joined #ruby
<banisterfiend>
_bart cool, are you going to the rails meetup on 28th?
cbreeze has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<DefV_>
you guys are dutch?
<banisterfiend>
DefV_ hell naw
qba73 has joined #ruby
<DefV_>
but Leiden is a dutch city
<_bart>
yes definitely, my colleague created the meetup
<timgauthier>
DefV_ and it says NL
<timgauthier>
yup right there! :P
gizmore has joined #ruby
mansi has joined #ruby
<timgauthier>
wait, all you is dutch, noice
phansch has quit [Quit: WeeChat 0.4.2]
<banisterfiend>
DefV_ i'm an import ;)
<_bart>
but I noticed you work for GA, do you work remotely then?
<banisterfiend>
_bart yeah
<_bart>
k cool
<banisterfiend>
_bart remote dev
<timgauthier>
GA?
<banisterfiend>
_bart how do you know about GA?
<_bart>
I'm NSA
afreidah4 has joined #ruby
<banisterfiend>
_bart where's your rails shop in leiden?
<_bart>
no your meetup profile and github mention it I think
<timgauthier>
_bart ... :O
sk87 has joined #ruby
<banisterfiend>
_bart ah ok
<_bart>
banisterfiend: I'm with Innerballoons, they're at Rapenburg 1, above the pub
<banisterfiend>
_bart which pub? :) i dont really know that much about pubs in leiden or street names
lolmaus has joined #ruby
<_bart>
banisterfiend: North End
<banisterfiend>
_bart haha the english pub, hate that place
<banisterfiend>
nastiest food in leiden
<timgauthier>
well Rapenburg 1 is pretty Specific :P
<_bart>
haha why get food at a pub? :p
<timgauthier>
banisterfiend where are you imported from?
<banisterfiend>
timgauthier new zealand
<timgauthier>
_bart thats what you do at english pubs!
<timgauthier>
cool
<timgauthier>
comonwealther
<timgauthier>
commonwealther*
<timgauthier>
fuck english is hard
<banisterfiend>
timgauthier what? you're from nz?
<banisterfiend>
oh
<timgauthier>
I'm from canada
mansi has quit [Ping timeout: 245 seconds]
<_bart>
I don't go there a lot though, I'm still a dutch student
nvrch has joined #ruby
<_bart>
timgauthier: ah okay, yeah I heard about the pie and stuff
<timgauthier>
bangers & mash
<timgauthier>
mmm
alexju has quit [Remote host closed the connection]
BadQuanta has quit [Ping timeout: 258 seconds]
Dude007 has quit [Ping timeout: 240 seconds]
Dude007 has joined #ruby
<_bart>
not a lot of Rails shops in leiden by the way
helpD has quit [Remote host closed the connection]
<banisterfiend>
_bart i know, and dutch pay is really bad for programmers
<timgauthier>
what?
<timgauthier>
really?
<banisterfiend>
_bart doesn't make sense to get a programming job in holland from what i've seen, you guys pay about 1/3 what american corps do :)
helpD has joined #ruby
<timgauthier>
what about compared to the rest of europe?
<banisterfiend>
timgauthier no idea
<_bart>
banisterfiend: what ranges are we talking about? Could you give an example?
<timgauthier>
I am not a programmer, so i'm not super concerned for myself
<banisterfiend>
_bart around 3-4K euro gross, it seems like
endash_ has quit [Quit: endash_]
<timgauthier>
but banisterfiend id say they may make "less" but they get more, insurance, benefits etc.
yfeldblum has joined #ruby
ospider has joined #ruby
<banisterfiend>
_bart what are the (gross) monthly salary you see for dutch rails programmers?
bthesorceror has quit [Remote host closed the connection]
<banisterfiend>
sorry it's a bit crude to talk money on chan, feel free to message me in PM /cc _bart
<_bart>
yeah agreed
<timgauthier>
*shrug*
helpD has quit [Ping timeout: 265 seconds]
ce_afk is now known as cescalante
panga has joined #ruby
helpD has joined #ruby
<timgauthier>
why do websites exist that are fixed width :(
<apeiros>
because the world sucks and only exists to see you suffer.
momomomomo has joined #ruby
Macaveli has quit [Read error: Connection reset by peer]
yfeldblum has quit [Ping timeout: 276 seconds]
<timgauthier>
ITS NOT JUST ME,
<timgauthier>
they are trying to burn down the internet
<timgauthier>
*shakes fist*
Macaveli has joined #ruby
<timgauthier>
and they call them selves designers *head bowed in shame*
<apeiros>
I call myself expert astronaut architect. doesn't mean I am one.
<timgauthier>
haha truth
<timgauthier>
Kerbal Space Program? :P
<Mon_Ouie>
Do you design astronauts or rockets?
<apeiros>
(that's even legal, since those titles are not protected in switzerland)
<timgauthier>
nice apeiros
<apeiros>
kerbal space program is funny
<timgauthier>
love that gaem
<apeiros>
should try it again, and/or maybe buy it :)
<timgauthier>
yeah definitely get it :P
momomomomo has quit [Client Quit]
afreidah4 has quit [Ping timeout: 245 seconds]
<timgauthier>
they added a huge content patch, i haven't touched it yet, but you can capture asteroids
emaxi has joined #ruby
ionull has quit [Read error: Connection reset by peer]
Faris3 has quit [Ping timeout: 245 seconds]
kaspergrubbe has joined #ruby
vpretzel_ is now known as vpretzel
momomomomo has joined #ruby
momomomomo has quit [Client Quit]
astrofog has joined #ruby
benzrf|offline is now known as benzrf
crzrcn has joined #ruby
LostDatagram has quit [Quit: Bye :P - znc.in]
browndawg has quit [Ping timeout: 245 seconds]
LostDatagram has joined #ruby
agjacome has joined #ruby
danshultz has joined #ruby
mark_locklear has joined #ruby
cescalante is now known as ce_afk
akonny has quit [Quit: akonny]
mary5030 has joined #ruby
nhmood has joined #ruby
Martxel has joined #ruby
crzrcn has quit [Ping timeout: 240 seconds]
crazymykl has quit [Remote host closed the connection]
crazymykl has joined #ruby
charliesome has joined #ruby
mary5030 has quit [Remote host closed the connection]
momomomomo has joined #ruby
mary5030 has joined #ruby
ndrei has joined #ruby
timonv has quit [Remote host closed the connection]
timonv has joined #ruby
dawkirst has quit [Remote host closed the connection]
misha_ae has joined #ruby
ospider has left #ruby [#ruby]
ayaz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
kyb3r_ has quit [Quit: Leaving]
fannye has joined #ruby
timonv has quit [Ping timeout: 258 seconds]
afreidah4 has joined #ruby
<_bart>
Anyone used the Mongo driver? I'm trying MongoCollection.find({"day" => 'ISODate("2014-03-19T00:00:00Z")'}) and it returns empty []. But when I run it directly: db.my_coll.find({"day": ISODate("2014-03-19T00:00:00Z")}) I get a lot of results.
nerium has joined #ruby
<nerium>
Anyone know a gem for normalizing strings?
<nerium>
Like converting "This`s true" to "That's true" and so on
metamaterial has quit [Ping timeout: 272 seconds]
_justin has quit [Quit: _justin]
<mikecmpbll>
nerium: ?
donnoc has joined #ruby
<nerium>
mikecmpbll: What :) ?
<benzrf>
>mongo
<mikecmpbll>
that's quite a specific transformation i'm not sure i understand what pattern could be applied to that
<nerium>
The problem I'm trying to solve is this
BadQuanta has joined #ruby
timonv has joined #ruby
panga has quit [Remote host closed the connection]
<nerium>
I'm fetching data from a lot of external sources. One source might return the value "This`s true" and another "That's true".
<nerium>
The are orignaly the same and should be stored in the same row in the db, but the aren't equal and therefor has to be normalizing
<nerium>
mikecmpbll: ^
panga has joined #ruby
skulker has quit [Remote host closed the connection]
<canton7-mac>
nerium, I suspect you'll have to specify all of your transformations manually
<mikecmpbll>
well, i presume you always know the specifics of what's equal to what?
<nerium>
I my case it's song titles and artist names
JasmeetQA has joined #ruby
<timgauthier>
when you look for the data why not pull this and thats and just put regex down to just the "true" and add your own prefix?
JasmeetQA has quit [Client Quit]
rmorello has joined #ruby
<mikecmpbll>
nerium: there's virtually no automation that can be achieved because every case is unique.
BadQuanta has left #ruby [#ruby]
<mikecmpbll>
not sure what a gem would contribute.
<timgauthier>
basically, do a call to look for that's true and transform it, and then do a call of this's true and transform it
<timgauthier>
you'd need to do a separate call for each variation, then normalize them yourself
<timgauthier>
right mikecmpbll ? (i'm a rubynewb)
<mikecmpbll>
i'd just have a mapping of all the variants to the desired value
<olivier_bK>
i parse all of my file for catch some params uid,dbname,url, and i get all of my params in same multi-value hash
<DreamingRainne>
That's what I assumed you wanted, since that's what your original code did. You want each page to have its own hash of results? That's easy enough to arrange for.
afreidah4 has quit [Ping timeout: 246 seconds]
_justin has joined #ruby
helpD has quit [Remote host closed the connection]
dyoko has joined #ruby
helpD has joined #ruby
meatherly has quit [Remote host closed the connection]
benzrf is now known as benzrf|offline
ironsand has joined #ruby
Hytosys has quit [Quit: Hytosys]
Squarepy has quit [Ping timeout: 276 seconds]
dawkirst has joined #ruby
dblessing has joined #ruby
shime has joined #ruby
<olivier_bK>
DreamingRainne, yes it's what i try to do
helpD has quit [Read error: Connection reset by peer]
<olivier_bK>
i try to understand where is my mistake on my code compare yours
<DreamingRainne>
In your own code, you're storing a Match object, which contains a bunch of supplemental info. If you just want the matched strings themselves, you'll want match[1], match[2] etc. Or in my own code, $1 and $2 which refer to captured parts of the last match.
cj3kim_ has quit [Ping timeout: 258 seconds]
doodlehaus has joined #ruby
Kricir_ has joined #ruby
<DreamingRainne>
Or, that was your earlier code, I see your new paste is different. You'd probably want to do something like: match = line.match(/whatever/); config[:uid] << match[1]
<DreamingRainne>
And, I see you want things in a different structure: an array of all UIDs, an array of all dbnames, etc... <rewrites>
RowdyChild|Away has quit [Ping timeout: 255 seconds]
DanKnox has quit [Ping timeout: 255 seconds]
dyoko1 has joined #ruby
_fumk has joined #ruby
_fumk has quit [Max SendQ exceeded]
sailias has joined #ruby
Squarepy has joined #ruby
sailias has quit [Client Quit]
ce_afk is now known as cescalante
dyoko has quit [Ping timeout: 276 seconds]
Kricir has quit [Ping timeout: 276 seconds]
sailias has joined #ruby
RowdyChild|Away has joined #ruby
fumk has quit [Ping timeout: 255 seconds]
DanKnox has joined #ruby
roolo has quit [Quit: Leaving...]
fumk has joined #ruby
fumk has quit [Max SendQ exceeded]
akonny has quit [Ping timeout: 245 seconds]
Kricir_ has quit [Ping timeout: 276 seconds]
saarinen has joined #ruby
fumk has joined #ruby
<DreamingRainne>
Then with my own code in that last paste, delete line 3, and line 6 becomes: (configs[$1] ||= Array.new) << $2
spyderman4g63 has joined #ruby
akonny has joined #ruby
chris_thomson has joined #ruby
DouweM_ has joined #ruby
DouweM has quit [Read error: Connection reset by peer]
lxsameer has quit [Quit: Leaving]
aganov has joined #ruby
sambao21 has joined #ruby
RowdyChild|Away is now known as RowdyChildren
<DreamingRainne>
http://pastie.org/private/gc2pd4xjhe6laffaku4fq ← Along with some variations, such as a trick to make auto-initializing values easier (line 1, simplifying line 5), and using MatchData properly rather than being lazy and using $1/$2 (which are ephemeral anyway).
sambao21 has quit [Client Quit]
browndawg has quit [Ping timeout: 265 seconds]
akonny_ has joined #ruby
crzrcn has joined #ruby
DouweM_ has quit [Client Quit]
csfrancis has joined #ruby
qmfnp has joined #ruby
qmfnp has quit [Client Quit]
crzrcn1 has joined #ruby
akonny has quit [Ping timeout: 245 seconds]
akonny_ is now known as akonny
browndawg has joined #ruby
browndawg has quit [Max SendQ exceeded]
cescalante is now known as ce_afk
<DreamingRainne>
Then you should wind up with stuff like config["uid"] » ["alliance", "total"]; config["url"] » ["https://herp", "https://derp"]; and so on.
<DreamingRainne>
Although, looking at those results, it seems more natural that you'd want each file's settings to be put together, so that one group's uid, url and dbname are stored together rather than each separately tossed onto a grab-bag of UIDs and URLs and DBnames.
crzrcn has quit [Ping timeout: 258 seconds]
saarinen has quit [Quit: saarinen]
chris_thomson has quit [Quit: Zzz...]
crzrcn1 has quit [Ping timeout: 250 seconds]
nerium has quit [Quit: nerium]
nerium has joined #ruby
lukec has joined #ruby
chipotle has joined #ruby
nerium has quit [Client Quit]
arietis has quit [Quit: Computer has gone to sleep.]
browndawg has joined #ruby
dima_ has joined #ruby
Kricir has joined #ruby
RowdyChildren is now known as RowdyChild|Away
hamakn has quit [Remote host closed the connection]
kitak_ has joined #ruby
kitak_ has quit [Remote host closed the connection]
garndt has joined #ruby
dyoko1 has quit [Quit: Leaving.]
ce_afk is now known as cescalante
yalue has joined #ruby
nbouscal has joined #ruby
kitak has quit [Ping timeout: 240 seconds]
phinfonet has joined #ruby
dima_ has quit [Ping timeout: 276 seconds]
dyoko has joined #ruby
lmickh has joined #ruby
mansi has joined #ruby
benzrf|offline is now known as benzrf
<benzrf>
Dude007:
<benzrf>
*dude
<benzrf>
imagine if somebody proved that P=NP
ericwood_ is now known as ericwood
<benzrf>
actually i can very simply prove that P=NP
<workmad3>
benzrf: it would depend on the kind of proof... if someone managed an existence proof of P=NP, then that would mean we knew there is a polynomial-time algorithm for NP-complete problems, but no indication of what it is
<benzrf>
i know
davispuh has joined #ruby
<benzrf>
but especially what if somebody found a proof that gives no clue what the ptime solutoins are
<benzrf>
*solutions
jrhorn424 is now known as zz_jrhorn424
nbouscal has quit [Ping timeout: 240 seconds]
<benzrf>
i wonder if every CS department in the world would immediately allocate all resources to searchin
Kricir has quit [Remote host closed the connection]
snath has quit [Ping timeout: 276 seconds]
osvico has quit [Read error: Connection reset by peer]
<lagweezle>
DreamingRainne: Completely unrelated, but you using an actual arrow in your message… *swoon*
<benzrf>
lagweezle →←
<benzrf>
»»»«««
<lagweezle>
hawt
<benzrf>
µ
<benzrf>
since µ == mu == zen mu
<benzrf>
i have decided to start using µ at y/n prompts
<benzrf>
:-D
osvico has joined #ruby
<lagweezle>
hah
<mikecmpbll>
☹
<DreamingRainne>
√π² ≈ ±3⅛
simplyaubs has joined #ruby
<benzrf>
☺
<lagweezle>
Now, thanks to benzrf, I'm stuck wondering if µpenis or µ-penis would be more correct…
jamto11 has joined #ruby
* DreamingRainne
makes a mental reminder to back up her keyboard file before doing any new OS install. ^_^
<crome>
µTorment
<benzrf>
hmm
<benzrf>
im using a compose key
<crome>
DreamingRainne: no use, you are going to forget about it
<benzrf>
how to make pi i:
afreidah4 has joined #ruby
<benzrf>
crud g2g
<benzrf>
bbloom:
<benzrf>
*bbl
<DreamingRainne>
I customized AltGr/etc for mine. Shift × AltGr × Win = eight-level layout. Hehe.
benzrf is now known as benzrf|offline
<crome>
ah, so you are turning your desktop environment into emacs ;>
<DreamingRainne>
Mostly muscle memory, though. And yeah, kinda!
<lagweezle>
DreamingRainne: Keyboard file?
osvico has quit [Read error: Connection reset by peer]
<DreamingRainne>
I modified the xkeyboard file that defines the layout, to use custom altgr/etc sequences.
<lagweezle>
I've not yet figured out how to have meta work AND have option key still work for all the special symbols, unless I give up and go with the escape+pause+key instead of meta. :(
<DreamingRainne>
Some years back. I'm not even sure where exactly it is, offhand, but it must still be there, obviously.
rmorello is now known as rmorello|WA-1296
osvico has joined #ruby
<DreamingRainne>
GTK entry widgets let you use ctrl+shift+U to get a Unicode codepoint prompt. ctrl+shift+U, "201c", enter/space → “
jprovazn has quit [Quit: Leaving]
afreidah4 has quit [Ping timeout: 265 seconds]
<DreamingRainne>
So, all you have to do is memorize a ton of those! ¬_¬
<lagweezle>
heh
<crome>
there arent that many aftera ll
<lagweezle>
I miss alt-; giving me an ellipsis.
dawkirst has joined #ruby
dik_dak has joined #ruby
<DreamingRainne>
alt+; gives me a dead acute (enter that, then type “a” → á)
anaeem1 has joined #ruby
<lagweezle>
IIRC that'd be alt (aka 'option') + a.
* lagweezle
is the weirdo using OS X and irssi.
<DreamingRainne>
On a vaguely related note, you know you're a programmer when you see that “alt+;” and see a statement terminator rather than a literal. x_x
haroldwu has joined #ruby
meatherly has joined #ruby
<lagweezle>
alt++; ;)
<lagweezle>
Ooh! alt++;)
<lagweezle>
I suppose that is mildly evil.
cocotton has joined #ruby
browndawg has quit [Ping timeout: 276 seconds]
Celm has joined #ruby
<shevy>
you guys are nerds
<DreamingRainne>
^_^
helpD has joined #ruby
rvraghav93 has quit [Ping timeout: 240 seconds]
jeregrine has joined #ruby
sambao21 has joined #ruby
AlexRussia has joined #ruby
Nukepuppy has joined #ruby
haroldwu has quit [Changing host]
haroldwu has joined #ruby
quitobro has joined #ruby
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
codabrink has joined #ruby
Melpaws has quit [Quit: Leaving.]
helpD has quit [Ping timeout: 276 seconds]
hamakn has joined #ruby
Celm has quit [Ping timeout: 258 seconds]
apeiros has quit [Remote host closed the connection]
phansch has joined #ruby
jobewan has joined #ruby
apeiros has joined #ruby
cocotton has quit [Remote host closed the connection]
afreidah4 has joined #ruby
sk87 has joined #ruby
jprovazn has joined #ruby
benzrf|offline is now known as benzrf
cocotton_ has joined #ruby
baweaver has joined #ruby
cocotton_ has quit [Remote host closed the connection]
cocotton has joined #ruby
koderok has joined #ruby
rayners has joined #ruby
apeiros has quit [Ping timeout: 250 seconds]
nerium has joined #ruby
chipotle has quit [Quit: cya]
donnoc has joined #ruby
SilkFox has joined #ruby
benzrf is now known as benzrf|offline
kitak_ has joined #ruby
javierbuilder has joined #ruby
jack_rabbit has quit [Ping timeout: 245 seconds]
mansi has quit [Remote host closed the connection]
kitak__ has joined #ruby
mansi has joined #ruby
afreidah4 has quit [Ping timeout: 250 seconds]
codebro has joined #ruby
dyoko has quit [Quit: Leaving.]
jlast has joined #ruby
treehug88 has joined #ruby
cocotton has quit [Remote host closed the connection]
devdazed has quit [Quit: Bye]
yanke_guo has joined #ruby
Advocation has joined #ruby
benzrf|offline is now known as benzrf
oo_ has joined #ruby
devdazed has joined #ruby
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
cocotton has joined #ruby
cocotton has quit [Remote host closed the connection]
cocotton has joined #ruby
roolo has joined #ruby
anaeem1 has quit [Remote host closed the connection]
donnoc has quit [Ping timeout: 258 seconds]
vpretzel is now known as vpretzel|1297
<benzrf>
i just use the unity compose key :3
<benzrf>
ĸ
<benzrf>
^thats a kappa right
Al__ has quit [Quit: Al__]
mansi has quit [Ping timeout: 245 seconds]
<yanke_guo>
is there handy epoll gems ?
avril14th has quit [Remote host closed the connection]
<Mon_Ouie>
My keyboard layout already has a dead-greek key. alt gr-g then w is ω for example
phansch has quit [Quit: WeeChat 0.4.2]
paulfm has joined #ruby
<benzrf>
:I
Martxel has quit [Ping timeout: 240 seconds]
<benzrf>
i can pretty much just type mu and maybe kappa
* workmad3
wonders if benzrf will punch him again he suggest awk...
<workmad3>
*if he
zcreative has joined #ruby
* benzrf
rips workmad3's head off
<workmad3>
benzrf: more seriously, you could probably wrap something around ruby_parser or ripper reasonably quickly
<shevy>
haha
<shevy>
workmad3: "hey benzrf, don't be lazy, go write it yourself!!!"
mjs2600 has quit [Remote host closed the connection]
<shevy>
now I just wait for benzrf asking it a third time
<shevy>
and workmad3 giving the same reply yet again ;)
jkamenik has joined #ruby
<workmad3>
shevy: more "I'm not aware of a gem to do that which doesn't use .source_location and so loads the code... but here's the raw tools you'd probably want"
<shevy>
noone wants them!!!
<shevy>
look how angry you made benzrf
<shevy>
* benzrf rips workmad3's head off
<benzrf>
im fuckin FURIOUS
<benzrf>
u shit
<workmad3>
hehe
<shevy>
<benzrf> workmad3: something programmatic u shit
<shevy>
* benzrf punches workmad3 in the face
ktun has joined #ruby
<shevy>
don't make teenagers angry
cjbottaro has joined #ruby
<shevy>
they grab a gun and randomly shoot people!
rvraghav93 has joined #ruby
<benzrf>
shevy: how droll
<benzrf>
not in poor taste at all
SCommette has joined #ruby
<shevy>
it's true
lukec has quit [Quit: lukec]
oo_ has quit [Remote host closed the connection]
zeropx has quit [Ping timeout: 245 seconds]
kiri has joined #ruby
misha_ae has quit [Quit: Page closed]
Drewch has joined #ruby
Macaveli has quit [Ping timeout: 252 seconds]
andy__ has joined #ruby
mansi has joined #ruby
mansi has quit [Read error: Connection reset by peer]
rvraghav93 has quit [Ping timeout: 240 seconds]
mansi has joined #ruby
mjs2600 has joined #ruby
Fretta has joined #ruby
mjs2600 has quit [Remote host closed the connection]
momomomomo has joined #ruby
nfk has quit [Quit: yawn]
dstynchula has joined #ruby
shime has quit [Ping timeout: 240 seconds]
momomomomo has quit [Client Quit]
krz has quit [Quit: WeeChat 0.4.3]
wallerdev has joined #ruby
oo_ has joined #ruby
arietis has quit [Quit: Computer has gone to sleep.]
lethjakman has quit [Ping timeout: 240 seconds]
crystal77 has joined #ruby
rvraghav93 has joined #ruby
pu22l3r has joined #ruby
jprovazn has quit [Quit: Leaving]
* certainty
looks at the ripped out hearts and bloody asses on the channel walls
DouweM has joined #ruby
pu22l3r has quit [Read error: Connection reset by peer]
<apeiros>
what did I miss?
<baweaver>
kali-ma?
pu22l3r has joined #ruby
dawkirst has quit [Remote host closed the connection]
bklane has joined #ruby
sambao21 has joined #ruby
simplyaubs has joined #ruby
bluOxigen has joined #ruby
aganov has quit [Quit: Leaving]
lowski has joined #ruby
LBRapid has joined #ruby
<certainty>
apeiros: benzrf and workmad3 were contenders in a death match. Apparently benzrf eventually got the chance to make his finish move
dstynchula has quit [Remote host closed the connection]
rvraghav93 has quit [Ping timeout: 250 seconds]
<shevy>
poor workmad3
mjs2600 has joined #ruby
mjs2600 has quit [Remote host closed the connection]
mikecmpbll has quit [Quit: i've nodded off.]
<workmad3>
certainty: I was too busy trolling benzrf with suggestions to grep and awk to avoid him ripping my head off...
sdelmore has joined #ruby
mrgoodcat is now known as ljt
<certainty>
some people of the audience though reported the forbidden use of monads
ljt is now known as mrgoodcat
danijoo has quit [Quit: Leaving...]
<olivier_bK>
how i can remove the white space between " and ' :uid=>" 'grouperefl';", i try with strip but i get nothing
<certainty>
linux is an example of you can actually maintain it in contrast to freeBSD
zcreative has joined #ruby
Celm has joined #ruby
<shevy>
hmm
poikon_ has joined #ruby
RaCx has joined #ruby
<shevy>
didn't they say that their approach is better?
roland_ has joined #ruby
<baweaver>
OpenBSD kills all in terms of security.
AlexRussia has quit [Remote host closed the connection]
<shevy>
like everything is given out by one group
<baweaver>
FreeBSD in terms of stability and package managements being actually up to date and vetted.
poikon__ has quit [Ping timeout: 245 seconds]
AlexRussia has joined #ruby
<certainty>
shevy: yeah, they probably also say that earth is the center of our stalar system
<certainty>
stelar?
<baweaver>
As a SysAdmin, I far far prefer BSD for servers.
<shevy>
baweaver, they use cvs!
<baweaver>
So?
<shevy>
cvs!!!
<certainty>
haha
<baweaver>
So???
<certainty>
baweaver: how many boxes do you have to administrate?
<shevy>
enough said!
<certainty>
administer?
<shevy>
1960 retro-coding
<baweaver>
They also have two remote exploits in their entire history.
<alexd>
shevy: really cvs?
arturaz has quit [Remote host closed the connection]
<shevy>
alexd no idea but look: http://www.openbsd.org/goals.html " Provide full source access to developers and users, including the ability to look at CVS tree changes directly."
<shevy>
THE ABILITY TO LOOK AT CVS TREE!!!!
<baweaver>
When I was in more of a devops role, 15 servers, and over 1000 linux boxes.
<shevy>
isn't that awesome?
oo_ has quit [Remote host closed the connection]
yfeldblum has joined #ruby
m104 has joined #ruby
<certainty>
baweaver: yeah, remote exploits are rare on other systems as well.
<baweaver>
then again that was around a year ago now, I'm in more of a developer capacity now.
vpereira has quit [Quit: leaving]
noob101 has joined #ruby
moritzs has joined #ruby
<certainty>
that's good, doing administration stuff is the road to the mental asylum
<baweaver>
The fun part was to 1000+ linux machines, which were ubiquiti antennas.
<certainty>
all the same distro?
<baweaver>
then about 500 alvarions
vpretzel|1297 is now known as vpretzel|1292
<baweaver>
yeah, debian based from what I could tell.
crzrcn has joined #ruby
rudisimo has joined #ruby
<baweaver>
alvarions were all telnet only access.....
<baweaver>
So I made an entire framework to automate the entire thing.
<baweaver>
and realized very quickly in the process I loved to code more than I loved to configure servers.
yfeldblum has quit [Ping timeout: 240 seconds]
<baweaver>
So I learned Rails in a few weeks and made the leap.
Morkel_ has joined #ruby
endash_ has quit [Quit: endash_]
<arubincloud>
baweaver: These days you can do both.
Morkel_ has quit [Client Quit]
BSaboia has joined #ruby
<baweaver>
Can, don't want to :P
<arubincloud>
Have you used anything like Puppet?
Morkel has quit [Ping timeout: 258 seconds]
<baweaver>
Chef
* arubincloud
was a sys admin long ago as well.
kitak has joined #ruby
dawkirst has quit [Remote host closed the connection]
<certainty>
puppet is also the road to mental asylum
<arubincloud>
It is thankless work.
dima_ has joined #ruby
<baweaver>
Though I effectively rolled my own.
yfeldblum has joined #ruby
<baweaver>
that with Zabbix, which I was fool enough to let it send me texts.
<arubincloud>
certainty: Some of us managed such things manually and with home-grown scripts back in the day. Puppet is a godsend.
Kricir has quit [Ping timeout: 240 seconds]
<certainty>
i wish we had things like nixOS when we voted for a new distro
<benzrf>
nixos?
<baweaver>
I preferred Chef to Puppet.
<certainty>
benzrf: yepp
<baweaver>
from a cursory look mind you
Trevoke has joined #ruby
<baweaver>
The fun part of that work is after I was done, you could update the firmware for an entire ISPs wireless antennas in about 10 minutes, as opposed to the one month it took to do it by hand before
lowski is now known as lowski_away
<baweaver>
automation win methinks.
<certainty>
arubincloud: it certainly is better than doing it all yourself, but I don't like the idea of telling what the system shall look like and let puppet figure out how to achieve it. It sounds promising at the beginning but it turns out that having control over how things are done is actually needed often times. I don't want to use exec resources for everything :)
<arubincloud>
Absolutely.
<arubincloud>
It is amazing how many companies still use very little automation.
<Trevoke>
Hi everyone, is there such a thing as an "Explicit" way of setting an instance variable? For instance, you can do "hello".send(:upcase) or 6.send(:class), but I haven't found a "less magic" way of doing "x = 3"
m104 has quit [Quit: bye]
cj3kim has quit [Remote host closed the connection]
<benzrf>
Trevoke: x in that example is a local var
<benzrf>
perhaps u mean @x = 3
cj3kim has joined #ruby
<baweaver>
Chef and Puppet are only really apparently useful once you go beyond 20 servers.
<arubincloud>
The system on which I work now must be installed manually.
<baweaver>
Then it becomes necessary fast.
kitak__ has quit [Remote host closed the connection]
<Trevoke>
benzrf: Right. And if you do "Kernel.local_variables" you can see that "x" is in that list.
AlexRussia has quit [Quit: Konversation terminated!Good bye!]
<benzrf>
ok...
<arubincloud>
And there is basically one person who knows absolutely everything about how to install it.
<benzrf>
so?
<Trevoke>
benzrf: Context, I'm going to be teaching Ruby to complete beginners and I'm looking for a way to bring around to them the idea that everything is an object.
chipotle has quit [Quit: cya]
AlexRussia has joined #ruby
duggiefresh has quit [Read error: Connection reset by peer]
duggiefr_ has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
chipotle has joined #ruby
dima_ has quit [Ping timeout: 265 seconds]
<arubincloud>
Trevoke: I think that showing them things like 5.methods should be enough.
<Trevoke>
benzrf: Since a variable is really just a pointer to something, I was wondering how Ruby handles the process of naming that pointer and assigning its value.
<DouweM>
Trevoke: for ivars you can use #instance_variable_get, for local variables I doubt it
Gooder` has quit [Ping timeout: 258 seconds]
<arubincloud>
And "some string".methods.
Dude007_ has joined #ruby
<Trevoke>
arubincloud: it's a part of what we're going to do, thanks. And eventually working our way through to BasicObject and such
<arubincloud>
Trevoke: Are these people new to Ruby or new to programming?
<DouweM>
and I can't envision "a less magic way of doing x = 3" because variable assignment is so basic and local to the scope, not some object you could call a method on
cj3kim has quit [Remote host closed the connection]
<arubincloud>
Because this seems like a bit much for people who are new to programming.
lowski_away is now known as lowski
rippa has joined #ruby
<benzrf>
foo = 3 is a basic primitive op in ruby
<benzrf>
so is foo.bar
farn has quit [Ping timeout: 252 seconds]
<benzrf>
foo.send :bar is more artificial than foo.bar tbh
<Trevoke>
DouweM: I don't know if it's possible, which is why I'm asking the larger community, but since we can get a _list_ of local variables, it seems that I should be able to add to that list ... manually.
<benzrf>
Trevoke: perhaps you are looking for io
<benzrf>
*Io
helpD has joined #ruby
<Trevoke>
benzrf but that's not true! "foo.bar" means "send the message 'bar' to the object 'foo'"
<DouweM>
Trevoke: yeah, with the access through Kernel I see what you eman
<certainty>
IO :p
fabrice31 has quit [Remote host closed the connection]
Dude007 has quit [Ping timeout: 265 seconds]
Es0teric has joined #ruby
bthesorceror has quit [Remote host closed the connection]
mikecmpbll has joined #ruby
zcreative has quit [Quit: Computer has gone to sleep.]
<Trevoke>
benzrf: IO ? Maybe, I haven't looked there yet, lemme take a gander
chipotle has quit [Client Quit]
kevind has joined #ruby
cj3kim has joined #ruby
cj3kim has quit [Remote host closed the connection]
dima_ has joined #ruby
ndrei has quit [Ping timeout: 252 seconds]
<Trevoke>
arubincloud: new to programming. It does seem a bit much, but as it turns out, making things very explicit removes the magic and provides them with the bedrock of Ruby, which is nice. "Oh, def create is just a method in the Controller, so it'll get called when the Controller gets instantiated" is kinda nice.
poikon_ has quit [Remote host closed the connection]
enebo has quit [Ping timeout: 245 seconds]
enebo_ is now known as enebo
Es0teric has quit [Client Quit]
helpD has quit [Read error: Connection reset by peer]
helpD_ has joined #ruby
<Trevoke>
benzrf: not sure how IO would be helping
<benzrf>
Trevoke: im all for this but you need to show concrete usable examples before showing them how it works
<arubincloud>
It gets called when the class is created actually.
<Trevoke>
benzrf: If you'll allow me to be the devil's advocate.... Why?
<arubincloud>
You can show this by throwing a puts in the middle of your class.
ndrei has joined #ruby
<benzrf>
Trevoke: because it's easier to understand how something works if you see what it does first
<benzrf>
if you look at the inside of a car before learning to drive, it's not as easy to form the associations with pedals &c
<Trevoke>
benzrf: I'd love to discuss teaching methodology, but can we solve one problem at a time, please?
<shevy>
Trevoke don't ask benzrf how a monad relates to ruby please!
_justin has quit [Quit: _justin]
tvw has quit []
<arubincloud>
shevy: Now you have done it...
<Trevoke>
arubincloud: That's because when you run the program, as it parses and "runs" the class object, it'll run what's inside, which is clearly Kernel.puts
<shevy>
arubincloud I shamefully admit that
<arubincloud>
Trevoke: I just wanted to clarify that it was not going to happen when an instance was created.
<arubincloud>
s/was created/is created/
flowerhack has joined #ruby
farn has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
<arubincloud>
I would show them things like 5.methods and "some string".methods and 5.+(6).
<arubincloud>
There is enough syntax to understand without knowing the details of absolutely everything.
panga has quit [Quit: Leaving :)]
RaCx has quit [Quit: Computer has gone to sleep.]
lethjakman has joined #ruby
<certainty>
i'd show them jruby so that they can write the libraries they want in clojure and call from the jruby side. You have to give options out of the ruby trap :)
<Trevoke>
certainty: I plan on showing Haskell and Lisp, don't worry.
<arubincloud>
Trevoke: You do not think it would what?
<Trevoke>
arubincloud: Well, actually, if you don't know what I'm saying, then I definitely don't know what I'm saying. I was responding to your "puts" comment.
<certainty>
Trevoke: why the detour to ruby then?
<arubincloud>
Trevoke: The point was that the defs are being executed when the class is "created", not when an instance is created.
<shevy>
when we test a ruby based gem project
zeropx has joined #ruby
<shevy>
do we call the directory test/ or tests/ ?
<certainty>
Trevoke: that's a bit mean though. You first show them how beautiful things can be before you tell them that they're not allowed to use them :)
omosoj has joined #ruby
<arubincloud>
Trevoke: What about it?
<shevy>
some languages do not deserve to be used
<shevy>
*cough* php *cough*
senayar has quit [Remote host closed the connection]
chipotle has quit [Quit: cya]
<Trevoke>
certainty: let's not go down that path, I'm not interested in this argument at the moment
arietis has joined #ruby
jkamenik has quit [Quit: Leaving.]
ndrei has quit [Ping timeout: 258 seconds]
_justin has joined #ruby
<Trevoke>
arubincloud: "puts" and "define_method" are called in the same scope. "puts" has the side effect of printing to standard-out, and "define_method" has the side effect of creating a method.
Es0teric has joined #ruby
ndrei has joined #ruby
<arubincloud>
Trevoke: Yes, and?
<Trevoke>
arubincloud: I think I'm agreeing with you, but I don't understand why you're saying this.
bklane has quit [Quit: Leaving...]
toastynerd has joined #ruby
lsmola has quit [Ping timeout: 252 seconds]
<arubincloud>
Trevoke: Because you wrote this:
javierbuilder has quit [Ping timeout: 240 seconds]
<arubincloud>
10:29 AM <Trevoke> arubincloud: new to programming. It does seem a bit much, but as it turns out, making things very explicit removes the magic and provides them with the bedrock of Ruby, which is nice. "Oh, def create is just a method in the Controller, so it'll get called when the Controller gets instantiated" is kinda nice.
<Trevoke>
arubincloud: aaaaaaaah I see.
vpretzel_ has joined #ruby
<arubincloud>
Perhaps the wording is just unclear.
<Trevoke>
arubincloud: It is unclear, I apologize.
senayar has joined #ruby
<arubincloud>
Perhaps you mean when the class is instantiated, not when an instance of the class is created.
<certainty>
Trevoke: no problem, just sayin' :)
jkamenik has joined #ruby
DouweM has quit [Quit: Leaving...]
<arubincloud>
I can see what you probably meant now.
vadzimt has joined #ruby
mjs2600 has joined #ruby
vadzimt has quit [Client Quit]
Iniesta8 has joined #ruby
<shevy>
Trevoke well being explicit has advantages too; no second guessing necessary. in ruby a lot of flexibility exists in syntax, more so than in i.e. python or php
maletor has joined #ruby
vpretzel|1292 has quit [Ping timeout: 245 seconds]
michael_lee has joined #ruby
vpretzel_ is now known as vpretzel|1292
lowski_away is now known as lowski
lowski is now known as lowski_away
<Trevoke>
shevy: Right, and doing "[].<< 3" is nice to show that there's no "magic" there.
lowski_away is now known as lowski
<shevy>
but ugly!
<lagweezle>
That's ... that's special, is what that is.
<Trevoke>
shevy: And it _is_ ugly, and that's why we want to make things prettier, but if you start with pretty, you may not understand how much work the lexer does for you
<lagweezle>
I'm not sure if I should be concerned or not, but I do understand it, Trevoke.
aedorn has joined #ruby
<Trevoke>
lagweezle: You shall henceforth be known as "First Minion"(tm). :D
<havenwood>
noob101: is it the % notation you don't understand?
<shevy>
Hanmac well java. it's like the banks -- too big to fail
<arubincloud>
lagweezle: Infix operators are usually method calls on the object to their left.
michael_lee has joined #ruby
<havenwood>
noob101: or something else?
yanke_guo has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<shevy>
noob101 you can choose any character after the % there
zcreative has joined #ruby
<shevy>
noob101 the ruby parser does not care
<shevy>
you can even use ' ' without the '
rvraghav93 has joined #ruby
<havenwood>
>> %|i too am a percent notation string, just don't use pipes inside me since that is the delimiter i chose|
benzrf is now known as benzrf|offline
<eval-in_>
havenwood => "i too am a percent notation string, just don't use pipes inside me since that is the delimiter i chose" (https://eval.in/137943)
<certainty>
let's ditch encrypted channels, crypto is too hard for people :)
arietis has quit [Quit: Computer has gone to sleep.]
chipotle has joined #ruby
<Trevoke>
certainty: I believe that is the sanest sentence I've read all week 8)
<arubincloud>
certainty: Ditching C would probably be a better idea.
crystal77 has joined #ruby
<Trevoke>
arubincloud: That would make Torvalds sad
rayners has quit [Ping timeout: 250 seconds]
<noob101>
notation I think
zcreative has quit [Client Quit]
<arubincloud>
Trevoke: Well, his use case is probably valid.
<certainty>
arubincloud: let's ditch both
<dstynchula>
Crypto is win! that is all.
<noob101>
I never seen it in my life programming until this exercise
browndawg has left #ruby [#ruby]
<noob101>
also the string is around parentheses and stuff.
Nukepuppy has joined #ruby
dagobah has quit [Quit: Leaving...]
rainmanjam has joined #ruby
_maes_ has joined #ruby
<Trevoke>
arubincloud: I have much respect for your use case of the word "probably".
creativeembassy has quit [Quit: FO SHO]
<arubincloud>
heh
<havenwood>
noob101: so a string literal is usually "double quotes" or 'single quotes', but if you try to use that same type of quote inside the string you must escape it (with a backslash typically). The parentheses were just the authors choice of delimiter for the flexible % string notation.
cocotton has quit [Remote host closed the connection]
<havenwood>
author's*
chipotle has quit [Client Quit]
<arubincloud>
Trevoke: I am open to the possibility of another language coming along that makes sense for OS development.
<arubincloud>
Trevoke: I suppose that some might argue that C++ is an option.
<noob101>
so havenwood can you just remind me why %() is used again to make strings and what is that method called?
nomenkun has quit [Remote host closed the connection]
<Hanmac>
shevy: What would happen if the Earth's rotation were sped up until a day only lasted one second? >>> http://what-if.xkcd.com/92/
nomenkun has joined #ruby
nomenkun has quit [Remote host closed the connection]
<certainty>
noob101: that's syntax not a method
<apeiros>
noob101: I actually showed you above
<apeiros>
18:05 apeiros: "foo=\"bar\"; baz=\"quuz\"" # <-- can be annoying
<apeiros>
18:05 apeiros: %{foo="bar"; baz="quuz"} # <-- easier to read
nomenkun has joined #ruby
<apeiros>
noob101: ^ that's why
<noob101>
apeiros: you told me why, I will check sorry
JBreit has left #ruby [#ruby]
<apeiros>
%{} and %() are the same
sski has quit [Ping timeout: 240 seconds]
<apeiros>
just different delimiters
<Hanmac>
certainty: so what about :"" and :'' so you have a funny sentence for that too?
bradhe has joined #ruby
`MArceLL` has joined #ruby
maletor has joined #ruby
roolo has quit [Client Quit]
deadlock has joined #ruby
bradhe_ has joined #ruby
_justin has quit [Quit: _justin]
dgfdgf has quit [Ping timeout: 246 seconds]
bradhe_ has quit [Read error: Connection reset by peer]
sigurding has quit [Quit: sigurding]
kenneth has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bradhe_ has joined #ruby
SilkFox has joined #ruby
rainmanj_ has joined #ruby
nomenkun has quit [Ping timeout: 240 seconds]
chrisja has joined #ruby
rainmanjam has quit [Read error: Connection reset by peer]
Iniesta8 has joined #ruby
_justin has joined #ruby
poikon_ has quit [Read error: Connection reset by peer]
mikecmpbll has joined #ruby
bradhe has quit [Ping timeout: 240 seconds]
poikon_ has joined #ruby
Hobogrammer has joined #ruby
yfeldblum has quit [Remote host closed the connection]
<shevy>
anyone of you did write a nice audio or video script in ruby?
<certainty>
Hanmac: nope, only the not so funny observation that the same rules apply basically, only the result is somewhat different as it will be interned regardless of whether it allowed a peek or not
zorak has joined #ruby
<havenwood>
shevy: whatcha mean? just anything to do with audio or vid?
<shevy>
havenwood hmm for instance, apeiros once wrote a ruby script that generated some .wav file that played a short melody, all in ruby - things like that would be awesome
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
zigomir has quit [Ping timeout: 245 seconds]
sigurding has joined #ruby
kitak has joined #ruby
avree has joined #ruby
eka has joined #ruby
<shevy>
hey guys
nateberkopec has joined #ruby
avree has quit [Client Quit]
<shevy>
can it be that, the more gems are installed, the slower ruby becomes?
alex88 has quit [Quit: Leaving...]
Iniesta8 has joined #ruby
<shevy>
hey shvelo!
<shevy>
my brother!
mikecmpbll has joined #ruby
<bricker`LA>
shevy: absolutely
Iniesta8 has quit [Max SendQ exceeded]
<shvelo>
shevy, what's up
<shevy>
certainty nah, born and living in vienna
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Iniesta8 has joined #ruby
ryanilg has joined #ruby
<certainty>
shevy: but still you understand german :)
User458764 has joined #ruby
<certainty>
that's what i've been meaning to ask
michaeldeol has joined #ruby
noop has quit [Ping timeout: 245 seconds]
rmorello|WA-1296 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<shevy>
certainty yeah, written in german; I have a hard time understanding fast spoken sächsisch
<banisterfiend>
certainty he speaks it fluently, his 'und' is something of exquisite beauty
babatz has quit [Ping timeout: 240 seconds]
<crome>
shevy: especially if you use lots of gems that do blasphemous things that increase the global state counter
<crome>
all the time
SilkFox has quit [Ping timeout: 250 seconds]
<shevy>
crome well I have about 350 gems so far
chipotle has quit [Quit: cya]
<shevy>
installed
noop has joined #ruby
<crome>
ah, you mean insatlled but not necessarily loaded
<shevy>
adhearsion pulled in like +20
<banisterfiend>
certainty he holds special parties where he stands in the middle of the floor softly saying 'und' repeatedly while the guests copulate rhythmically around him
<certainty>
shevy: almost everyone has problems with that ;)
<certainty>
banisterfiend: lol
zigomir has joined #ruby
chipotle has joined #ruby
<dunkel2>
hello
bradhe_ has quit [Remote host closed the connection]
erikruthven has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<dunkel2>
i installed ruby on debian but i cant install a gem i need
<shevy>
not much information given so far
<dunkel2>
it keeps giving me an error like this ERROR: Failed to build gem native extension.
<shevy>
that usually means that it tries to compile something
<dunkel2>
and i was trying to compile the ruby form source to have the latest
skaflem has quit [Quit: Leaving]
astrofog has quit [Quit: Nisam tu]
pwh has joined #ruby
i_s has quit [Remote host closed the connection]
<dunkel2>
and it also had an error while running the make command
mjs2600 has joined #ruby
wallerdev has joined #ruby
timonv has quit [Remote host closed the connection]
rmorello has joined #ruby
astrofog has joined #ruby
astrofog has quit [Max SendQ exceeded]
<Hanmac>
dunkel2: how did you install ruby, did you install the ruby-dev package of the version?
duggiefresh has joined #ruby
<dunkel2>
hey Hanmac hello again
<shevy>
dunkel2 it often helps if you give more information. for instance, the name of the gem. and the specific error. you can put these on a pastie
<dunkel2>
im reinstalling ruby i just purge all instalation of it with apt-get
zegerjan has joined #ruby
<dunkel2>
the gem is flowdock-git-hook
mrgoodcat is now known as goodcat
LadyRainicorn has quit [Quit: Bye]
<dunkel2>
ok im doing this first sudo apt-get install ruby1.9.1
astrofog has joined #ruby
astrofog has quit [Max SendQ exceeded]
<dunkel2>
now this sudo apt-get install ruby1.9.1-dev
klaut has quit [Remote host closed the connection]
<shevy>
yeah, it hopefully copied the .so into your ruby site dir lib path
<grieg>
hi. does ruby support user datatypes? (yes/no goes)
nisstyre has joined #ruby
<dunkel2>
so i try again the gem install?
erikruthven has joined #ruby
<shevy>
install the gem again, if it fails, go to "cd /var/lib/gems/1.9.1/gems/" and look for flowdock-git-hook there
erikruthven has quit [Max SendQ exceeded]
SvenOostenbrink has joined #ruby
<doanerock>
can you get the salt grains on the minion? for only running salt locally? is there a name for only running salt locally?
<shevy>
grieg can you define what is a user datatype`
edwardly is now known as edwardly_
jason__ has quit [Read error: Connection reset by peer]
<dunkel2>
its not there
<shevy>
dunkel2 ok
<dunkel2>
that dir only has json and posix
<certainty>
grieg: every class denotes a distinct type
lethjakman has left #ruby ["WeeChat 0.4.3"]
<SvenOostenbrink>
Hi there, I'm trying to install a ruby based program (chiliproject) and halfway during that setup, I have to do "gem install rails --version 2.3.5" which gives me "ERROR: Loading command: install (LoadError); /usr/local/rvm/rubies/ree-1.8.7-2012.02/lib/ruby/1.8/x86_64-linux/openssl.so: undefined symbol: EC_GROUP_new_curve_GF2m - /usr/local/rvm/rubies/ree-1.8.7-2012.02/lib/ruby/1.8/x86_64-linux/openssl.so; ERROR: While executing gem ...
<SvenOostenbrink>
(NoMethodError); undefined method `invoke_with_build_args' for nil:NilClass"
shvelo has quit [Ping timeout: 276 seconds]
ddv has quit [Changing host]
ddv has joined #ruby
<shevy>
go to: /var/lib/gems/1.9.1/cache/
edwardly_ is now known as edwardly
<shevy>
dunkel2 look for flowdock*
<SvenOostenbrink>
actually, just "gem install" will give me that error..
<shevy>
SvenOostenbrink your openssl.so lacks a symbol
<dunkel2>
again just json and posix
fubelly has joined #ruby
<shevy>
dunkel2 impossible
DouweM has quit [Read error: Connection reset by peer]
kidoz has joined #ruby
cj3kim_ has joined #ruby
<shevy>
dunkel2 whenever "gem install foo" is issued, and that gem exists, it will be downloaded and stored at cache/ directory
larissa has joined #ruby
senayar has quit [Remote host closed the connection]
bean has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<grieg>
shevy, a data type created by user. certainty, can i call say integer a class then?
<dunkel2>
:S
<shevy>
now you say that your cache/ dir has only two .gem files even though you did a "gem install flowdock-git-hook"
<dunkel2>
do i run —verbose or something?
<shevy>
no idea
<shevy>
I think people who use debian-ruby should not use ruby at all
Martxel has quit [Ping timeout: 245 seconds]
UnclueFungus has joined #ruby
<dunkel2>
xD
bean has joined #ruby
<shevy>
my cache/ dir has all the .gem files
<shevy>
even when they fail to install (though, none really fails)
doodlehaus has quit [Remote host closed the connection]
erikruthven has joined #ruby
iamjarvo has joined #ruby
<shevy>
you can try to find out why your flowdock-git-hook has a dependencies on this posix stuff
<SvenOostenbrink>
shevy: How would it miss a symbol exactly? I suppose this means that my openssl install is broken maybe? This is a centos 6.5 install, but afaik, all is installed from packages
cz20xx has quit [Remote host closed the connection]
<shevy>
so grit pulls it in
<workmad3>
SvenOostenbrink: your ruby isn't installed from packages
<dunkel2>
im installing rails just to test the gem install and its installing correctly
<shevy>
SvenOostenbrink probably your openssl.so lacked it when compiled
<workmad3>
SvenOostenbrink: and I bet you updated openssl recently to patch heartbleed
meatherly has joined #ruby
pu22l3r_ has joined #ruby
okdas has joined #ruby
bean has quit [Max SendQ exceeded]
avree has joined #ruby
<SvenOostenbrink>
I updated the entire server a few days ago yeah
<workmad3>
SvenOostenbrink: so it's most likely that the symbol got removed or changed, and your REE compiled with RVM hasn't been recompiled to cope
yfeldblum has joined #ruby
<dunkel2>
and those dependencies are installed automatically you say right?
pu22l3r__ has joined #ruby
<SvenOostenbrink>
workmad3: okay, but how would I solve this? I'd have to remove all ruby packages, and compile all ruby manually?
bean has joined #ruby
<workmad3>
SvenOostenbrink: you're not using ruby packages
<workmad3>
SvenOostenbrink: you're using rvm
<SvenOostenbrink>
dunkel2: well, its all RPM packages, only these gems I'd have to install by hand
iceden has quit [Ping timeout: 276 seconds]
<workmad3>
SvenOostenbrink: so you should reinstall the ruby with rvm
pu22l3r_ has quit [Remote host closed the connection]
_justin has quit [Quit: _justin]
pu22l3r has quit [Read error: Connection reset by peer]
<dunkel2>
i installed posix alone
rmorello|fixbuil is now known as rmorello|1304
<dunkel2>
anow ill try again the flowdock
akonny has quit [Quit: akonny]
cocotton has joined #ruby
cocotton has quit [Remote host closed the connection]
<shevy>
dunkel2 normally that is how gem install works
<workmad3>
SvenOostenbrink: btw, you're also using a 2 year old version of REE that will be lacking a lot of security patches
<SvenOostenbrink>
workmad3: ah crap.. actually.. I did this: bash < <(curl -s https://rvm.beginrescueend.com/install/rvm) then added this at the bottom of bash profile page: [[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" then logout, login, type rvm | head -1 to verify, then rvm get head; rvm reload; then rvm install ree; rvm --default use ree; then the gem install failed
<shevy>
I also see my mistake
cocotton has joined #ruby
<shevy>
dunkel2, I issued "gem install --ignore-dependencies" through an alias here, that is why I did not get the posix gem
User458764 is now known as User458764_NotHe
<workmad3>
SvenOostenbrink: exactly, you installed ruby with rvm
<SvenOostenbrink>
workmad3: I take it I took my REE from the wrong place then, maybe?
<dunkel2>
shevy: i installed all dependencies separate
<workmad3>
SvenOostenbrink: it's a fork of 1.8.7 that hasn't been updated for about 2 years, and 1.8.7 is itself past EoL and unsupported
<shevy>
SvenOostenbrink welcome to the stone age!
User458764_NotHe has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<SvenOostenbrink>
workmad3: so basically, that entire path of "how to install" is dead
Xeago_ has joined #ruby
<shevy>
Enter CentOS
<workmad3>
SvenOostenbrink: only up to 'rvm install ree; rvm --default use ree;'
<SvenOostenbrink>
shevy: I'm 100% unknown in ruby and REE and such, so I really did not know
<workmad3>
SvenOostenbrink: or rather, only that bit
bean has quit [Client Quit]
<shevy>
yeah, as a user you have to depend on upstream folks
<SvenOostenbrink>
workmad3: okay, so how would I go about this?
_justin has joined #ruby
<workmad3>
SvenOostenbrink: try 'rvm install ruby; rvm --default ruby' and try a gem install after that
x77686d has quit [Quit: x77686d]
benzrf is now known as benzrf|offline
benzrf|offline is now known as benzrf
Morkel has joined #ruby
<dunkel2>
now it works great thank you so much shevy Hanmac and IfraRuby which i think is not here atm
ghr has joined #ruby
<workmad3>
SvenOostenbrink: although if it's an app that relies on REE or 1.8.7, you could be in trouble as that would imply that app itself is rather outdated, vulnerable and out of maintenance
aob has quit [Remote host closed the connection]
misha_ae has joined #ruby
AlSquire has quit [Quit: This computer has gone to sleep]
dawkirst has joined #ruby
AxonetBE has quit [Quit: AxonetBE]
koderok has quit [Ping timeout: 258 seconds]
Xeago has quit [Ping timeout: 265 seconds]
diegoviola has quit [Quit: WeeChat 0.4.3]
shashank_rs has joined #ruby
nadirvardar has joined #ruby
diegoviola has joined #ruby
nateberkopec has joined #ruby
ghr has quit [Ping timeout: 265 seconds]
JonathanNeal has left #ruby [#ruby]
ndrei has quit [Ping timeout: 250 seconds]
cj3kim__ has joined #ruby
bean has joined #ruby
qhartman has joined #ruby
iceden has joined #ruby
cj3kim_ has quit [Ping timeout: 276 seconds]
ccham__ has quit [Remote host closed the connection]
doanerock has quit [Quit: This computer has gone to sleep]
SilkFox has joined #ruby
chrisja_ has joined #ruby
ccham__ has joined #ruby
nadirvardar has quit [Ping timeout: 258 seconds]
cornfeedhobo has joined #ruby
sailias has joined #ruby
Morkel has quit [Quit: Morkel]
nerium has quit [Quit: nerium]
sepp2k has joined #ruby
chrisja has quit [Ping timeout: 258 seconds]
SCommette has quit [Quit: SCommette]
cj3kim__ has quit [Remote host closed the connection]
Merks has quit []
JoeGaudet has quit [Quit: Computer has gone to sleep.]
agarie has joined #ruby
cocotton has quit [Remote host closed the connection]
crzrcn has quit [Quit: Leaving.]
vasilakisfil has joined #ruby
bean has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
_justin has quit [Quit: _justin]
cocotton has joined #ruby
cocotton has quit [Remote host closed the connection]
<shevy>
dunkel2 \o/
cocotton has joined #ruby
robbyoconnor has joined #ruby
MillyBays has joined #ruby
rezzack has joined #ruby
_justin has joined #ruby
cpruitt has quit [Ping timeout: 240 seconds]
thisirs has quit [Ping timeout: 250 seconds]
bean has joined #ruby
Milly_Bays has quit [Ping timeout: 240 seconds]
doanerock has joined #ruby
renderful has quit [Remote host closed the connection]
pushpak has joined #ruby
User458764 has joined #ruby
<SvenOostenbrink>
workmad3: I did the rvm install ruby, then rvm install ruby; rvm --default ruby' which gave me "Please note that `rvm ruby ...` was removed, try `ruby ` or `rvm all do ruby ` instead. ( see: 'rvm usage' )"
<SvenOostenbrink>
This is normal?
MillyBays has quit [Ping timeout: 240 seconds]
mehlah has quit [Quit: Leaving...]
<workmad3>
SvenOostenbrink: just means it's been too long since I used rvm so got a command wrong :)
<SvenOostenbrink>
okay, let me try to continue and see what happens
User458764 has quit [Client Quit]
<SvenOostenbrink>
workmad3: Boom, same error on gem install
kmwhite has joined #ruby
<SvenOostenbrink>
I do recall somethign about openssl not having ECC support under centos. Then again, AFAIK, this project doesnt use that, and I've managed to install it on another centos 6.5 server without problems
bean has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<SvenOostenbrink>
So I doubt thats the problem
danshultz has quit [Remote host closed the connection]
streetlight has quit [Ping timeout: 276 seconds]
danshultz has joined #ruby
* Hanmac
point and laugh about centos
zegerjan has quit [Remote host closed the connection]
cpruitt has quit [Ping timeout: 240 seconds]
benzrf is now known as benzrf|offline
RaCx has joined #ruby
ixti has quit [Ping timeout: 240 seconds]
cpruitt has joined #ruby
_justin has quit [Quit: _justin]
rm_ has joined #ruby
olivier_bK has quit [Ping timeout: 276 seconds]
benzrf|offline is now known as benzrf
aniM has joined #ruby
sigurding has quit [Quit: sigurding]
ce_afk is now known as cescalante
danshultz has quit [Ping timeout: 252 seconds]
bean has joined #ruby
ktosiek has joined #ruby
crystal77 has quit [Quit: Computer has gone to sleep.]
agent_white has joined #ruby
agent_white has quit [Client Quit]
jprovazn has joined #ruby
aspires has joined #ruby
agent_white has joined #ruby
cpruitt has quit [Read error: Connection reset by peer]
treehug88 has joined #ruby
cpruitt has joined #ruby
duggiefresh has quit [Remote host closed the connection]
x1337807x has joined #ruby
<agent_white>
Good afternoon
<apeiros>
good evening
treehug8_ has quit [Ping timeout: 258 seconds]
<doanerock>
SevereOverfl0w, sounds like a edge case
bean has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
SvenOostenbrink has quit [Ping timeout: 240 seconds]
donnoc has joined #ruby
x1337807x has quit [Client Quit]
<shevy>
good night?
<wallerdev>
good morning here
duggiefresh has joined #ruby
senayar has joined #ruby
SvenOostenbrink has joined #ruby
erikruthven has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Martxel has joined #ruby
crystal77 has joined #ruby
afex has joined #ruby
<shevy>
hehe
<shevy>
now we have all cases covered I hope
nerium has joined #ruby
poikon_ has quit []
<certainty>
good lord
klaut has joined #ruby
codezomb has joined #ruby
senayar has quit [Ping timeout: 250 seconds]
red234324 has joined #ruby
cocotton has quit [Remote host closed the connection]
pu22l3r__ has quit [Read error: Connection reset by peer]
x77686d has joined #ruby
helpD_ has quit [Remote host closed the connection]
oo_ has quit [Ping timeout: 258 seconds]
pu22l3r has joined #ruby
<certainty>
eww my brain hurts, that's not sortey by time
<certainty>
sorted, even
donnoc_ has joined #ruby
helpD has joined #ruby
senayar has quit [Ping timeout: 250 seconds]
cocotton has joined #ruby
cocotton has quit [Remote host closed the connection]
cocotton has joined #ruby
pskosinski has quit [Quit: Til rivido Idisti!]
<arubincloud>
I assume that the Lord would come first if it were to be sorted?
tjbiddle has quit [Quit: tjbiddle]
<certainty>
yepp i was going to say
crystal77 has quit [Quit: Computer has gone to sleep.]
JoeGaudet has joined #ruby
r_rios has quit [Ping timeout: 265 seconds]
jds has quit [Quit: Connection closed for inactivity]
metamaterial has quit [Read error: Connection reset by peer]
donnoc has quit [Ping timeout: 258 seconds]
rkofman_ has joined #ruby
<shevy>
that's some non-standard algorithm you use there
avree has left #ruby ["rubby"]
metamaterial has joined #ruby
helpD has quit [Ping timeout: 265 seconds]
<certainty>
shevy: it's *the* natural algorithm
<rkofman_>
hey folks, I’m trying to convert timezone expressions from “Eastern Time (US & Canada)” to “”America/New_York”, and have been looking at TZInfo docs.. but seem to be struggling with actually creating a TZInfo::Timezone object from the “pretty” timezone name (“Eastern Time (US & Canada)”) any pointers?
<certainty>
and on the 6th day god created the algorithm and the algorithmic language scheme
chipotle has quit [Quit: cya]
sdwrage has joined #ruby
robbyoconnor has quit [Excess Flood]
creativeembassy has joined #ruby
doodlehaus has quit [Remote host closed the connection]
<benzrf>
nvm ur way is the only really non awful way
<wallerdev>
should be using gsub anyway
<benzrf>
but when u just want the words &:display
<benzrf>
:O
erikruthven has joined #ruby
dawkirst has quit [Quit: Leaving...]
aspires has quit []
rkofman_ has quit [Quit: rkofman_]
danshultz has joined #ruby
arietis has quit [Quit: Computer has gone to sleep.]
saarinen has joined #ruby
bean has joined #ruby
jxport has joined #ruby
crystal77 has joined #ruby
robbyoconnor has quit [Ping timeout: 258 seconds]
chrisseaton has quit []
kirun has joined #ruby
arietis has joined #ruby
ixti has joined #ruby
<jxport>
At which point does a class, which is composed of many others and delegates most calls to its components, in addition to having its own methods which handle interactions between the components, become a God class (anti-pattern) and not an abstraction?
jcs222 has quit [Quit: leaving]
<certainty>
if it approaches 42
<benzrf>
jxport: off the top of my head id say
<benzrf>
if you cant describe what an instance is supposed to be in a few words
<shevy>
I just deleted about 1400 lines from an old project
<shevy>
this feels so good
<wallerdev>
when its too big to understand
<apeiros>
jxport: "composed by many others", "delegates most calls" already sound smelly
<certainty>
shevy: randomly or selective?
<benzrf>
and remember, a god class is one that *HOLDS ONTO RESPONSIBILITIES THAT ARENT ITS OWN*
<apeiros>
jxport: anyway, SRP
<benzrf>
it's fine to have a class that represents a program instance
<apeiros>
always the answer *puts on clever-hat*
<certainty>
also remember that a god class is only one o away from a good class
<benzrf>
as long as it doesnt 'personally' manage all of the details
<benzrf>
afaict
twidx has joined #ruby
vasilakisfil has quit [Remote host closed the connection]
<certainty>
apeiros: clever-hats are those with the propeller on them?
claymore has quit [Ping timeout: 240 seconds]
<apeiros>
certainty: yes. not to forget the reading light and magnifying glass.
<shevy>
certainty a mixture of both - I am scanning through it right now to see what I will keep, and what I will not keep. mostly I will retain functionality, such as demultiplexing or format conversions
<shevy>
but the rest, which is the majority, is going away!
banisterfiend has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<apeiros>
certainty: alternatively that hat which sherlock holmes wears
<jxport>
benzrf: it's a program instance, yes
<certainty>
apeiros: nice!
doodlehaus has joined #ruby
<benzrf>
jxport: sounds fine to me as long as most of its job is to manage lower components
endash_ has joined #ruby
chrisseaton has joined #ruby
<benzrf>
and not do actual workmad3
<benzrf>
*work
<certainty>
shevy: ah, not impressed. You should delete random lines and release the result
<benzrf>
maybe.
<benzrf>
trust your intuition to some degree :o
Xeago_ has quit [Remote host closed the connection]
x1337807x has joined #ruby
testcore has quit [Ping timeout: 272 seconds]
<shevy>
lol certainty
etqqkoiflwhb has joined #ruby
UnclueFungus has quit [Read error: No route to host]
aspires has joined #ruby
emdub has joined #ruby
donnoc_ has quit [Quit: WeeChat 0.4.3]
linojon has quit [Quit: linojon]
<arubincloud>
Use genetic programming to delete lines.
<arubincloud>
The fitness test can be your unit tests.
arietis has quit [Quit: Computer has gone to sleep.]
SCommette has joined #ruby
x1337807x has quit [Ping timeout: 258 seconds]
Martxel_ has joined #ruby
sepp2k1 has joined #ruby
emdub has quit [Client Quit]
emdub has joined #ruby
helpD has joined #ruby
sepp2k has quit [Ping timeout: 252 seconds]
JoeGaudet has quit [Ping timeout: 250 seconds]
testcore has joined #ruby
danshultz has quit [Read error: Connection reset by peer]
danshultz has joined #ruby
AxonetBE has joined #ruby
SonicX has joined #ruby
amundj has joined #ruby
Martxel has quit [Ping timeout: 276 seconds]
gregf has quit [Quit: WeeChat 0.4.3]
rkofman_ has joined #ruby
vic736 has joined #ruby
crzrcn has quit [Quit: Leaving.]
DrShoggoth has joined #ruby
claymore has joined #ruby
optiz0r has quit [Remote host closed the connection]
linojon has joined #ruby
fbernier has quit [Read error: Connection reset by peer]
shvelo has joined #ruby
optiz0r has joined #ruby
shvelo has quit [Read error: Connection reset by peer]
shvelo has joined #ruby
Zebroid has joined #ruby
arietis has joined #ruby
chrisseaton has quit []
<agent_white>
So I found this oldschool book from the 60's called "The Invaders" in a shop... the pictures in it are priceless: http://i.imgur.com/B3D9MZJ.jpg
<xybre>
Judo chop?
RaCx has quit [Quit: Computer has gone to sleep.]
alvaro_o has joined #ruby
<apeiros>
xybre: judo doesn't have chops
<agent_white>
All these alien movies had it all wrong, all we need is David to bitchslap some aliens.
Advocation has quit [Quit: Advocation]
mjs2600 has quit []
<xybre>
apeiros: It does in Austin Powers
DouweM has joined #ruby
baordog_ has joined #ruby
centrex has quit [Remote host closed the connection]
jespada has joined #ruby
centrex has joined #ruby
<apeiros>
xybre: … durr
RaCx has joined #ruby
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
paulfm has quit []
bean has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
amundj has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<xybre>
apeiros: Aaaand thats the joke.
<apeiros>
of course
vic736 has quit [Quit: leaving]
vic736 has joined #ruby
ccham__ has quit [Remote host closed the connection]
<centrex>
Whats the proper include file to use the Archive keyword (to tar gzip a file)?
<xybre>
Archive keyword?
<centrex>
Archive::Tar.create('~/logfiles.tar.gz', DIR["/tmp/logs"], :compression => :gzip,) <--- no workie
<apeiros>
centrex: also, Archive is a constant, not a keyword
claymore has quit [Ping timeout: 240 seconds]
jlast has quit [Remote host closed the connection]
rvraghav93 has quit [Read error: Connection reset by peer]
<centrex>
slash_nick: I read that and it doesn't work, I'm wondering what to include to make it do so
Zebroid has quit [Remote host closed the connection]
<slash_nick>
i know centrex, just showing that it might be part of ruby
claymore has joined #ruby
<centrex>
ah okay
<slash_nick>
require/include something but i don't know what yet :)
<centrex>
apeiros: thats what I meant sorry its early, thats why I just pasted it instead of describing it
<centrex>
by early I mean before 3 in the afternoon
arietis has quit [Quit: Computer has gone to sleep.]
kaspergrubbe has joined #ruby
chrisseaton has joined #ruby
<apeiros>
centrex: first you install the archive-tar gem, then you require 'archive/tar'
vic736 has quit [Client Quit]
UnclueFungus has joined #ruby
testcore has quit [Ping timeout: 272 seconds]
jlast has joined #ruby
dblessing has quit [Ping timeout: 240 seconds]
<shevy>
wheeee
<shevy>
a require with a / inside
<slash_nick>
that's right...so it is NOT part of ruby
saarinen has quit [Quit: saarinen]
<shevy>
perhaps we could push for require becoming more akin to python's import, including renaming namespaces
_FL1SK is now known as FL1SK
sambao21 has quit [Read error: Connection reset by peer]
x1337807x has joined #ruby
sambao21 has joined #ruby
Briareos1 has quit [Remote host closed the connection]
<benzrf>
shevy: rah rah
<slash_nick>
shevy: i'd hope so if the gem name has a hyphen...i'd expect to find an Archive::Tar namespace in the gem
DouweM has quit [Quit: Leaving...]
Briareos1 has joined #ruby
<xybre>
slash_nick: Also look at your URL.. it has "gems" in it.
rm_ has quit [Remote host closed the connection]
nisstyre has quit [Quit: WeeChat 0.4.3]
<shevy>
benzrf didn't you use wank wank as slogan before?
rvraghav93 has joined #ruby
sidik has joined #ruby
<xybre>
shevy: Namespacing renaming/wrapping would be nice. So would real modules with versioning.
rm_ has joined #ruby
<slash_nick>
xybre: lookie there, sure does
<benzrf>
just wenk wenk
<certainty>
shevy: also dropping namespaces, so you can switch implementations easily
<shevy>
slash_nick right but this is not how require works, as it only looks for .rb (or others like .so) files there
Briareos1 has quit [Remote host closed the connection]
Hamburglr has joined #ruby
<shevy>
certainty yeah
<apeiros>
shevy (and centrex): archive_tar would be expected to require 'archive_tar' and have ArchiveTar
<slash_nick>
shevy: i'm not catching the problem...
<shevy>
I shamefully admit I keep on using autoinclude.rb
tvw has quit []
* slash_nick
agrees with apeiros
tvw has joined #ruby
<apeiros>
archive-tar is expected to be require 'archive/tar' and Archive::Tar, that's the most prominent current convention
<shevy>
a file called archive-tar.rb ?
<certainty>
i shamefully keep using to include autoadmit
<apeiros>
shevy: never.
Briareos1 has joined #ruby
banister has joined #ruby
<benzrf>
bye bus
benzrf is now known as benzrf|offline
rm_ has quit [Ping timeout: 250 seconds]
Shidash has joined #ruby
doanerock has quit [Quit: This computer has gone to sleep]
<jrhorn424>
is there an idiomatic way to have Foo.new return an instance of Array instead of Foo? explicit returns seem to be swallowed if I stick them in initialize.
omosoj has quit [Ping timeout: 245 seconds]
testcore has joined #ruby
<jrhorn424>
i could just do `Foo.new.run` or something, but that seems... intention hiding. maybe less so than breaking the new contract. so i guess i'm asking for design advice.
Rhainur has quit [Quit: Leaving]
sidik has quit [Ping timeout: 276 seconds]
ktosiek has quit [Ping timeout: 240 seconds]
shvelo is now known as Princessu-Kenny
Hanmac1 has joined #ruby
DouweM has joined #ruby
jkamenik has quit [Quit: Leaving.]
grieg has quit [Quit: Leaving]
<slash_nick>
shevy: no... archive/tar.rb
iamjarvo has quit [Ping timeout: 245 seconds]
Princessu-Kenny is now known as shvelo
AxonetBE has quit [Ping timeout: 276 seconds]
Hanmac has quit [Ping timeout: 276 seconds]
bradhe has quit [Remote host closed the connection]
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<shevy>
jrhorn424 I think that is not possible
mixonic has joined #ruby
decoponio has quit [Quit: Leaving...]
GaryOak_ has quit [Remote host closed the connection]
iamjarvo has joined #ruby
<shevy>
so much code out there in the wild
crzrcn has joined #ruby
godd2 has joined #ruby
erikruthven has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
senayar has joined #ruby
<mixonic>
dear lazyweb, how can I set a session value in an rspec rails request test?
chipotle has joined #ruby
<shevy>
hehe
<mixonic>
session is not present, nor request, or instance variables
<apeiros>
dear mixonic, #rubyonrails might help you with that
<mixonic>
apeiros: gracias
<apeiros>
or maybe #rspec
<apeiros>
not sure
<godd2>
When I'm creating #initialize methods for my classes, which is considered better practice, to have separate parameters, or to have a parameter hash? i.e. Note.new("C#", "quarter", 3) vs. Note.new(name: "C#", duration: "quarter", octave: 3)
locriani has joined #ruby
okdas has quit [Remote host closed the connection]
etqqkoiflwhb has quit [Ping timeout: 240 seconds]
quitobro has quit [Remote host closed the connection]
quitobro has joined #ruby
rmorello|1304 is now known as rmorello|1194
bthesorceror has quit [Remote host closed the connection]
crzrcn has quit [Ping timeout: 258 seconds]
godd2_ has joined #ruby
godd2 has quit [Disconnected by services]
godd2_ is now known as godd2
etqqkoiflwhb has joined #ruby
alekst has joined #ruby
<wallerdev>
godd2: if theyre all required id put them in the parameter list
diegoviola has quit [Ping timeout: 240 seconds]
bthesorceror has joined #ruby
<wallerdev>
if you have more than like 3 and some are optional then id use the hash way
<godd2>
ok thanks
<shevy>
how do you guys document projects on rubygems.org?
<wallerdev>
point to github repo
<slash_nick>
exactly what wallerdev said... i use the hash, but I also have some other mechanisms for requiring certain k/v pairs...
fubelly has joined #ruby
r_rios has joined #ruby
<slash_nick>
shevy: yard still
<apeiros>
godd2: if you target ruby2+ and have 3+ args, use keyword args
<apeiros>
godd2: also think hard about your method if you have 3+ args.
misha_ae has quit [Quit: Bye]
<godd2>
I'm developing this gem in 193 right now, but I will look into that if I want to dev into 2+
alekst has quit [Client Quit]
<slash_nick>
well it's not just any method, it's his initialize method.. and objects can certainly have more than 3 attributes
<agent_white>
apeiros: That makes me wonder what Ncurses devs were doing with 8 params in their methods... :i
nari has quit [Ping timeout: 250 seconds]
RowdyChild|Away is now known as RowdyChildren
Es0teric has quit [Quit: Computer has gone to sleep.]
<apeiros>
agent_white: ncurses is C, which is not OO. different rules apply. doesn't make 8 params much nicer, though
<godd2>
I mean, I'm making objects out of musical constructs, so the amount of information contained in what a "note" is can get a little annoying.
afex has quit [Ping timeout: 276 seconds]
<agent_white>
apeiros: Ahhh... yeah I didn't think there would be an exception in any case! :P
yalue has quit [Quit: Leaving]
<godd2>
Plus, I wouldn't know what to name a thing that is a note with less info. After all, the two hardest things in CS are cache invalidation and naming things.
<apeiros>
godd2: I didn't say you never should have more than 3 args. I just said you should think hard about it :)
claymore has quit [Ping timeout: 240 seconds]
<baweaver>
The two hardest things in CS are cache invalidation, naming things, and off by one errors.
senayar has quit [Remote host closed the connection]
<xybre>
Hey but thats... ohh.
noop has quit [Ping timeout: 258 seconds]
<apeiros>
baweaver: one of my favorite quotes :)
<agent_white>
godd2: Couldn't you bring in some inheritance to deal away with that many args? Like class `CSharp < Note` ? Anyone chime in if I'm way off.
<apeiros>
meh
<agent_white>
`class CSharp < Note` *
doanerock has joined #ruby
<godd2>
agent_white: Maybe, but that would be like making class 3 < Integer; end
jlast has quit [Remote host closed the connection]
doanerock is now known as Guest18768
<baweaver>
Seems like a lot of unnecessary code
<shevy>
hehe
<agent_white>
godd2: Ah. I have no idea about musical notation so I'm probably way off :P
RaCx has quit [Quit: Computer has gone to sleep.]
<baweaver>
I mean, a note is effectively a pitch. Simple as that
<shevy>
agent_white stick to drumming then!
jackneill has quit [Remote host closed the connection]
claymore has joined #ruby
<godd2>
baweaver: well I have a Pitch class, and given a note name and an octave, it calculates the pitch for me in equal temperament
<agent_white>
shevy: I'm a professional desk drummer. Everyone hates me for it. All rockstars had haters.
<baweaver>
Just find the formulae for calculating the pitch
<godd2>
If you want to look at what I have already, you can see that I've already implemented a way to make a new note that's very lenient on the naming and creates a correct pitch tuned to 2**(number_of_half_steps_above_A4/12.0)
SvenOostenbrink has quit [Ping timeout: 240 seconds]
<slash_nick>
Hanmac: ah... I'll make use of it before long... I'm currently using def initialize(options = {})
Dude007 has joined #ruby
danshultz has quit [Ping timeout: 265 seconds]
etqqkoiflwhb has quit [Quit: Computer has gone to sleep.]
SonicX has quit [Remote host closed the connection]
cassioscabral has joined #ruby
mr_red has quit [Ping timeout: 240 seconds]
omosoj has joined #ruby
oponder has quit [Ping timeout: 250 seconds]
endash_ has quit [Remote host closed the connection]
etqqkoiflwhb_ has joined #ruby
endash_ has joined #ruby
Musashi1 has joined #ruby
<slash_nick>
it's a ruby 2.* feature, right? too soon to use it in gems, unless you're using other features that require 2.*
bthesorceror has quit [Ping timeout: 258 seconds]
Musashi1 has quit [Client Quit]
paulfm has quit []
<apeiros>
it's never too soon. all you do is narrow your audience.
<apeiros>
well, except if you yourself have a requirement for <ruby2
shvelo is now known as Kggggggggggggggg
<slash_nick>
apeiros: i'd throw it in my gem that utilizes io/console... but for the others that build and run fine on pre 2.0, i'd like to continue support for pre 2.0
northfurr has joined #ruby
<havenwood>
1.9 EOL is less than a year away, soon...
<slash_nick>
i'll do it then :)
bthesorceror has joined #ruby
northfurr has quit [Client Quit]
zodiac7 has joined #ruby
<zodiac7>
hi
chipotle has quit [Quit: cya]
northfurr has joined #ruby
<zodiac7>
can someone here tell me which is the fastest way to get a prototype ready for a demo, rails/django or cakephp?
djbkd has joined #ruby
djbkd has quit [Remote host closed the connection]
Phoenixz has joined #ruby
Al__ has joined #ruby
Doppp has quit [Ping timeout: 258 seconds]
djbkd has joined #ruby
Es0teric has quit [Quit: Computer has gone to sleep.]
<dideler|work>
zodiac7: i'd say go with whichever language you're most familiar with
zorak has joined #ruby
<shevy>
zodiac7 from scratch? probably php
rickenharp__ has quit []
SHyx0rmZ has joined #ruby
x1337807x has joined #ruby
Es0teric has joined #ruby
<shevy>
zodiac7 I wouldn't go with php though, engineering will be definitely better in ruby and python
claymore has quit [Ping timeout: 276 seconds]
<zodiac7>
shevy
<zodiac7>
sorry, i am looking for something for build demo and discard case
simono has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
srji has joined #ruby
donnoc has joined #ruby
Zai00 has joined #ruby
simono has joined #ruby
cpruitt has quit [Quit: cpruitt]
<slash_nick>
zodiac7: i imagine discarding will be pretty quick whichever language you choose :)
Al__ has quit [Read error: Connection reset by peer]
<dideler|work>
well they're all frameworks, so which will help you build your prototype faster is very difficult for us to answer if we don't know what the prototype is and which languages you're familiar with. at this point, any option is equally recommendable
Al__ has joined #ruby
<zodiac7>
i dont know any of them
<dideler|work>
zodiac7: you don't know ruby, python, or php?
Al__ has quit [Client Quit]
<zodiac7>
just wanting to learn one for creating demo apps
<dideler|work>
ok, well in that case...
<zodiac7>
i dont know neither, yes
<dideler|work>
not many people like php, though it is very popular
mu5k17u has joined #ruby
<srji>
zodiac7: middleman can be used to create prototypes with different js frameworks
sambao21 has quit [Quit: Computer has gone to sleep.]
Zai00 has quit [Client Quit]
yekta has joined #ruby
crzrcn has joined #ruby
paulfm has joined #ruby
danshultz has joined #ruby
senayar has joined #ruby
<dideler|work>
zodiac7: personally i'd go with python + django or ruby + rails, both communities are great and both frameworks are doing and have lots of learning resources available
Phoenixz has quit [Ping timeout: 250 seconds]
<dideler|work>
s/doing/doing fine/
srji has quit [Quit: leaving]
<baweaver>
protip: s/\(doing\)/\1 fine/
<dideler|work>
less readable for chat
yfeldblu_ has joined #ruby
mr_red has joined #ruby
RaCx has joined #ruby
yfeldblum has quit [Ping timeout: 258 seconds]
no6 has quit [Ping timeout: 240 seconds]
mu5k17u has quit [Quit: Leaving]
endash__ has joined #ruby
endash__ has quit [Client Quit]
senayar has quit [Ping timeout: 252 seconds]
djbkd has quit [Remote host closed the connection]
saarinen has joined #ruby
claymore has joined #ruby
aedorn has quit [Quit: Leaving]
no6 has joined #ruby
atno has joined #ruby
aedorn has joined #ruby
endash_ has quit [Ping timeout: 276 seconds]
Hanmac1 has joined #ruby
djbkd has joined #ruby
Hanmac has quit [Ping timeout: 240 seconds]
centrex has quit [Read error: Connection reset by peer]
Spami has quit [Quit: This computer has gone to sleep]
centrex has joined #ruby
zachallett has quit [Remote host closed the connection]
michaeldeol has joined #ruby
freerobby has quit [Quit: Leaving.]
codebro has quit [Ping timeout: 240 seconds]
freerobby has joined #ruby
gregf has joined #ruby
<zodiac7>
thanks for the help guys
benzrf|offline is now known as benzrf
djbender has quit [Quit: djbender]
zodiac7 has quit []
freerobby has quit [Client Quit]
srji has joined #ruby
<benzrf>
hey yo
<benzrf>
is there any signficantly less dumb way of doing this:
bthesorceror has quit [Remote host closed the connection]
mixonic has quit [Client Quit]
bthesorceror has joined #ruby
cocotton_ has quit [Remote host closed the connection]
fannye has quit [Read error: Connection reset by peer]
timgauthier has joined #ruby
Es0teric has joined #ruby
RaCx has joined #ruby
cocotton has joined #ruby
RaCx has quit [Client Quit]
<timgauthier>
DO YOU EVEN CODE?!
ccham__ has quit [Ping timeout: 252 seconds]
cescalante is now known as ce_afk
deric_skibotn has quit [Ping timeout: 252 seconds]
bean has joined #ruby
zachallett has quit [Remote host closed the connection]
RaCx has joined #ruby
bthesorceror has quit [Ping timeout: 240 seconds]
Milly_Bays has joined #ruby
dunkel2 has quit [Quit: dunkel2]
<shevy>
what resolution do you guys have with your monitors?
Milly_Bays has quit [Read error: Connection reset by peer]
<shevy>
I currently have 1280x1024 which is not so bad or?
ktun has joined #ruby
<shevy>
but I am writing a document in libreoffice and the font size is somewhat smallish (on purpose), and I cant fit it on the available width too easily, I have to scroll a bit which is annoying
bthesorceror has joined #ruby
<timgauthier>
1440x900!
<timgauthier>
13-inch macbook air, so its the higher DPI but not retina
<timgauthier>
i'd kill for independence resolution to scale thing sup a bit though :S
* DreamingRainne
is using 900×1440. Hehe.
<shevy>
timgauthier hmm
<shevy>
900 is enough for height?
<apeiros>
shevy: 2880x1800
<DreamingRainne>
(A 1440×900 monitor rotated clockwise and propped up on an old optical drive, which I do from time to time.)
<shevy>
wow
<shevy>
apeiros is like staring at the wall
<timgauthier>
height for what?
<shevy>
height for height
<shevy>
not to be mistaken for height for width
<shevy>
or turning the monitor upside down
<apeiros>
emulating 1680x1050, though
<shevy>
or to a side
<shevy>
aha!
<shevy>
well 1680 is still a lot
<DreamingRainne>
I've got plenty of height in this setup. Not so much width, though (a lot of websites get horizontal scrollbars).
<apeiros>
sadly I've got to wait for probably ~15 months until I get my dual 4K setup
<timgauthier>
shevy what is this for?
<timgauthier>
<- does film stuff too
Milly_Bays has joined #ruby
<shevy>
timgauthier dunno, I am beginning to think that my monitor is too smallish
<DreamingRainne>
But it works well for coding. Can see about 120 lines if I maximize vertically.
Hanmac has joined #ruby
<timgauthier>
ahh
<timgauthier>
1440x900 is a bit short
shime has joined #ruby
<timgauthier>
especially since i refuse to hide my dock
<timgauthier>
1440x900 is okay horizontal though
<timgauthier>
the dell 24-inch display, are NICE
<shevy>
DreamingRainne huh I always have to scroll... I can see about 90 chars to the side in my editor at a font I can easily read (I have quite a bad eyesight)
<timgauthier>
honestly, anything under 1080 is a bit cramped
cocotton has quit [Remote host closed the connection]
crystal77 has quit [Quit: Computer has gone to sleep.]
dapz has joined #ruby
dapz has quit [Client Quit]
dapz has joined #ruby
x1337807x has joined #ruby
crystal77 has joined #ruby
<DreamingRainne>
>> __
<eval-in_>
DreamingRainne => undefined local variable or method `__' for main:Object (NameError) ... (https://eval.in/138047)
* DreamingRainne
shrugs.
jlast has joined #ruby
popl has quit [Ping timeout: 240 seconds]
cocotton has joined #ruby
UnclueFungus has left #ruby [#ruby]
mattsp1290 has joined #ruby
<lolmaus>
lolma
<lolmaus>
ooops, was intended to search
benzrf is now known as benzrf|offline
bean has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<timgauthier>
so, are their any stupid "conventions" in programming? In Design all of the new designers think that all you do is draw things in photoshop and hand that off to a developer who does all the work, and if you don't start in photoshop then you are not a designer and shouldn't call yourself one.
<centrx>
That sounds more like project planning
no6 has quit [Ping timeout: 252 seconds]
Czupa has joined #ruby
Czupa has quit [Client Quit]
Hanmac1 has joined #ruby
freerobby has joined #ruby
Shidash has quit [Ping timeout: 265 seconds]
pwh has joined #ruby
alexju has joined #ruby
x1337807x has quit [Ping timeout: 258 seconds]
<shevy>
timgauthier depends on the designer
<shevy>
if he knows only photoshop or other software
Hanmac has quit [Ping timeout: 252 seconds]
<timgauthier>
it actually seems to be mostly the new guys coming out of school
cocotton has quit [Quit: Leaving...]
<shevy>
but what did they study?
x1337807x has joined #ruby
<timgauthier>
but my question was, is that like anything in the programming school?
<timgauthier>
design
<timgauthier>
i think, i don't know, its been a weird influx last week
<timgauthier>
just lots of new and immature designers
nateberkopec has joined #ruby
x1337807x has quit [Client Quit]
<slash_nick>
timgauthier: i think all designers should be good with image editing... but only the good ones code (markup and css at least)
bean has joined #ruby
senayar has joined #ruby
alexju has quit [Read error: No route to host]
<slash_nick>
s/good/best/
alexju has joined #ruby
<timgauthier>
yea
freerobby has quit [Ping timeout: 250 seconds]
<timgauthier>
but do you guys have a similar issue with new programmers?
creativeembassy has quit [Quit: FO SHO]
bpgoldsb has joined #ruby
yfeldblu_ has quit [Remote host closed the connection]
yfeldblum has joined #ruby
<slash_nick>
i don't think I undestand what you're getting at
<bricker>
timgauthier: there are lots of conventions in programming, I don't think that's the word you're looking for
agarie has quit [Remote host closed the connection]
<slash_nick>
observations, maybe
nateberkopec has quit [Client Quit]
<slash_nick>
trends
skulker has joined #ruby
iamjarvo has quit [Ping timeout: 265 seconds]
<timgauthier>
what i'm trying to ask is, this is an issue we have in design. New designers enter the community with this preconceived notion of design that is quite limited in scope and immature in action. They scoff at the idea of having to do markup, and think that someone who starts designing at different place or process then them is wrong and not a designer.
<bricker>
timgauthier: fact: every framework and language is written in, or compiled by, another language. Users of that lower-level language will always tell you that your language is stupid and unnecessary.
<timgauthier>
Does the programming community have similar issues, with new people misunderstanding the role, or how does immaturity in the developer community manifest itself?
<bricker>
Examples: Ask a rails question in #ruby. As a Node question in #javascript. Ask a Chef question in #ruby
<bricker>
Ask an Android question in #java
senayar has quit [Ping timeout: 250 seconds]
danshultz has quit [Remote host closed the connection]
grzywacz has quit [Quit: :wq]
<shevy>
timgauthier dunno, I think it really depends on what kind of project it is, whether it has a good leader or specific goals + ways to achieve this
danshultz has joined #ruby
andrewlio has quit [Ping timeout: 276 seconds]
jeregrine has quit [Quit: Connection closed for inactivity]
kinginky has joined #ruby
<shevy>
timgauthier I didn't understand what my boss wanted for a few weeks and wasted writing code for things that barely were needed at all
<timgauthier>
so when new programmers join the community they don't come in with these trained ways to do things that strongly differ from reality?
oponder has joined #ruby
<timgauthier>
ah ok, so the issues are misunderstandings like that
<shevy>
timgauthier in open source games, when people are not motivated they tend to disappear, we had that happen for the PARPG game with most of our designers and modellers
codebro has quit [Ping timeout: 265 seconds]
<timgauthier>
yea
codebro has joined #ruby
<timgauthier>
its hard to keep those guys motivated in an open source because things go all over the place, and its very hard when you have to get everything you do approved by a group of people who don't actually know, understand, or always appreciate what you do
<timgauthier>
having a leader/director is annoying sometimes, but much more helpful for the creative pipeline
jacky has quit [Excess Flood]
iamjarvo has joined #ruby
shashank_rs has joined #ruby
no6 has joined #ruby
<shevy>
without a leader, how can a project function well?
<kinginky>
hey you all. question: does anyone know of a way to run a rack middleware in a separate thread. im using a simple Grape REST API to receive data. when data is received, an event is fired and the corresponding object needs to be dealt with accordingly. the thing is, i need to be able to access and use those objects in IRB too. im just trying to figure out how to do something along these lines.
danshultz has quit [Ping timeout: 240 seconds]
deric_skibotn has joined #ruby
<kinginky>
i dont even know if it's possible. i havent worked with threads much.
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
sski has joined #ruby
kevinykc_ has joined #ruby
<srji>
timgauthier: all communities have their arrogant people
yacks has quit [Quit: Leaving]
michaeldeol has joined #ruby
alvaro_o has quit [Quit: Ex-Chat]
Krajsnick has quit [Quit: Leaving...]
<timgauthier>
srji yeah, i was just wondering how they are in the programming community
<srji>
the same like designers
cpruitt has joined #ruby
<timgauthier>
arrogant would be a good way to put it yeah, arrogant but new and inexperienced. In my opinion immature more then all of the above. It's just so weird because i'm noticing it again and again, but this time i've realized that I was just as bad. That said and a bunch of other programmers have recently mentioned things about this too
Martxel_ has joined #ruby
<srji>
all arrogant people are equal
<srji>
thats reason why i run my own business
<srji>
*the
kevinykchan has quit [Ping timeout: 276 seconds]
<timgauthier>
sweet :)
Guest86890 has joined #ruby
<timgauthier>
but what about the arrogant customers ? ;)
<srji>
they pay me
<srji>
its ok
mehlah has joined #ruby
<srji>
customers have the right to be everything
<srji>
one rule: customers are always right
<timgauthier>
yeah i disagree with that but
<arubincloud>
Nah.
<timgauthier>
i mean they can be whatever they want
<timgauthier>
they also don't have to be my customer
iamjarvo has quit [Ping timeout: 240 seconds]
Guest86890 is now known as jackyalcine
<arubincloud>
Letting your customers treat you like a doormat is a terrible way to run things.
jackyalcine has quit [Changing host]
jackyalcine has joined #ruby
cpruitt has quit [Client Quit]
<arubincloud>
And usually less profitable.
jackyalcine is now known as jacky
zorak8 has joined #ruby
zorak has quit [Quit: Saliendo]
Martxel has quit [Ping timeout: 240 seconds]
<arubincloud>
It is more important to set realistic expectations.
<srji>
respect your customers and their wisches, and they will respect your work
<srji>
*wishes
oponder has quit [Remote host closed the connection]
<metamaterial>
sell the customers
aniM has quit [Ping timeout: 258 seconds]
zorak8 has quit [Client Quit]
zorak_ has joined #ruby
zorak_ has quit [Remote host closed the connection]
zorak8 has joined #ruby
dik_dak has quit [Quit: Leaving]
oponder has joined #ruby
<shevy>
haha
<shevy>
make the customers your new bitches
fubelly has quit [Remote host closed the connection]
zorak8 has quit [Client Quit]
zorak8 has joined #ruby
<shevy>
or make the bitches your new customers
<timgauthier>
i don't need new britches
<timgauthier>
naw you gotta serve the customers for sure srji
aspires has quit []
<timgauthier>
but you also have to have clear expectations laid out, and adjust them if they get out of wonk
aspires has joined #ruby
x1337807x has joined #ruby
<metamaterial>
sell them with hipaa compliance and charge them a fee
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<timgauthier>
lol
<timgauthier>
agh, so thats what the newbs look like :P
<srji>
hipaa compliance?
<timgauthier>
lol
oponder has quit [Ping timeout: 250 seconds]
<shevy>
perhaps he meant hipster compliance
<timgauthier>
HIPPA is a safety thing isn't it?
<arubincloud>
No.
frankS2 has joined #ruby
<arubincloud>
And it is HIPAA.
<frankS2>
Hi, does anyone have a ctag config for embedded ruby? :)
crucify_me has joined #ruby
dblessing has quit [Quit: dblessing]
<timgauthier>
agh, HIPPA is another thing then i think..
<arubincloud>
It is a privacy and insurance portability thing.
<crucify_me>
http://pastie.org/9088390 I'm working with a Struct. Is the cell[0] notation on line 17 the only place the defines the data input as an array?
yekta has quit [Quit: yekta]
emaxi has quit [Remote host closed the connection]
sambao21 has joined #ruby
queequeg1 has joined #ruby
emaxi has joined #ruby
<crucify_me>
aside from initializing the object below of course...^^
<DreamingRainne>
crucify_me: It doesn't turn it into an Array, but it does *assume* it's one. Or at least responds to [this].
nadirvardar has joined #ruby
dapz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<DreamingRainne>
You might also write it: data.collect{ |(rim,tire)| Wheel.new(rim,tire) }
<crucify_me>
DreamingRainne: you're speaking of the entire prog assuming? I even thought array was a default type...
dapz has joined #ruby
<DreamingRainne>
crucify_me: Your code assumes that the elements of 'data' are themselves arrays. (That 'data' is an array of arrays.)
<crucify_me>
DreamingRainne: as defined in the wheelify meth. ..right?
<DreamingRainne>
Yes, in line 17 as you mentioned.
<timgauthier>
DONT DO METH KIDS
jlast has quit [Remote host closed the connection]
<crucify_me>
good advice timgauthier thanks DreamingRainne usually I've seen @wheels = [] or such.
cpruitt has joined #ruby
dapz has quit [Client Quit]
djbkd has joined #ruby
<timgauthier>
crucify_me i still always get confused when people write car.wheel[:color] like car.wheel.color
<DreamingRainne>
Calling "collect" on "data" assumes that it's an Enumerable, and calling "[]" on its elements assumes that they're Arrays (or perhaps Hashes, or otherwise that they respond to "[]" with integer arguments). "collect" returns an Array, so, line 4 will result in an Array.
Dude007 has quit [Remote host closed the connection]
sdwrage has quit [Quit: This computer has gone to sleep]
emaxi has quit [Ping timeout: 276 seconds]
dapz has joined #ruby
<crucify_me>
thanks DreamingRainne. yeah this prog is teaching how to "hide" the object type in a method in case it changes in the future according to Sandi Metz.
DrShoggoth has quit [Quit: Leaving]
<DreamingRainne>
Which is a good idea in general. Define a solid interface, then you can change the underlying structures as you see fit, as long as you can make it fit the interface.
doodlehaus has quit [Remote host closed the connection]
<DreamingRainne>
Hmm, line 12 should have #{@wheels.size} not #{wheels.size} (the latter calls a 'wheels' method on the object, while @wheels gets the actual underlying data object).
<crucify_me>
pretty basic I guess but Struct seems a bit nebulous .. so I'm going to practice. one last thing. Wheel is upperCase I guess since it is a 'sub'Class ?
sdwrage has joined #ruby
<DreamingRainne>
...Which you do have (just noticed line 2), so, there you go.
nateberkopec has joined #ruby
skulker has quit []
<DreamingRainne>
But, within the methods, you don't have to be modest about what you reveal; it's okay to invoke @wheels internally. All it means is that if you change how the wheels are stored internally, you'll need to change how the methods access them.
<crucify_me>
not sure I follow ... sorry could you draw an example?
<DreamingRainne>
You don't want callers to make assumptions about how things are done internally, but *internally* you can go ahead and make assumptions about how things are done internally. :P
<crucify_me>
I do get that DreamingRainne thank you.
<crucify_me>
so i.e. the wheelify method is basically private. DreamingRainne
<DreamingRainne>
On a different note, I think "count" should return just the count itself. As written, what it returns is a complete sentence describing the count.
<DreamingRainne>
Well, if it's only used internally, then yeah, you may want to make it protected or private. But as long as it doesn't mangle the class invariants to call it, then it's okay being public.
cpruitt has quit [Quit: cpruitt]
<crucify_me>
DreamingRainne: that's what I guess I'm asking, why use struct like this if a private method would define the sort of data type.
<DreamingRainne>
In fact, maybe even have it a class method ("def self.wheelify(data)" and called as "RevealingReferences.wheelify(data)") rather than an instance method, since it's not tied to any particular object, just the class in general.
treehug88 has quit [Ping timeout: 245 seconds]
SHyx0rmZ has quit [Ping timeout: 276 seconds]
jameswlane has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<crucify_me>
ok seeing the light thanks DreamingRainne
cpruitt has joined #ruby
<DreamingRainne>
And if you're only going to use it in the initializer, you might just as well do its operation directly within the initializer rather than making a separate method for it.
bean has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
babatz has joined #ruby
ccham has quit [Ping timeout: 265 seconds]
<DreamingRainne>
But if that operation (turning a caller-provided array of number pairs into Wheel objects) is done in multiple places, then having it as a method isn't so bad.
peterhu has joined #ruby
<crucify_me>
I think she is evolving this program lesson by lesson so I'll see where it goes. thanks DreamingRainne
bluOxigen has quit [Ping timeout: 240 seconds]
rmorello|1194 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
alvaro_o has joined #ruby
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<DreamingRainne>
Maybe it would be good to have the Wheel class as part of the interface. The caller themself creates Wheel objects and passes them to you, rather than representing them as [123,456]. Which one's which again...?
sungai_keruh has quit [Quit: Leaving]
sailias has quit [Quit: Leaving.]
andrewlio has joined #ruby
<DreamingRainne>
And the "wheelify" stuff (the way for callers to define Wheels) can be done in the Wheel initializer, such as accepting a Hash (like "Wheel.new(:rim => 622, :tire => 20)") or the two-element Array or whatever, normalizing it into a particular format.
geggam has quit [Remote host closed the connection]
timgauthier has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
x1337807x has joined #ruby
pagios has quit [Read error: Connection reset by peer]
rm__ has joined #ruby
agjacome has quit [Remote host closed the connection]
sski has quit [Remote host closed the connection]
quitobro has quit []
jsutch has joined #ruby
<DreamingRainne>
In which case, "Wheel" encapsulates, and is responsible, for an individual wheel; and the outer class is responsible for handling collections of them.
sski has joined #ruby
baweaver has quit [Remote host closed the connection]
<crucify_me>
that's good stuff DreamingRainne .. thanks for precise description.
jlast has joined #ruby
jovimarti has joined #ruby
yfeldblu_ has joined #ruby
baordog_ has quit [Quit: ChatZilla 0.9.90.1 [Firefox 28.0/20140314220517]]
ccham has joined #ruby
jovimarti has left #ruby [#ruby]
baishe has quit [Quit: Leaving]
duggiefresh has quit [Remote host closed the connection]
crystal77 has quit [Quit: Computer has gone to sleep.]
jobewan has quit [Quit: Leaving]
SCommette has quit [Quit: SCommette]
ktun has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
sski has quit [Ping timeout: 240 seconds]
freerobby has joined #ruby
crystal77 has joined #ruby
djbender has quit [Quit: djbender]
yfeldblum has quit [Ping timeout: 245 seconds]
SonicX has joined #ruby
e4xit has joined #ruby
eynj has joined #ruby
babatz has quit [Quit: babatz]
Hanmac has joined #ruby
<srji>
hm, ghostbusters 2 on tv, again
mrmargolis has quit [Remote host closed the connection]
saarinen has joined #ruby
helpD has quit [Remote host closed the connection]
freerobby has quit [Ping timeout: 258 seconds]
crystal77 has quit [Client Quit]
helpD has joined #ruby
nari has quit [Ping timeout: 240 seconds]
jason__ has joined #ruby
SonicX has quit [Remote host closed the connection]
Hanmac1 has quit [Ping timeout: 265 seconds]
ndrei has quit [Ping timeout: 250 seconds]
sputnik13 has quit [Ping timeout: 240 seconds]
chipotle has joined #ruby
msmith_ has quit [Remote host closed the connection]
jason__ has quit [Remote host closed the connection]
Martxel_ is now known as Martxel
sputnik13 has joined #ruby
bean has joined #ruby
tvw has quit []
helpD has quit [Ping timeout: 250 seconds]
<crucify_me>
DreamingRainne: you still on?
* DreamingRainne
looks up.
postmodern has joined #ruby
agjacome has joined #ruby
andrewlio has quit [Ping timeout: 250 seconds]
crystal77 has joined #ruby
pagioss has joined #ruby
<crucify_me>
but as it stands, http://pastie.org/9088390 Wheels is not encapsulating an individual wheel ?
chris_thomson has joined #ruby
<crucify_me>
DreamingRainne: ^^
yfeldblu_ has quit [Remote host closed the connection]
bean has quit [Client Quit]
<crucify_me>
*Wheel ^^
<wallerdev>
thats some weird code haha
mary5030 has quit [Remote host closed the connection]
* lagweezle
reads code.
* lagweezle
goes to find an Advil.
mary5030 has joined #ruby
bricker has quit [Quit: leaving]
<crucify_me>
its for edification not that I know a better way (sandi metz book) wallerdev lagweezle
djbkd has quit [Remote host closed the connection]
bricker has joined #ruby
afex has quit [Ping timeout: 240 seconds]
<wallerdev>
that sentence made even less sentence than the code you posted
DylanJ` has quit [Quit: WeeChat 0.4.1]
<wallerdev>
sense haha
Biohazard has quit [Ping timeout: 252 seconds]
Hanmac1 has joined #ruby
<crucify_me>
wallerdev: The book is building up better ways to do it I assume.
andrewlio has joined #ruby
crystal77 has quit [Client Quit]
jrhorn424 is now known as zz_jrhorn424
helpD has joined #ruby
<lagweezle>
I'm okay with the sentence. The code hurts my brain.
pagioss has quit [Read error: Connection reset by peer]
<crucify_me>
!!
<DreamingRainne>
Well, I'm thinking, the process of turning data into a Wheel should be in the Wheel constructor.
Hanmac has quit [Ping timeout: 240 seconds]
ccham has quit [Ping timeout: 240 seconds]
jamto11 has quit [Remote host closed the connection]
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Biohazard has joined #ruby
<lagweezle>
It is. Sort of.
<DreamingRainne>
As in, interpretation should happen there. As it is, this happens in the wheelify method of the collection/parent class. What "wheelify" could do is relay arguments to the Wheel constructor for interpretation there, but not do interpretation itself.
<lagweezle>
Okay. I grok wheelify, now.
enebo has quit [Quit: enebo]
mary5030 has quit [Ping timeout: 276 seconds]
<crucify_me>
huh?
<crucify_me>
the collection/parent class?
treehug88 has joined #ruby
treehug88 has quit [Client Quit]
chipotle has quit [Quit: cya]
<DreamingRainne>
The RevealingReferences class, which manages a collection of Wheels.
ixti has joined #ruby
<DreamingRainne>
(Not sure there *could* be a less obvious name for something which manages a collection of Wheels, but that's what it's called.)
<lagweezle>
The free-floating Wheel = Struct.new(:rim, :tire) confuses me, though.
andy__ has quit [Remote host closed the connection]
pika_pika has quit [Ping timeout: 258 seconds]
<DreamingRainne>
lagweezle: It's a nested class. The outside world would see it as RevealingReferences::Wheel.
<lagweezle>
Oooh.
<lagweezle>
Okay. I was at least on the right train of thought.
bradhe has quit [Remote host closed the connection]
hgl_ has quit [Quit: Computer has gone to sleep.]
<DreamingRainne>
And might use it like: RevealingReferences::Wheel.new(:spinning, :untreaded)
no6 has quit [Ping timeout: 265 seconds]
<crucify_me>
that is all helpful dialogue thanks
bradhe has joined #ruby
treehug88 has joined #ruby
treehug88 has quit [Max SendQ exceeded]
bean has joined #ruby
blackmesa has quit [Ping timeout: 245 seconds]
<crucify_me>
DreamingRainne: could you elaborate on say the spinning attribute?
<DreamingRainne>
def RevealingReferences.wheelify(data); data.collect{ |args| Wheel.new(args) }; end
omosoj has quit [Ping timeout: 252 seconds]
ccham has joined #ruby
emaxi has joined #ruby
jason__ has joined #ruby
treehug88 has joined #ruby
<lagweezle>
Hm. So perhaps more of @wheels = data.collect { |cell| Wheel.new(cell) } then?
<DreamingRainne>
^ forwarding arguments to Wheel constructor so that the Wheel constructor can do the interpretation itself, rather than presuming to do its job for it.
<DreamingRainne>
lagweezle: Yeah, that should work.
<lagweezle>
Making sure not to confuse 'spinning' with 'spinners' ;)
luriv has quit [Ping timeout: 258 seconds]
benlieb has joined #ruby
jason__ has quit [Remote host closed the connection]
cover has quit [Remote host closed the connection]
hgl_ has joined #ruby
<DreamingRainne>
Then perhaps define Wheel longhand: class Wheel; attr_accessor :rim, :tire; def initialize( *args ); data = args.flatten; @rim = data[0].to_f; @tire = data[1].to_f; end; def diameter; @rim + @tire*2; end; end
qhartman has quit [Quit: Ex-Chat]
ccham has quit [Remote host closed the connection]
<DreamingRainne>
(Also putting "diameter" as a method of Wheel, on the same principle.)
ccham has joined #ruby
hgl_ has quit [Client Quit]
devdazed has quit [Quit: Bye]
DouweM has quit [Quit: Leaving...]
jason__ has joined #ruby
yfeldblum has joined #ruby
rakm has quit [Quit: Connection closed for inactivity]
Dude007 has quit [Remote host closed the connection]
Dude007 has joined #ruby
Dude007 has quit [Read error: Connection reset by peer]
agent_white has quit [Quit: brb]
klaut has quit [Remote host closed the connection]
<rdgawdzi>
Hi, Ruby n00b here. Do these weird Range's come up a lot? For example, consider array[2..-1]
<rdgawdzi>
Is it beneficial to understand negative indices and such? If they are used in production?
rm__ has quit [Remote host closed the connection]
<rdgawdzi>
*Do they get used by Ruby devs
<DreamingRainne>
rdgawdzi: Sometimes, mainly in contexts like that. That example means "everything but the first two elements"; the -1 is interpreted to mean "end of array" in that context.
rm__ has joined #ruby
roland_ has quit [Ping timeout: 252 seconds]
afex has joined #ruby
<DreamingRainne>
You can also do array[2,:end] with the same meaning, in that case.
<crucify_me>
DreamingRainne: why flatten the args if they are already indexed in the definition? sorry
twiceday has joined #ruby
skulker has quit []
e4xit has quit [Quit: e4xit]
<DreamingRainne>
crucify_me: So you can do stuff like "Wheel.new(rim,tire)" (as separate arguments) or "Wheel.new([rim,tire])" (relayed from "wheelify" without interpretation) with the same effect.
djbkd has joined #ruby
IceDragon has joined #ruby
<wallerdev>
rdgawdzi: i see -1 used a lot, dont usually see other negative indices besides that one
jason__ has quit [Remote host closed the connection]
dstynchu_ has joined #ruby
RaCx has quit [Quit: Computer has gone to sleep.]
<wallerdev>
unless you're code golfing
dstynchu_ has quit [Read error: Connection reset by peer]
dstynchu_ has joined #ruby
dstynchula has quit [Read error: Connection reset by peer]
<Nilium>
The gentleperson's fine sport of code golf
twiceaday has quit [Ping timeout: 265 seconds]
dstynchu_ has quit [Read error: Connection reset by peer]
rm__ has quit [Ping timeout: 240 seconds]
bean has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
sailias has joined #ruby
<crucify_me>
DreamingRainne: thanks a lot...
<benlieb>
I have a 2.5G text file that I would like to parse records out of and put into a database. This happens to be a rails log file, so the word "Started" seems to be a good record separator. What is the most efficient way to parse this very large file into pieces that I insert into the db. I assume this wouldn't be loading the whole "string" into memory...
andrewlio has quit [Ping timeout: 258 seconds]
<benlieb>
My current idea is to go line by line, looking for the string "Started", and concat if I don' t find it, and start a new record if I do...
<benlieb>
haven't implemented this yet, though.
<benlieb>
If there is a gem out there that already does this, all the better.
shashank_rs has quit [Ping timeout: 265 seconds]
<crucify_me>
DreamingRainne: I wonder, if you flatten the args, if the arrays changed in the outside world to three elements each, wouldn't that break the constructor?
<DreamingRainne>
benlieb: The approach I might take is have an Array/Hash for "current record", then do "File.foreach(logfile) do |line|", then start a new record ("current = Hash.new") if line.include? "Started"
<DreamingRainne>
Something like that.
<benlieb>
DreamingRainne: yeah, that's what my idea was above, basically
red234324 has quit [Quit: Leaving]
<DreamingRainne>
crucify_me: No, it just indexes [0] and [1]. More elements in the arrays won't hurt anything.
bufferloss has joined #ruby
<crucify_me>
DreamingRainne: pondering many thanks.
<bufferloss>
how can I fix encoding errors when downloading a zip file?
zachallett has joined #ruby
kirun has quit [Quit: Client exiting]
x77686d has quit [Quit: x77686d]
zigomir has quit [Remote host closed the connection]
<bufferloss>
can I just write plain data instead of strings?
zigomir has joined #ruby
<bufferloss>
I’ve tried opening the file with “b” instead of “w” for example but that didn’t seem to help
<bufferloss>
DreamingRainne: did you look at that gist?
linojon has quit [Quit: linojon]
<bufferloss>
wallerdev: I am on OSX right now
<kerin>
So I'm running a Sinatra app that runs on top of three Thin processes, and had an issue where class variables were *apparently* being accessed by a different thread than the one that created it... is this expected behavior?
<bufferloss>
eventually this will be running on a *nix system in production
Bumptious has quit [Remote host closed the connection]
Nukepuppy has joined #ruby
akonny has quit [Quit: akonny]
ylluminate_ has joined #ruby
<DreamingRainne>
bufferloss: That looks okay. Maybe there's a conn.binary or something? <shrug>
fubelly has left #ruby ["Leaving..."]
<wallerdev>
should just work
<wallerdev>
havent used that lib though
<bufferloss>
it’s pretty much just, literally a wrapper around libcurl
<bufferloss>
the CLI version of curl is totally easy, works like a charm
<bufferloss>
wanted the script to not have to rely on running shell commands in e.g. bash/sh to be platform agnostic
<bufferloss>
but it’s unlikely this code will ever run on windows anyway
crucify_me has quit []
Hanmac has joined #ruby
<bufferloss>
was still hoping to do it the “pure ruby” way
<bufferloss>
wallerdev, DreamingRainne, would you mind trying that script I showed? just gem install curb
lukec has joined #ruby
<bufferloss>
works fine for getting HTML
zigomir has quit [Ping timeout: 276 seconds]
ylluminate has quit [Ping timeout: 250 seconds]
kitak has quit [Remote host closed the connection]
<wallerdev>
bufferloss: did it fine without curl
ylluminate` has quit [Ping timeout: 255 seconds]
kitak has joined #ruby
<DreamingRainne>
There's a Net::HTTP in the standard library. Maybe use that?
<wallerdev>
just used open-uri
garndt has quit [Quit: Connection closed for inactivity]
mansi_ has joined #ruby
mansi has quit [Read error: Connection reset by peer]
<wallerdev>
the only problem with my code is that itll use a bunch of ram
<wallerdev>
since itll keep the zip in memory
<bufferloss>
"if I see that a library uses open-uri internally, I don't use that library. It's a deeply flawed library built on top of a deeply flawed URI parser. It's fine for usage in IRB and that's it.”
benlieb has quit [Quit: benlieb]
<bufferloss>
wallerdev: well, the other main question is whether open-uri will allow me to e.g. follow redirects and maintain cookies
<wallerdev>
no i dont think it handles things like that
<wallerdev>
i usually just use it for one liners to download a file
<bufferloss>
wallerdev: yeah so that’s why I pretty much need to use the Curb gem
<bufferloss>
though I’d be open to other gems that provide similar features
<wallerdev>
gotcha
<wallerdev>
i know mechanize handles things like logging in and stuff
<wallerdev>
not sure what that uses underneath though
x77686d has joined #ruby
<wallerdev>
probably net/http
<wallerdev>
but mechanize is more for page scraping stuff
dangerousdave has quit [Ping timeout: 245 seconds]
<bufferloss>
well it’s not just an http username password auth scheme
<bufferloss>
yeah it uses nokogiri from what I saw
<bufferloss>
so I figured it was probably overkill
kaspergrubbe has quit [Remote host closed the connection]
shime has quit [Ping timeout: 258 seconds]
<bufferloss>
I actually have to do a few pre-flight get and post requests to set up cookies and then send an HTTP POST request with form-encoded data to actually perform the login over HTTPS
<wallerdev>
if your zip is coming out corrupt or something make sure you clear it out before appending to that file
arietis has joined #ruby
<bufferloss>
I’ve definitely got the zip file data, it looks exactly what command line curl gives me when I puts it to the screen
jarred has joined #ruby
arubincloud has quit []
<bufferloss>
I figure the example that downloads the wordpress zip is relatively reliably not downloading a corrupted zip file
tzhuang has quit [Quit: leaving]
<bufferloss>
and it seems to succeed up til the exact same point as my script, which is the call to fh.write
shashank_rs has quit [Ping timeout: 276 seconds]
<jarred>
stupid question. I'm trying to have a task run before another in my deploy.rb file with Capistrano 3.x. Here is the task: https://www.dropbox.com/s/zn0z2oz6kpkxfg4/Screenshot%202014-04-17%2019.00.03.png. I can see that it's not being invoked when I run "cap production deploy" because CTRL-F'ing for "bower:install" comes up with nothing. I'm obviously doing something really stupid here