<havenwood>
wald0: if you have an older RubyGems, can also `--no-ri` but that is the default these days
meatherly has quit [Ping timeout: 276 seconds]
36DAB3XBB has quit [Quit: 36DAB3XBB]
<wald0>
is "ri" deprecated for ruby docs?
tcstar has quit [Ping timeout: 264 seconds]
ahawkins has joined #ruby
<havenwood>
wald0: i've not heard anything about deprecation, but i've not heard of anyone using it either :P
jlast has quit [Ping timeout: 240 seconds]
<shevy>
hehehehehe
<shevy>
wald0, ri stinks
<shevy>
wald0 you must train your brain
<shevy>
also store snippets and pieces of good knowledge locally
lmickh has quit [Remote host closed the connection]
danshultz has quit [Ping timeout: 265 seconds]
x__ has joined #ruby
stryek has joined #ruby
Landshark753 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nanoyak has quit [Quit: Computer has gone to sleep.]
<shevy>
oh man, ruby fpdf is odd
<shevy>
look at this:
<shevy>
def cell(w, h = 0, txt = '', border = 0, ln = 0, align = '', fill = 0, link = '')
ahawkins has quit [Ping timeout: 276 seconds]
nhhagen has joined #ruby
agjacome has quit [Quit: leaving]
ctp has joined #ruby
Neomex has joined #ruby
iliketurtles has quit [Quit: zzzzz…..]
jamesaanderson has joined #ruby
jamesaanderson has quit [Max SendQ exceeded]
jblack has joined #ruby
jamesaanderson has joined #ruby
iliketurtles has joined #ruby
iliketurtles has quit [Excess Flood]
fractastical has quit [Quit: fractastical]
interactionjaxsn has quit [Remote host closed the connection]
snath has quit [Ping timeout: 260 seconds]
iliketurtles has joined #ruby
kaldrenon has joined #ruby
kitak__ has quit [Remote host closed the connection]
FifthWork has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
m00nlight has joined #ruby
thumpba has quit [Remote host closed the connection]
<pzula>
exit
pzula has quit [Quit: leaving]
Hanmac has joined #ruby
kitak has joined #ruby
iliketurtles has quit [Client Quit]
ephemerian has quit [Quit: Leaving.]
baroquebobcat has quit [Quit: baroquebobcat]
kure__ has quit [Ping timeout: 245 seconds]
Hanmac1 has quit [Ping timeout: 264 seconds]
nhhagen has quit [Ping timeout: 252 seconds]
aspires has quit []
lioninawhat has quit [Remote host closed the connection]
aspires has joined #ruby
kitak_ has joined #ruby
yoshie902a has joined #ruby
kaldrenon has quit [Ping timeout: 276 seconds]
nanoyak has joined #ruby
iliketurtles has joined #ruby
iliketurtles has quit [Excess Flood]
zz_karupanerura is now known as karupanerura
thumpba has joined #ruby
kitak_ has quit [Remote host closed the connection]
<yoshie902a>
I want to use sample data Fixture from CSV files with rspec for testing and found out the CSV feature was deprecated. any recommendations on how to import CSV files data with use with RSPEC?
kitak_ has joined #ruby
kitak has quit [Ping timeout: 245 seconds]
<wald0>
oh good, I was thinking that ri was the tool to read the ruby docs/manpages/whatever in the OS
<wald0>
so what i should use instead then ?
iliketurtles has joined #ruby
workmad3_ has quit [Ping timeout: 264 seconds]
nhhagen has joined #ruby
Jeticus has quit []
unixpro1970 has joined #ruby
bricker has quit [Ping timeout: 276 seconds]
iliketurtles has quit [Client Quit]
Hanmac1 has joined #ruby
lioninawhat has joined #ruby
Hanmac has quit [Ping timeout: 248 seconds]
bMalum has joined #ruby
<shevy>
yeah you can use documentation of rdoc via ri
<shevy>
yard should also be an option
rawal has joined #ruby
<wald0>
seems like debian testing has better ruby support (packages) than debian stable, unfortunately i cannot switch to testing atm
thumpba has quit [Remote host closed the connection]
<havenwood>
looks like RubyGems 2.2.1 just got released! \o/ time to: gem update --system
flame_ has quit [Quit: Computer has gone to sleep.]
<wald0>
yard? mmh, can you tell me an example of how i should read the ruby doc? im going to be offline for 2 weeks soon and i would need to some "manpages" access :)
aspires has quit []
thumpba has joined #ruby
shedd_ has quit [Remote host closed the connection]
thumpba has quit [Remote host closed the connection]
<shevy>
wald0 no idea, sorry. someone else here surely knows. As I said that ri stinks, I stopped using commandline docu tools about 9 years ago. Today I search on the web, if examples are useful I store it into a knowledge base and add .rb example files. sorry
thumpba has joined #ruby
jblack has quit [Ping timeout: 265 seconds]
<rawal>
can you tell me best IDE for ruby and RoR
rootshift has quit [Quit: rootshift]
aspires has joined #ruby
<wald0>
nobody reads, good :)
<wald0>
maybe im too much perfectionist
lfox has joined #ruby
<wald0>
rawal: more like "best", vim is the most customizable, and so you can have any needed feature on it, is also maybe the most powerful editor
iliketurtles has joined #ruby
iliketurtles has quit [Excess Flood]
<shevy>
wald0 In the beginning I was like that but after you studied or read a lot of ruby-related things, you kinda try to only focus (and read) on what is relevant or most direct. I think after you wrote your first 100 .rb files, things will be a lot easier suddenly
<wald0>
shevy: your productivity is not affected by the online research ? :P, i always think that everything related to internet slows down productivity
<terrellt>
rawal: There's a lot of options. vim with vim-rails is popular, Sublime, RubyMine. Hell, I used eclipse with Aptana Studio for a while.
_aeris_ is now known as [_aeris_]
<rawal>
wald0 for windows
burlyscudd has joined #ruby
<wald0>
rawal: too :)
Jason has joined #ruby
bigbadbear has joined #ruby
<shevy>
wald0 sure, the initial one. but I store useful things locally, then I am no longer dependent. Without internet in general, I am not very productive. I am like a youtube addict
<shevy>
but for most ruby-related issues I really dont need any documentation other than my own
bMalum has quit [Ping timeout: 260 seconds]
<Jason>
I've got a rather stupid question :-(. How do I create a, uh, I believe it's a module. Like, methods from another file.
<shevy>
these days most of the time I need to look up something in ruby-gnome bindings, then I also need official gnome/gtk docu
<wald0>
shevy: suffering procrastination too ? lol
<shevy>
Jason with "module". module Foo; end <--- this is a module
CpuID has quit [Quit: This computer has gone to sleep]
phipes has quit [Remote host closed the connection]
<Jason>
shevy: i don't think that's what i want, though:
<shevy>
wald0 yeah, unfortunately :( I need to find a way to not get sucked up into youtube...
<Jason>
In pie.rb: def hi puts 'hi' end. In main.rb: require 'pie' pie.hi
<Jason>
shevy: like, that kind of magic. ^
<wald0>
shevy: what are your needs with GUI? im going to use ruby for gui too but not gtk
<shevy>
Jason do you use a module in this code you showed?
larissa has quit [Quit: Leaving]
<rawal>
thanks, I recently started learning ruby and rails so any fast track for quick and easy learning
<wald0>
shevy: you can use these bindings in 2 different ways, one is "native API of enlightenment" like the previous example, the other is a more ruby-like one: http://paste.debian.net/74689/
<shevy>
I dont quite yet understand how that works
<shevy>
are these autogenerated methods?
tkuchiki has joined #ruby
mary5030 has joined #ruby
<wald0>
shevy: using ffi and automated parser scripts, which automatically generates the bindings from the C lib, which ensures that the bindings will not die in a future (minimal maintaining required)
zeade has quit [Quit: Leaving.]
<wald0>
yep
cj3kim has quit [Ping timeout: 264 seconds]
<shevy>
hmm
<shevy>
interesting
Hanmac1 has quit [Ping timeout: 264 seconds]
<shevy>
so basically these would be always up-to-date
lioninawhat has quit [Remote host closed the connection]
sambao21 has quit [Quit: Computer has gone to sleep.]
tvw has quit []
robustus has quit [Ping timeout: 245 seconds]
<wald0>
yeah, in fact im learning ruby -only- because i can use these bindings lol (need to do some gui apps, and gtk is not enough for me)
thumpba has quit [Remote host closed the connection]
<cmouse>
wald0: oh, sorry, you werent asking...
<cmouse>
my bad
<wald0>
cmouse: none good enough :)
thumpba has joined #ruby
<wald0>
gtk is the best option, but EFL is simply much more powerful and much more light
Aryasam has joined #ruby
thumpba has quit [Remote host closed the connection]
robustus has joined #ruby
cmouse has left #ruby [#ruby]
thumpba has joined #ruby
robbyoconnor has quit [Ping timeout: 260 seconds]
gsvolt has quit [Ping timeout: 245 seconds]
phipes has quit [Remote host closed the connection]
robbyoconnor has joined #ruby
wildroman2 has joined #ruby
nwertman has quit [Ping timeout: 260 seconds]
<wald0>
shevy: if you want to do a "fast overview/test" i suggest you to download the last Live iso of elive which is already installed/build (it depends of the same enlightenment libs, etc), and run the ruby scripts from: /usr/share/doc/ruby-ffi-efl/test/
cbetta is now known as cbetta_afk
<wald0>
shevy: or maybe you just need to run "apt-get install ruby-ffi-efl" in the live mode to have it
<shevy>
wald0 interesting motivation to want to learn ruby
<shevy>
most people use ruby because of rails these days
kure__ has joined #ruby
<shevy>
I wanted to use a better language than php
sakb has joined #ruby
doodlehaus has quit [Remote host closed the connection]
<wald0>
shevy: i wanted to use better language than bash :), allowing me to do GUI apps without using C, and there was ruby with efl !!! :)
<shevy>
wald0 I am compiling enlightenment things right now
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
lyanchih_ has joined #ruby
mlpinit_ has quit [Read error: Operation timed out]
shedd has joined #ruby
eka has joined #ruby
b00stfr31k has quit [Ping timeout: 276 seconds]
<shevy>
oh damn
Hobogrammer has joined #ruby
<shevy>
now I remember why I could not compile it the last time
<shevy>
checking whether lua_newstate() is in liblua... checking for lua_newstate in -llua... no
<shevy>
no
<shevy>
configure: error: Cannot find lua library. Be sure that you have installed it and set CFLAGS and LDFLAGS correctly
<shevy>
:(
cj3kim has quit [Ping timeout: 265 seconds]
<wald0>
shevy: i told you that the deps has some amount :)
<shevy>
oh the deps are no problem at all
<wald0>
if you where in a debian* system i could have give you some prebuilded packages but not sure about slackware... mmh, i think that there was for slackware too
<shevy>
the problem is that when I compile lua, I get a liblua.a
<shevy>
and I dont know how to get the .so
<shevy>
nah, I abandoned the distribution world
<wald0>
mmh, your system should not work if there's no .so ones, imho
zxq9 has joined #ruby
ahawkins has joined #ruby
<shevy>
lol
<shevy>
lua runs fine
shadoi has quit [Quit: Leaving.]
shaker75 has quit [Remote host closed the connection]
<lethjakman>
hrm I have a feeling this is fairly trivial...but I'm trying to make a ruby regex that will match both demo.connect and connect but not just *.connect
<lethjakman>
is there an easy way to do that?
<lethjakman>
I may be over complicating this....
epochwolf has joined #ruby
<shevy>
wald0 a moment
<shevy>
bilbo_swaggins yeah, I'll work on that eventually one day in reallife!
Aryasam has quit [Ping timeout: 260 seconds]
jlast has joined #ruby
jwalk has quit [Ping timeout: 276 seconds]
bilbo_swaggins has quit [Quit: Leaving]
gverri has joined #ruby
gverri has quit [Max SendQ exceeded]
bilbo_swaggins has joined #ruby
heidi has quit [Client Quit]
Targen has joined #ruby
Neomex has quit [Quit: Neomex]
tonni_ has quit [Read error: Connection reset by peer]
phipes has quit [Remote host closed the connection]
cj3kim_ has quit [Remote host closed the connection]
charliesome has joined #ruby
tonni has joined #ruby
<shevy>
I cant read the font wald0 :(
<shevy>
it's too small
<shevy>
lethjakman regexes always kill my brain
<shevy>
lethjakman optional matches could be done via (foo|bla) I think, I usually play on rubular.com until it works
<lethjakman>
shevy: hrm...the ( makes it optional?
<agent_white>
But again, please test it... as I only removed "demo" and replaced it with "poo" and other things of the sort. ;P
cads has joined #ruby
shedd has joined #ruby
bMalum has joined #ruby
jeebster has joined #ruby
<shevy>
wald0, I have a question. can these widgets be used when a user runs in kde or gnome?
sakb has quit [Quit: Leaving]
<pontiki>
\W matches a non-word character
<jeebster>
what do I need to pass the parser for it to recognize multi-line code, e.g. a block that spans multiple lines?
<pontiki>
\w matches a word character
Hanmac1 has joined #ruby
trinode has quit [Ping timeout: 260 seconds]
shedd has quit [Ping timeout: 264 seconds]
bMalum has quit [Ping timeout: 240 seconds]
Hanmac has quit [Ping timeout: 260 seconds]
Aryasam has quit [Ping timeout: 240 seconds]
gja has joined #ruby
anthony has joined #ruby
anthony is now known as Guest9486
aspires has quit []
Aryasam has joined #ruby
freezey has quit [Ping timeout: 264 seconds]
freidahpatch has joined #ruby
<wald0>
shevy: mmh, you can't read the font because the video is bigger than your screen, if you use mplayer without fullscreen you should be able to "move" the "bigger than your desktop" video window and read it
<wald0>
unfortunately i cannot record a small-size right now
<shevy>
well no rush, we got plenty of time!
gja has quit [Client Quit]
nfk has quit [Remote host closed the connection]
magoo has joined #ruby
lukec has joined #ruby
gja has joined #ruby
<wald0>
shevy: yes, these widgets can work without problems in any X11 environment, in fact you can use them with any engine like GL rendering, win32, wayland (that future X11 by intel), and FrameBuffer (yeah, you can have these widgets running OUT OF X11! lol)
<shevy>
ok
vlad_starkov has joined #ruby
freidahpatch has quit [Ping timeout: 248 seconds]
troyready has joined #ruby
<wald0>
shevy: as long as you have libefl & libelementary installed, + this small ruby-ffi-efl thingy, it would work on any kde/gnome environment
pskosinski has joined #ruby
<shevy>
good!
<shevy>
I am on xfce right now and I just broke pango
Guest9486 has quit [Read error: Connection reset by peer]
<wald0>
by installing libefl, shevy ?
<shevy>
nah
Aryasam has quit [Ping timeout: 248 seconds]
<shevy>
tried to fix the libpng stuff
<shevy>
stupid libtool has stupid hardcoded .la files
<wald0>
rm -rf .la files :)
<shevy>
spread all over in all the other .la files like a virus
<shevy>
hmm but then I think I can't compile anything that makes use of libtool anymore
AlSquire has quit [Remote host closed the connection]
<shevy>
I will give it a try then
troyready has quit [Read error: Operation timed out]
Voodoofish4302 has quit [Quit: Leaving.]
maletor has quit [Quit: Computer has gone to sleep.]
jeebster has quit [Quit: Leaving.]
havenwood has quit [Remote host closed the connection]
jeebster has joined #ruby
ner0x has joined #ruby
tylersmith has quit [Ping timeout: 272 seconds]
pen has quit [Remote host closed the connection]
dukz has joined #ruby
pen has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
Bira has quit []
mneorr has quit [Remote host closed the connection]
DGuedes has quit [Ping timeout: 248 seconds]
Wolland_ has quit [Remote host closed the connection]
nanoyak has quit [Read error: Operation timed out]
mneorr has joined #ruby
poutine has joined #ruby
magoo has quit [Ping timeout: 248 seconds]
burlyscudd has joined #ruby
nhhagen has joined #ruby
burlyscudd has quit [Client Quit]
Wolland has joined #ruby
<wald0>
well, dont risk your system, better to move out all the .la files instead of delete them
lfox has quit [Quit: ZZZzzz…]
<shevy>
I will annihilate all of them and then destroy libtool and then find the authors and tell them to stop maintaining libtool
shedd has joined #ruby
<wald0>
mmh, with something like find / -name '*'.la | cpio -paduv -- /tmp/backup-of-la-files/ you should backup all of them with the same dir structure
<wald0>
or something similar with -paduv for cpio :)
pskosinski has quit [Remote host closed the connection]
<shevy>
/usr/bin/sed: can't read /usr/lib/libffi.la: No such file or directory
<shevy>
libtool: link: `/usr/lib/libffi.la' is not a valid libtool archive
pen has quit [Ping timeout: 265 seconds]
nateberkopec has joined #ruby
<wald0>
/usr/lib/i386-linux-gnu/libffi.so.5.0.10
flame_ has quit [Quit: Computer has gone to sleep.]
<wald0>
no .la installed
<shevy>
you don't have any .la files?
benzrf has joined #ruby
<wald0>
nope, debian dont use them at all
<benzrf>
hello ruby masters
<shevy>
:(
<shevy>
lucky you
<wald0>
or.. wait
<shevy>
I will ask on #slackware
lioninawhat has quit [Remote host closed the connection]
<benzrf>
is it considered common ruby practice to put 1 class in each file
<benzrf>
and/or module
<wald0>
nope, seems like no
phipes has quit [Remote host closed the connection]
<shevy>
wald0 I envy you now
mneorr has quit [Ping timeout: 264 seconds]
<wald0>
not for libffi in any case :) seems like other packages has, but they are not useful
<shevy>
I need to find out how I can get rid of this libtool virus
<wald0>
in fact i always wipe them
<shevy>
benzrf YES
bMalum has joined #ruby
<shevy>
benzrf because it is SIMPLER for the brain
<shevy>
foo.rb module Foo (or class Foo)
<wald0>
shevy: but libtool is something good, i use libtool without .la
tylersmith has joined #ruby
mneorr has joined #ruby
Hanmac has joined #ruby
<benzrf>
fft ok
<shevy>
wald0 ah well
<shevy>
I shall find out eventually
<shevy>
right now I am in rage and hate
nhhagen has quit [Ping timeout: 252 seconds]
<shevy>
mood
ahawkins has joined #ruby
<shevy>
benzrf I think many ruby guys don't care, on rubygems.org many projects are just wild in what they put into a .rb file
<benzrf>
hmmmmm
<wald0>
shevy: sorry, i could not help you much with slack, the last time i tried slack was with floppy disks :)
<wald0>
iirc
<benzrf>
i think i shall put them in separate files
<benzrf>
maybe
<benzrf>
o_o
<shevy>
that's ok, I'll tackle the problem another day wald0
<shevy>
benzrf YES
Hanmac1 has quit [Ping timeout: 265 seconds]
<shevy>
benzrf unless your editor is bad
<benzrf>
i use vim
<wald0>
shevy: well, if you have any problem installing libefl / libelementary for run ruby-ffi-efl just tell me, im very familiarized with it, but you should not have any problem
<wald0>
note that the second one works in gvim but not vim from terminal
<benzrf>
ohcibi:
<benzrf>
i c
<benzrf>
*oh
<benzrf>
not ohcibi ~_~
robbyoconnor has joined #ruby
Mars___ has quit [Remote host closed the connection]
<wald0>
benzrf: its very useful to have a visual/mental reference of your code and the location of the elements when the file is long, check the sublimetext site animated-screenshot-presentation and you will see what it does
<benzrf>
hmm, i think apeiros said something about using LOAD_PATH so that I do not use ./ ?
ckinni has joined #ruby
<benzrf>
i am aware of what minimap does I think
<benzrf>
I tend to just search or use markers
<benzrf>
and i can do folding in MY MIND
<wald0>
benzrf: i should use more markers, but then i dont remember them lol
<benzrf>
same ;-;
moshee has quit [Quit: 囧]
<wald0>
benzrf: good, you have a better mind than me :), (seriously, bad memory)
butblack has quit [Quit: butblack]
ehc has quit [Quit: ehc]
<benzrf>
well to be precise I think 'ok this file has World, then Room, then Tile, then Sprite'
moshee has joined #ruby
<wald0>
maybe because i have good "visual memory" i found that minimap plugin very handy, is just like a "fast shot" to remember where things are, by simply looking the "form" of the code
<benzrf>
then i can pop open Room and say 'ok the methods are in this order'
<benzrf>
i guess
<wald0>
visual form *
<benzrf>
im fairly good at hopping up and down levels of abstraction i think
<wald0>
for have a tab to look like an idea (with a list of functions, variables, etc) i use taglist.vim, very useful
<agent_white>
wald0: I use that since any other plugins I tried just fucked things up terribly.
<agent_white>
lethjakman: Once you get Socratic replys, you'll know you provided the right info ;)
<agent_white>
mt
fire has joined #ruby
<benzrf>
fire: nice nick
<fire>
benzrf: :)
digital-ghost has quit [Remote host closed the connection]
vlad_starkov has quit [Read error: Connection reset by peer]
Megtasti_ has quit []
heidi has quit [Quit: Leaving.]
_reset has joined #ruby
Rylee has quit [Ping timeout: 264 seconds]
DrShoggoth has quit [Quit: Leaving]
<shevy>
if the world would be without bugs
mneorr_ has joined #ruby
jwalk has joined #ruby
kure__ has quit [Ping timeout: 272 seconds]
lfox has joined #ruby
reset has quit [Ping timeout: 252 seconds]
Megtastique has joined #ruby
aspires has joined #ruby
nhhagen has joined #ruby
_reset has quit [Ping timeout: 260 seconds]
nari has quit [Ping timeout: 248 seconds]
mneorr has quit [Ping timeout: 264 seconds]
mneorr_ has quit [Ping timeout: 240 seconds]
jerius has joined #ruby
<agent_white>
there'd be no angelina jolie to hax the gibson D:
freezey has joined #ruby
nhhagen has quit [Ping timeout: 252 seconds]
Brolen has quit [Quit: Brolen]
cads has joined #ruby
gja has quit [Quit: This computer has gone to sleep]
robbyoconnor has quit [Read error: Connection reset by peer]
mavcunha has quit [Quit: Computer has gone to sleep.]
robbyoconnor has joined #ruby
kitak_ has quit [Remote host closed the connection]
mbytes has quit [Remote host closed the connection]
jonahR has joined #ruby
dukz has quit [Remote host closed the connection]
<wald0>
shevy: we are reaching that level :) think about the moving from asembly to c
<wald0>
now we have ruby :)
<shevy>
hmm
iliketurtles has joined #ruby
dukz has joined #ruby
kitak has joined #ruby
<benzrf>
what should I call my file that does modification of core classes?
<benzrf>
core_mod.rb?
<shevy>
did you not ask this before
<benzrf>
Norrin:
maroloccio2 has quit [Quit: WeeChat 0.4.2]
<benzrf>
*no
cads has quit [Quit: Leaving]
<shevy>
I think rails puts them into core_ext/
<shevy>
I usually put them into core/
<shevy>
then it depends, if it modifies string, I create string.rb
<wald0>
overwrittings_core_modules.rb
<shevy>
if it modifies array, I create array.rb
<wald0>
or better, modules_core
<wald0>
ops,clases i mean :)
<benzrf>
i have a few small ones though
<benzrf>
ill just call it core_ext
croaky has quit [Ping timeout: 240 seconds]
<shevy>
you are a good girl benzrf
<shevy>
wald0 I think I finally fixed all png related problems
<benzrf>
...
bigbadbear has quit [Ping timeout: 246 seconds]
croaky has joined #ruby
Targen has joined #ruby
<benzrf>
hmm, i think apeiros said something about using LOAD_PATH so that I do not use ./ ?
<benzrf>
how do I do this
MrJoshua has joined #ruby
Thanatermesis has quit [Quit: ɯlɐɔ uı ʞɹoʍ oʇ ƃuıoƃ]
JorDunn has quit [Ping timeout: 246 seconds]
nateberkopec has joined #ruby
lethjakman has quit [Ping timeout: 240 seconds]
krz has quit [Read error: Operation timed out]
newUser1234 has quit [Remote host closed the connection]
shadoi has joined #ruby
lioninawhat has joined #ruby
bMalum has quit [Quit: Computer has gone to sleep.]
ahawkins has joined #ruby
<wald0>
shevy: good :), im going to sleep now, hope you get to install libefl + libelementary easly in the end, but i remember that slackware packager guy of the link is an active maintainer for these libs if you want to install it easly
<dopie>
how can i move this if statement to the model
<benzrf>
my Ack plugin will come in handy now that i have divided my project into files!
<law>
hey all, apologies in advance if this is the wrong channel to ask this, but I'm trying to install a variety of gems via 'bundle exec gem install <blargh>', and while the system says they install just fine, they don't show up in 'gem list' or 'bundle list' or 'bundle exec gem list'. This is on OS X Mavericks, with Ruby 2.0.0p247
<law>
I suspect a well-meaning coworker 'did something silly' to my gems when I let him on my system to troubleshoot a rackspace gem issue
snath has joined #ruby
<law>
so... I'd also be down with "how to nuke Ruby from orbit and reinstall for OS X" help :-)
nari has joined #ruby
ctp has joined #ruby
ahawkins has quit [Ping timeout: 276 seconds]
heidi has joined #ruby
newUser1234 has joined #ruby
iliketurtles has quit [Quit: zzzzz…..]
Zesty has joined #ruby
Aryasam has joined #ruby
LinearInterpol has quit [Ping timeout: 276 seconds]
shadoi has quit [Quit: Leaving.]
fire has quit [Read error: Operation timed out]
jhn has joined #ruby
pen has joined #ruby
<emocakes>
law:
<emocakes>
system ruby?
<emocakes>
or other ruby
<emocakes>
you shouldnt bother with the system ruby
<emocakes>
use chruby
<emocakes>
or something
ctp has quit [Ping timeout: 264 seconds]
<law>
I don't deal with multiple versions of ruby, I'd really prefer to be able to just use my system Ruby :-)
wildroman2 has quit [Remote host closed the connection]
rootshift has joined #ruby
wildroman2 has joined #ruby
bigbadbear has quit [Ping timeout: 264 seconds]
nateberkopec has joined #ruby
ctp has joined #ruby
Yan has joined #ruby
Kabaka has joined #ruby
decoponio has joined #ruby
toastynerd has joined #ruby
brennanMKE has quit [Ping timeout: 260 seconds]
croaky has joined #ruby
mary5030 has joined #ruby
razibog has quit [Remote host closed the connection]
okinomo has joined #ruby
LostMonk_ has joined #ruby
<okinomo>
quit
<okinomo>
exit
okinomo has quit [Client Quit]
rdark has joined #ruby
Nahra has joined #ruby
<tobiasvl>
/quit
razibog has joined #ruby
Zai00 has joined #ruby
wildroman2 has quit [Ping timeout: 264 seconds]
carraroj has quit [Ping timeout: 264 seconds]
Aryasam has quit [Ping timeout: 264 seconds]
nateberkopec has quit [Ping timeout: 272 seconds]
dapz has quit [Ping timeout: 259 seconds]
Aryasam has joined #ruby
Cooler__ has quit []
[_aeris_] is now known as _aeris_
toastynerd has quit [Ping timeout: 276 seconds]
LostMonk- has quit [Ping timeout: 260 seconds]
mary5030 has quit [Ping timeout: 264 seconds]
croaky has quit [Ping timeout: 248 seconds]
timonv has quit [Remote host closed the connection]
jlast has joined #ruby
brotspinne has joined #ruby
joaoh82 has joined #ruby
Lingo has joined #ruby
olivier_b has joined #ruby
vlad_starkov has joined #ruby
Rylee has joined #ruby
jlast has quit [Ping timeout: 272 seconds]
dapz has joined #ruby
Aryasam has quit [Ping timeout: 265 seconds]
Aryasam has joined #ruby
p8952 has quit [Remote host closed the connection]
Peter has joined #ruby
Peter has quit [Read error: Connection reset by peer]
zipper has quit [Remote host closed the connection]
p8952 has joined #ruby
joaoh82 has quit [Ping timeout: 260 seconds]
vlad_starkov has quit [Ping timeout: 276 seconds]
weeeems has joined #ruby
weeems has quit [Read error: Connection reset by peer]
brotspinne has quit [Remote host closed the connection]
p8952 has quit [Client Quit]
lsmola_ has joined #ruby
reset has quit [Quit: Leaving...]
sungai_keruh has quit [Quit: Leaving]
marcgg_ has joined #ruby
fractastical has quit [Quit: fractastical]
MrZYX|off is now known as MrZYX
marcgg has quit [Ping timeout: 276 seconds]
timonv has joined #ruby
LinearInterpol has quit [Ping timeout: 272 seconds]
brotspinne has joined #ruby
cbetta_afk is now known as cbetta
blackmes1 has joined #ruby
BizarreCake has joined #ruby
marr has joined #ruby
sensen has joined #ruby
Rylee has quit [Ping timeout: 265 seconds]
iMe has quit [Ping timeout: 260 seconds]
Yan has quit [Ping timeout: 276 seconds]
iMe has joined #ruby
Aryasam has quit [Read error: Connection reset by peer]
Aryasam has joined #ruby
dfranciosi has joined #ruby
mikecmpbll has joined #ruby
Aryasam has quit [Read error: Connection reset by peer]
zoscoy has joined #ruby
jgoff has joined #ruby
N00D is now known as zz_N00D
Kabaka has quit [Ping timeout: 276 seconds]
brotspinne has quit [Remote host closed the connection]
mojjojo has joined #ruby
Kar- has quit [Ping timeout: 264 seconds]
robertjpayne has joined #ruby
<robertjpayne>
In irb if you puts a binary string it includes all the special characters, is there a way to preserve that formatting when using something that would otherwise not display those special characters?
sinm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<joesavage>
I think I'm going insane here, but the order of the 'or' operator in conditions in Ruby doesn't matter, right?
<joesavage>
Or rather the order of the conditions that are being or'd together -- poor phrasing on my part there
OdNairy has quit [Ping timeout: 264 seconds]
mojjojo has quit [Quit: mojjojo]
drumusician has quit [Ping timeout: 260 seconds]
<joesavage>
I guess the order matters if the operations change the variables involved, but I don't think they do here. I'm speaking somewhat cryptically here anyway, I'll pull out my code example of what's confusing me
arietis has joined #ruby
Xeago has joined #ruby
<apeiros>
D'oh! ~10 years of ruby, and only TIL `rescue => $x` is valid (useful in ad-hoc testing which raises what)
<apeiros>
joesavage: of course it matters
<apeiros>
joesavage: order always matters
subbyyy has quit [Ping timeout: 245 seconds]
<workmad3>
joesavage: with 'or' you have a massively lowered precedence
<joesavage>
Here's the snippet that's causing me problems (with output that just doesn't seem to make sense): https://gist.github.com/joesavage/8297285 -- any help would be awesome
<apeiros>
you may have certain conditions under which it doesn't, but that's not something you can attribute to the operator.
Guest92966 is now known as Caius
Caius has quit [Changing host]
Caius has joined #ruby
<workmad3>
joesavage: puts false or true == puts(false) or true
ando has joined #ruby
yasushi has joined #ruby
<workmad3>
joesavage: as opposed to puts false || true == puts(false || true)
wildroman2 has quit [Remote host closed the connection]
brennanMKE has joined #ruby
yasushi has quit [Remote host closed the connection]
<workmad3>
joesavage: or, in other words - 'or' != '||'
nari has quit [Ping timeout: 264 seconds]
ando has quit [Read error: Connection reset by peer]
soba has quit [Ping timeout: 276 seconds]
ando has joined #ruby
yasushi has joined #ruby
crashx has joined #ruby
ghr has joined #ruby
horofx has joined #ruby
joaoh82 has joined #ruby
<rtpg>
How can we pass around function ? I tried doing something like file.each_line array.push but it doesn't seem to like it
dapz has quit [Ping timeout: 248 seconds]
zeeraw has joined #ruby
<joesavage>
workmad: Aaaaaahh I see. Well that actually solves my entire problem, thanks
nateberkopec has joined #ruby
<apeiros>
rtpg: you can a) use symbols + Object#send, b) use Method instances (see Object#method for how to get one) or c) wrap the call in a proc
<workmad3>
rtpg: first, why not use file.readlines to get an array of the file contents
wildroman2 has joined #ruby
wildroman2 has quit [Remote host closed the connection]
<apeiros>
rtpg: but what you do certainly does not require passing around a method
<apeiros>
use a proper block with each_line
wildroman2 has joined #ruby
<apeiros>
file.each_line do |line| array.push line end # but that's a bad way to do that…
<workmad3>
apeiros: y u no like ary.each &other_arry.method(push) ? :P
<apeiros>
array.concat(file.lines)
<apeiros>
workmad3: coz me no crazy!
<rtpg>
oh I didn't know there was lines
<workmad3>
apeiros: Y U NO CRAZY!
toastynerd has joined #ruby
<apeiros>
COZ I CAN HAS TINFOIL HATZ!
ando has quit [Remote host closed the connection]
<rtpg>
I'm very much for passing around methods ( coming more from a Haskell-y background) , so at least finding a simple solution is important to me
<workmad3>
:)
brennanMKE has quit [Ping timeout: 272 seconds]
ando has joined #ruby
<apeiros>
rtpg: when in rome, do as the romans do
ando has quit [Remote host closed the connection]
thiago__ has quit [Ping timeout: 276 seconds]
<apeiros>
rtpg: or more programmery: DONT CODE HASKELL IN RUBY! srsly.
Kar- has joined #ruby
ando has joined #ruby
OdNairy has joined #ruby
Mars__ has joined #ruby
<workmad3>
apeiros: +1
Guest76088 has quit [Ping timeout: 245 seconds]
Yan has joined #ruby
<workmad3>
rtpg: ruby looks and feels nicer when passing around blocks rather than whole method objects
ando has quit [Remote host closed the connection]
mojjojo has joined #ruby
mojjojo has quit [Client Quit]
ando has joined #ruby
<rtpg>
jeez, sorry. considering that passing around functions with just a name is present in a lot of other languages, it's not insane to assume it exists in ruby
<workmad3>
rtpg: I wasn't having a go, more giving a pointer for the future
nateberkopec has quit [Ping timeout: 248 seconds]
mojjojo has joined #ruby
<workmad3>
rtpg: that said though... you know that foo.bar calls the 'bar' method on foo, yes?
ando has quit [Remote host closed the connection]
sergicles has joined #ruby
<workmad3>
rtpg: so out of curiosity, how would you expect the interpreter to distinguish that from when you wanted the method object instead? :)
ando has joined #ruby
gja has joined #ruby
ahmedelgabri has quit [Remote host closed the connection]
<apeiros>
rtpg: nobody said it didn't exist. I even gave you three ways to do it.
<rtpg>
yeah I was thinking about that too, there could have been a symbol to reference the function instead of a function call though
<apeiros>
rtpg: but that doesn't invalidate what I said.
<rtpg>
like how lisp's backticks indicate symbols
<apeiros>
ruby has its own idioms. if you want to use LANGUAGE_X' idioms instead, then by all means, use LANGUAGE_X, not ruby.
toastynerd has quit [Ping timeout: 272 seconds]
joesavage has quit [Quit: Page closed]
jlast has joined #ruby
mengu has quit [Remote host closed the connection]
psyprus has quit [Ping timeout: 240 seconds]
soobus has joined #ruby
ahmedelgabri has joined #ruby
drumusician has joined #ruby
jlast has quit [Ping timeout: 260 seconds]
vlad_starkov has quit [Read error: Connection reset by peer]
brandon has joined #ruby
brandon is now known as Guest17428
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
vlad_starkov has joined #ruby
shaunbaker has joined #ruby
Hanmac has joined #ruby
fgo has joined #ruby
mavcunha has joined #ruby
OdNairy has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
joonty has quit [Read error: Operation timed out]
gja has quit [Quit: This computer has gone to sleep]
joonty has joined #ruby
charliesome has joined #ruby
psyprus has joined #ruby
Macaveli has joined #ruby
ando has quit [Remote host closed the connection]
Hanmac1 has quit [Ping timeout: 264 seconds]
ando has joined #ruby
w4pm has joined #ruby
gja has joined #ruby
ando has quit [Remote host closed the connection]
ando has joined #ruby
foooobear has joined #ruby
yasushi has quit [Remote host closed the connection]
h_kon has quit [Remote host closed the connection]
Hanmac has quit [Ping timeout: 265 seconds]
fgo has quit [Ping timeout: 264 seconds]
gja has quit [Client Quit]
Macaveli has quit [Client Quit]
h_kon has joined #ruby
h_kon has quit [Remote host closed the connection]
Macaveli has joined #ruby
mansi has joined #ruby
cbetta is now known as cbetta_afk
gigetoo has quit [Remote host closed the connection]
phipes has quit [Remote host closed the connection]
drumusician has joined #ruby
horofox_ has quit [Quit: horofox_]
gja has joined #ruby
psyl0n has joined #ruby
psyl0n has joined #ruby
psyl0n has quit [Changing host]
psyprus has quit [Ping timeout: 240 seconds]
Macaveli has quit [Ping timeout: 260 seconds]
dukz has quit [Remote host closed the connection]
psyprus has joined #ruby
h_kon has joined #ruby
Macaveli has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
drumusician has quit [Read error: Operation timed out]
wallerdev has quit [Quit: wallerdev]
phansch_ has joined #ruby
phansch has quit [Ping timeout: 264 seconds]
brotspinne has quit [Remote host closed the connection]
dagobah has quit [Remote host closed the connection]
dagobah has joined #ruby
marcgg has joined #ruby
psyprus has quit [Ping timeout: 240 seconds]
camilasan has quit [Remote host closed the connection]
psyprus has joined #ruby
camilasan has joined #ruby
camilasan has quit [Read error: Connection reset by peer]
bigbadbear has joined #ruby
ferr has quit [Ping timeout: 276 seconds]
marcgg_ has quit [Ping timeout: 265 seconds]
asmodlol has quit [Remote host closed the connection]
brtdv has quit []
brennanMKE has joined #ruby
zipper has joined #ruby
sensen has quit [Quit: leaving]
wildroman2 has quit [Remote host closed the connection]
brtdv has joined #ruby
nateberkopec has joined #ruby
bigbadbear has quit [Ping timeout: 260 seconds]
wildroman2 has joined #ruby
wildroman2 has quit [Remote host closed the connection]
lyanchih has quit [Ping timeout: 248 seconds]
psyl0n has quit [Read error: Connection reset by peer]
wildroman2 has joined #ruby
psyl0n has joined #ruby
Yan has quit [Ping timeout: 264 seconds]
camilasan has joined #ruby
toastynerd has joined #ruby
brennanMKE has quit [Ping timeout: 260 seconds]
eka has joined #ruby
LiohAu has joined #ruby
nateberkopec has quit [Ping timeout: 276 seconds]
kitak has quit [Remote host closed the connection]
toastynerd has quit [Ping timeout: 260 seconds]
hiall has joined #ruby
tesuji_ has joined #ruby
tesuji has quit [Ping timeout: 276 seconds]
jlast has joined #ruby
danijoo_ has quit [Read error: Connection reset by peer]
danijoo has joined #ruby
hl has joined #ruby
phansch_ has quit [Ping timeout: 264 seconds]
zipper has quit [Quit: Lost terminal]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
matti__ is now known as matti
jlast has quit [Ping timeout: 260 seconds]
matti has quit [Changing host]
matti has joined #ruby
Amnesia has left #ruby [#ruby]
phansch has joined #ruby
zipper has joined #ruby
Speed has joined #ruby
rdark has quit [Ping timeout: 272 seconds]
krz has quit [Ping timeout: 265 seconds]
niop has joined #ruby
rdark has joined #ruby
<niop>
hi, to get subclasses of a class, i'm using: ObjectSpace.each_object(Class).select { |klass| klass < self }, but the returned classes, printed like #<Class:0x173ef3f>, do not instantiate with .new, giving an error "TypeError: wrong instance allocation". any idea why?
psyprus has quit [Ping timeout: 240 seconds]
charliesome has joined #ruby
pskosinski has quit [Quit: Til rivido Idisti!]
brtdv has quit []
drumusician has joined #ruby
<apeiros>
niop: looks like a singleton class of an anonymous class
<apeiros>
niop: also I hope you don't use ObjectSpace.each_object for production code…
clamstar has joined #ruby
Bumptious has quit [Remote host closed the connection]
<apeiros>
you referring to "traversing the whole object space"?
pranny has joined #ruby
carraroj has joined #ruby
rootshift has quit [Quit: rootshift]
dEPy has quit [Quit: Computer has gone to sleep.]
dEPy has joined #ruby
LinearInterpol has joined #ruby
<niop>
apologies.. digressed on that line. it was referring to inherited, which you clarified.
dkamioka has joined #ruby
<niop>
and it worked. the inherited callback. wonderful.
alexherbo2 has joined #ruby
cha1tanya has quit [Ping timeout: 264 seconds]
krz has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
Guest93929 has joined #ruby
drumusician has quit [Ping timeout: 264 seconds]
<apeiros>
great
carraroj has quit [Ping timeout: 260 seconds]
wildroman2 has quit [Remote host closed the connection]
autumn has quit [Remote host closed the connection]
brotspinne has joined #ruby
larissa has joined #ruby
shaunbaker has quit [Remote host closed the connection]
cj3kim has joined #ruby
troessner has quit [Quit: Leaving]
noop has quit [Ping timeout: 264 seconds]
doodlehaus has joined #ruby
shime has joined #ruby
ggherdov has quit [Changing host]
ggherdov has joined #ruby
ggherdov has quit [Changing host]
ggherdov has joined #ruby
brotspinne has quit [Ping timeout: 272 seconds]
cha1tanya has joined #ruby
cha1tanya has quit [Changing host]
cha1tanya has joined #ruby
cj3kim has quit [Ping timeout: 260 seconds]
mojjojo has quit [Quit: mojjojo]
krz has quit [Ping timeout: 248 seconds]
tkuchiki has quit [Remote host closed the connection]
tkuchiki has joined #ruby
drumusician has joined #ruby
doodlehaus has quit [Remote host closed the connection]
brennanMKE has joined #ruby
nateberkopec has joined #ruby
blarghmatey has joined #ruby
brotspinne has joined #ruby
vlad_starkov has joined #ruby
tkuchiki has quit [Ping timeout: 260 seconds]
tesuji_ has quit [Read error: Connection reset by peer]
toastynerd has joined #ruby
brennanMKE has quit [Ping timeout: 260 seconds]
krz has joined #ruby
mehlah has quit [Quit: Leaving...]
nateberkopec has quit [Ping timeout: 248 seconds]
dkamioka has quit [Remote host closed the connection]
mehlah has joined #ruby
mehlah has quit [Client Quit]
arietis has quit [Quit: Computer has gone to sleep.]
mojjojo has joined #ruby
dkamioka has joined #ruby
toastynerd has quit [Ping timeout: 260 seconds]
<Wixy>
Hello guys
Soda has joined #ruby
claymore has joined #ruby
<Wixy>
I'm trying to use ActiveRecord standalone, so I included "active_record", created the models, etc. Still, it says "validates" function doesn't exist.. any idea?
zipper has quit [Ping timeout: 272 seconds]
noop has joined #ruby
krz has quit [Ping timeout: 265 seconds]
clamstar has quit [Quit: Computer has gone to sleep.]
dkamioka has quit [Ping timeout: 265 seconds]
jlast has joined #ruby
nari has joined #ruby
ConstantineXVI has quit [Ping timeout: 240 seconds]
zipper has joined #ruby
wildroman2 has joined #ruby
wildroman2 has quit [Remote host closed the connection]
jlast has quit [Ping timeout: 260 seconds]
wildroman2 has joined #ruby
psyprus has quit [Ping timeout: 240 seconds]
luckyruby has joined #ruby
ws2k3 has quit [Remote host closed the connection]
<luckyruby>
msg.gsub(/<ccnum>\d+<\/ccnum>/,"<ccnum>[FILTERED]</ccnum>").gsub(/<cc_cvv>\d+<\/cc_cvv>/,"<cc_cvv>[FILTERED]</cc_cvv>") Is there a more efficient way to accomplish this?
shaunbaker has joined #ruby
simoz13 has joined #ruby
lkba has joined #ruby
colonolGron has joined #ruby
LinearInterpol has quit [Ping timeout: 276 seconds]
apeiros has quit [Remote host closed the connection]
camilasa_ has joined #ruby
<Wixy>
DouweM, it seems to be fine, right?
camilasan has quit [Read error: Connection reset by peer]
<DouweM>
Wixy: yeah
RaCx has joined #ruby
ffranz has joined #ruby
dEPy_ has joined #ruby
shime has quit [Ping timeout: 245 seconds]
ahmedelgabri has joined #ruby
thecreators has joined #ruby
jerius has joined #ruby
Tarential has quit [Excess Flood]
Tarential has joined #ruby
bMalum has joined #ruby
mojjojo has joined #ruby
joaoh82 has joined #ruby
burlyscudd has quit [Quit: Leaving.]
ItSANgo has quit [Quit: Leaving...]
robbyoconnor has quit [Read error: Operation timed out]
ando has quit [Remote host closed the connection]
ando has joined #ruby
doodlehaus has joined #ruby
yan_ has quit [Ping timeout: 262 seconds]
ws2k3 has joined #ruby
ws2k3 has quit [Excess Flood]
ws2k3 has joined #ruby
soobus has joined #ruby
Mars__ has quit [Remote host closed the connection]
ando has quit [Remote host closed the connection]
TejasDinkar has joined #ruby
ando has joined #ruby
Mars__ has joined #ruby
<zxd>
what;s the command to test ruby syntax
kitak has joined #ruby
ando has quit [Remote host closed the connection]
<shevy>
guys
ando has joined #ruby
<shevy>
I just realized something
<txdv>
ruby -c
<txdv>
zxd: man ruby
<shevy>
Snowden is now more popular than he would have ever been without that information
peneconleche has joined #ruby
TejasDinkar has quit [Client Quit]
<txdv>
without what information
joaoh82 has quit [Ping timeout: 265 seconds]
kitak has quit [Remote host closed the connection]
<shevy>
txdv well, "privileged information" in general. information not for the general public. secret information. i.e. NSA/CIA spying on everyone
<shevy>
imagine if he would have just continued to work like he did
<shevy>
noone would have known him in 100 years!
<txdv>
yeah that is a trivial thing to notice
jlebrech has joined #ruby
<txdv>
he also wouldn't have gone to russia
freebs has joined #ruby
Heskie has joined #ruby
<shevy>
true
<shevy>
though I think he was first in Hong Kong?
krz has quit [Ping timeout: 264 seconds]
Mars__ has quit [Read error: Operation timed out]
nowthatsamatt has joined #ruby
<txdv>
and I wouldn't have switched to firefox from chromium browser
<shevy>
hehe
<shevy>
well chromium is damn fast
<shevy>
but google goes so on my nerves, I want it to stop growing
<txdv>
i have to find an alternative to gmail
<shevy>
yeah :(
<txdv>
i have access to 6 servers so a distributed mail app that I can control would be nice
<shevy>
I hate how they connect youtube comments to g+, I dont want need or use g+
klcant102 has joined #ruby
<txdv>
who doesn't
mavcunha has quit [Ping timeout: 248 seconds]
gja has joined #ruby
jlast has joined #ruby
<TMM>
Hi all, I have a just rewritten a rest api and created a test suite for the new code using rack-test, I was wondering if there was some mechanical way of transforming my rack-test based rspec tests to run against a real http server so I can verify my testsuite against the old implementation
jlast has quit [Remote host closed the connection]
mansi has joined #ruby
jlast has joined #ruby
ahmedelgabri has quit [Remote host closed the connection]
gja has quit [Client Quit]
aryaching has quit [Read error: Connection reset by peer]
Neomex has joined #ruby
shime has joined #ruby
aryaching has joined #ruby
drumusician has joined #ruby
snath has quit [Ping timeout: 264 seconds]
jamesaanderson has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
workmad3 has quit [Ping timeout: 260 seconds]
toastynerd has joined #ruby
brennanMKE has joined #ruby
Brolen has joined #ruby
mengu has quit [Remote host closed the connection]
mavcunha has joined #ruby
Megtastique has joined #ruby
zoscoy has joined #ruby
ItSANgo has joined #ruby
drumusician has quit [Remote host closed the connection]
tkuchiki has joined #ruby
drumusician has joined #ruby
dblessing has joined #ruby
strk has joined #ruby
ando has quit [Remote host closed the connection]
toastynerd has quit [Ping timeout: 264 seconds]
ando has joined #ruby
brennanMKE has quit [Ping timeout: 276 seconds]
simoz110 has joined #ruby
geekbri has joined #ruby
asobrasil has joined #ruby
jerius has quit []
mansi has quit [Remote host closed the connection]
timonv_ has quit [Remote host closed the connection]
ando has quit [Remote host closed the connection]
ando has joined #ruby
burlyscudd has quit [Quit: Leaving.]
Hanmac has joined #ruby
travisjeffery has joined #ruby
ando has quit [Remote host closed the connection]
ando has joined #ruby
<mrnugget>
Hey there! I need to save some values in a hash and use date objects as keys. That performed okay but got me into trouble with timezones and key collisions. I then used `<date_object>.inspect` as the keys for the hash, which seems to slow things down. Any ideas as to what the fastest way is to uniquely identify date objects?
zipper has quit [Ping timeout: 264 seconds]
sophomorical has quit [Ping timeout: 240 seconds]
ando has quit [Remote host closed the connection]
rixth_ has quit [Quit: Computer has gone to sleep.]
ando has joined #ruby
timonv has joined #ruby
maloik has quit [Remote host closed the connection]
bigbadbear has quit [Ping timeout: 260 seconds]
maloik has joined #ruby
gyre007 has joined #ruby
shedd has joined #ruby
zipper has joined #ruby
Hanmac1 has quit [Ping timeout: 276 seconds]
psyprus has joined #ruby
ando has quit [Write error: Broken pipe]
RaCx has quit [Ping timeout: 269 seconds]
ando has joined #ruby
mark_locklear has joined #ruby
joaoh82 has joined #ruby
wildroman2 has joined #ruby
wildroman2 has quit [Remote host closed the connection]
reactormonk has joined #ruby
wildroman2 has joined #ruby
jedimind has joined #ruby
h_kon has quit [Remote host closed the connection]
sassamo has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<havenwood>
mrnugget: How about using the instances of Date themselves as keys?
<mrnugget>
havenwood: that's what I tried at first. But it can lead to problems with timezones.
<workmad3>
mrnugget: always work in utc
ckinni_ has quit [Read error: Connection reset by peer]
<havenwood>
mrnugget: ah
fijimunkii has quit [Ping timeout: 289 seconds]
<workmad3>
mrnugget: e.g hsh[some_date.utc] as your key
joaoh82 has quit [Ping timeout: 248 seconds]
mary5030 has quit [Remote host closed the connection]
<mrnugget>
workmad3: the timezone is part of the information we need to preserve here
zoscoy has joined #ruby
mary5030 has joined #ruby
Dwarf has joined #ruby
mlpinit has quit [Ping timeout: 260 seconds]
peneconleche is now known as peneconleche|awa
<workmad3>
mrnugget: hmm... maybe use the iso8601 string as the hash key then?
<workmad3>
hsh[some_date.iso8601]
<IceDragon>
just use an Array :3
sergicles has quit [Quit: sergicles]
zoscoy has quit [Client Quit]
<workmad3>
IceDragon: how does that help in looking stuff up? :P
<IceDragon>
I have no idea whats going on
<IceDragon>
;3
<workmad3>
IceDragon: :)
<IceDragon>
whats the problem exactly?
shredding has joined #ruby
23LAAS91H is now known as adam12
Brolen has quit [Quit: Brolen]
soobus has joined #ruby
Hanmac1 has joined #ruby
<Hanmac1>
or use some_date.to_i ;D
brennanMKE has joined #ruby
sophomorical has joined #ruby
<mrnugget>
IceDragon: I need to cache some values, mapping them to dates (and sometimes simple ints). It seems like hash[date] is faster than hash[date.inspect], but the former leads to problems with the timezones.
<workmad3>
Hanmac1: that's only defined on Time :)
<IceDragon>
someone shoot me: I'm about to use sudo inside a ruby app with the password exposed ;x
<Hanmac1>
dam
<waxjar>
does Date not work with timezones?
<IceDragon>
I wouldn't use date as the key
<IceDragon>
as it varies too much
Hanmac has quit [Ping timeout: 248 seconds]
<IceDragon>
can't date be collapsed to a simple integer?
<zxd>
how to check if node['platform_family'] includes either "rhel" "fedora" or "debian" ,then run code ?
<IceDragon>
>> Date.now.to_i
shedd has quit [Remote host closed the connection]
petey has quit [Remote host closed the connection]
lethjakman has joined #ruby
Lingo has joined #ruby
Advocation has quit [Quit: Advocation]
mneorr has joined #ruby
<havenwood>
zxd: your earlier example used a local variable for `array`, so if you tried to call a method on it before defining it you would get a NameError: undefined local variable or method
zigomir has joined #ruby
tharindu has joined #ruby
tylersmith has quit [Remote host closed the connection]
Advocation has joined #ruby
johnmilton has joined #ruby
<havenwood>
zxd: instance variables are `nil` when undefined, unlike local variables, so you'd be able to call the method but get a: NoMethodError: undefined method `insert' for nil:NilClass
jlast_ has quit [Remote host closed the connection]
petey has joined #ruby
pel_daniel has joined #ruby
n00batirc has joined #ruby
slash_ni1k is now known as slash_part
slash_part has quit [Changing host]
slash_part has joined #ruby
nateberkopec has joined #ruby
jlast has joined #ruby
wildroman2 has quit [Remote host closed the connection]
fgo has quit [Ping timeout: 265 seconds]
jlast has quit [Remote host closed the connection]
momomomomo has quit [Quit: momomomomo]
jlast has joined #ruby
RaCx has quit [Quit: Computer has gone to sleep.]
claymore has quit [Ping timeout: 276 seconds]
rdark has quit [Ping timeout: 252 seconds]
bennyboobooboo has quit [Remote host closed the connection]
ckinni has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
weeeems is now known as weems
weems has quit [Changing host]
weems has joined #ruby
<zxd>
is there a way to push elements with this %w.push{foo, foo2, foo3 etc .. }
<zxd>
is this valid
Xeago has quit [Remote host closed the connection]
colonolGron has joined #ruby
ando_ has joined #ruby
yasushi has joined #ruby
bennyboobooboo has quit [Ping timeout: 260 seconds]
<havenwood>
zxd: no, the %w is going to use the . as a delemiter, which happens to close with the first dot following etc but i'm sure not what you meant to happen
<DouweM>
zxd: no, that's not valid. what are you trying to do?
aganov has quit [Remote host closed the connection]
meatherl_ has quit [Remote host closed the connection]
<havenwood>
>> %w.foo bar baz. #=> ["foo", "bar", "baz"]
shaunbaker has joined #ruby
<zxd>
trying to create a bunch of case statements and in each when insert more values to an array
<pontiki_>
you send the push to an array-like object
meatherly has quit [Ping timeout: 272 seconds]
mneorr has quit [Remote host closed the connection]
Wolland has quit [Remote host closed the connection]
sambao21 has quit [Quit: Computer has gone to sleep.]
Xiti has quit [Read error: Connection reset by peer]
nuck has quit [Ping timeout: 246 seconds]
Alina-malina has quit [Ping timeout: 246 seconds]
culturelabs has quit [Ping timeout: 246 seconds]
Sp4rKy has quit [Ping timeout: 246 seconds]
gomix has quit [Ping timeout: 246 seconds]
araujo has quit [Ping timeout: 246 seconds]
gtc has quit [Ping timeout: 246 seconds]
yxhuvud has quit [Ping timeout: 246 seconds]
Xiti has joined #ruby
nfk has quit [Remote host closed the connection]
agent_white has joined #ruby
shredding has quit [Quit: shredding]
psyl0n has joined #ruby
<agent_white>
Mornin!
Alina-malina has joined #ruby
PLejeck is now known as nuck
Alina-malina has quit [Changing host]
Alina-malina has joined #ruby
culturelabs_ is now known as culturelabs
colonolGron has quit [Quit: Lost terminal]
Neomex has quit [Remote host closed the connection]
Neomex has joined #ruby
cj3kim_ has joined #ruby
nowthatsamatt has quit [Quit: nowthatsamatt]
Spami has joined #ruby
travisjeffery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
sambao21 has joined #ruby
rixth_ has quit [Quit: Computer has gone to sleep.]
ambushsabre has joined #ruby
zipper has quit [Quit: leaving]
barratt has quit [Quit: Leaving...]
araujo has joined #ruby
b00stfr31k has quit [Quit: leaving]
cj3kim has quit [Ping timeout: 265 seconds]
b00stfr3ak has joined #ruby
danijoo has quit [Read error: Connection reset by peer]
danijoo has joined #ruby
momomomomo has joined #ruby
rootshift has joined #ruby
mlpinit_ has joined #ruby
mansi_ has joined #ruby
shadoi has joined #ruby
Neomex has quit [Ping timeout: 252 seconds]
mudmaster has joined #ruby
joshwines_ has joined #ruby
kapowaz_ has joined #ruby
shaileshg_____ has joined #ruby
flubba has quit [Remote host closed the connection]
pwh has joined #ruby
klaut has joined #ruby
peregrine81_ has joined #ruby
Silvia has joined #ruby
Heskie has quit []
justinmcp_ has joined #ruby
vlad_starkov has joined #ruby
andrewstewart_ has joined #ruby
frem_ has joined #ruby
crashx has quit [Quit: crashx]
maroloccio2 has quit [Quit: WeeChat 0.4.2]
roolo has quit [Remote host closed the connection]
mneorr has joined #ruby
hoelzro_ has joined #ruby
gazoombo_ has joined #ruby
dziga_ has joined #ruby
JoeTheGuest__ has joined #ruby
poikon_ has joined #ruby
Jakee`_ has joined #ruby
adambeynon_ has joined #ruby
ckrailo__ has joined #ruby
blooberr__ has joined #ruby
dioms__ has joined #ruby
zeade has joined #ruby
tjaco has joined #ruby
mmitchel_ has joined #ruby
mattyohe_ has joined #ruby
klaut has quit [Ping timeout: 252 seconds]
gja has quit [Quit: This computer has gone to sleep]
RKornmeyer has joined #ruby
Astralum has quit [Ping timeout: 264 seconds]
enebo has quit [Quit: enebo]
lethjakman has joined #ruby
noop has joined #ruby
ddv_ has joined #ruby
akitada_ has joined #ruby
ghr has quit [Quit: Computer has gone to sleep.]
senayar has joined #ruby
karnowski__ has joined #ruby
wallerdev has joined #ruby
Sthebig_ has joined #ruby
Kruppe- has joined #ruby
artgoeshere has quit [Ping timeout: 240 seconds]
kapowaz has quit [Ping timeout: 240 seconds]
joshwines has quit [Ping timeout: 240 seconds]
peregrine81 has quit [Ping timeout: 240 seconds]
Paradox has quit [Ping timeout: 240 seconds]
shaileshg____ has quit [Ping timeout: 240 seconds]
Nightmare has quit [Ping timeout: 240 seconds]
zz_jrhorn424 has quit [Ping timeout: 240 seconds]
karnowski_ has quit [Ping timeout: 240 seconds]
JoeTheGuest_ has quit [Ping timeout: 240 seconds]
andrewstewart has quit [Ping timeout: 240 seconds]
mbff has quit [Ping timeout: 240 seconds]
DarkFoxDK has quit [Ping timeout: 240 seconds]
flagg0204 has quit [Ping timeout: 240 seconds]
Guest60081 has quit [Ping timeout: 240 seconds]
alol has quit [Ping timeout: 240 seconds]
mjmac has quit [Ping timeout: 240 seconds]
St_Marx has quit [Ping timeout: 240 seconds]
mudmaste_ has quit [Ping timeout: 240 seconds]
mansi has quit [Ping timeout: 240 seconds]
mlpinit has quit [Ping timeout: 240 seconds]
dmarr has quit [Ping timeout: 240 seconds]
xiphias has quit [Ping timeout: 240 seconds]
aetaric has quit [Ping timeout: 240 seconds]
blooberr_ has quit [Ping timeout: 240 seconds]
dziga has quit [Ping timeout: 240 seconds]
seich- has quit [Ping timeout: 240 seconds]
culturelabs has quit [Ping timeout: 240 seconds]
BizarreCake has quit [Ping timeout: 240 seconds]
allaire has joined #ruby
drumusician has quit [Ping timeout: 240 seconds]
sophomorical has quit [Ping timeout: 240 seconds]
kenichi has quit [Ping timeout: 240 seconds]
akitada has quit [Ping timeout: 240 seconds]
Mon_Ouie has quit [Ping timeout: 240 seconds]
octarine has quit [Ping timeout: 240 seconds]
alol_ has joined #ruby
Kruppe has quit [Ping timeout: 240 seconds]
aspiers has quit [Ping timeout: 240 seconds]
bedouin has quit [Ping timeout: 240 seconds]
hoelzro has quit [Ping timeout: 240 seconds]
justinmcp has quit [Ping timeout: 240 seconds]
drPoggs has quit [Ping timeout: 240 seconds]
Alina-malina has quit [Ping timeout: 240 seconds]
abra has quit [Ping timeout: 240 seconds]
gazoombo has quit [Ping timeout: 240 seconds]
epochwolf has quit [Ping timeout: 240 seconds]
ConstantineXVI has quit [Ping timeout: 240 seconds]
sharms has quit [Ping timeout: 240 seconds]
poutine has quit [Ping timeout: 240 seconds]
dioms_ has quit [Ping timeout: 240 seconds]
ckrailo_ has quit [Ping timeout: 240 seconds]
Sthebig has quit [Ping timeout: 240 seconds]
RKornmeyer_ has quit [Ping timeout: 240 seconds]
ddv has quit [Ping timeout: 240 seconds]
utkarsh has quit [Ping timeout: 240 seconds]
adambeynon has quit [Ping timeout: 240 seconds]
frem has quit [Ping timeout: 240 seconds]
mattyohe has quit [Ping timeout: 240 seconds]
poikon has quit [Ping timeout: 240 seconds]
rurban has quit [Ping timeout: 240 seconds]
blo has quit [Ping timeout: 240 seconds]
senayar_ has quit [Ping timeout: 240 seconds]
Jakee` has quit [Ping timeout: 240 seconds]
xiphias has joined #ruby
JoeTheGuest__ is now known as JoeTheGuest_
zz_jrhorn424 has joined #ruby
epochwolf has joined #ruby
dmarr has joined #ruby
kenichi has joined #ruby
aetaric has joined #ruby
Nightmare has joined #ruby
blo has joined #ruby
poutine has joined #ruby
DarkFoxDK has joined #ruby
artgoeshere has joined #ruby
utkarsh has joined #ruby
joshwines_ is now known as joshwines
kapowaz_ is now known as kapowaz
peregrine81_ is now known as peregrine81
epochwolf has quit [Changing host]
epochwolf has joined #ruby
xiphias has quit [Changing host]
xiphias has joined #ruby
zipper has joined #ruby
Sthebig_ is now known as Sthebig
andrewstewart_ is now known as andrewstewart
Nightmare has quit [Changing host]
Nightmare has joined #ruby
mbff_ has joined #ruby
BizarreCake has joined #ruby
karnowski__ is now known as karnowski_
aspiers_ has joined #ruby
psyprus has joined #ruby
RaCx has quit [Quit: Computer has gone to sleep.]
Alina-malina has joined #ruby
flagg0204 has joined #ruby
sophomorical has joined #ruby
mjmac has joined #ruby
Mon_Ouie has joined #ruby
ddv_ is now known as ddv
frem_ is now known as frem
blo has quit [Changing host]
blo has joined #ruby
Alina-malina has quit [Changing host]
Alina-malina has joined #ruby
drPoggs has joined #ruby
sharms has joined #ruby
dziga_ is now known as dziga
mattyohe_ is now known as mattyohe
zipper is now known as Guest27396
RKornmeyer is now known as RKornmeyer_
blooberr__ is now known as blooberr_
Jakee`_ is now known as Jakee`
ckrailo__ is now known as ckrailo_
Mon_Ouie has quit [Changing host]
Mon_Ouie has joined #ruby
gazoombo_ is now known as gazoombo
bedouin has joined #ruby
seich- has joined #ruby
aspires has joined #ruby
culturelabs_ has joined #ruby
poikon_ is now known as poikon
akitada_ is now known as akitada
rdark has quit [Quit: leaving]
octarine has joined #ruby
St_Marx has joined #ruby
rurban has joined #ruby
frode15243 has joined #ruby
frode15243 has quit [Changing host]
frode15243 has joined #ruby
ambushsabre has quit [Quit: rip]
tylersmith has joined #ruby
m00nlight__ has quit [Write error: Broken pipe]
RaCx has joined #ruby
LinearInterpol has joined #ruby
m00nlight__ has joined #ruby
LinearInterpol has quit [Read error: Connection reset by peer]
CaptainJet has joined #ruby
tylersmith has quit [Remote host closed the connection]
LinearInterpol has joined #ruby
psyprus has quit [Client Quit]
sambao21 has quit [Quit: Computer has gone to sleep.]
ConstantineXVI has joined #ruby
fijimunkii has joined #ruby
Wolland has joined #ruby
clamstar has quit [Ping timeout: 248 seconds]
zigomir has joined #ruby
superscott[8] has joined #ruby
Paradox has joined #ruby
abra has joined #ruby
mansi_ has quit [Remote host closed the connection]
cj3kim_ has quit [Remote host closed the connection]
phoenixHollywood has quit [Quit: leaving]
aef has quit [Remote host closed the connection]
aef has joined #ruby
subbyyy_ has joined #ruby
LinearInterpol is now known as {}
{} is now known as LinearInterpol
nfk has joined #ruby
nfk has joined #ruby
nfk has quit [Changing host]
lukec has joined #ruby
<ericwood>
oh awesome gsub! returns nil on no match, not the original string
<ericwood>
so much for chaining it lawl
cj3kim has joined #ruby
nfk has quit [Client Quit]
Guest27396 has quit [Quit: leaving]
tcstar has quit [Ping timeout: 272 seconds]
bilbo_swaggins has quit [Quit: Leaving]
zipper_ has joined #ruby
mansi_ has joined #ruby
sree has joined #ruby
reset has joined #ruby
zipper_ has quit [Client Quit]
alexherbo2 has joined #ruby
gomix1 is now known as gomix
troyready has quit [Read error: Operation timed out]
zipper_ has joined #ruby
gomix has quit [Changing host]
gomix has joined #ruby
zipper_ is now known as zipper
clamstar has joined #ruby
saarinen has joined #ruby
bennyboobooboo has quit [Remote host closed the connection]
fijimunk1i has joined #ruby
cj3kim has quit [Remote host closed the connection]
shadoi has quit [Quit: Leaving.]
klaut has joined #ruby
tylersmith has joined #ruby
danshultz has joined #ruby
baschtmobil has quit [Ping timeout: 248 seconds]
blackmes1 has joined #ruby
ahmedelgabri has quit []
Urocyon is now known as stephenfiggins
blackmesa has quit [Ping timeout: 240 seconds]
petey is now known as petey_
mrnugget has joined #ruby
ctp has joined #ruby
bennyboobooboo has joined #ruby
maroloccio has joined #ruby
stephenfiggins is now known as sfiggins
aspiers_ is now known as aspiers
mojjojo has quit [Quit: mojjojo]
tjaco has quit [Read error: Connection reset by peer]
IceDragon has quit [Ping timeout: 259 seconds]
heidi has joined #ruby
drumusician has joined #ruby
cj3kim has joined #ruby
danshultz has quit [Ping timeout: 260 seconds]
utkarsh has quit [Ping timeout: 240 seconds]
poutine has quit [Ping timeout: 240 seconds]
aetaric has quit [Ping timeout: 240 seconds]
Paradox has quit [Ping timeout: 240 seconds]
ConstantineXVI has quit [Ping timeout: 240 seconds]
DarkFoxDK has quit [Ping timeout: 240 seconds]
kenichi has quit [Ping timeout: 240 seconds]
artgoeshere has quit [Ping timeout: 240 seconds]
xiphias has quit [Ping timeout: 240 seconds]
fijimunkii has quit [Ping timeout: 240 seconds]
flagg0204 has quit [Ping timeout: 240 seconds]
Nightmare has quit [Ping timeout: 240 seconds]
epochwolf has quit [Ping timeout: 240 seconds]
zipper has quit [Ping timeout: 240 seconds]
St_Marx has quit [Ping timeout: 240 seconds]
octarine has quit [Ping timeout: 240 seconds]
drPoggs has quit [Ping timeout: 240 seconds]
seich- has quit [Ping timeout: 240 seconds]
sophomorical has quit [Ping timeout: 240 seconds]
sharms has quit [Ping timeout: 240 seconds]
mbff_ has quit [Ping timeout: 240 seconds]
blo has quit [Ping timeout: 240 seconds]
dmarr has quit [Ping timeout: 240 seconds]
mjmac has quit [Ping timeout: 240 seconds]
sophomorical has joined #ruby
DarkFoxDK has joined #ruby
sharms has joined #ruby
drPoggs has joined #ruby
seich- has joined #ruby
kenichi has joined #ruby
aetaric has joined #ruby
utkarsh has joined #ruby
[_aeris_] is now known as _aeris_
artgoeshere has joined #ruby
mjmac has joined #ruby
mbff_ has joined #ruby
xiphias has joined #ruby
Nightmare has joined #ruby
xiphias has quit [Changing host]
xiphias has joined #ruby
epochwolf has joined #ruby
octarine has joined #ruby
epochwolf has quit [Changing host]
epochwolf has joined #ruby
mikeg has joined #ruby
flagg0204 has joined #ruby
blo has joined #ruby
blo has quit [Changing host]
blo has joined #ruby
psyl0n has quit [Remote host closed the connection]
poutine has joined #ruby
ConstantineXVI has joined #ruby
IceDragon has joined #ruby
dmarr has joined #ruby
Paradox has joined #ruby
<mikeg>
I have some json being passed in to a script from something that doesn't understand json. so it's coming through like a string with all kinds of extra crap. this is what the string looks like: "\"{\"cluster_name\": \"Test\"}\""
zxd has quit [Ping timeout: 288 seconds]
<mikeg>
I'm trying to clean it up so it can be treated like json but can't seem to figure out how
asmodlol has joined #ruby
<apeiros>
mikeg: you're looking at an inspect as it seems
interactionjaxsn has quit [Remote host closed the connection]
pel_daniel has quit [Ping timeout: 272 seconds]
rixth_ has joined #ruby
<mikeg>
apeiros: I don't know what you mean by that
sinm has joined #ruby
<apeiros>
i.e., that string almost certainly has none of those backslashes in it. they're there because inspect prints strings the way you'd have to write them in source.
<apeiros>
mikeg: try `puts '"'.inspect` in irb
<mikeg>
right. so this is what it looks like with puts
<apeiros>
or just '"'
<apeiros>
it'll return "\""
petey_ has quit [Remote host closed the connection]
<mikeg>
right
St_Marx has joined #ruby
RaCx has quit [Quit: Computer has gone to sleep.]
<mikeg>
so this is what that string looks like with "puts" "{"cluster_name": "Test"}"
<mikeg>
I basically just need to strip out the outer "
petey_ has joined #ruby
<waxjar>
string[1..-2]
Kar- has joined #ruby
<mikeg>
sweet waxjar. that does it. can you tell me what that's called so I can read up on it?
<waxjar>
it's String#[], i think people call it a slice
<mikeg>
ok. thx again
iliketurtles has joined #ruby
iliketurtles has quit [Excess Flood]
ckinni has quit [Ping timeout: 246 seconds]
interactionjaxsn has joined #ruby
nimitz has quit [Read error: Connection reset by peer]
tonni has joined #ruby
drumusician has quit [Remote host closed the connection]
lukec has quit [Quit: lukec]
momomomomo has quit [Quit: momomomomo]
<miah>
hai
petey_ has quit [Ping timeout: 245 seconds]
blackmesa has joined #ruby
drumusician has joined #ruby
maroloccio has quit [Quit: WeeChat 0.4.2]
mklappstuhl has joined #ruby
blackmes1 has quit [Ping timeout: 240 seconds]
DrShoggoth has joined #ruby
toastynerd has quit [Remote host closed the connection]
Targen has quit [Ping timeout: 276 seconds]
senayar has quit [Remote host closed the connection]
danman has joined #ruby
senayar has joined #ruby
mansi_ has quit [Remote host closed the connection]
mansi has joined #ruby
unixpro1970 has joined #ruby
iliketurtles has joined #ruby
rixth_ has quit [Quit: Computer has gone to sleep.]
burlyscudd has quit [Ping timeout: 252 seconds]
ambushsabre has joined #ruby
nanoyak has joined #ruby
rootshift has quit [Quit: rootshift]
Neomex has joined #ruby
Advocation has quit [Quit: Advocation]
p8952 has joined #ruby
andynu has joined #ruby
toastynerd has joined #ruby
iliketurtles has quit [Client Quit]
mansi has quit [Ping timeout: 245 seconds]
doodleha_ has joined #ruby
blandflakes has joined #ruby
olivier_bK has quit [Ping timeout: 272 seconds]
mansi has joined #ruby
fgo has joined #ruby
AntelopeSalad has quit [Ping timeout: 272 seconds]
Mars___ has joined #ruby
drumusician has quit [Remote host closed the connection]
burlyscudd has joined #ruby
RaCx has joined #ruby
caveat- has quit [Ping timeout: 245 seconds]
doodlehaus has quit [Ping timeout: 260 seconds]
Baluse has quit [Read error: Operation timed out]
caveat- has joined #ruby
iliketurtles has joined #ruby
iliketurtles has quit [Excess Flood]
fgo has quit [Ping timeout: 252 seconds]
iliketurtles has joined #ruby
sree has quit []
w4pm has joined #ruby
workmad3 has quit [Ping timeout: 260 seconds]
doodlehaus has joined #ruby
mneorr has quit [Remote host closed the connection]
mark_locklear has quit [Ping timeout: 272 seconds]
krawchyk has quit []
<canton7>
shevy, OptionParser is built in but IMO the worst of the 3. trollop's really nice, and slop's pretty good (and has decent subcommand support_
<waxjar>
pry is using slop, iirc
sharms has quit [Ping timeout: 240 seconds]
momomomomo has joined #ruby
<centrx>
benzrf, I think it is because Class.new specifically creates a "new class"
fgo has quit [Remote host closed the connection]
<benzrf>
so?
<benzrf>
this is absurdly magic
<waxjar>
clap is super simple, but pretty nice
<benzrf>
it is /letting a method see the context the result is being used in/!
sharms has joined #ruby
iliketurtles has quit [Quit: zzzzz…..]
<benzrf>
and only syntactically, at that!
tonni has joined #ruby
<apeiros>
benzrf: the method doesn't see it. technically neither does the class, as this happens "under the hood". and yes, it's ridiculously magic.
predator217 has quit [Ping timeout: 248 seconds]
chris613 has joined #ruby
<chris613>
Hey, is there any page that explains the differences and rationale for change between Ruby 1.8 and 1.9 for the expression foo[0] where foo is a string? In 1.8 this returns a fixnum of the ascii value of the first character. In 1.9 it returns the character itself
<chris613>
This is a bigger change than I'd expect for a minor release and was just wondering if there is some discussion about it I could read
<apeiros>
chris613: first off, 1.8 -> 1.9 is NOT a minor release
<apeiros>
or, was, as it's already 6 years (?) in the past
<chris613>
apeiros: Okay
<centrx>
benzrf, It's not magic, it's in C :)
<apeiros>
chris613: I think the change was due to too many being confused by String[x] returning an int
* chris613
is a semver fan. Major.Minor.Patch - but I realize not everyone subscribes to that :)
meatherly has quit [Remote host closed the connection]
<apeiros>
I think they switch to semver as of 2.1
<MrZYX>
^
<shevy>
chris613 I always specify the length, so rather than foo[0], I use foo[0,1]
mengu has joined #ruby
mengu has joined #ruby
mengu has quit [Changing host]
<apeiros>
still have to check that and potentially change the topic to remove the patchlevel.
meatherly has joined #ruby
<shevy>
ah you mean you need the fixnum. hmm... is ?variable still working?
timonv has quit [Remote host closed the connection]
<apeiros>
shevy: it works, but now returns a string too.
<apeiros>
which makes it quite pointless.
clamstar has quit [Quit: Computer has gone to sleep.]
<shevy>
hehehe
<apeiros>
also it's not ?variable, it's ?char ;-)
iliketurtles has quit [Client Quit]
troyready has quit [Ping timeout: 265 seconds]
<chris613>
shevy: Fair enough.
<shevy>
yeah it's been years since I last used it
Wixy has joined #ruby
sinm has joined #ruby
Wixy has quit [Changing host]
Wixy has joined #ruby
<apeiros>
chris613: .ord gives you the byte's value for binary encoded strings and the codepoint otherwise
<apeiros>
>> "h".ord
<shevy>
the bot is dead :(
<apeiros>
*sobs*
<apeiros>
eval-in… why're you so unreliable?
<chris613>
Thank you both for your input. We just solved a bug related to this and it intrigued me so I thought I'd go looking for the (now old) outrage over the confusion this must have caused
mansi_ has quit [Read error: Connection reset by peer]
meatherly has joined #ruby
mansi has quit [Read error: Connection reset by peer]
thumpba has quit [Client Quit]
mansi has joined #ruby
pel_daniel has left #ruby [#ruby]
Jake232 has joined #ruby
bsdbofh_ is now known as bsdbofh
Megtastique has quit []
iliketurtles has joined #ruby
thumpba has joined #ruby
lkba has quit [Ping timeout: 260 seconds]
Advocation has quit [Quit: Advocation]
robmozart has joined #ruby
jerius has joined #ruby
echevemaster has joined #ruby
troyready has joined #ruby
ambushsabre has joined #ruby
Mars___ has joined #ruby
troyready has quit [Read error: Connection reset by peer]
jlast has quit [Remote host closed the connection]
kevind has quit [Quit: kevind]
kpshek has quit []
mklappstuhl has quit [Remote host closed the connection]
geekbri_ has quit []
drumusician has joined #ruby
RaCx has quit [Quit: Computer has gone to sleep.]
MrJoshua has joined #ruby
brisbin has quit [Quit: WeeChat 0.4.1]
danshultz has quit [Remote host closed the connection]
Wixy has quit [Ping timeout: 252 seconds]
Megtastique has joined #ruby
brisbin has joined #ruby
cescalante is now known as ce_afk
rubyracer has quit [Quit: Konversation terminated!]
predator117 has joined #ruby
<pontiki_>
because the insectoids will have taken over
drumusician has quit [Ping timeout: 252 seconds]
cj3kim has joined #ruby
sinm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
kpshek has joined #ruby
freggles has quit [Remote host closed the connection]
cj3kim_ has quit [Read error: Connection reset by peer]
iliketurtles has quit [Quit: zzzzz…..]
joaoh82 has joined #ruby
mary5030 has quit [Remote host closed the connection]
mmitche__ has joined #ruby
troyready has joined #ruby
glanotte has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
robbyoconnor has quit [Excess Flood]
robbyoconnor has joined #ruby
kcombs has quit [Remote host closed the connection]
Wixy has joined #ruby
Wixy has quit [Changing host]
Wixy has joined #ruby
croaky has quit [Ping timeout: 265 seconds]
jrobeson has quit [Quit: Leaving]
fixl has joined #ruby
joaoh82 has quit [Read error: Operation timed out]
croaky has joined #ruby
batchitcray has joined #ruby
nanoyak has joined #ruby
jamesaanderson has joined #ruby
jamesaanderson has quit [Max SendQ exceeded]
fgo has joined #ruby
burlyscudd has quit [Quit: Leaving.]
lmickh has joined #ruby
lmickh_ has joined #ruby
danshultz has joined #ruby
burlyscudd has joined #ruby
newUser1234 has quit [Remote host closed the connection]
w4pm has quit [Ping timeout: 252 seconds]
drumusician has joined #ruby
nanoyak has quit [Client Quit]
cbetta_afk is now known as cbetta
alexherbo2 has quit [Read error: Operation timed out]
jamesaanderson has joined #ruby
fgo has quit [Ping timeout: 252 seconds]
elyoung has quit [Remote host closed the connection]
cbetta is now known as cbetta_afk
<Sid05>
xcccccccccccccccccccccccccccc........
atno has joined #ruby
n00batirc has quit [Ping timeout: 272 seconds]
cbetta_afk is now known as cbetta
fijimunk1i has quit [Ping timeout: 272 seconds]
iliketurtles has joined #ruby
sethen has quit [Quit: Leaving]
jamesaanderson has quit [Client Quit]
benzrf has quit [Quit: :O]
mneorr has quit [Remote host closed the connection]
dziga has quit []
mneorr has joined #ruby
jamesaanderson has joined #ruby
fedez77 has quit [Ping timeout: 265 seconds]
danshultz has quit [Remote host closed the connection]
fractastical has quit [Quit: fractastical]
<shevy>
well it needs some kind of artificial intelligence
<shevy>
and different programming languages
danshultz has joined #ruby
<shevy>
just as DNA (4 different positions available in every location) can give rise to all of biological complexity
anderson has quit [Read error: Connection reset by peer]
mneorr__ has joined #ruby
mneorr has quit [Read error: Connection reset by peer]
mmitche__ has quit [Remote host closed the connection]
harumph has quit [Ping timeout: 272 seconds]
colonolGron has quit [Quit: Lost terminal]
subbyyy has quit [Read error: Operation timed out]
<MrZYX>
I guess one could call genetic disorders bugs in the DNA, so that's far from the ideal system. And we can't cope with two states, why should four states improve?
DGuedes has joined #ruby
robertrv has quit [Ping timeout: 264 seconds]
mengu has quit [Remote host closed the connection]
baschtmobil has joined #ruby
<pontiki_>
let's not forget the retrovirii!
ckinni has joined #ruby
subbyyy has joined #ruby
ged_ is now known as ged
danshultz has quit [Ping timeout: 272 seconds]
<shevy>
MrZYX who defines what a bug exactly is? different species have different metabolic pathways ;)
<shevy>
you need to look at it not from individual organisms/species but at the overall complexity, as if all of life would be a superorganism
zigomir has joined #ruby
<pontiki_>
why?
w4pm has joined #ruby
<shevy>
pontiki_ because then you suddenly have a system that is in essence extremely simple but able to cooperate (degrade materials, build up biomass) and evolve as a whole
<shevy>
it's like erlang in nature!
guinslym has quit [Ping timeout: 245 seconds]
<shevy>
without the awful syntax
<pontiki_>
intelligent design!
<shevy>
it designed itself!
OdNairy has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dogweather has joined #ruby
<shevy>
does anyone know where I could download the original .rb file that chris pine used for "learn to program"?
jamesaanderson has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
zigomir has quit [Ping timeout: 252 seconds]
alexherbo2 has joined #ruby
troyready has quit [Read error: Connection reset by peer]
w_alexus has joined #ruby
kaldrenon has quit [Remote host closed the connection]
jamesaanderson has joined #ruby
Jdubs has joined #ruby
<shevy>
found it
kpshek has quit []
harumph has joined #ruby
recursive has joined #ruby
<recursive>
are 'read receipts' part of any rfc? i would like to be informed before contacting a lawyer on the matter. A client of mine claims his lawyer told him that read receipts are legally binding. I have never heard this and would like to know if it is even part of any standard...
<apeiros>
recursive: wrong channel?
jamesaanderson has quit [Client Quit]
<pontiki_>
as in an email read receipt? or are you talking post?
<recursive>
apeiros: not sure, im a programmer and was hoping anyone with experience implementing smtp/pop/imap would have run into it before
<recursive>
Jason: thanks
phinfone_ has joined #ruby
<apeiros>
recursive: you're aware that law is not globally the same?
eka has quit [Ping timeout: 260 seconds]
jamesaanderson has joined #ruby
phinfonet has quit [Ping timeout: 252 seconds]
<pontiki_>
nor much in ruby
jerius has quit []
<apeiros>
recursive: also it's not obvious from your initial question that you were referring to smtp/pop/imap. there are rfcs for those and they are searchable
<recursive>
apeiros: its not a matter of law, its more a matter of is it even standard. i am fully aware that law differs based on locality
<pontiki_>
if a lawyer said that, i'd say they're full of crap
breakingthings has quit []
<pontiki_>
since there are many email clients that send them automatically
<pontiki_>
it doesn't prove that the email arrived or was read
<recursive>
pontiki_: and there are some that don't implement that feature at all, thats why i am after finding out which rfc covers that technology and if it is part of any mailing standard
mityaz has quit [Quit: See ya!]
<pontiki_>
it is (can't say which off the top of my head)
fgo has joined #ruby
<pontiki_>
i did look at it aeons ago
<recursive>
pontiki_: i think my client is lying about talking to a lawyer, that is a load of crap
<pontiki_>
that would be even more likely
<recursive>
pontiki_: do you remember the technical name and i can search rfc
psyl0n has quit [Remote host closed the connection]
<pontiki_>
it's part of the message delivery rfc, i think
<recursive>
apeiros: thanks, im not singling out those three technologies, its more the fact that i don't know the official name of read receipts
platzhirsch has joined #ruby
<recursive>
pontiki_: ill start there, thank you
doodlehaus has quit [Remote host closed the connection]
claymore has quit [Quit: Leaving]
<pontiki_>
a message header contains a request for the receipt
<recursive>
pontiki_: i would not discount my client in full though, we are located in IL, one of the most rediculous states in the union
<pontiki_>
also: rfcs are not intended to provide legal opinions :>
<recursive>
pontiki_: perfect, ill start there and contact my lawyer after i have done the research
<platzhirsch>
Anyone using Vim for Ruby and accesses the stdlib/other source code on the fly? So far I did this using pry, but what if you are not in a repl session?
<centrx>
recursive, He may merely mean they are "admissible"
jamesaanderson has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<pontiki_>
good point, centrx
<recursive>
centrx: i would agree, but that is not the verbiage used
<pontiki_>
or he may be confusing the two
acrussell has quit [Quit: Leaving.]
dziga_ has joined #ruby
danijoo_ has joined #ruby
<recursive>
my assumption would be that it is simply admissable that one requested the email, however, if it is part of the header, then i don't see the big deal, submit the request and call it a day, but i'm not a lawyer obviously
<recursive>
thanks guys off to do research
mfonda has joined #ruby
fgo has quit [Ping timeout: 252 seconds]
danijoo_ has quit [Read error: Connection reset by peer]
danijoo has quit [Read error: Connection reset by peer]
drumusician has quit [Ping timeout: 252 seconds]
danijoo has joined #ruby
<shevy>
guys when you do class Foo; end
<shevy>
do you, after class Foo, first add constants, or first include modules? or vice versa
danijoo has quit [Read error: Connection reset by peer]
danijoo has joined #ruby
johnjohn101 has left #ruby [#ruby]
<pontiki_>
i tend to do constants first
danijoo has quit [Read error: Connection reset by peer]
<pontiki_>
but that may be stylistic and habit
<pontiki_>
i think Pascal you had to do things in a certain order
danijoo has joined #ruby
<platzhirsch>
first include modules, like C#, C++, Java, implementing Interfaces
nfk has quit [Quit: yawn]
<shevy>
pontiki_ yeah I do the same until now, but I just noticed that I usually have more constants than includes
ffranz has quit [Ping timeout: 276 seconds]
<shevy>
I think I'll try include-first approach for a while
<pontiki_>
for C/C++ the includes come first, that is right
<pontiki_>
but those includes are more like ruby's require, not ruby's include
bean has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<shevy>
another question, again stylistic
<shevy>
what would you rather use:
<shevy>
_ = 'blabla_some_string'
<shevy>
foo { _ }
<shevy>
vs
<shevy>
foo {_}
<pontiki_>
(spaces vs no spaces?)
braddeicide has joined #ruby
<shevy>
yes but only inside of a block
ffranz has joined #ruby
<pontiki_>
i put spaces
<MrZYX>
+1, spaces
<shevy>
ok
<pontiki_>
also spaces after commas
<braddeicide>
is this were i'd ask about ruby gem dependencies or does it have its own room? :)
agent_white has quit [Quit: brb]
<shevy>
pontiki_ sure, always spaces after a comma here, we don't want to end up Hanmac style
<pontiki_>
this is the place, braddeicide !
mfonda has left #ruby [#ruby]
<pontiki_>
spaces inside parens varies, tho
Solnse has left #ruby [#ruby]
<pontiki_>
i don't know why, either
<braddeicide>
i install a gem with mime-types ~> 1.15 dependency, but gem pulls in 2.0 then fails mid way though saying 1.15 is required… i know that that's why i listed it :)
Landshark753 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bean has joined #ruby
<shevy>
what is the ~> it means only this version?
<pontiki_>
show us the Gemfile, braddeicide
<braddeicide>
i searched dep of all gems pulled in, anyone who mentions mime-types says ~> 1.15, except one that says >=0
axl_ has joined #ruby
<Hanmac>
shevy like Professor Oak would say: "there is the right time and the right place to do hanmac style"
<pontiki_>
~> means anything within this minor version, any build number is ok
asobrasil has left #ruby [#ruby]
<Hanmac>
braddeicide: ~> 1.15 means > 1.15 BUT < 2.0
<pontiki_>
you should also look at your Gemfile.lock - it could be another gem is pulling in 2.0
tekacs has joined #ruby
<braddeicide>
i did a "dep" on all gems and couldn't see one
harumph has quit [Ping timeout: 252 seconds]
tekacs has quit [Client Quit]
<braddeicide>
also, if you gem install mime-types -v 1.16 before starting the installation, it all works
<braddeicide>
no-one wants 2.0 :)
<MrZYX>
what's the exact error message you get?
<pontiki_>
then i'm clueless, but we know that's my natural state
max96at has quit [Read error: Connection reset by peer]
tekacs has joined #ruby
<pontiki_>
you might consider nailing that version
LiohAu_ has joined #ruby
<pontiki_>
i can't tell that will fix the problem tho, i doubt it
<MrZYX>
you also want to check in Gemfile.lock if you got a Gemfile
jragon has quit [Ping timeout: 246 seconds]
<braddeicide>
wanted to avoid hard versions, has to be addressed manually then :)
<braddeicide>
ok i'll look in that file
<braddeicide>
I'm just redoing the gem install to grab the error msg
<LiohAu_>
can anybody help me, I have a an array with an unknown number of elements, and I would like to loop over this array picking one item randomly, calling a function on it, and depending on the function result, retry on another item ignoring the previous ones
drumusician has joined #ruby
failshell has quit [Ping timeout: 260 seconds]
<pontiki_>
MrZYX: that's what she said
<pontiki_>
i think that's the very first time i've ever used that phrase :>
<braddeicide>
so yeah, 2.0 barges in then causes problems later. it seems gem doesn't consider all dependencies before starting installions
sharms has quit [Ping timeout: 240 seconds]
ner0x has joined #ruby
<pontiki_>
braddeicide: you have 1.16 in there, not 1.15
<braddeicide>
ya sry i was trying to keep my story shorder
<braddeicide>
shorter
__eka__ is now known as eka
<MrZYX>
LiohAu_: something like begin; pivot = array.sample; end until method?(pivot) ?
<LiohAu_>
maybe the ".sample" method could have an option to do not reuse a previous used sample
<pontiki_>
so you changed the error message?
<braddeicide>
some dependencies dependencies are 1.15, 1.16 is a middle ground
<pontiki_>
veewee is calling in 1.16
<pontiki_>
grit says 1.15 from that error message
<pontiki_>
where is 2.0 coming from?
<LiohAu_>
wow, what's the "method?(pivot)" thing?
<pontiki_>
LiohAu_: i was just thinking you could extend the Array class to your own that included that mod to sample
<braddeicide>
gem is installing mime-types 2.0. but veewee wants ~>1.16 and grit wants ~>1.15. "where is 2.0 coming from" is indeed my question
<pontiki_>
do you mean bundle?
<LiohAu_>
too complicated, i made less than 1 week of ruby in my life :)
<braddeicide>
if you install 1.16 manually veewee installs happily
<pontiki_>
or have i missed something else?
<MrZYX>
LiohAu_: the method you want to call? Another approach could be array.shuffle.find {|element| check?(element) }
Landshark753 has joined #ruby
joaoh82 has joined #ruby
<MrZYX>
braddeicide: doing a `bundle` works though?
<braddeicide>
yes
sharms has joined #ruby
nhhagen has joined #ruby
<braddeicide>
it's just a gem dependency calc problem
<pontiki_>
wow, now i *am* confused
<pontiki_>
you haven't been doing bundle install?
<LiohAu_>
MrZYX: is it sure that i will try all the elements ?
<MrZYX>
I guess you already tried making sure rubygems is on the latest version
Albright has joined #ruby
kpshek has joined #ruby
<MrZYX>
pontiki_: he showed a gemspec, he's building a gem...
kpshek has quit [Client Quit]
<pontiki_>
yes?
<pontiki_>
when i'm creating a gem, i use bundle install on it
<MrZYX>
LiohAu_: it'll stop once it finds one for that the block returns true
<LiohAu_>
check? is just a sample right?
<LiohAu_>
this is what i should replace by my code ?
<braddeicide>
gem can install local gems can't it? when i gem install ./veewee.gem etc it's not just grabbing the old one from public repo with no deps?
<Albright>
Can anyone recommend books for learning Ruby 2 for developers familiar with other languages? (PHP, JS and Objective-C in my case.)
<MrZYX>
LiohAu_: sure
<LiohAu_>
Albright: Welcome in my world
drumusician has quit [Ping timeout: 272 seconds]
<LiohAu_>
And it's a pain in the ass to learn ruby
<LiohAu_>
really :)
joaoh82 has quit [Ping timeout: 272 seconds]
kpshek has joined #ruby
<Albright>
LiohAu_: Really? What sources are you using?
<pontiki_>
Albright: go with the new pickaxe book
<LiohAu_>
google and this channel
<pontiki_>
nice reference and all
fijimunkii has joined #ruby
kpshek has quit [Client Quit]
<pontiki_>
eloquent ruby is great for picking up a lot of the idioms, as well
<Albright>
LiohAu_: Ah. Well, I’d like to spend a little money on a book; I’ve had success getting started with other projects that way.
<pontiki_>
Albright: my problem is that there are actually so many awesome books
nanoyak has joined #ruby
<pontiki_>
(my problem with picking one for someone else, i mean)
Hobogrammer_ has quit [Read error: Connection reset by peer]
<platzhirsch>
I am probably too late and he carved the style rules into stone
<benzrf>
what would lead to a broken pipe?
<pontiki_>
other end closed it
sailias has quit [Ping timeout: 265 seconds]
<platzhirsch>
benzrf: when the end hang up unexpected
thecreators has quit [Quit: thecreators]
sassamo has quit [Ping timeout: 272 seconds]
<platzhirsch>
I always get this when I ssh and the endpoint burns down
<benzrf>
:|
<brandonblack>
benzrf: exceptionally cold weather
devdazed has quit [Quit: Bye]
<benzrf>
there is no reason for the other end to be hanging up...
_honning_ has quit [Ping timeout: 245 seconds]
vlad_starkov has quit [Remote host closed the connection]
<pontiki_>
and yet...
<platzhirsch>
no suicide note?
<pontiki_>
never!
<pontiki_>
we just drive off the cliff singing
<platzhirsch>
"This particular endpoint never striked me as the type of being depressive and yet.."
Megtastique has quit []
withnale has quit [Read error: No route to host]
m-o-s has quit [Ping timeout: 260 seconds]
Xeago has quit [Remote host closed the connection]
burlyscudd has quit [Ping timeout: 260 seconds]
croaky has quit [Ping timeout: 272 seconds]
<benzrf>
oh shit i think i figured it out >_>
<platzhirsch>
tell us
kirun has quit [Quit: Client exiting]
petey__ has quit [Remote host closed the connection]
<benzrf>
i think the default when starting the process to debug is to run the rails server
fractastical has quit [Quit: fractastical]
<benzrf>
i assumed it was to run the current file
<benzrf>
-.-
<benzrf>
[i am not doing rails]
DGuedes has left #ruby ["Saindo"]
Exancillatus has joined #ruby
petey_ has joined #ruby
beneggett has joined #ruby
alexherbo2 has quit [Quit: WeeChat 0.4.3-dev]
burlyscudd has joined #ruby
enape_101 has quit [Ping timeout: 252 seconds]
bean has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<benzrf>
still not working :\
<platzhirsch>
lol, no worries I at least won't discriminate you, no need for a disclaimer
dvarrui has joined #ruby
drumusician has joined #ruby
atraylen has joined #ruby
cj3kim_ has joined #ruby
enape_101 has joined #ruby
subbyyy_ has joined #ruby
foooobear has joined #ruby
croaky has joined #ruby
spider-mario has quit [Remote host closed the connection]
subbyyy has quit [Ping timeout: 252 seconds]
divi_ has joined #ruby
phinfone_ has quit [Read error: Connection reset by peer]
pehlert has joined #ruby
cj3kim has quit [Ping timeout: 260 seconds]
<pehlert>
Hey folks. Does anyone know how to initialize class level instance variables with defaults like I'm attempting to do in this example? http://pastie.org/8612151
petey_ has quit [Ping timeout: 272 seconds]
<platzhirsch>
Only 869 people here... my, we had over 900 at some point. Where is everyone
CpuID has quit [Read error: Connection reset by peer]
phinfonet has joined #ruby
Exancillatus has quit [Quit: Exancillatus]
<benzrf>
pehlert: you are setting @loglevel as an ivar on the metaclass
<MrZYX>
pehlert: @loglevel inside logger is an instance variable, so is attr_accessor giving access to the instance variable, if you want to initialize an instance vairable use a constructor (def initialize)
<benzrf>
not on the class
<benzrf>
pehlert: you want the ivar to be on the class, right?
foooobear has quit [Ping timeout: 252 seconds]
<benzrf>
pehlert: think for a sec
hiall has quit [Quit: hiall]
<benzrf>
pehlert: you are calling attr_accessor on the class's class
<MrZYX>
okay, nvm, it's too late for me I totally read over the class <<
<benzrf>
pehlert: therefore the variable must be on that thing's instance
<benzrf>
pehlert: aka the class
phutchin2 has quit [Ping timeout: 264 seconds]
<benzrf>
pehlert: so you should be setting @loglevel for the class, not the class's class
MrmacHD has joined #ruby
<benzrf>
pehlert: therefore, put it in a place where self is the class
<MrmacHD>
hi
<benzrf>
pehlert: which is, of course, just inside the class block
<MrmacHD>
for some days now I have been getting this: $ gem install jekyll
<MrmacHD>
ERROR: Could not find a valid gem 'jekyll' (>= 0), here is why:
<platzhirsch>
so the logger method is defined as self.logger
<benzrf>
pehlert: im telling you
<pehlert>
benzrf: I was hoping that I could avoid the ActiveSupport magic
<benzrf>
pehlert: listen to me ;p
<benzrf>
pehlert: look at where your attr_accessor def is
<benzrf>
pehlert: it is on the module's class, right?
<pehlert>
benzrf: Right
danshultz has joined #ruby
<benzrf>
the ivar that the accessor looks up should be on the instance of the class body that the accessor is deifned in
<benzrf>
right?
<MrZYX>
MrmacHD: I'd bet on a proxy acting badly or old/weird configured OpenSSL
<pehlert>
Which I suppose is what I want, because Test.loglevel works as expected from outside the module block, right?
<MrmacHD>
MrZYX: no, country wide firewall
<benzrf>
pehlert: your attr_accessor is correct
<benzrf>
pehlert: the ivar that the accessor looks up should be on the instance of the class body that the accessor is deifned in
<MrmacHD>
but yeah my bad luck
<benzrf>
yeah?
cashnguns has quit [Remote host closed the connection]
<pehlert>
benzrf: Makes sense, yes.. So the @loglevel = "DEFAULT" line goes outside the class << self?
<MrmacHD>
jekyll I do need though, otherwise down the drains with my website.
<benzrf>
pehlert: right!
<benzrf>
:)
<divi_>
Can somebody please recommend an ISO8601 date parsing gem?
<platzhirsch>
benzrf: how it attr_accessor should be accessed through the module only?
<platzhirsch>
how is attr_accessor correct if is should be accessed through the module only*
colonolGron has joined #ruby
<MrZYX>
MrmacHD: do you have access to machine from where it works? if so I'd just socks proxy everything through that
<benzrf>
platzhirsch: dont ask me
<benzrf>
it is pehlert's design
<pehlert>
benzrf: Cool, many thanks! Makes sense to me now that I think about it. I guess I got a bit confused by the class/module mix, but it's more straight forward than it seemed
atraylen has joined #ruby
CpuID has joined #ruby
CpuID has joined #ruby
CpuID has quit [Changing host]
<benzrf>
pehlert: no problem!
<MrmacHD>
MrZYX: unfortunately that is possible on windows via psiphon3
<benzrf>
it is easy to confuse levels once you reach metaclasses
<benzrf>
:)
<MrmacHD>
so unless they bring their tunnelling crap to mac, i cannot install jekyll on my mac.
<pehlert>
platzhirsch, benzrf: Anything wrong with that design?
<benzrf>
pehlert: just remember that an ivar should not be set in the same block as an attr declaration for that ivar
<platzhirsch>
benzrf, pehlert: Because that how I would rewrite it http://pastie.org/8612171 independent of the design choices
<benzrf>
pehlert: it all depends on how you are using it, of course
<MrmacHD>
ok then, thanks MrZYX
<benzrf>
platzhirsch: that is basically the same thing
<shevy>
benzrf a problem in the lexer/parser while compiling, i.e. when you messed up bison or yasm
<platzhirsch>
but now I really wonder how you can eliminate the redundancy of self.loglevel= through attr_accessor
<benzrf>
shevy: hm?
<shevy>
benzrf that can cause a broken pipe too
<benzrf>
OH
<benzrf>
platzhirsch: use attr_reader
<benzrf>
*writer
<platzhirsch>
because module Test; attr_accessor :loglevel; won't do
<Wixy>
is there a limit for elements in an array? I'm trying to create one with around 800k elems
<Wixy>
but it says stack level too deep (SystemStackError)
<MrZYX>
MrmacHD: I mean you can download the .gem files through https://rubygems.org/gems/jekyll (Download button) but that might get a greater pain than finding a proxy with all the deps
<shevy>
Wixy probably depends on how much RAM you have
<centrx>
pehlert, You might be looking for module_function
<platzhirsch>
this defines def loglevel and def loglevel= and not self.loglevel and self.logevel=
diegoviola has joined #ruby
<benzrf>
platzhirsch: in a class << self block...
<Wixy>
which is werid, why is it nesting things in the stack?
<Wixy>
I mean, calling <something> recursively or similar..
danshultz has quit [Ping timeout: 272 seconds]
bennyboobooboo has quit [Remote host closed the connection]
<platzhirsch>
benzrf: oh right, I thought this was invalid in this case
<shevy>
Wixy how do you create that array?
<platzhirsch>
good one platzhirsch, spread confusion
<pehlert>
benzrf, platzhirsch: I intend to have an initializer somewhere which configures Test.loglevel at the start of my application. It shall than be read once the logger is instantiated
bennyboobooboo has joined #ruby
<Wixy>
shevy, the elements are explicit in the file foo=["foo", "bar", ...]
<shevy>
ok and there are 800k entries like that
<Wixy>
yep
<MrmacHD>
MrZYX: oh my gosh, then I have to manually install all the dependencies too!
razibog has quit [Ping timeout: 272 seconds]
<MrmacHD>
none the less a good alternative in such a desperate situation
<Wixy>
this file is only supposed to process that data, I'm looking for something in it
cameronbarton has joined #ruby
bennyboobooboo has quit [Read error: Connection reset by peer]
thecreators has joined #ruby
<shevy>
Wixy can you do _ = File.readlines('name_of_your_file_here') ?
bennyboobooboo has joined #ruby
<platzhirsch>
pehlert: sure, but why a module then and not a class with only class methods
<Wixy>
well, yeah, I could
<platzhirsch>
Because preserving a state in a module seems alienate
fgo has joined #ruby
jkamenik has quit [Quit: Leaving.]
ando_ has joined #ruby
yasushi has joined #ruby
Landshark753 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
lkba has joined #ruby
MrThePlague has quit [Ping timeout: 252 seconds]
Nogbit has joined #ruby
nateberkopec has quit [Quit: Leaving...]
fgo has quit [Ping timeout: 272 seconds]
Landshark753 has joined #ruby
kitak has joined #ruby
MrZYX is now known as MrZYX|off
vlad_starkov has joined #ruby
zarul has quit [Quit: Leaving]
<pehlert>
platzhirsch: Because I'd have to use a separate Configuration class in that case and from an OOP perspective, that wouldn't be much of a class either
segv has joined #ruby
cj3kim_ has quit [Read error: Connection reset by peer]
<pehlert>
I feel like this is a good approach now :)
Kar- has quit [Ping timeout: 252 seconds]
zarul has joined #ruby
cj3kim has joined #ruby
thecreators has quit [Quit: thecreators]
baschtmobil has quit [Ping timeout: 252 seconds]
enebo has quit [Quit: enebo]
<benzrf>
lewellyn: hows it goin m8
<lewellyn>
i'm alive. :)
<platzhirsch>
:o
<lewellyn>
it's always better than the alternatives!
lioninawhat has joined #ruby
vlad_starkov has quit [Read error: Connection reset by peer]
ner0x has quit [Quit: Leaving]
Deele has quit [Ping timeout: 260 seconds]
<benzrf>
mmm debatable
<MrmacHD>
ooh some gems that are hosted on https://bb-m.rubygems.org/... instead of s3.amazon cannot be downloaded. why?
mlpinit_ has quit [Read error: Operation timed out]
emocakes has joined #ruby
jamesaanderson has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
sethen has joined #ruby
<platzhirsch>
Maybe it's a write-only gem repository?
<platzhirsch>
Like write-only memory, for security and fun
pehlert has quit [Ping timeout: 245 seconds]
<benzrf>
gah
<benzrf>
hmm
petey_ has joined #ruby
<MrmacHD>
wait, what?
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<MrmacHD>
I'm going through the pain of manually downloading and installing all dependencies of jekyll, some are hosted like that.
<MrmacHD>
will i ever be able to install jekyll?
vlad_starkov has joined #ruby
<lewellyn>
benzrf: dead sucks. and undead sounds inconvenient, albeit cool.
ando_ has quit [Remote host closed the connection]
ando has joined #ruby
<lewellyn>
people use jekyll? :P
ando has quit [Remote host closed the connection]
ando has joined #ruby
<MrmacHD>
lewellyn: of course :D
casheew has quit [Read error: Connection reset by peer]
<platzhirsch>
What else?
danijoo has quit [Read error: Connection reset by peer]
casheew has joined #ruby
mary5030 has quit [Remote host closed the connection]
ando has quit [Remote host closed the connection]
ando has joined #ruby
<lewellyn>
i just haven't heard of many people who stuck with it past the infatuation period unless it managed to get entrenched by then and the employees stuck with it grumble incessantly.
danijoo has joined #ruby
ando has quit [Remote host closed the connection]
sergicles has quit [Ping timeout: 240 seconds]
ando has joined #ruby
ando has quit [Remote host closed the connection]
ando has joined #ruby
dblessing has quit [Quit: dblessing]
<MrmacHD>
no idea why anything connection-wise SSLv3 related fails
<MrmacHD>
been like that for the past two weeks
horofox_ has joined #ruby
<platzhirsch>
lewellyn: Any alternatives?
<platzhirsch>
MrmacHD: Tried the setup on a different machine?
vlad_starkov has quit [Read error: Connection reset by peer]
<MrmacHD>
what different machine, i only have a mac pro
<platzhirsch>
and does the HD in your name stand for High Definition?
<MrmacHD>
mac book pro that is
sailias has joined #ruby
<MrmacHD>
platzhirsch: nope
toastynerd has quit [Remote host closed the connection]
<lewellyn>
platzhirsch: i haven't heard anything which pleases me. so i still use an old java-based thing which generates static html.
<MrmacHD>
high density of my gray brain cells
toastynerd has joined #ruby
<platzhirsch>
lewellyn: Some people use gist :D
<MrmacHD>
lewellyn: used to have lift and mongodb on scala, but hey jekyll is better.
toastynerd has quit [Remote host closed the connection]
<MrmacHD>
and free
<lewellyn>
i think my current "blog generator" is actually older than ruby. :P
ffranz has quit [Quit: Leaving]
thecreators has joined #ruby
<lewellyn>
great thing about static html though: i don't have to worry about security vulns in it. :P
<MrmacHD>
is there a way of setting machomebrew's openssl to force-use sslv2
<MrmacHD>
?
sergicles has joined #ruby
thecreators has quit [Remote host closed the connection]
dvarrui has quit [Ping timeout: 246 seconds]
<MrmacHD>
lewellyn: that too!
ephemerian has quit [Quit: Leaving.]
<MrmacHD>
nah even os x' default openssl wants v3
<MrmacHD>
and my country whole heartedly has decided to block that.
radic has quit [Ping timeout: 260 seconds]
Mon_Ouie has quit [Read error: Operation timed out]
drumusician has quit [Ping timeout: 272 seconds]
<MrmacHD>
anyways
<MrmacHD>
good night y'all
MrmacHD has left #ruby [#ruby]
<workmad3>
hmm... someone's living in a country where the government wants to break all comms....
joaoh82 has joined #ruby
<CoverSlide>
america?
<workmad3>
CoverSlide: nah, the US isn't that obvious about it
radic has joined #ruby
<workmad3>
they just backdoor all your random number generators
Hanmac1 has joined #ruby
mini``` has joined #ruby
joaoh82 has quit [Read error: Connection reset by peer]
joaoh82 has joined #ruby
fractastical has joined #ruby
<lewellyn>
i was curious an exact URI MrmacHD was trying to retrieve :P
<lewellyn>
oh well. too late now.
Hanmac has quit [Ping timeout: 264 seconds]
<platzhirsch>
Wohoo, just another problem and I have finished the section Arrays and Strings, next is Recursion... Programming Interview Exposed *pow pow*
<benzrf>
platzhirsch: huh?
<platzhirsch>
benzrf: it's a book to prepare me for Skype wars
<benzrf>
~_~
<benzrf>
so is it actually possible to make money from freelancing over the internet?