Kricir has quit [Remote host closed the connection]
sambao21 has joined #ruby
eka has joined #ruby
afex has quit [Ping timeout: 245 seconds]
dogurness has joined #ruby
reset has quit [Ping timeout: 255 seconds]
ashleyis has joined #ruby
pskosinski has quit [Remote host closed the connection]
troyronda has quit [Remote host closed the connection]
fgo has joined #ruby
pu22l3r has quit [Remote host closed the connection]
tkuchiki has joined #ruby
sdwrage has quit [Quit: This computer has gone to sleep]
senayar has quit [Ping timeout: 246 seconds]
pu22l3r has joined #ruby
momigi has quit [Remote host closed the connection]
endash has quit [Quit: endash]
razrunelord has joined #ruby
ixti has quit [Ping timeout: 276 seconds]
eka has quit [Quit: My computer has gone to sleep. ZZZzzz…]
troyronda has joined #ruby
amclain has joined #ruby
aspires has quit []
kleing has joined #ruby
hermanmunster has quit [Remote host closed the connection]
kinacamen has joined #ruby
zensavona_ has joined #ruby
razrunelord has quit [Ping timeout: 246 seconds]
mrmargolis has quit [Remote host closed the connection]
metamaterial has quit [Remote host closed the connection]
s2013 has joined #ruby
codeFiend has quit [Quit: codeFiend]
Es0teric has quit [Remote host closed the connection]
sambao21 has quit [Quit: Computer has gone to sleep.]
kinacamen has left #ruby [#ruby]
Es0teric has joined #ruby
SilkFox has quit [Ping timeout: 246 seconds]
SCommette has joined #ruby
kitak has joined #ruby
RaptorJesus has quit [Remote host closed the connection]
sailias has joined #ruby
banister_ has joined #ruby
cpruitt has joined #ruby
beef-wellington has joined #ruby
dogurness has quit [Quit: dogurness]
x77686d has quit [Quit: x77686d]
nzbb has quit [Remote host closed the connection]
SilkFox has joined #ruby
hugoxrosa has joined #ruby
Atrumx has quit [Read error: Connection reset by peer]
mansi has quit [Ping timeout: 255 seconds]
banister has quit [Ping timeout: 252 seconds]
robustus has quit [Ping timeout: 252 seconds]
RaptorJesus has joined #ruby
nateberkopec has joined #ruby
danshultz has joined #ruby
aspires has joined #ruby
meatherly has joined #ruby
robustus has joined #ruby
simono_ has joined #ruby
nateberkopec has quit [Read error: No route to host]
nateberkopec has joined #ruby
simono has quit [Ping timeout: 252 seconds]
zorak has quit [Remote host closed the connection]
zorak has joined #ruby
s2013 has quit [Remote host closed the connection]
fgo has quit [Remote host closed the connection]
binaryhat has joined #ruby
IceDragon has quit [Ping timeout: 240 seconds]
beef-wellington has quit [Ping timeout: 252 seconds]
IceDragon has joined #ruby
cpruitt has quit [Quit: cpruitt]
speakingcode has joined #ruby
cpruitt has joined #ruby
snath has joined #ruby
eka has joined #ruby
Hobogrammer has joined #ruby
rebelshrug has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
michaeldeol has joined #ruby
fgo has joined #ruby
Hobogrammer has quit [Read error: Connection reset by peer]
Hobogrammer has joined #ruby
pu22l3r has quit [Remote host closed the connection]
tpp8 has joined #ruby
Gooder has quit [Ping timeout: 240 seconds]
senayar has joined #ruby
andrewjanssen has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
hermanmunster has joined #ruby
dstarnes has joined #ruby
dstarnes has quit [Client Quit]
dstarnes has joined #ruby
PragCypher has joined #ruby
Kricir has joined #ruby
blackavr has quit [Quit: blackavr]
hamakn has quit [Remote host closed the connection]
Dreamer3 has joined #ruby
advorak has quit [Ping timeout: 245 seconds]
hermanmunster has quit [Remote host closed the connection]
sdwrage has joined #ruby
dapz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dapz has joined #ruby
SilkFox has quit [Ping timeout: 245 seconds]
Firebox has quit [Quit: Page closed]
Firebox_ is now known as Firebox
Firebox has left #ruby [#ruby]
ghr has joined #ruby
wenshan has joined #ruby
s2013 has joined #ruby
sepp2k has quit [Quit: Leaving.]
jamto11 has joined #ruby
ddv has quit [Ping timeout: 245 seconds]
<wenshan>
Hi, I'd like to check whether a string contains proper html text. For example, "hello ruby </br>" is considered as validated while "hello ruby<haha>" is not. What do you recommend for achieving this?
crazy_glue has joined #ruby
helpD has quit [Remote host closed the connection]
ghr has quit [Ping timeout: 240 seconds]
helpD has joined #ruby
bthesorceror has joined #ruby
dapz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
evenix has quit [Remote host closed the connection]
cpruitt has quit [Quit: cpruitt]
charliesome has joined #ruby
helpD has quit [Ping timeout: 276 seconds]
troyronda has quit [Remote host closed the connection]
diegoviola has joined #ruby
crazy_glue has quit [Quit: Leaving]
cpruitt has joined #ruby
ddv has joined #ruby
tyll has quit [Ping timeout: 252 seconds]
osvico has quit [Ping timeout: 245 seconds]
markmarkmark has quit [Quit: WeeChat 0.4.3]
ashooby has joined #ruby
<wenshan>
tpp8: thanks.I've already tried that GEM. It gives warnings such as "line 1 column 1 - Warning: missing <!DOCTYPE> declaration" on string "hello world</br>", which makes sense, but I couldn't find a way to turn certain rules off to make "hello world</br>" valid.
hamakn has joined #ruby
Hanmac1 has joined #ruby
saarinen has joined #ruby
<shevy>
wenshan hmm
<shevy>
wenshan isn't that trivial to code?
maestrojed has joined #ruby
GGMethos has joined #ruby
eka has quit [Quit: My computer has gone to sleep. ZZZzzz…]
<wenshan>
shevy: html_tags looks promising, I'll give it a go, thanks
tyll has joined #ruby
AlexRussia has quit [Quit: Konversation terminated!Good bye!]
nateberkopec has quit [Quit: Leaving...]
<shevy>
wenshan nono it does not yet have this ability, I just think it is trivial to add; if you still have not found anything by tomorrow I'll add it
jottr has quit [Ping timeout: 246 seconds]
nisstyre has joined #ruby
pu22l3r has joined #ruby
tpp8 has quit [Remote host closed the connection]
hermanmunster has joined #ruby
lethjakman has quit [Ping timeout: 252 seconds]
razrunelord has joined #ruby
renier has quit [Ping timeout: 255 seconds]
AlexRussia has joined #ruby
renier has joined #ruby
Kricir has quit [Remote host closed the connection]
kevinykchan has quit [Read error: Connection reset by peer]
<wenshan>
shevy: I thought you were asking me to add this functionality to html_tags. Yes, I've been searching for the whole morning and haven't found anything suitable. I would appreciate it if you could update html_tags.
kevinykchan has joined #ruby
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jameswlane has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jjbohn has joined #ruby
crzrcn has quit [Quit: Leaving.]
pu22l3r has quit [Ping timeout: 240 seconds]
razrunelord has quit [Ping timeout: 240 seconds]
tyll has quit [Ping timeout: 265 seconds]
troyronda has quit [Remote host closed the connection]
troyronda has joined #ruby
tyll has joined #ruby
speakingcode has quit [Remote host closed the connection]
jeregrine has quit [Quit: Connection closed for inactivity]
subbyyy has quit [Ping timeout: 265 seconds]
momigi has joined #ruby
michaeldeol has joined #ruby
senayar has quit [Remote host closed the connection]
redondos has quit [Excess Flood]
senayar has joined #ruby
gilest has joined #ruby
mojoe1 has quit []
redondos has joined #ruby
mojoe has joined #ruby
cpruitt has quit [Quit: cpruitt]
s2013 has quit [Ping timeout: 240 seconds]
simono_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
danshultz has quit [Remote host closed the connection]
momigi has quit [Ping timeout: 240 seconds]
rokob has quit []
danshultz has joined #ruby
Firebox has joined #ruby
cpruitt has joined #ruby
<Firebox>
in hash each method, | first, second | <—— first is always key and second is always value?
goleldar has quit [Remote host closed the connection]
senayar has quit [Ping timeout: 276 seconds]
nbezzala has joined #ruby
kleing has quit [Remote host closed the connection]
danshultz has quit [Ping timeout: 245 seconds]
benweint has joined #ruby
kleing has joined #ruby
mojoe has quit []
mojoe has joined #ruby
mojoe has left #ruby [#ruby]
rostam has quit [Remote host closed the connection]
nbezzala has quit [Read error: Connection reset by peer]
nbezzala_ has joined #ruby
kleing has quit [Ping timeout: 240 seconds]
<shevy>
wenshan yah will do tomorrow, going to bed here soon
davispuh has quit [Remote host closed the connection]
nbezzala_ is now known as nbezzala
SilverKey has joined #ruby
SilverKey has quit [Max SendQ exceeded]
wallerdev has joined #ruby
fgo has quit [Remote host closed the connection]
<wenshan>
shevy: good night
rostam has joined #ruby
freezey has joined #ruby
<mordof>
Firebox: normally yeah
<Firebox>
thanks
SilverKey has joined #ruby
SilverKey has quit [Max SendQ exceeded]
<Firebox>
normal = Hash.new
<Firebox>
was_not_there = normal[:zig]
<Firebox>
what is :zig?
<mordof>
a symbol
<Firebox>
what simbol?
<mordof>
the... zig... symbol?
<Firebox>
i dont know your saying.
<shevy>
Firebox the leading : indicates a symbol
<shevy>
:foo <-- a symbol
maletor has quit [Quit: Computer has gone to sleep.]
<mordof>
symbols by themselves don't have any function or inherent capability to do anything
<shevy>
:bar <-- a symbol
<pipework>
No, it's clearly a colon bar.
fgo has joined #ruby
<mordof>
lol
linojon has quit [Quit: linojon]
<shevy>
:pipework_with_your_mom <-- a bad symbol
<mordof>
I'd like a pint of your richest colon
<pipework>
mordof: Actually, symbols have methods.
<Firebox>
??
<Firebox>
oh
troyronda has quit [Remote host closed the connection]
<shevy>
and "can't we use HashWithIndifferentSomething"
<pipework>
HashWithIndifferentCat
<mordof>
pipework: lol
Andromeda has joined #ruby
<shevy>
mordof years ago I was taught that symbols make my ruby code faster
<mordof>
hm?
<shevy>
yeah
<pipework>
shevy: They do though.
<shevy>
pipework but they are never GC collected!
<mordof>
pipework: they'd have to get gc'd at *some* point though, just not during normal execution?
<shevy>
they grow and grow and grow like cancer
crome has joined #ruby
<RubyPanther>
Symbols may or may not make your code fast or slower, but that is totally besides the point because one is for code identifiers and one is data, and those shouldn't really be interchangeable
<pipework>
shevy: Faster doesn't mean they are more efficient overall.
<pipework>
mordof: Nope.
<mordof>
oh right
<mordof>
symbols don't get stored in memory
<mordof>
so they wouldn't be gc'd
pu22l3r has joined #ruby
<shevy>
Firebox I hope you now know when you should use symbols
<pipework>
mordof: Of course they get stored in memory.
<mordof>
well - it's different than normal objects anyway
<pipework>
They just aren't garbage collected. When the process finishes the memory they were in gets released back to the OS.
<RubyPanther>
symbols are C ints, strings have some overhead beyond the C chars
<Firebox>
Hash[:punch, 99] == Hash[“punch”=>99]
<Firebox>
?
<mordof>
pipework: ah. wasn't considering what you were putting as garbage collection
<pipework>
Firebox: You have ruby installed, you tell me.
<mordof>
but i get the distinction now
<pipework>
mordof: Garbage Collection isn't a thing to 'put'.
nateberkopec has quit [Ping timeout: 240 seconds]
<mordof>
i'm tired. my wording sucks -.-
* mordof
will just stop talking
<pipework>
mordof: You should drink more.
<mordof>
lolwhat
* mordof
leaves for the night
Andromeda has quit [Ping timeout: 252 seconds]
Firebox has left #ruby [#ruby]
combusean has joined #ruby
OrionKissinger has joined #ruby
sambao21 has joined #ruby
fgo has quit [Remote host closed the connection]
bthesorceror has quit [Remote host closed the connection]
centipedefarmer has quit [Remote host closed the connection]
bthesorceror has joined #ruby
jjbohn has quit [Quit: Leaving...]
kevinykchan has quit [Read error: Connection reset by peer]
razrunelord has joined #ruby
kevinykchan has joined #ruby
binaryhat has quit [Quit: Leaving]
HashNuke has joined #ruby
deric_skibotn has quit [Ping timeout: 265 seconds]
benweint has quit [Quit: Computer has gone to sleep.]
bthesorceror has quit [Ping timeout: 240 seconds]
razrunelord has quit [Ping timeout: 252 seconds]
fgo has joined #ruby
Eomar is now known as Davey
rezzack has quit [Ping timeout: 246 seconds]
radic has quit [Ping timeout: 255 seconds]
newUser1234 has quit [Remote host closed the connection]
radic has joined #ruby
kalz has quit [Ping timeout: 252 seconds]
Speed has joined #ruby
crzrcn has joined #ruby
sparrovv has joined #ruby
nbezzala has quit [Read error: Connection reset by peer]
momigi has joined #ruby
thomasxie has quit [Remote host closed the connection]
Nahra has quit [Remote host closed the connection]
freerobby has quit [Quit: Leaving.]
troyronda has joined #ruby
sheepman has quit [Ping timeout: 252 seconds]
dapz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
senayar has joined #ruby
newUser1234 has quit [Read error: Connection reset by peer]
dapz has joined #ruby
ponga has joined #ruby
ponga has quit [Changing host]
ponga has joined #ruby
newUser1234 has joined #ruby
freezey has quit [Remote host closed the connection]
andrewjanssen has quit [Remote host closed the connection]
saarinen has quit [Quit: saarinen]
mary_synthesizin has quit [Ping timeout: 276 seconds]
skysploit has quit [Remote host closed the connection]
eka has quit [Quit: My computer has gone to sleep. ZZZzzz…]
andrewjanssen has joined #ruby
pencilcheck has joined #ruby
ce_afk is now known as cescalante
senayar has quit [Ping timeout: 276 seconds]
Royalb15 has quit [Ping timeout: 252 seconds]
kevinykchan has joined #ruby
pencilcheck has quit [Ping timeout: 240 seconds]
fgo has joined #ruby
michael_lee has joined #ruby
Diranged has joined #ruby
aspires has joined #ruby
saarinen has joined #ruby
trhodes_ has quit [Ping timeout: 264 seconds]
<Diranged>
Hey I'm having a hard time understanding how to mock a full class in rspec?
fuhgeddaboudit has joined #ruby
<Diranged>
I understand how, in theory, to mock a particular method or class-method of a class… but how do I just mock the entire object?
skysploit has joined #ruby
skysploit has quit [Changing host]
skysploit has joined #ruby
blackavr has quit [Quit: blackavr]
trhodes_ has joined #ruby
dogurness has quit [Quit: dogurness]
coderhs has quit [Ping timeout: 245 seconds]
codeFiend has joined #ruby
aspires has quit []
nateberkopec has joined #ruby
alvaro_o has quit [Quit: Ex-Chat]
nateberkopec has quit [Ping timeout: 240 seconds]
codeFiend has quit [Quit: codeFiend]
Nahra has joined #ruby
Firebox has left #ruby [#ruby]
<agarie>
make a new object that happens to implement all the methods of the mocked object
coderhs has joined #ruby
Nahra has quit [Remote host closed the connection]
Andromed_ has quit [Remote host closed the connection]
kevind has quit [Quit: kevind]
Andromeda has joined #ruby
troyronda has quit [Ping timeout: 240 seconds]
mehlah has quit [Quit: Leaving...]
combusean has quit [Ping timeout: 240 seconds]
newUser1234 has quit [Read error: Connection reset by peer]
combusean has joined #ruby
fuhgeddaboudit has quit [Ping timeout: 252 seconds]
newUser1234 has joined #ruby
Andromeda has quit [Ping timeout: 240 seconds]
jamto11 has joined #ruby
freerobby has joined #ruby
<Diranged>
agarie: do i have to re-factor my code though so that i pass the mocked object in? or can i just sort of mock it like we can in python where any instance of FooBar that gets instantiated is automatically a mock
freerobby has quit [Read error: Connection reset by peer]
mary_synthesizin has joined #ruby
freerobby1 has joined #ruby
jjbohn has joined #ruby
oo_ has joined #ruby
Firebox has joined #ruby
pu22l3r has quit [Remote host closed the connection]
michaeldeol has joined #ruby
<Firebox>
normal = Hash.new
<Firebox>
was_not_there = normal[:zig]
<Firebox>
i dont know :zig
<Firebox>
explain me plz
freerobby has joined #ruby
lxsameer has joined #ruby
lxsameer has quit [Changing host]
lxsameer has joined #ruby
blackavr has joined #ruby
freerobby1 has quit [Read error: Connection reset by peer]
codeFiend has joined #ruby
CaptainJet has quit []
gancl has joined #ruby
evenix has quit [Remote host closed the connection]
Bira has quit []
evenix has joined #ruby
trhodes_ has quit [Ping timeout: 264 seconds]
Nahra has joined #ruby
mary_synthesizin has quit [Remote host closed the connection]
dapz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mary_synthesizin has joined #ruby
mary_synthesizin has quit [Read error: Connection reset by peer]
mary_synthesizin has quit [Remote host closed the connection]
mary_synthesizin has joined #ruby
fgo has quit [Remote host closed the connection]
oo_ has quit [Remote host closed the connection]
crucify_me has joined #ruby
yfeldblum has joined #ruby
mary_synthesizin has quit [Ping timeout: 246 seconds]
Speed has quit [Ping timeout: 245 seconds]
yfeldblu_ has quit [Ping timeout: 240 seconds]
locriani has joined #ruby
yfeldblum has quit [Ping timeout: 240 seconds]
hermanmunster has quit [Remote host closed the connection]
senayar has joined #ruby
oo_ has joined #ruby
oo_ has quit [Read error: Connection reset by peer]
toastynerd has quit [Remote host closed the connection]
oo_ has joined #ruby
rm__ has quit [Remote host closed the connection]
LexicalScope has joined #ruby
LexicalScope has quit [Changing host]
LexicalScope has joined #ruby
rm__ has joined #ruby
<crucify_me>
hi sorry for those helping me earlier today. regarding : http://pastie.org/9129437 I think I understand most of this code but on line 15 where string += 'attachment' , the object gets mutated and the original lhs remains the same. So now string_2 points to the original object. If string_2 hadn't been assigned to the original object, would the object still exist in the code somewhere?
mib_mib has joined #ruby
subraminion has joined #ruby
arubin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ndrei has joined #ruby
lethjakman has joined #ruby
sambao21 has quit [Ping timeout: 255 seconds]
senayar has quit [Ping timeout: 240 seconds]
Andromeda has joined #ruby
pen has joined #ruby
LexicalScope has quit [Read error: Connection reset by peer]
alem0lars has joined #ruby
omosoj has quit [Ping timeout: 245 seconds]
wenshan has left #ruby ["ERC Version 5.3 (IRC client for Emacs)"]
sdwrage has quit [Quit: This computer has gone to sleep]
<michael_mbp>
where are string literals documented?
rjhunter has quit [Remote host closed the connection]
<Senjai>
michael_mbp: I dont think you should think of it in terms of single quote and double quote. More as a literal string and an interpolated string
<Senjai>
michael_mbp: one alters the original, one returns a duplicate
boshhead has quit [Ping timeout: 255 seconds]
katlogic has left #ruby [#ruby]
<Senjai>
Hanmac: Nice
<Senjai>
Hanmac: I don't like preprocessors though, which is why I like ruby :)
<michael_mbp>
yup I noticed your use of the bang on merge
rm__ has quit [Ping timeout: 240 seconds]
<michael_mbp>
so the non-bang is non-destructive?
<Hanmac>
"bangs are always destructive" ;P
<michael_mbp>
Hanmac: :p
<michael_mbp>
yeah, in my version I didn't use the bang though
<Senjai>
michael_mbp: I mean yes, thats what its supposed to mean, but you can define anything with a bang
<michael_mbp>
Senjai: yeah, but the bang's only in your version?
<Hanmac>
Senjai: thats for my ruby binding ... it turns macro_attr(Value,wxString) into some _get & _set methods so i can bind them later with rb_define_method (but they are documented as rb_define_attr, means rdoc thinks they are attributes, not methods ;P )
<Senjai>
I just use it in scenarios that modify the original object, or will be more strict about the process (raise instead of return false) or importing large data sets
<Senjai>
michael_mbp: So they mean different things
<Senjai>
Hanmac: I noticed
soheil has quit [Ping timeout: 240 seconds]
<Senjai>
Hanmac: I havent done any ruby bindings, havent thought of anything I'd need C for in ruby
<michael_mbp>
Senjai: my point being, "also you shouldn't be merging a random parameter into a a strong_param'd (presumeably) hash
troyronda has joined #ruby
<michael_mbp>
" is statisfied if we remove the bang on your version :)
<Senjai>
sure, but then you ahve to assign it to another variable
<Hanmac>
Senjai: i have bindings for wxwidgets (means WindowGUI), for sfml (means 2d-rendering) and also for Ogre3d (means 3d-rendering)
combusean has quit [Ping timeout: 276 seconds]
<Senjai>
michael_mbp: Also in rails, Model.create will return an unpersisted object on failure, Model.create! will raise an exception if it couldnt create the record so ! means many different things
<michael_mbp>
brb in 1 hr, thanks so much Senjai Hanmac - absolute fun learning from you guys.
<michael_mbp>
Senjai: indeed.
<Senjai>
Hanmac: I did some ogre3d/c++ stuff when I was younger
* Hanmac
hears a intro like "a long time ago ..."
<Senjai>
I'm only 23..
<Senjai>
When i was like 16
<michael_mbp>
Senjai: save and save! also have similar behaviour. One returns true/false other raises an exception.
* Hanmac
is currently 26 ... last time i checked
<Senjai>
michael_mbp: yes but neither returns the object
<michael_mbp>
indeed.
<Senjai>
michael_mbp: ergo difference between save and create
<michael_mbp>
that's true.
Speed has joined #ruby
<michael_mbp>
hence why I did record_object = instance_variable_set("@#{self.class.crudify_options[:singular_name]}", run_create)
maestrojed has joined #ruby
<Senjai>
create is equivilant to Model.new(params).tap{|model| model.save}
<michael_mbp>
yeah... tap is really handy.
<michael_mbp>
ok I'm off, back to hacking on refinery in a bit.
ashleyis has quit [Ping timeout: 255 seconds]
<michael_mbp>
Senjai got some fun questions I want to bounce off you.
troyronda has quit [Ping timeout: 255 seconds]
<Senjai>
michael_mbp: quick, its late, going to bed soon
dapz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<michael_mbp>
so the question is, is there any way to mixin/eval some code if any decendent calls that method, without explicitely monkey-patching the method itself?
<michael_mbp>
or monkey-patching crudify to call another method.
<Senjai>
michael_mbp: Defined that way? not without great effort
<Senjai>
this is why refinery is shit
<michael_mbp>
figured as much ta.
nateberkopec has joined #ruby
<Senjai>
michael_mbp: alias_method maybe
<michael_mbp>
Thanks I 'll check out CMS
<Senjai>
michael_mbp: If you can switch solutions switch to CMS
<michael_mbp>
it's the stadnard at work for now.
<Senjai>
michael_mbp: It has a learning curve, but totally worth it
<Senjai>
michael_mbp: We use it on a lot of our projects
<michael_mbp>
great thanks
<michael_mbp>
reordering pages is simple?
<Senjai>
michael_mbp: click and drag
<michael_mbp>
sweet
<michael_mbp>
bbl
<Senjai>
night
<Senjai>
Night all
ktosiek has joined #ruby
maestrojed has quit [Quit: Computer has gone to sleep.]
nateberkopec has quit [Ping timeout: 240 seconds]
SegFaultAX has quit [Excess Flood]
SegFaultAX has joined #ruby
<apeiros>
it's so nice when your old self already has written all the code you need :D
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
maestrojed has joined #ruby
flughafen has joined #ruby
sdwrage has joined #ruby
x77686d has joined #ruby
alem0lars has quit [Quit: Going AFK...]
alem0lars has joined #ruby
sdwrage has quit [Client Quit]
x77686d has quit [Ping timeout: 276 seconds]
<vandemar>
I'm using curb, and a server will only negotiate RC4 ciphersuites which are no longer part of the default ciphers list for openssl. Is there a way to adjust the ciphersuite used by curb/curl?
sdwrage has joined #ruby
BizarreCake has joined #ruby
timonv has joined #ruby
sdwrage has quit [Client Quit]
aedorn has quit [Ping timeout: 240 seconds]
jamto11 has joined #ruby
freerobby has joined #ruby
flughafen has quit [Ping timeout: 246 seconds]
jack_rabbit has joined #ruby
jjbohn has joined #ruby
alem0lars has quit [Quit: Going AFK...]
sk87 has joined #ruby
alem0lars has joined #ruby
freerobby has quit [Ping timeout: 240 seconds]
<Hanmac>
apeiros: and if something goes wrong, blame Past!self for it and let Future!self fix it ;P
<vandemar>
Not that it makes much difference in looking for a solution, but it's curl that removed RC4, not openssl itself.
jamto11 has quit [Ping timeout: 276 seconds]
makara has joined #ruby
<Hanmac>
vandemar: write the server an email, blame them that their IT is shitty
<melkor>
How would I limit a regexp to the begining and ending of words only?
jjbohn has quit [Ping timeout: 252 seconds]
wallerdev has quit [Quit: wallerdev]
<Hanmac>
melkor: are you looking for \b ?
<vandemar>
Hanmac: not an option :( back to Net HTTP I guess.
<Hanmac>
vandemar: why? why is it not an option?
Speed has quit [Ping timeout: 245 seconds]
ghr has joined #ruby
jamto11 has joined #ruby
JoeGaudet has joined #ruby
<melkor>
Hanmac: possibly. Right now I use term.gsub(/[[[:punct:]],[[:digit:]]]/,'')
makara has quit [Read error: Connection reset by peer]
<vandemar>
Hanmac: the people who run the server are highly likely to either ignore such a comment or if they do fix it, fix it next year.
relix has joined #ruby
<melkor>
I would like 2test.? to become test, but I would want t2est to stay t2est.
<Hanmac>
let me guess, they are using windowsXp or 2000, or an outdated centos version with ruby < 1.8.6 ?
<vandemar>
IIS 7.5
<Hanmac>
this sounds even worse ...
<zorak>
#rubyonrails
<vandemar>
not outdated but corp mentality
IceDragon has quit [Quit: Space~~~]
zorak is now known as zorak8
zorak8 has quit [Quit: Saliendo]
crzrcn has quit [Quit: Leaving.]
zorak8 has joined #ruby
jamto11 has quit [Ping timeout: 240 seconds]
ghr has quit [Ping timeout: 265 seconds]
maestrojed has quit [Quit: Computer has gone to sleep.]
alem0lars has quit [Quit: Going AFK...]
alem0lars has joined #ruby
<Hanmac>
vandemar: is IIS7.5 already the latest version? and is the RC4 thing IIS fault, or should another underlying lib be blamed for?
crzrcn has joined #ruby
KanKava_ has quit [Quit: leaving]
hermanmunster has quit [Remote host closed the connection]
anay has quit []
hermanmunster has joined #ruby
<melkor>
Using \A or \z I can get either from the front of the string or from the end of the string. But not both, yet.
BizarreCake has quit [Ping timeout: 240 seconds]
momigi has joined #ruby
aedorn has joined #ruby
senayar has joined #ruby
alexju has quit [Remote host closed the connection]
<vandemar>
Hanmac: there's IIS 8.5 now, and the RC4 thing is probably a configuration choice on their part, based on 2 year old information that's no longer valid
brucelee has quit [Ping timeout: 255 seconds]
qba73 has joined #ruby
<Hanmac>
let me guess, and they cant upgrade from ISS7 to ISS8 because it would cost money right? ...
jackneill has quit [Remote host closed the connection]
kleing_ has quit [Remote host closed the connection]
hermanmunster has quit [Ping timeout: 252 seconds]
predator217 has quit [Read error: Connection reset by peer]
jackneill has joined #ruby
jackneill has quit [Changing host]
jackneill has joined #ruby
momigi has quit [Ping timeout: 240 seconds]
blackmes1 has joined #ruby
jackneill has quit [Client Quit]
senayar has quit [Ping timeout: 245 seconds]
alem0lars has quit [Quit: Going AFK...]
Speed has joined #ruby
qba73 has quit [Remote host closed the connection]
qba73 has joined #ruby
alem0lars has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
jackneill has joined #ruby
jackneill has quit [Changing host]
jackneill has joined #ruby
<vandemar>
probably. their website looks like it was designed in the 90's.
rm__ has joined #ruby
funburn has joined #ruby
ghr has joined #ruby
Xiti has joined #ruby
senayar has joined #ruby
alem0lars has quit [Client Quit]
Speed has quit [Ping timeout: 246 seconds]
klaut has joined #ruby
skysploit has joined #ruby
armyriad has quit [Ping timeout: 240 seconds]
armyriad has joined #ruby
claymore has quit [Ping timeout: 255 seconds]
alem0lars has joined #ruby
rm__ has quit [Ping timeout: 265 seconds]
poikon has joined #ruby
BizarreCake has joined #ruby
dawkirst has joined #ruby
skysploit has quit [Ping timeout: 246 seconds]
claymore has joined #ruby
marr has joined #ruby
blackmes1 has quit [Ping timeout: 240 seconds]
michaeldeol has quit [Ping timeout: 246 seconds]
predator117 has joined #ruby
metamaterial has quit [Ping timeout: 272 seconds]
nateberkopec has joined #ruby
michaeldeol has joined #ruby
andrewlio has joined #ruby
psyko666 has joined #ruby
nateberkopec has quit [Read error: No route to host]
JJMalina has joined #ruby
helpD has quit [Remote host closed the connection]
mcrmfc has joined #ruby
Mon_Ouie has joined #ruby
Mon_Ouie has quit [Changing host]
Mon_Ouie has joined #ruby
helpD has joined #ruby
elaptics`away is now known as elaptics
michaeldeol has quit [Ping timeout: 240 seconds]
mikecmpbll has joined #ruby
brucelee has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
JJMalina has quit [Ping timeout: 240 seconds]
helpD has quit [Ping timeout: 240 seconds]
JoeGaudet has quit [Ping timeout: 240 seconds]
momigi has joined #ruby
yojimbo has joined #ruby
predator117 has quit [Ping timeout: 252 seconds]
ephemerian has joined #ruby
brucelee has quit [Ping timeout: 246 seconds]
popl has joined #ruby
popl has joined #ruby
helpD has joined #ruby
momigi has quit [Ping timeout: 255 seconds]
Justinas has joined #ruby
poikon has quit [Read error: Connection reset by peer]
poikon has joined #ruby
freerobby has joined #ruby
senayar has quit [Remote host closed the connection]
<Justinas>
Hello guys. I do have ActiveRecord structure like this: User, Record, Comment where user has_many records and comments, record has many comments and belongs to user and comment belong to user and record. However i cannot create new comment with. record.comments.create(). it leaves comment id nill and record_id random
<Justinas>
any toughts?
jjbohn has joined #ruby
BizarreCake has quit [Ping timeout: 245 seconds]
melkor has quit [Quit: wowzers.]
freerobby has quit [Ping timeout: 245 seconds]
<Hanmac>
justinas: #rubyOnRails
Darryl has joined #ruby
<Justinas>
no,im not using rails
thomasxie has joined #ruby
<canton7>
yeah, but railsy people use ActiveRecord a lot more than we do
charliesome has joined #ruby
<Justinas>
oh. ok, thanks
<canton7>
Sequel / DataMapper are probably more popular here
Xeago has quit [Remote host closed the connection]
Xeago has joined #ruby
justinas_ has joined #ruby
<justinas_>
I was here,asked for a help few hours earlier and you guys redirected me to rails channel. However i didnt got any help there so I am back. Is there anyone using ActiveRecord with ruby?
oo_ has quit [Remote host closed the connection]
michaeldeol has joined #ruby
yfeldblum has joined #ruby
oo_ has joined #ruby
Milly_Bays has joined #ruby
Xeago has quit [Read error: Connection reset by peer]
<crome>
you mean without rails?
Xeago has joined #ruby
sepp2k has joined #ruby
<justinas_>
crome: yes
senayar has joined #ruby
<justinas_>
crome: or with rails. I dont know. I believe its all about relations
oo_ has quit [Remote host closed the connection]
michaeldeol has quit [Ping timeout: 245 seconds]
yfeldblum has quit [Ping timeout: 265 seconds]
Soda has joined #ruby
oo_ has joined #ruby
sparrovv_ has joined #ruby
ikaros has joined #ruby
Milly_Bays has quit [Quit: Leaving]
sparrovv has quit [Ping timeout: 240 seconds]
ctp has joined #ruby
timonv has joined #ruby
brucelee has joined #ruby
<crome>
well, I use rails every day.
senayar has quit [Ping timeout: 276 seconds]
<crome>
although I guess you have some weird problem if the guys in the other channel couldnt help you
<crome>
but fire away anyway
coderhs has joined #ruby
benzrf is now known as benzrf|offline
okinomo_ has joined #ruby
rm_ has joined #ruby
evenix has joined #ruby
brucelee has quit [Ping timeout: 246 seconds]
LadyRainicorn has quit [Ping timeout: 276 seconds]
<justinas_>
crome: i might just put it on the gist. I want the structure to work: User may create a record and in addition, they can comment record (made by any user). Problem is - i cannot create a comment which belongs to record and user(not nescesseraly an author of record). gist: https://gist.github.com/anonymous/b10af104875e99ba22ed
<justinas_>
on Comment.create somehow i do have record created as well. I mean record_id is 1,2,3 and so on
User458764 is now known as User458764_NotHe
jottr has quit [Ping timeout: 240 seconds]
LadyRainicorn has joined #ruby
User458764_NotHe has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
rm_ has quit [Ping timeout: 265 seconds]
oo_ has quit [Remote host closed the connection]
okinomo__ has joined #ruby
evenix has quit [Ping timeout: 245 seconds]
razrunelord has joined #ruby
kitak has quit [Remote host closed the connection]
okinomo__ has quit [Client Quit]
okinomo__ has joined #ruby
okinomo__ has quit [Client Quit]
crzrcn has joined #ruby
blackmes1 has quit [Quit: WeeChat 0.4.3]
okinomo__ has joined #ruby
troyronda has joined #ruby
razrunelord has quit [Ping timeout: 246 seconds]
shock_one has joined #ruby
nazty has quit [Quit: WeeChat 0.3.7]
alem0lars has quit [Quit: Going AFK...]
nateberkopec has joined #ruby
eka has joined #ruby
LadyRainicorn has quit [Read error: Connection reset by peer]
crzrcn has quit [Ping timeout: 240 seconds]
LadyRainicorn has joined #ruby
okinomo__ has quit [Client Quit]
okinomo has joined #ruby
claymore has quit [Ping timeout: 255 seconds]
troyronda has quit [Ping timeout: 255 seconds]
claymore has joined #ruby
eka has quit [Client Quit]
phoo1234567 has quit [Read error: Connection reset by peer]
nateberkopec has quit [Ping timeout: 240 seconds]
kevinykchan has quit [Read error: Connection reset by peer]
Alina-malina has quit [Ping timeout: 250 seconds]
locriani has quit [Ping timeout: 240 seconds]
kevinykchan has joined #ruby
zipace has joined #ruby
okinomo has quit [Quit: leaving]
okinomo has joined #ruby
oo_ has joined #ruby
workmad3 is now known as wm3|lunch
LadyRainicorn has quit [Read error: Connection reset by peer]
jaki has joined #ruby
<jaki>
is it necessary to have rake as a dependency in the Gemfile ?
LadyRainicorn has joined #ruby
<apeiros>
if your app uses rake, sure.
<jaki>
thanks. wasnt sure if it was redundant (i.e. if it already comes with ruby)
BizarreCake has quit [Read error: Connection reset by peer]
phoo1234567 has joined #ruby
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
Shidash has quit [Ping timeout: 252 seconds]
subraminion has joined #ruby
crystal77 has quit [Quit: Computer has gone to sleep.]
decoponio has joined #ruby
freerobby has joined #ruby
nari has joined #ruby
thomasxie has left #ruby [#ruby]
doodlehaus has joined #ruby
freerobby has quit [Ping timeout: 255 seconds]
dapz has joined #ruby
kitak has joined #ruby
jjbohn has joined #ruby
dapz has quit [Client Quit]
troyronda has joined #ruby
troyronda has quit [Remote host closed the connection]
predator117 has quit [Ping timeout: 240 seconds]
jjbohn has quit [Ping timeout: 265 seconds]
jamto11 has joined #ruby
troyronda has joined #ruby
z has quit [Quit: leaving]
nateberkopec has joined #ruby
helpD_ has quit [Remote host closed the connection]
bthesorceror has joined #ruby
jamto11 has quit [Ping timeout: 276 seconds]
helpD has joined #ruby
michaeldeol has joined #ruby
yvemath has quit [Excess Flood]
jaki has quit [Quit: leaving]
oo_ has quit [Remote host closed the connection]
poikon has quit [Remote host closed the connection]
troyronda has quit [Remote host closed the connection]
bthesorceror has quit [Remote host closed the connection]
oo_ has joined #ruby
senayar has joined #ruby
ktosiek has joined #ruby
LadyRainicorn has quit [Read error: Connection reset by peer]
simono has joined #ruby
LadyRainicorn has joined #ruby
senayar has quit [Remote host closed the connection]
helpD has quit [Ping timeout: 240 seconds]
senayar has joined #ruby
yvemath has joined #ruby
michaeldeol has quit [Ping timeout: 246 seconds]
crzrcn has joined #ruby
claymore has quit [Ping timeout: 255 seconds]
helpD has joined #ruby
doodlehaus has quit [Remote host closed the connection]
troyronda has joined #ruby
senayar_ has joined #ruby
troyronda has quit [Read error: Connection reset by peer]
senayar has quit [Read error: No route to host]
troyronda has joined #ruby
crzrcn has quit [Ping timeout: 240 seconds]
claymore has joined #ruby
bthesorceror has joined #ruby
anaeem1 has joined #ruby
rm_ has joined #ruby
sk87 has joined #ruby
kiri has joined #ruby
<crome>
justinas_: you want the comment to belong to a user OR to a record, right?
<crome>
not to both at the same time
anaeem1 has quit [Remote host closed the connection]
subraminion has quit [Remote host closed the connection]
subraminion has joined #ruby
claymore has quit [Ping timeout: 255 seconds]
_bart has joined #ruby
<_bart>
Hi, how do I get all the nodes at a specific level with Nokogiri? So let's say I want all the <div>s 4 levels in for example
rm_ has quit [Ping timeout: 255 seconds]
jamto11 has joined #ruby
claymore has joined #ruby
razrunelord has joined #ruby
<justinas_>
crome: Thanks for your effort, but i have already fixed my problem with a help of #rails guys. For the interrest - i wanted a comment to be assigned to BOTH user and record :)
ndrei has quit [Read error: No route to host]
fgo_ has quit [Remote host closed the connection]
<crome>
ah, okay
ndrei has joined #ruby
<crome>
sorry, I was out having a lunch
nateberkopec has quit [Quit: Leaving...]
<_bart>
Ah nevermind, it's easy with xpath: /*/*/*...
poikon has joined #ruby
nateberkopec has joined #ruby
jamto11 has quit [Ping timeout: 276 seconds]
lkba has joined #ruby
rm_ has joined #ruby
postmodern has quit [Quit: Leaving]
LadyRainicorn has quit [Read error: Connection reset by peer]
razrunelord has quit [Ping timeout: 265 seconds]
LadyRainicorn has joined #ruby
rm_ has quit [Remote host closed the connection]
PragCypher has quit [Remote host closed the connection]
rm_ has joined #ruby
linojon has joined #ruby
kevinykchan has quit [Read error: Connection reset by peer]
osvico has joined #ruby
cina has joined #ruby
rm_ has quit [Read error: No route to host]
kevinykchan has joined #ruby
nateberkopec has quit [Client Quit]
rm_ has joined #ruby
rm_ has quit [Remote host closed the connection]
Alina-malina has joined #ruby
<cina>
Hi all! I'm looking for a faster array to csv formatter/writer. I've tried "CSV.open(file, 'wb')", but it is too slow for my large data. Maybe I should manually escape commas... any of you ever used something else?
rm_ has joined #ruby
momomomomo has joined #ruby
<cina>
is it a good idea to convert an array into csv format manually? how do I make sure commas are escaped correctly?
rm_ has quit [Read error: Connection reset by peer]
bthesorceror has quit [Remote host closed the connection]
zegerjan has quit [Ping timeout: 252 seconds]
dorei has joined #ruby
zegerjan has joined #ruby
momigi has joined #ruby
endash has quit [Client Quit]
greenarrow has joined #ruby
dawkirst has quit [Remote host closed the connection]
benzrf|offline is now known as benzrf
troyronda has quit [Remote host closed the connection]
tkuchiki has quit [Ping timeout: 265 seconds]
FenixFyreX has joined #ruby
timonv has quit [Remote host closed the connection]
mark_locklear has joined #ruby
tkuchiki_ has quit [Ping timeout: 276 seconds]
<cina>
LadyRainicorn: "NotImplementedError: Please switch to Ruby 1.9's standard CSV library. It's FasterCSV plus support for Ruby 1.9's m17n encoding engine."
oo_ has quit [Remote host closed the connection]
zegerjan has quit [Ping timeout: 246 seconds]
momigi has quit [Ping timeout: 252 seconds]
freerobby has joined #ruby
helpD has quit [Remote host closed the connection]
relix has quit [Read error: Connection reset by peer]
<crome>
you dont have to use fastercsv with ruby 19+
newUser1234 has quit [Read error: Connection reset by peer]
<crome>
its the standard
helpD has joined #ruby
relix has joined #ruby
karlfreeman has joined #ruby
maximski has joined #ruby
<LadyRainicorn>
Hmm, well I guess you could create your own bindings to a C library?
<LadyRainicorn>
Why do you need to write csv anyway?
newUser1234 has joined #ruby
<karlfreeman>
Is there a concept of Infinity for Time? I'm looking at trying to do a range but would like the start to be "since the beginning of time" and the end being (optional) "till the end of time"
helpD_ has joined #ruby
<apeiros>
karlfreeman: (shameless plug) try out my gem 'sorting', it includes Bigger and Smaller constants
<apeiros>
those compare as always smaller and as always bigger
Beoran__ has joined #ruby
sparrovv_ has quit [Remote host closed the connection]
<LadyRainicorn>
>> Time.now < Float::INFINITY
<eval-in>
LadyRainicorn => comparison of Time with Float failed (ArgumentError) ... (https://eval.in/144946)
<LadyRainicorn>
huh
<cina>
LadyRainicorn: I want to load the CSV into MySQL
<cina>
j416: Yes, sir. Insert is not an option, I have benchmarked it and it is too slow. I'm inserting millions of rows and I need it to be fast.
<j416>
cina: wrap it in a single transaction
testol has joined #ruby
Soda has quit [Remote host closed the connection]
<cina>
j416: done that as well
<testol>
Is it possible to set a default directory for Kernel.open to look in?
<FenixFyreX>
Hi guys,I've just built Ruby-2.1.1p76 and I've noticed some strange behavior when anything related to readline gets used in code. Specifically, the irb. The first time I compiled, I had gnu readline configured and installed. After ruby was built and I loaded up irb, I noticed that everytime I hit backspace, the second to last character would get erased. Pressing Return or anything else resulted in mayhem in the command prompt's cont
<Hanmac>
testol: Dir.chdir ?
<j416>
cina: I don't know much about mysql. Should be fast.
<apeiros>
I doubt you can load csv faster than using that
jjbohn has quit [Ping timeout: 252 seconds]
<FenixFyreX>
The second time I compiled I left readline out of ruby, and when I tried to load irb, it crashed instantly. So i installed the gem rb-readline, and now it loads up, except...everytime I try to use gets, it crashes on the first key i press.
mjs2600 has joined #ruby
<FenixFyreX>
with a segfault
zarubin has quit []
<cina>
apeiros: I am using load data infile already -- j416 made fun of me for not knowing about INSERT
<FenixFyreX>
Can anyone help me with this issue?
<j416>
cina: I was being serious, though
<apeiros>
FenixFyreX: are you on osx? what does Readline::VERSION return?
cina has quit [Read error: No route to host]
okinomo has quit [Quit: leaving]
cina has joined #ruby
okinomo_ has quit [Remote host closed the connection]
zegerjan has quit [Ping timeout: 246 seconds]
<j416>
cina: didn't mean to offend you
<apeiros>
cina: I seriously doubt that you'll find anything faster than load data infile
<FenixFyreX>
apeiros: I'm on windows 7, with a msys/mingw build environment. Readline::VERSION returns "5.2"
<apeiros>
cina: especially not by going via ruby, as there you'll create tons of garbage objects
<apeiros>
FenixFyreX: I have 6.2, maybe try updating readline?
<apeiros>
but win+mingw - no idea really.
jjbohn has joined #ruby
<FenixFyreX>
apeiros: haha, yeah windows and mingw is unstable. I might just install a distro of linux and forget windows ever existed...the issues, man
<apeiros>
yeah, vm might be a better option than win+ming
<cina>
apeiros: true - the thing I forgot about "load data infile" is that it accepts any separator and terminated-by characters. so I could join my arrays with null characters and feed it to LOAD DATA INFILE! no need to use ruby's CSV
AlexRussia has quit [Ping timeout: 255 seconds]
Rainicorn has joined #ruby
kpshek has joined #ruby
LadyRainicorn has quit [Disconnected by services]
Rainicorn is now known as ladyrainicorn
ladyrainicorn is now known as LadyRainicorn
<cina>
j416: :)
yfeldblum has joined #ruby
michaeldeol has joined #ruby
jjbohn has quit [Ping timeout: 240 seconds]
sambao21 has joined #ruby
helpD_ has quit [Remote host closed the connection]
michaeldeol has quit [Ping timeout: 252 seconds]
helpD has joined #ruby
crzrcn has joined #ruby
yfeldblum has quit [Ping timeout: 252 seconds]
sparrovv has joined #ruby
wm3|lunch is now known as workmad3
rippa has joined #ruby
jamto11 has quit [Remote host closed the connection]
bthesorceror has joined #ruby
bthesorceror has quit [Remote host closed the connection]
bthesorceror has joined #ruby
brucelee has joined #ruby
thoolihan has joined #ruby
helpD has quit [Ping timeout: 252 seconds]
crzrcn has quit [Ping timeout: 255 seconds]
Xeago has quit [Remote host closed the connection]
Xeago has joined #ruby
Sawbones has joined #ruby
Kricir has joined #ruby
freezey has joined #ruby
alexju has joined #ruby
sparrovv has quit [Remote host closed the connection]
Xeago has quit [Read error: Connection reset by peer]
Xeago has joined #ruby
helpD has joined #ruby
freezey has quit [Remote host closed the connection]
ixti has joined #ruby
brucelee has quit [Ping timeout: 265 seconds]
cina has quit [Read error: No route to host]
noop has joined #ruby
claymore has quit [Ping timeout: 255 seconds]
cina has joined #ruby
randomnick_ has joined #ruby
freezey has joined #ruby
alexju has quit [Ping timeout: 245 seconds]
nateberkopec has joined #ruby
freezey has quit [Remote host closed the connection]
cover has quit [Remote host closed the connection]
claymore has joined #ruby
troyronda has joined #ruby
razrunelord has joined #ruby
bruno- has joined #ruby
MattStratton has joined #ruby
cina has quit [Client Quit]
cina has joined #ruby
karlfreeman has quit []
vise890 has joined #ruby
mjs2600 has quit [Remote host closed the connection]
yojimbo has quit [Ping timeout: 246 seconds]
bruno- has quit [Read error: Connection reset by peer]
<cina>
I think my irc client was disconnected -- to update you guys, I'm going to continue using MySQL's load infile, but separate and terminate my records using special characters and avoid using CSV. Thanks all for your input :)
razrunelord has quit [Ping timeout: 252 seconds]
<benzrf>
cina: why are u using mysql
<benzrf>
when u could be using glorious mustard race postgres
matcouto has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ankov has quit [Remote host closed the connection]
<LadyRainicorn>
^ @ringo2
gancl has quit [Remote host closed the connection]
<ringo2>
LadyRainicorn maybe that's what I'm doing wrong ...I was using a class and not a module.
yfeldblum has joined #ruby
<LadyRainicorn>
You can use it with Class, as stated in the documentation I linked.
justinas_ has quit [Ping timeout: 252 seconds]
Kricir has quit [Remote host closed the connection]
<ringo2>
LadyRainicorn okay. If I want the same "initialize" and "attr_accessor" on about 10 classes, would _you_ put that in a base class or base module?
<segfalt>
No such thing as a base module
<segfalt>
well, you can 't inherit from a module
<LadyRainicorn>
Probably base class, but it depends.
<segfalt>
you could include it in all classes
<ringo2>
Ok. I'll probably keep it in the base class as it's easier for others to understand that way. I'll go look through that document to try to see how to grab the inheriting class's name
<shevy>
ringo2 ruby limits you artifically with the class vs. module distinction; in such a case, the simplest way is to make a base class
havenn has joined #ruby
sski has joined #ruby
havenwood has quit [Read error: Connection reset by peer]
Kricir has joined #ruby
kumarat9pm has joined #ruby
snath has joined #ruby
<ringo2>
shevy ok thank you. I'm trying to DRY up my code a little by having an API class that has about 10 properties that are instantiations of 10 other classes
<ringo2>
shevy I instantiate the class by passing in self (the API) ...self has a "request" method on it that calls out to a website for return info
<shevy>
I am sorry, I have no real clue what you are trying to do here ;-)
troyronda has joined #ruby
<ringo2>
shevy so I'm trying to make a base class that will take the inherited classes name and turn it into a symbol and pass it as one of the arguments to the request(...) method on the main API class that created this huge mess :)
<toretore>
ringo2: if you find yourself needing to know what classes inherit another for functionality, it's usually a design flaw
yfeldblum has quit [Ping timeout: 240 seconds]
crzrcn has joined #ruby
wallerdev has joined #ruby
<ringo2>
toretore I dont "need" to know it
<ringo2>
toretore it's more of ...(let me write up a gist)
<shevy>
ringo2 I am the wrong person to speak about complexity, the only way I can manage ruby is by making it so dumb that I never again have to think about it
<ringo2>
shvy lol
<shevy>
zombie coding is the best
LadyRainicorn has quit [Read error: Connection reset by peer]
LadyRainicorn has joined #ruby
<toretore>
you're trying to make a `class Get < Request` that automatically makes a GET request?
<shevy>
ringo2 the class vs. module distinction in ruby is curious; will you use class or module as your main namespace? I used to assume that a module would be proper, until apeiros used a class; when asked why, he said that he gets more options that way (using .new on it)
agjacome has joined #ruby
<ringo2>
yeah hold on, i'm writing up a gist :P
dapz has joined #ruby
xiq has quit [Ping timeout: 245 seconds]
troyronda has quit [Ping timeout: 252 seconds]
freezey has joined #ruby
crzrcn has quit [Ping timeout: 245 seconds]
doodlehaus has quit [Remote host closed the connection]
jamto11 has quit [Remote host closed the connection]
Rollabunna has joined #ruby
doodlehaus has joined #ruby
skysploit has joined #ruby
skysploit has quit [Changing host]
skysploit has joined #ruby
atmosx has quit [Remote host closed the connection]
sdwrage has joined #ruby
centrx has joined #ruby
newUser1234 has quit [Remote host closed the connection]
<ringo2>
I'll basically be able to do this: api = API.new({password: 'hello', user: 'world'})
pu22l3r has quit [Ping timeout: 265 seconds]
<ringo2>
then: name = api.foo.get_name
acrussell has joined #ruby
<ringo2>
or: something= api.bar.get_something
arubincloud has joined #ruby
maestrojed has joined #ruby
<ringo2>
it would _just_ be really nice if ServicesBase had a method that could detect what class inherited it, and then call: api.request(__inherited_class_name_to_symbol__, service)
claymore has joined #ruby
razrunelord has joined #ruby
<toretore>
but that is ambiguous
Hanmac has quit [Ping timeout: 276 seconds]
<toretore>
it can be both foo and bar
dawkirst_ has quit [Remote host closed the connection]
kumarat9pm has quit [Quit: Leaving.]
sdwrage has quit [Quit: This computer has gone to sleep]
<ringo2>
toretore awesome! That's what I was looking for ...
kumarat9pm has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
<ringo2>
toretore so there's no way to tell what called. No biggie.
LexicalScope has quit [Ping timeout: 252 seconds]
<toretore>
well
jamto11 has quit [Ping timeout: 252 seconds]
<ringo2>
toretore I mean it works as is ...it's just one extra method on my classes that is repeated, but with a different first argument ..it's not the end of the world lol
<toretore>
if i understand you correctly, you'd do something like `foo = Foo.new(anAPI)`
<ringo2>
no
predator117 has quit [Ping timeout: 240 seconds]
<ringo2>
I do: api = API.new(_my_options_)
<ringo2>
then I can do: api.foo.get_name
<toretore>
that's weird
predator117 has joined #ruby
<toretore>
but anyway, it's the same thing
<toretore>
then you'd know what class you're in
<ringo2>
toretore not really ...maybe it' weird for Ruby. I do this in .NET
<toretore>
self.class
<ringo2>
toretore it's just a um ..singleton? or a unit of work ...not sure exactly which it is
dawkirst has joined #ruby
<ringo2>
toretore the purpose is that API keeps control of the @options variable as well as a handle to Request
mary_synthesizin has quit [Ping timeout: 240 seconds]
_justin has joined #ruby
ponga has quit [Quit: Leaving :)]
pwh has joined #ruby
<toretore>
def request(service); api.request(self.class.name.somthing, service); end
<ringo2>
toretore so now "I" do not need to create each class and pass in the options each time
<toretore>
but that's not something i'd do
<ringo2>
toretore ok ..yeah I'll keep it as it
razrunelord has quit [Ping timeout: 240 seconds]
<toretore>
it's better to be explicit ime
<ringo2>
toretore the other thing I was going to ask ..I DO NOT like how in the API class I'm automatically creating Foo and Bar classes
<ringo2>
toretore does Ruby have a way to lazy load properties?
<toretore>
that's what i was referring to as weird
<toretore>
sure
momigi has joined #ruby
<toretore>
just define an accessor that doesn't create anything until it's called
goleldar has joined #ruby
<ringo2>
toretore that would be much better as I will probably have at least 10 of these classes, and when I create an instance of API I might only need 2 ...so I rather not create all 10
freezey has quit [Remote host closed the connection]
sambao21 has joined #ruby
<ringo2>
toretore gotcha! Thank you so much for your help ;)
sparrovv has joined #ruby
tkuchiki has quit [Remote host closed the connection]
jjbohn has quit [Read error: Connection reset by peer]
zachallett has quit [Remote host closed the connection]
<toretore>
to reduce repetition you could put the namespace into its own method and call that from request
kilk_ has joined #ruby
sdwrage has joined #ruby
W0rmDr1nk has quit [Ping timeout: 252 seconds]
Morkel_ has joined #ruby
<ringo2>
toretore I'm not sure I understand?
LadyRainicorn has quit [Read error: Connection reset by peer]
mary5030 has joined #ruby
Kricir has quit [Remote host closed the connection]
<toretore>
def request(s); api.request(namespace, s); end
goleldar has quit [Remote host closed the connection]
LadyRainicorn has joined #ruby
<toretore>
def namespace; 'foo'; end
<ringo2>
toretore ah! I see
goleldar has joined #ruby
Morkel has quit [Ping timeout: 245 seconds]
Morkel_ is now known as Morkel
<ringo2>
toretore I'll give that a try. Thank you
sparrovv has quit [Remote host closed the connection]
<toretore>
np
Aaaal has joined #ruby
ringo2 has left #ruby [#ruby]
tcstar has quit [Remote host closed the connection]
atmosx has joined #ruby
freezey has joined #ruby
xiella has quit [Ping timeout: 252 seconds]
lkba has quit [Ping timeout: 246 seconds]
kumarat9pm has quit [Ping timeout: 265 seconds]
claymore has quit [Ping timeout: 255 seconds]
cina_ has joined #ruby
n0n3 has quit []
bogon is now known as manacit
flops has quit [Ping timeout: 245 seconds]
fgo has joined #ruby
jumblemuddle has joined #ruby
cina_ has quit [Client Quit]
kumarat9pm has joined #ruby
LadyRainicorn has quit [Quit: Bye]
LadyRainicorn has joined #ruby
<jumblemuddle>
I know very little about ruby, but metasploit requires a few gems. How can I move the '.gem' folder in my home directory to follow xdg specs?
claymore has joined #ruby
shock_one has joined #ruby
mg^afk is now known as mg^
<shevy>
jumblemuddle what do the xdg specs require?
ephemerian has left #ruby [#ruby]
<jumblemuddle>
Basically just moving the .gem folder to either .local/share or .config or .cache depending on what's in it.
<jumblemuddle>
If that's not possible I can just move the folder. (It doesn't have to be xdg specs, I just want a clean /home)
Rollabunna has quit [Quit: Leaving...]
fgo has quit [Ping timeout: 240 seconds]
sambao21 has quit [Quit: Computer has gone to sleep.]
<shevy>
hmm
dawkirst has quit [Remote host closed the connection]
kumarat9pm has quit [Quit: Leaving.]
atmosx has quit [Remote host closed the connection]
<jumblemuddle>
Sometimes there's a global environment variable that I have to set, or maybe the folder just has to be added to my path?
<shevy>
as far as I know there are two main install ways for a gem - the first is a system-wide install, which usually goes into PREFIX, /usr/lib/ruby*, and the user install one via --user-install which goes into $HOME dir
atmosx has joined #ruby
duggiefresh has joined #ruby
kumarat9pm has joined #ruby
freerobby has joined #ruby
<jhass>
jumblemuddle: you can modify GEM_HOME / GEM_PATH, check the output of `gem env` with different values for these
cocotton has quit [Remote host closed the connection]
<jumblemuddle>
jhass: that's what I was looking for, thanks :)
sambao21 has joined #ruby
sambao21 has quit [Client Quit]
_maes_ has joined #ruby
sski has quit [Remote host closed the connection]
cocotton has joined #ruby
kumarat9pm has quit [Client Quit]
sski has joined #ruby
ponga has joined #ruby
x77686d has joined #ruby
<jumblemuddle>
So, I should changes these where ever I want? Or does ruby have a specific way of setting these?
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
jamto11 has joined #ruby
leslie has joined #ruby
sski has quit [Ping timeout: 246 seconds]
x77686d has quit [Ping timeout: 245 seconds]
sambao21 has quit [Read error: Connection reset by peer]
Spami has quit [Quit: This computer has gone to sleep]
ashleyis has quit [Ping timeout: 245 seconds]
User458764 has joined #ruby
MacTrash has quit [Quit: This computer has gone to sleep]
justinas_ has joined #ruby
dapz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
toastynerd has joined #ruby
freezey has quit [Remote host closed the connection]
claymore has quit [Ping timeout: 255 seconds]
s3ri0us has joined #ruby
FenixFyreX has quit [Quit: Page closed]
ce_afk is now known as cescalante
poikon has quit [Remote host closed the connection]
<apeiros>
shevy: it's not that I have more options. it's when my base namespace is naturally already a class
_justin has quit [Quit: _justin]
<jhass>
jumblemuddle: environment variables, so these would go to your .profile or .env if you're autoenv or you declare a function to activate them or whatever
freezey has joined #ruby
<jumblemuddle>
Ok, thanks
endash has quit [Quit: endash]
claymore has joined #ruby
Kricir has joined #ruby
endash has joined #ruby
<jumblemuddle>
GEM_PATH should be separated by ':' right?
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
crzrcn1 has joined #ruby
kpshek has quit []
claymore has quit [Ping timeout: 255 seconds]
beckyconning_ has quit [Ping timeout: 240 seconds]
brucelee has joined #ruby
claymore has joined #ruby
Soda has joined #ruby
crzrcn has quit [Ping timeout: 276 seconds]
zachallett has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
crzrcn1 has quit [Ping timeout: 240 seconds]
froy has joined #ruby
kpshek has joined #ruby
andrewjanssen has joined #ruby
brucelee has quit [Ping timeout: 245 seconds]
jamto11_ has joined #ruby
phutchin2 has joined #ruby
azkaran34 has joined #ruby
DaniG2k has quit [Quit: leaving]
phutchin1 has quit [Ping timeout: 255 seconds]
Martxel has quit [Ping timeout: 265 seconds]
jamto11_ has quit [Ping timeout: 240 seconds]
Merks has quit []
aspires has joined #ruby
toastynerd has quit [Remote host closed the connection]
apeiros has quit [Remote host closed the connection]
justinas_ has quit [Quit: Leaving]
sambao21 has joined #ruby
troyronda has joined #ruby
crystal77 has quit [Quit: Computer has gone to sleep.]
magnetica has quit [Ping timeout: 240 seconds]
aspires has quit [Client Quit]
lethjakman has joined #ruby
aspires has joined #ruby
zachallett has quit [Remote host closed the connection]
apeiros has joined #ruby
michael_lee has quit [Remote host closed the connection]
majoh has quit [Quit: bam bam bam bam]
Martxel has joined #ruby
Advocation has quit [Quit: Advocation]
crystal77 has joined #ruby
michaeldeol has joined #ruby
mjs2600 has quit [Remote host closed the connection]
<v0n>
what is the easiest way to backport __dir__?
duggiefresh has quit [Remote host closed the connection]
maletor has joined #ruby
<v0n>
if RUBY_VERSION != "2.1.0" ; define __dir__ ; Dir.dirname(__FILE__) ; end ; end ?
greenarrow has quit [Quit: 500]
<segfalt>
don't use !=.
<segfalt>
2.1.1 is out
pu22l3r_ has quit [Remote host closed the connection]
<segfalt>
if RUBY_VERSION < "2.1.0"
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
<v0n>
segfalt: thanks (btw it's 2.0.0 I think)
einarj has joined #ruby
ta_ has joined #ruby
zachallett has joined #ruby
azkaran34 has quit [Quit: Leaving]
mjsmith2 has quit [Remote host closed the connection]
deric_skibotn has joined #ruby
Martxel has quit [Ping timeout: 246 seconds]
benzrf is now known as benzrf|offline
redondos has quit [Excess Flood]
WormDrink has quit [Ping timeout: 265 seconds]
ta has quit [Ping timeout: 265 seconds]
cescalante is now known as ce_afk
redondos has joined #ruby
redondos has quit [Changing host]
redondos has joined #ruby
boboc has joined #ruby
Martxel has joined #ruby
djbkd has joined #ruby
fgo has joined #ruby
benzrf|offline is now known as benzrf
mjsmith2 has joined #ruby
Rainicorn has joined #ruby
doodlehaus has quit [Read error: Connection reset by peer]
doodlehaus has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
Martxel has quit [Read error: Connection reset by peer]
Mon_Ouie has joined #ruby
Mon_Ouie has quit [Changing host]
Mon_Ouie has joined #ruby
helpD has quit [Remote host closed the connection]
Spami has joined #ruby
helpD has joined #ruby
fgo has quit [Ping timeout: 265 seconds]
Hobogrammer has joined #ruby
SCommette has quit [Quit: SCommette]
omosoj has joined #ruby
LadyRainicorn has quit [Ping timeout: 276 seconds]
x77686d has joined #ruby
musl has quit [Quit: WeeChat 0.4.3-dev]
benzrf is now known as benzrf|offline
mcrmfc has quit [Ping timeout: 240 seconds]
WormDrink has joined #ruby
sambao21 has joined #ruby
nouitfvf has joined #ruby
helpD has quit [Ping timeout: 240 seconds]
alpha123 has joined #ruby
mikecmpbll has quit [Ping timeout: 265 seconds]
freeone3000 has joined #ruby
supermarin has quit [Remote host closed the connection]
<freeone3000>
How do I get rid of the bundler warning about running as root on windows? My account is admin, but ruby.exe isn't running in UAC. (Equivilant thing on linux would be if a user was in a no-password sudoers group but executing the command.)
<havenn>
v0n: i'd probably check if Kernel#__dir__ is defined rather than checking the version: methods.include?(:__dir__)
<havenn>
v0n: or: defined? __dir__
supermarin has joined #ruby
helpD has joined #ruby
<v0n>
that's funny, you don't need to pass a symbol... defined? __dir__ instead of :__dir__
sdouglas has quit [Remote host closed the connection]
<michael_mbp>
consider there's a code-base, it's pretty much a CMS.
<michael_mbp>
normally two deploy envs - master(production) & staging, so two branches in the git repo.
W0rmDr1nk has joined #ruby
goleldar has quit [Remote host closed the connection]
instantaphex has quit [Ping timeout: 246 seconds]
<michael_mbp>
What's a decent setup for being able to continuously develop the generic CMS, but at the same time be able to patch client CMSs and potentially even backport stuff from client CMSs to the general stream (This would be rare).
poikon has quit [Ping timeout: 240 seconds]
<michael_mbp>
one approach would be to have a single git repo, master/staging/client-1/client-1-staging
<michael_mbp>
as branches
<michael_mbp>
downside, it's one huge repo.
WormDrink has quit [Ping timeout: 252 seconds]
supermarin has joined #ruby
elaptics is now known as elaptics`away
Hobogrammer has quit [Ping timeout: 246 seconds]
saarinen has joined #ruby
supermarin has quit [Read error: Connection reset by peer]
arianit has joined #ruby
arianit has quit [Changing host]
arianit has joined #ruby
LadyRainicorn has quit [Read error: Connection reset by peer]
supermarin has joined #ruby
LadyRainicorn has joined #ruby
blackavr has joined #ruby
Hobogrammer has joined #ruby
KanKava has joined #ruby
bruno- has quit [Read error: Connection reset by peer]
crystal77 has quit [Quit: Computer has gone to sleep.]
sambao21 has quit [Quit: Computer has gone to sleep.]
bruno- has joined #ruby
<michael_mbp>
thoughts?
yfeldblum has joined #ruby
benzrf|offline is now known as benzrf
ce_afk is now known as cescalante
ktosiek_ has joined #ruby
sdwrage has quit [Quit: This computer has gone to sleep]
boboc has quit [Remote host closed the connection]
Advocation has joined #ruby
SilkFox has quit [Ping timeout: 240 seconds]
<havenn>
michael_mbp: so client repos are forks of your generic CMS and have the original repo upstream remote?
wallerdev has joined #ruby
crystal77 has joined #ruby
ghr has quit [Ping timeout: 240 seconds]
mjs2600 has joined #ruby
omosoj has joined #ruby
<michael_mbp>
ah.
<havenn>
michael_mbp: if so then fetch upstream/staging or upstream/master
Vovko has quit []
<michael_mbp>
so the client repo is separate right?
<michael_mbp>
or just a fork?
yfeldblum has quit [Ping timeout: 252 seconds]
ktosiek has quit [Ping timeout: 252 seconds]
<michael_mbp>
fork it is
<havenn>
michael_mbp: i really don't know what you're doing, but i'd assume you'd have the client have their own repo that is a fork of yours with your set as remote upstream.
supermarin has quit [Remote host closed the connection]
razrunelord has quit [Remote host closed the connection]
kpshek has joined #ruby
stormbytes has joined #ruby
caleb_io has joined #ruby
caiges has joined #ruby
paulfm has joined #ruby
paulfm has quit [Client Quit]
sdouglas has quit [Remote host closed the connection]
papercode has joined #ruby
noocode has joined #ruby
poikon has joined #ruby
momomomomo has quit [Quit: momomomomo]
asteros has joined #ruby
zipace has quit [Read error: Connection reset by peer]
ascarter has joined #ruby
Es0teric has joined #ruby
mercwithamouth has joined #ruby
Kricir has quit [Ping timeout: 255 seconds]
djbkd has joined #ruby
newUser1_ has joined #ruby
ephemerian has joined #ruby
predator117 has joined #ruby
crzrcn has joined #ruby
Kricir has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
robbyoconnor has quit [Excess Flood]
poikon has quit [Ping timeout: 265 seconds]
timgauthier has quit [Read error: No route to host]
robbyoconnor has joined #ruby
moted has joined #ruby
crystal77 has quit [Quit: Computer has gone to sleep.]
centrx has quit [Quit: All this computer hacking is making me thirsty]
newUser1234 has quit [Ping timeout: 276 seconds]
nouitfvf_ has joined #ruby
yfeldblum has joined #ruby
Doppp has joined #ruby
nouitfvf has quit [Ping timeout: 240 seconds]
MatthewsFace has joined #ruby
datafirm has joined #ruby
crystal77 has joined #ruby
pen has joined #ruby
<datafirm>
Im trying to override a method in an instance_eval block. but the method names are dynamic so I need to interpolate them as strings. I cannot seem to be able to use define_method on an instance .
<datafirm>
ideas?
sdouglas has joined #ruby
bearlulz has joined #ruby
zastern has quit [Quit: WeeChat 0.4.2]
pen has quit [Client Quit]
zastern has joined #ruby
momigi has quit [Remote host closed the connection]
<jhass>
define_singleton_method
<jhass>
doing that for every instance of some class is pretty inefficient though
davedev2_ has joined #ruby
momigi has joined #ruby
robbyoconnor has quit [Ping timeout: 245 seconds]
kirun has joined #ruby
davedev24 has quit [Read error: Connection reset by peer]
Toordog has quit [Ping timeout: 276 seconds]
asteros has quit [Quit: asteros]
razrunelord has joined #ruby
asteros has joined #ruby
suffice has quit [Remote host closed the connection]
endash_ has joined #ruby
endash has quit [Read error: Connection reset by peer]
endash_ is now known as endash
Doppp has quit [Ping timeout: 246 seconds]
x77686d has quit [Quit: x77686d]
JBreit has joined #ruby
Kricir has quit [Ping timeout: 245 seconds]
omosoj has quit [Ping timeout: 276 seconds]
<datafirm>
jhass: hmm. there are a bunch of accessors that were created, and I need to perform some function after each of them are called.
<datafirm>
jhass: maybe an observer of some sort?
momigi has quit [Ping timeout: 240 seconds]
timonv has joined #ruby
Speed has joined #ruby
<jhass>
the accessors are defined per instance? not at the class level?
timonv_ has joined #ruby
paulfm has joined #ruby
sdouglas has quit [Remote host closed the connection]
andrewjanssen has quit [Quit: Leaving...]
FenixFyreX_ has joined #ruby
<datafirm>
jhass: they are defined at the class level using #define_method
dapz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
sdouglas has joined #ruby
FenixFyreX has quit [Disconnected by services]
FenixFyreX_ is now known as FenixFyreX
<datafirm>
I cannot overid the method that calls the define methods, because that would cause too much rewrite. @jhass
x1337807x has joined #ruby
dapz has joined #ruby
<jhass>
why don't you just call a hook at the end of them then?
bruno- has quit [Read error: Connection reset by peer]
gazarsgo has joined #ruby
bruno- has joined #ruby
<jhass>
or just redefine them at the class level and save the originals with alias_method
ghr has joined #ruby
<gazarsgo>
i'm trying to use basic auth with the restclient gem, but I get a 401? curl'ing the same URL doesn't return a 401...
<jhass>
datafirm: though that might show signs of doing too much metaprogramming
<freeone3000>
gazarsgo: Are you sending the correct auth?
timonv has quit [Ping timeout: 255 seconds]
<gazarsgo>
what do you mean, the correct auth? I have username:password embedded in the URL
<datafirm>
jhass: It’s coming from a library, so I don’t want to overwrite there sutf. I just need to know when these accessor methods are called so I can call another method hook
<jhass>
you need to overwrite them
sdouglas has quit [Ping timeout: 245 seconds]
coderhs has joined #ruby
momigi has quit [Read error: Connection reset by peer]
coderhs has quit [Read error: Connection reset by peer]
<datafirm>
jhass: which means I have to copy lines of their code.. if their codebase changes, I cannot get bugs fixes and what not..
predator117 has quit [Ping timeout: 252 seconds]
<jhass>
no
momigi has joined #ruby
<jhass>
you can alias_method the originals and call them in your new methods
<jhass>
another approach would be using SimpleDelegate from the delegate stdlib
IceDragon has quit [Ping timeout: 265 seconds]
<jhass>
though that makes only sense if you want to augment the class / methods in specifics places
newUser1_ has quit [Ping timeout: 240 seconds]
bruno- has quit [Ping timeout: 240 seconds]
ghr has quit [Ping timeout: 245 seconds]
IceDragon has joined #ruby
jprovazn has joined #ruby
troyronda has joined #ruby
baweaver has joined #ruby
postmodern has joined #ruby
fgo has quit [Ping timeout: 276 seconds]
<datafirm>
jhass: I think I can alias the methods! I just need a hook after they are called.
skysploit has quit [Remote host closed the connection]
<shevy>
note to self, when wenshan connects, say something
JBreit has left #ruby ["Leaving"]
paulfm has quit []
goleldar has quit [Remote host closed the connection]
supermarin has joined #ruby
<datafirm>
jhass: shit. actually the methods are created at the intance level.. so I cannot define_method or alias them at the class level, since I don’t know what they are.
kiri has quit [Ping timeout: 252 seconds]
cina has quit [Ping timeout: 252 seconds]
subbyyy has joined #ruby
wjlafrance has joined #ruby
Hanmac1 has joined #ruby
newUser1234 has joined #ruby
omosoj has joined #ruby
Hanmac has quit [Ping timeout: 245 seconds]
dogurness has quit [Ping timeout: 276 seconds]
ponga has joined #ruby
bruno- has joined #ruby
justinas_ has joined #ruby
nanoyak has quit [Quit: Computer has gone to sleep.]
<justinas_>
Is there any way ruby caches variable value?
bruno- has quit [Ping timeout: 255 seconds]
x1337807x has quit [Ping timeout: 245 seconds]
ktosiek_ has quit [Ping timeout: 245 seconds]
momomomomo has joined #ruby
x77686d has joined #ruby
<jhass>
justinas_: what do you mean?
bruno- has joined #ruby
paulfm has joined #ruby
IcyDragon is now known as IceDragon
<justinas_>
jhass: i run into strange issue. I do have a method which returns number of friends user have. and whenever i call that method it will keep his first value for future calls
ktosiek has joined #ruby
<jhass>
what does that method look like? (read the topic)
<apeiros>
ruby does not magical caching. if you have something cached, it's because you explicitly wrote something which caches.
kleing has joined #ruby
skysploit has quit [Ping timeout: 250 seconds]
iamvery has joined #ruby
cina has joined #ruby
bruno- has quit [Ping timeout: 265 seconds]
bruno- has joined #ruby
aspires has quit []
thomas3141592653 has joined #ruby
sepp2k1 has joined #ruby
<justinas_>
jhass: there is that metod. As i have said, it somehow stores first value. For example: user has 1 friends, i print it out, then add another friend, it shows 1.
relix_ has quit [Read error: Connection reset by peer]
razrunelord has quit [Remote host closed the connection]
meatherly has joined #ruby
relix has joined #ruby
<justinas_>
one more question guys. Are any of you using sublime+rspec? For me it is not working (cant find required gems) while in terminal everything works just well
rdark has quit [Quit: leaving]
bruno- has joined #ruby
W0rmDr1nk has quit [Ping timeout: 252 seconds]
ItSANgo has joined #ruby
<shevy>
use the terminal only!
asteros has joined #ruby
<apeiros>
gazarsgo: I remember that + in URIs meant space in some context, but I can't find any reference for that in 2396
<apeiros>
*contexts
W0rmDr1nk has joined #ruby
seaned has quit [Quit: Zzzzzz....]
<apeiros>
it might be correct to translate it to space. not sure though.
predator117 has joined #ruby
<freeone3000>
It's incorrect, but it's been used since forever.
poikon has quit [Remote host closed the connection]
benzrf is now known as benzrf|offline
<freeone3000>
Blame google.
sdwrage has joined #ruby
jameswlane has quit [Quit: Logging off]
poikon has joined #ruby
Valesk has joined #ruby
<apeiros>
gazarsgo: if you want to transmit a literal +, use %2b
<justinas_>
shevy: i do need to run rspec for single test/line and with terminal it takes way more time than it would take with ctrl+shift+r in sublime
marcdel has quit []
troyronda has quit [Remote host closed the connection]
ndrei has quit [Quit: Lost terminal]
bruno- has quit [Ping timeout: 255 seconds]
fgo has joined #ruby
ndrei has joined #ruby
<apeiros>
I'm pretty sure + as space existed before google freeone3000
helpD has joined #ruby
<freeone3000>
It was still wrong. By every single URI spec, + should be +. %2b should also be +, but you don't do %65 for A.
fgo_ has joined #ruby
ponga has quit [Quit: Leaving :)]
wallerdev has quit [Quit: wallerdev]
troyronda has joined #ruby
anonymuse has joined #ruby
momomomomo has quit [Quit: momomomomo]
sambao21 has joined #ruby
claymore has quit [Ping timeout: 255 seconds]
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
seuros1 has quit [Ping timeout: 276 seconds]
bthesorceror has quit [Remote host closed the connection]
<apeiros>
freeone3000: and the query part of an url is form-urlencoded
claymore has joined #ruby
dapz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
fgo_ has quit [Ping timeout: 276 seconds]
<freeone3000>
apeiros: Okay. But the authority is not.
gregf has quit [Quit: WeeChat 0.4.3]
<apeiros>
not sure on that. when I read it before, I've seen that they spoke about having added "+" to reserved because it was reserved in query part too
<apeiros>
can't find that now, though :-|
<gazarsgo>
apeiros: + is in reserved, but reserved only applies to subsets of URI, not every section
<gazarsgo>
appendix A is the BNF for every 'word' specification
<apeiros>
gazarsgo: yes. found that. that's why I could make the statement "and + is part of sub-delims there"
bruno- has joined #ruby
renier has quit [Ping timeout: 255 seconds]
<apeiros>
but it does not explain the meaning/ideas behind sub-delims
<apeiros>
but given that "delims" probably means "delimiters", it makes sense to escape delimiters if you don't intend to use it as a delimiter.
<apeiros>
s/escape/encode/
noop has quit [Ping timeout: 252 seconds]
sambao21 has quit [Quit: Computer has gone to sleep.]
<freeone3000>
Even though + is allowed, since it's a sub-delim, and sub-delims are allowed?
<freeone3000>
User data doesn't end until there's a @.
<apeiros>
allowed doesn't mean "it means its literal value"
Es0teric has quit [Quit: Computer has gone to sleep.]
<gazarsgo>
delims are explained generically in section 2.2
<apeiros>
it just means "it is allowed to stand there"
<gazarsgo>
i'm just glad the bug is in my code. thanks for the sanity check
<freeone3000>
So what, that means usernames can contain spaces?
alvaro_o has joined #ruby
<apeiros>
freeone3000: encoded spaces?
pwh has quit []
<freeone3000>
apeiros: Yes.
<freeone3000>
apeiros: Okay, yeah, that actually does make it consistent. Okay.
<apeiros>
note: I'm not entirely sure I make correct sense of that mess of RFC :)
bruno- has quit [Ping timeout: 255 seconds]
instantaphex has quit [Ping timeout: 240 seconds]
cocotton has quit [Remote host closed the connection]
bruno- has joined #ruby
seuros has joined #ruby
cocotton has joined #ruby
devyn has quit [Ping timeout: 250 seconds]
devyn has joined #ruby
renier has joined #ruby
benzrf|offline is now known as benzrf
trhodes_ has joined #ruby
nanoyak has joined #ruby
bruno- has quit [Ping timeout: 276 seconds]
asteros has joined #ruby
asteros has quit [Client Quit]
soulcake has quit [Read error: Connection reset by peer]
phinfonet has joined #ruby
diegoviola has quit [Quit: WeeChat 0.4.3]
soulcake has joined #ruby
arianit has quit [Quit: Ex-Chat]
WishBoy has quit [Ping timeout: 240 seconds]
troyronda has quit [Remote host closed the connection]
einarj has quit [Ping timeout: 255 seconds]
akgerber has joined #ruby
timonv_ has quit [Remote host closed the connection]
paulfm has quit []
mary5030_ has joined #ruby
newUser1234 has joined #ruby
Mon_Ouie has quit [Quit: WeeChat 0.4.3]
bruno- has joined #ruby
mary503__ has joined #ruby
aspires has joined #ruby
ndngvr has quit [Ping timeout: 246 seconds]
mary5030 has quit [Read error: Connection reset by peer]
einarj has joined #ruby
michaelpjohnson has joined #ruby
havenwood has quit []
Snarkz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Hakon|mbp has joined #ruby
kpshek has quit []
ikaros has quit [Quit: Ex-Chat]
mary5030 has joined #ruby
mary5030_ has quit [Ping timeout: 245 seconds]
dapz has joined #ruby
Hakon|mbp has quit [Client Quit]
pwh has joined #ruby
seuros has quit [Ping timeout: 250 seconds]
jds has quit [Quit: Connection closed for inactivity]
michaelpjohnson has quit [Client Quit]
mary503__ has quit [Ping timeout: 255 seconds]
paulfm has joined #ruby
michaelpjohnson has joined #ruby
nari has quit [Ping timeout: 246 seconds]
metamaterial has joined #ruby
crystal77 has joined #ruby
zachalle_ has joined #ruby
zachallett has quit [Ping timeout: 265 seconds]
profelm has quit [Quit: Page closed]
marcdel has joined #ruby
tcstar has joined #ruby
benzrf is now known as benzrf|offline
sambao21 has joined #ruby
metamaterial has quit [Remote host closed the connection]
jheg_ has joined #ruby
Tricon has joined #ruby
troyronda has joined #ruby
metamaterial has joined #ruby
yfeldblum has quit [Ping timeout: 240 seconds]
instantaphex has joined #ruby
dawkirst has joined #ruby
<Nowaker>
hey. is there any way to get the length of utf-8 text on *screen*? this japanese guy takes 2 places in constant-width font in console: 'て'. whereas this guy 'ł' takes only one. 'て'.size = 1, 'て'.bytesize = 3, but how about the width on the screen? is ruby aware of something like that?
troyronda has quit [Remote host closed the connection]
aspires has quit []
momomomomo has joined #ruby
endash has quit [Quit: endash]
dapz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
subbyyy_ has joined #ruby
<freeone3000>
Nowaker: If you're using a full-width monospaced font, then .size is correct.
jamto11_ has joined #ruby
<DouweM>
Nowaker: I'm assuming that depends on the font. In Sublime, て takes up about 1.5 charwidths, not two
<freeone3000>
Nowaker: If you're not using a full-width monospaced font, you need information from the font to calculate the display size of a run of text.
<freeone3000>
(Full-width monospaced fonts are ugly as sin, so even if you're using monospaced, it's probably some width hybrid.)
pu22l3r has quit [Ping timeout: 246 seconds]
aspires has joined #ruby
dapz has joined #ruby
jheg_ has quit [Quit: jheg_]
troyronda has joined #ruby
jheg_ has joined #ruby
subbyyy has quit [Ping timeout: 250 seconds]
<Nowaker>
DouweM: that's interesting, yeah, it's ~1.5 in my sublime too.
<Nowaker>
however, in console it's 2
<Nowaker>
probably because terminal emulators have strict rules about this
<DouweM>
Nowaker: which shows Ruby can't possibly know that :)
<freeone3000>
Nowaker: RMagick can help with this, if you know what font your terminal is using, which rbcurse can help with...
code-cat has joined #ruby
<DouweM>
freeone3000: *shudder* :)
<Nowaker>
freeone3000: yeah... but it's not a case for me. i was fixing a rubygem for rendering colorful terminal outputs to html
<apeiros>
or some lib which can read font-metric data from the font files
<Nowaker>
so there's no way to know the font
<freeone3000>
Nowaker: It's the font you specify. You're writing HTML. Font control is like, day 1.
<code-cat>
hello, is there a way to force the size of every leaf/child values in a hash that's generated from a yaml?
acrussell has quit [Quit: Leaving.]
momomomomo has quit [Quit: momomomomo]
<apeiros>
freeone3000: it might be a browser fallback because the specified font is not available :-/
jamto11_ has quit [Ping timeout: 246 seconds]
<apeiros>
code-cat: the size?
<code-cat>
yes
<apeiros>
ok, maybe I have been unclear. *what* size.
<code-cat>
for example i want all values to not exceed 4096 bytes
soheil has quit [Remote host closed the connection]
nanoyak has quit [Quit: Computer has gone to sleep.]
<freeone3000>
There are ways around that nowadays, but yeah, it's possible that'll happen, but you can specify a font and embed a font and use really common fonts and, hey, DejaVu Sans Mono is full-width monospaced!
<freeone3000>
(And, as aforementioned, ugly as sin.)
phutchin2 has quit [Ping timeout: 265 seconds]
<apeiros>
of memory? or are they strings and .bytesize should be <= 4096?
<apeiros>
code-cat: seriously, be precise.
obscured has joined #ruby
<code-cat>
apeiros: string size
elm has joined #ruby
nanoyak has joined #ruby
<apeiros>
code-cat: if post-processing is good enough, then just traverse the yaml document
momomomomo has joined #ruby
<code-cat>
but then again, not all values are strings, so i am not sure how i can go about it
<apeiros>
if it isn't good enough, psych afaik has ways to hook into the parsing process
gancl has joined #ruby
elm has left #ruby [#ruby]
gancl has quit [Remote host closed the connection]
alexju has quit [Remote host closed the connection]
seuros has joined #ruby
shock_one has quit [Ping timeout: 276 seconds]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
havenwood has joined #ruby
justinxreese has quit [Ping timeout: 246 seconds]
justinxreese has joined #ruby
momomomomo has quit [Client Quit]
<slash_nick>
monkeypatch String#inspect to truncate at 4096
Xeago has quit [Remote host closed the connection]
poguez_ has quit [Quit: Connection closed for inactivity]
cocotton has quit [Remote host closed the connection]
<code-cat>
haha ok, i think i have a general direction on how to do this now
wallerdev has joined #ruby
ascarter has joined #ruby
soheil has joined #ruby
troyronda has quit [Remote host closed the connection]
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
MatthewsFace has joined #ruby
Snarkz has joined #ruby
michaeldeol has joined #ruby
bthesorceror has joined #ruby
jackneill has quit [Remote host closed the connection]
seuros1 has joined #ruby
cocotton has joined #ruby
momomomomo has joined #ruby
blackmesa has joined #ruby
SegFaultAX has quit [Excess Flood]
<instantaphex>
What does end.first mean?
<freeone3000>
instantaphex: The method or instance variable first of the object end.
<apeiros>
instantaphex: I think you left out an important chunk there
seuros has quit [Ping timeout: 252 seconds]
<apeiros>
instantaphex: I'd wager the guess that it's do … end.first
<apeiros>
and that'd be calling first on the value returned by the block
<instantaphex>
apeiros: yeah its in a do block
<jhass>
*the return value of the method the block is passed to
SegFaultAX has joined #ruby
<apeiros>
jhass: flaky
<apeiros>
block can break
<apeiros>
but yes. my phrasing was not correct.
<jhass>
I'd still consider it the methods return value, even if the block breaks
mark_locklear has quit [Ping timeout: 255 seconds]
djbkd has joined #ruby
jonno11 has joined #ruby
benwoody has joined #ruby
seuros1 has quit [Ping timeout: 240 seconds]
Kricir has quit [Ping timeout: 276 seconds]
Es0teric has joined #ruby
doodlehaus has quit [Ping timeout: 240 seconds]
treehug88 has quit [Ping timeout: 252 seconds]
treehug88 has joined #ruby
zachalle_ has quit [Remote host closed the connection]
xiq has joined #ruby
musl has joined #ruby
marcdel has quit []
freeone3000 has left #ruby ["Konversation terminated!"]
Shidash has joined #ruby
poikon has quit [Remote host closed the connection]
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
razrunelord has joined #ruby
cina has joined #ruby
<sweeper>
hmm. I want a pre-commit hook that runs *only* the tests relevant, by using a git diff between current branch & master to get touched files, and combined with code coverage results to produce a list of tests covering said code
AlexRussia has joined #ruby
benzrf|offline is now known as benzrf
djbkd has quit [Remote host closed the connection]
Xeago has joined #ruby
seuros has joined #ruby
blackmesa has quit [Ping timeout: 246 seconds]
Morkel has quit [Quit: Morkel]
<terrellt>
sweeper: Why not just use guard?
djbkd has joined #ruby
poikon has joined #ruby
Rylee has quit [Max SendQ exceeded]
<sweeper>
terrellt: still need to compare with coverage tools
<apeiros>
s2013: .split(/\W+/) this will only work for ascii based languages
paulfm has quit []
<apeiros>
i.e., not many
brunops has joined #ruby
bthesorceror has quit [Remote host closed the connection]
nfk has quit [Quit: yawn]
<apeiros>
.scan(/\p{Word}+/)
<shevy>
much more readable
momigi has quit [Read error: Connection reset by peer]
<s2013>
ok cool. this is very helpful
<instantaphex>
Sixteen years old, men of bread with blood; they were seventy sons and when Samuel hewed stones, and the LORD; but the LORD, so that possesseth an Egyptian; because of Israel, that he had sworn unto them. And the evil dealings by the LORD delivered us.
<shevy>
instantaphex if only they would have known ruby
<instantaphex>
oh shit sorry
<instantaphex>
haha
testcore_ has joined #ruby
TheMoonMaster has quit [Excess Flood]
<instantaphex>
I'm messing around with a markov chain text generator on the bible
nanoyak has quit [Quit: Computer has gone to sleep.]
momigi has joined #ruby
testcore has quit [Ping timeout: 272 seconds]
<s2013>
have you used treat instantaphex
<instantaphex>
no
<s2013>
check it out, its a cool gem for ruby
treehug88 has joined #ruby
<instantaphex>
will do
<s2013>
do you do nlp?
<apeiros>
lol
* apeiros
was close to /kick instantaphex not #religion
nfk has joined #ruby
mojo619 has joined #ruby
* instantaphex
bows head in shame
blackmesa has joined #ruby
srji has joined #ruby
<s2013>
apeiros, are you an op here?
cina has joined #ruby
dapz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<benzrf>
apeiros is an op
<apeiros>
um, no :o)
dapz has joined #ruby
<s2013>
instantaphex, cool i was thinking about doing word frequency on diff religoius texts like the Bible, Quran, Vedas, etc.
<shevy>
s2013 try to get him to kick you
<s2013>
and wanted to see overlap
<instantaphex>
that's cool
<s2013>
apeiros, your mother is a nice woman.
<benzrf>
yo momma so impure, she makes C look like haskell
<instantaphex>
I haven't figured out what to do with it yet. Just messing with it to see what cool things it can come up with
<shevy>
instantaphex cool things like?
<workmad3>
benzrf: pretty sure that should be the other way around ;)
<s2013>
tons of cool things.
<s2013>
data is awesome
<shevy>
eh
treehug88 has quit [Client Quit]
rezzack1 has joined #ruby
<instantaphex>
not sure, shevy
<benzrf>
workmad3: that would be if she was super pure tho
<workmad3>
benzrf: oh wait... it's too late
<s2013>
anyone here working on sciruby?
jamto11_ has joined #ruby
<s2013>
i wish i was smart enough to work on it :(
<workmad3>
benzrf: my brain is obviously turned off for the day today :)
<shevy>
what is sciruby
<shevy>
is that ruby for science
<shevy>
but everyone's using python?
<benzrf>
scientists like python because it falls under biology
<benzrf>
but ruby only falls under geology
musl has joined #ruby
<s2013>
yeah shevy
<s2013>
hehe benzrf
<havenwood>
perl for marine biology
<s2013>
im going to scipycon this year
<s2013>
its more expensive than railsconf!
<shevy>
lol havenwood
<shevy>
damn python guys
<s2013>
and C for oceanography
<benzrf>
haskell falls under psychiatry
<benzrf>
or so they might say
<s2013>
Clojure for breakups
<shevy>
But I have one speculation why ruby is less popular
<shevy>
it's too complex
jdguzman has joined #ruby
rezzack has quit [Ping timeout: 276 seconds]
<s2013>
cause ruby was almost irrelevant until DHH came along
<s2013>
and thats the truth
<shevy>
eh if rails would have been so great, why did ruby decline in the last 2 years
<s2013>
because rails isnt cool anymore
<s2013>
its all about nodejs/go/clojure nowadays
<shevy>
damn javascript
<s2013>
even though i prefer rails over all of them
subbyyy_ has quit [Ping timeout: 240 seconds]
<s2013>
you gotta realize vast majority of osftware is still C/C++/Java/.NET.. the other ones are all startupish and they like to follow trends
<instantaphex>
I bet somewhere in Japan, there is production code like that
marcdel has quit [Ping timeout: 276 seconds]
benwoody has joined #ruby
aagdbl has quit [Quit: Connection closed for inactivity]
<havenwood>
shevy: top 15 langs for new repos on github so far this year (accd to google bigquery i just did): {"JavaScript"=>187622, "Java"=>143876, "Ruby"=>137412, "PHP"=>91006, "CSS"=>89650, "C"=>78209, "Python"=>72094, "C++"=>41434, "Objective-C"=>31976, "C#"=>29858, "Shell"=>24083, "R"=>16254, "CoffeeScript"=>11168, "Go"=>6985}
<instantaphex>
damnit I cmd + r'd my iTerm
zachallett has joined #ruby
<shevy>
wat
<shevy>
java before ruby
<shevy>
the world is going to end soon
Nukepuppy has quit [Ping timeout: 276 seconds]
blackmesa has quit [Ping timeout: 240 seconds]
<apeiros>
the world already ended a dozen times over
nanoyak has quit [Read error: Connection reset by peer]
<s2013>
the mayans were right
<shevy>
right but this time for real
<apeiros>
it was every time for real
nanoyak has joined #ruby
<apeiros>
you're in hell atm
mrmargolis has joined #ruby
<apeiros>
hence java > ruby
<apeiros>
that's also why encodings exist. and timezones. and off-by-one-errors
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<xiq>
hellas
doodlehaus has joined #ruby
ghr has joined #ruby
ikaros has joined #ruby
ikaros has quit [Remote host closed the connection]
mary5030 has quit [Remote host closed the connection]
danman_ has joined #ruby
kitak has joined #ruby
cocotton_ has joined #ruby
aspiers has quit [Ping timeout: 246 seconds]
lkba has joined #ruby
kitak has quit [Remote host closed the connection]
bthesorceror has joined #ruby
<havenwood>
shevy: i dunno, seems Ruby has a nice piece of the top 15 pie: {"JavaScript"=>"19.5%", "Java"=>"15.0%", "Ruby"=>"14.3%"}