yfeldblum has quit [Remote host closed the connection]
<smathy>
amincd, it's just a variable name meant to indicate that the object must be like an IO object.
<ramfjord_>
amincd: I'm not entirely sure, but I'm guessing it's something that implements a subset of the IO methods
<amincd>
smathy: thanks
<amincd>
ramfjord_: got it
yfeldblum has joined #ruby
brianpWins has quit [Ping timeout: 260 seconds]
dikaio has joined #ruby
sneakerhax has quit [Ping timeout: 246 seconds]
brianpWins has joined #ruby
sp4rrow has quit [Quit: The Internet needs a break and I need a cookie]
crash_ovride has quit [Quit: Leaving]
<wrkrcoop>
what does it mean if someone has a class Person
<wrkrcoop>
and then in that class there’s a line that says class << self
_biox has quit [Ping timeout: 244 seconds]
sumobob has joined #ruby
<Arcaire>
wrkrcoop: anything in that class (the << self bit) will be considered a class method instead of an instance method
<Arcaire>
so you're implicitly writing `def self.method`
<wrkrcoop>
oh i see
<wrkrcoop>
Arcaire: got it. and anytime u use self.method it is a class method? shoot i thought that was just was way of creating insance methods
jenrzzz has quit [Ping timeout: 250 seconds]
<Arcaire>
wrkrcoop: self.method is class
<Arcaire>
method is instance
<wrkrcoop>
Arcaire: thank you
wrkrcoop has quit [Quit: wrkrcoop]
<Arcaire>
:D
hahuang61 has joined #ruby
jenrzzz has joined #ruby
jenrzzz has joined #ruby
<ramfjord_>
I've got to say, I've been using ruby for a number of years and I don't understand that syntax or the point of it
<Arcaire>
ramfjord_: Which?
<ramfjord_>
"class" is a reserved keyword, but AFAIK has something to do with Class.new
<Arcaire>
class and Class aren't the same.
<ramfjord_>
there is no << method on Class or Module though, and in any case, it would seem like you were extending a new class if that were the case, instead of the class of the current scope
hahuang61 has quit [Ping timeout: 250 seconds]
<ramfjord_>
"class A < B" is equivalent to "A = Class.new(B) do" right? so what does class mean?
<Arcaire>
class is a keyword
<Arcaire>
but Class is, well, a Class
<Arcaire>
lol
<ramfjord_>
so is "class << self" effectively a keyword on it's own right as well then?
Ebok has joined #ruby
<ramfjord_>
why the special treatment? If we wanted to make a way of defining class methods in a short way, why not make the keyword "class methods" or something obvious?
snoozelose has quit [Remote host closed the connection]
snoozelose has joined #ruby
jdawgaz has joined #ruby
eljimmy has quit [Read error: Connection reset by peer]
impermanence has quit [Ping timeout: 240 seconds]
gregf has quit [Quit: WeeChat 1.5]
monoprotic has joined #ruby
monoprotic has joined #ruby
yeticry has joined #ruby
SilverKey has quit [Quit: Halted.]
eljimmy has joined #ruby
jenrzzz has quit [Ping timeout: 244 seconds]
gregf has joined #ruby
jenrzzz has joined #ruby
CloCkWeRX has joined #ruby
yeticry has quit [Client Quit]
snoozelose has quit [Client Quit]
yeticry has joined #ruby
snoozelose has joined #ruby
karmatr0n has joined #ruby
LoneHerm_ has joined #ruby
gregf has quit [Client Quit]
karmatr0n has quit [Read error: Connection reset by peer]
gregf has joined #ruby
karmatr0n has joined #ruby
Caerus|Away is now known as Caerus
pietr0 has quit [Ping timeout: 265 seconds]
<Caerus>
hello #ruby
CloCkWeRX has quit [Ping timeout: 260 seconds]
bluOxigen has joined #ruby
nando293921 has quit [Quit: Lost terminal]
nando293921 has joined #ruby
tjbiddle has quit [Quit: tjbiddle]
agent_white has joined #ruby
tmtwd has joined #ruby
<agent_white>
Evenin'
pawnbox has joined #ruby
bruno- has quit [Ping timeout: 252 seconds]
dikaio has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
pawnbox has quit [Ping timeout: 276 seconds]
kareeoleez has joined #ruby
elifoster has quit [Ping timeout: 252 seconds]
CloCkWeRX has joined #ruby
openstruct has quit []
djbkd has joined #ruby
ruby-lang151 has quit [Ping timeout: 250 seconds]
whathappens has quit [Remote host closed the connection]
idefine has joined #ruby
jenrzzz has quit [Ping timeout: 252 seconds]
jdawgaz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Xiti has quit [Quit: Xiti]
nankyokusei has joined #ruby
d0lph1n98 has quit [Ping timeout: 260 seconds]
jdawgaz has joined #ruby
terlar has joined #ruby
tmtwd has quit [Quit: Leaving]
nankyokusei has quit [Ping timeout: 250 seconds]
halfamind has quit [Quit: Leaving.]
roamingdog has quit [Read error: Connection reset by peer]
karmatr0n has quit [Ping timeout: 244 seconds]
rbennacer has quit [Remote host closed the connection]
dikaio has joined #ruby
dikaio has quit [Client Quit]
dikaio has joined #ruby
LoneHerm_ has quit [Remote host closed the connection]
CloCkWeRX has quit [Ping timeout: 246 seconds]
griffindy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
CloCkWeRX has joined #ruby
stardiviner has quit [Ping timeout: 246 seconds]
Heaventree has joined #ruby
ta_ has quit [Remote host closed the connection]
Heaventree has left #ruby [#ruby]
aredridel has quit [Ping timeout: 240 seconds]
nando293921 has quit [Quit: Lost terminal]
chopin has quit [Remote host closed the connection]
nando293921 has joined #ruby
yfeldblum has quit [Remote host closed the connection]
Devalo has joined #ruby
JoshGlzBrk has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
aredridel has joined #ruby
saramic has joined #ruby
Axy has joined #ruby
Mia has quit [Ping timeout: 240 seconds]
idefine has quit [Remote host closed the connection]
d0lph1n98 has joined #ruby
stardiviner has joined #ruby
bronson has joined #ruby
ctp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
pawnbox has joined #ruby
Guest43 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Yiota has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bronson has quit [Ping timeout: 265 seconds]
Coldblackice has joined #ruby
pawnbox has quit [Ping timeout: 250 seconds]
djbkd has quit [Quit: My people need me...]
snoozelose has quit [Quit: Leaving]
nando293921 has quit [Quit: Lost terminal]
Eiam_ has quit [Quit: ╯°□°)╯︵ǝpouǝǝɹɟ]
benlieb has quit [Quit: benlieb]
djbkd has joined #ruby
dopie has joined #ruby
CausaMortis has joined #ruby
jdawgaz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
nando293921 has joined #ruby
smathy_afk has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ta_ has joined #ruby
nando293921 has quit [Client Quit]
arescorpio has joined #ruby
_blizzy_ has quit [Ping timeout: 250 seconds]
hahuang61 has joined #ruby
tildes_ has joined #ruby
kareeoleez has quit [Remote host closed the connection]
ur5us has quit [Remote host closed the connection]
ta_ has quit [Ping timeout: 260 seconds]
nando293921 has joined #ruby
hahuang61 has quit [Ping timeout: 260 seconds]
isxek has joined #ruby
dopie has quit [Quit: Lost terminal]
beatdown has joined #ruby
karmatr0n has joined #ruby
astrobunny has joined #ruby
yfeldblum has joined #ruby
haxrbyte has joined #ruby
sauvin has joined #ruby
bobbycvi has quit [Quit: ...]
benlieb has joined #ruby
yfeldblum has quit [Remote host closed the connection]
CausaMortis has quit [Ping timeout: 260 seconds]
yfeldblum has joined #ruby
impermanence has joined #ruby
karmatr0n has quit [Ping timeout: 244 seconds]
Vile` has quit [Ping timeout: 252 seconds]
monoprotic has quit [Ping timeout: 260 seconds]
impermanence has quit [Ping timeout: 260 seconds]
d0lph1n98 has quit [Ping timeout: 244 seconds]
Parko has quit [Ping timeout: 265 seconds]
hdm has joined #ruby
bluOxigen has quit [Ping timeout: 276 seconds]
quakephil has joined #ruby
noService has quit [Ping timeout: 246 seconds]
jaguarmagenta has quit [Remote host closed the connection]
codecop has joined #ruby
Parko has joined #ruby
ravishankarjha has joined #ruby
astrobunny has quit [Read error: Connection reset by peer]
astrobunny has joined #ruby
pawnbox has joined #ruby
raeoks has joined #ruby
idefine has joined #ruby
qualiaqq has joined #ruby
d0lph1n98 has joined #ruby
<guardian>
hello, when I ask Ruby to copy a file, does it open a file handle then performs a read / write loop, having blocks of data travel from filesystem to ruby buffers -- or does it defer it to the OS keeping it low overhead ala Java NIO?
skade has joined #ruby
pawnbox has quit [Ping timeout: 260 seconds]
last_staff has joined #ruby
djbkd has quit [Remote host closed the connection]
agit0 has joined #ruby
moeabdol has joined #ruby
aupadhye has joined #ruby
CloCkWeRX has left #ruby [#ruby]
speakingcode has quit [Ping timeout: 240 seconds]
ur5us has joined #ruby
idefine has quit [Ping timeout: 265 seconds]
bruno- has joined #ruby
MiniFren` has joined #ruby
ur5us has quit [Remote host closed the connection]
speakingcode has joined #ruby
Guest43 has joined #ruby
Guest43 has quit [Client Quit]
MiniFrenchBread has quit [Ping timeout: 265 seconds]
kareeoleez has joined #ruby
syndikate has joined #ruby
nhhc has joined #ruby
<syndikate>
Hello Guys, Good day.
saneax_AFK is now known as saneax
<syndikate>
I am trying to write a gemfile, now I am confused as to how to convert the structure of my small program to a gemfile
<Arcaire>
come again?
kareeoleez has quit [Remote host closed the connection]
aupadhye has quit [Quit: Leaving]
kareeoleez has joined #ruby
astrobu__ has joined #ruby
<syndikate>
I have a small command line application
<syndikate>
Which takes user input and process and provides output, now I run the application in a infinite loop so as to keep reading user input, now I need to convert the application to a gemfile
bruno- has quit [Ping timeout: 240 seconds]
<syndikate>
I make use of 2-3 classes for the program
<Arcaire>
What is your impression of what a Gemfile does?
skade has quit [Quit: Computer has gone to sleep.]
jackjackdripper has joined #ruby
astrobunny has quit [Ping timeout: 250 seconds]
<syndikate>
Provides portable code, so that I can package my classes and share it around
<syndikate>
It should be readily usable out of the box
arescorpio has quit [Quit: Leaving.]
agit0 has quit [Ping timeout: 250 seconds]
<Arcaire>
That's a gem, not a Gemfile, but I can see why you'd mistake the two.
<Arcaire>
A Gemfile is essentially a list of gems (libraries) to install to make your app work.
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
stardiviner has quit [Ping timeout: 246 seconds]
Devalo has quit [Ping timeout: 250 seconds]
postmodern has quit [Quit: Leaving]
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
the_drow has quit [Read error: Connection reset by peer]
startupality has quit [Quit: startupality]
AnoHito_ has joined #ruby
nankyokusei has joined #ruby
senayar has joined #ruby
senayar has quit [Changing host]
senayar has joined #ruby
AnoHito has quit [Ping timeout: 250 seconds]
zotherstupidguy has quit [Ping timeout: 276 seconds]
the_drow has joined #ruby
nankyokusei has quit [Ping timeout: 246 seconds]
<hanmac>
shevy good that i try recent ruby build again, they broke my bindings again ... "-std=gnu99 instead of -std=c99" they did it without thinking that it might have consequences for other stuff
|ifei5good has quit [Read error: Connection reset by peer]
AnoHito_ has quit [Read error: Connection reset by peer]
|ifei5g00d has joined #ruby
AnoHito_ has joined #ruby
Asher has quit [Read error: Connection reset by peer]
Asher has joined #ruby
lxsameer has joined #ruby
joneshf-laptop has quit [Ping timeout: 260 seconds]
hays_ has joined #ruby
hinbody has quit [Ping timeout: 276 seconds]
jwang has quit [Ping timeout: 260 seconds]
__main__ has quit [Ping timeout: 260 seconds]
hinbody has joined #ruby
joneshf-laptop has joined #ruby
hays has quit [Ping timeout: 250 seconds]
__main__ has joined #ruby
jwang has joined #ruby
lxsameer has quit [Ping timeout: 252 seconds]
<shevy>
hanmac as long as the wxwidget bindings work!
<hanmac>
shevy not yet, but i am currently fixing it
platzhirsch has joined #ruby
brunto has quit [Ping timeout: 250 seconds]
dionysus69 has quit [Remote host closed the connection]
ctp has quit [Ping timeout: 265 seconds]
brunto has joined #ruby
charliesome has joined #ruby
mitt3ns has joined #ruby
the_drow has quit [Quit: This computer has gone to sleep]
agent_white has quit [Read error: Connection reset by peer]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Snowy has joined #ruby
astrob___ has joined #ruby
Nice_BikeMaN has joined #ruby
dANOKELOFF has joined #ruby
<Nice_BikeMaN>
Where is the best place to learn Ruby
astrobu__ has quit [Ping timeout: 246 seconds]
Couch has quit [Ping timeout: 276 seconds]
<tobiasvl>
in vim
<Caerus>
the internet, lots of sources
astrobunny has quit [Ping timeout: 252 seconds]
mitt3ns is now known as agent_white
<Caerus>
Nice_BikeMaN, do you have programming background? if so a very good way is to pickup a ruby book and use internet to research on subjects that might confuse you.
<Nice_BikeMaN>
tobuasvl: Vim is wayyyyyyyyyyyy to complex and over kill for me:-)
<Caerus>
or ask here and maybe SO(search first)
<Nice_BikeMaN>
Caerus: I learned a little bit of Python and C++ (hardly any C++) so you could say that I am a total noob:-)
syndikate has quit [Ping timeout: 276 seconds]
<shevy>
Nice_BikeMaN you sorta need to have some motivation or need or goal
<Caerus>
my personal point about books are that a lof of them tend to be really hard to digest for total newbies, specially the core subjects that are language agnostic
<Caerus>
at least thats what I've seen in all the people I've tried to evangelize into coding so YMMV.
Madmanden has joined #ruby
<shevy>
there are good books and then there are not so good books!
<Nice_BikeMaN>
shevy: My goal is to be able to do task automation and write small programs (a calculator, for example)
crdpink has joined #ruby
<shevy>
calculator sounds easy
<Nice_BikeMaN>
shevy: Is The Ruby Programming Language (by David Flanagan) one you would recommend?
<shevy>
never read that one, I read the pickaxe back then which was ok
<shevy>
but the more important part is to actively write code
<Caerus>
Nice_BikeMaN, maybe pick up a ruby book that doesn't go deep on Rails like "Ruby Monk"
<shevy>
I once bought some rails book
<shevy>
I never finished it :(
<shevy>
halfway "building a webshop" I lost interest in that book... no idea if that was rails fault or the book's fault
<Caerus>
I was on my way with agile web development with rails. found it very good but I realized I had to go back to foundations to get a better ruby grasp
ajax0xd9 has quit [Ping timeout: 260 seconds]
norc has joined #ruby
ajax0xd9 has joined #ruby
<shevy>
hmm perhaps it was that book
<Caerus>
maybe it was just me but I just felt I didn't know ruby enough to be messing around with rails.
<Nice_BikeMaN>
Is Rails better than Dejango?
<norc>
Nice_BikeMaN: Is blue better than red?
<shevy>
Nice_BikeMaN it is more famous :)
<Caerus>
then there's "rails 4 in action" which is very good from what i've heard.
<norc>
>> binding.local_variable_set(:a, nil); puts a
<ruby[bot]>
norc: # => undefined local variable or method `a' for main:Object (NameError) ...check link for more (https://eval.in/569477)
araujo_ has quit [Quit: Leaving]
<norc>
Being aware of why that fails, is there anyone who feels that it SHOULD work?
<norc>
Nice_BikeMaN: Honest question. Why do you ask in #ruby whether a Ruby based web framework is better than a Python based web framework?
<norc>
Other than trolling
<shevy>
:D
<Nice_BikeMaN>
norc: I wasn't trolling
<shevy>
to the local variables, can it work? e. g. would you not have to then also make it possible to define local variables in other .rb files, and when pulling them in, they would be available on the toplevel scope?
<norc>
shevy: You do not have to declare methods either.
<Nice_BikeMaN>
Great, more IRC assholes
<norc>
Nice_BikeMaN: The question whether A is better than B is hard to answer in most cases.
<norc>
Almost universally the answer is: "It depends".
<Nice_BikeMaN>
norc: OK, thanks
<adaedra>
Nice_BikeMaN: please avoid insulting people because they're not answering like you wish they would.
aupadhye has joined #ruby
<shevy>
well methods on toplevel will become persistent as private method for Object, local variables don't become as persistent
<norc>
shevy: Local variables could be resolved at runtime just like method. The problem is not whether its possible.
aupadhye is now known as aupadhye|mtg
noService has quit [Ping timeout: 260 seconds]
<shevy>
how would you get rid of persistent local variables then?
<norc>
What?
<Nice_BikeMaN>
adaedra: I wasn't "insulting" people because they didn't answer the question they way I wanted, which was not the case. I "insulted" them because after my shitty day, I felt like they were being assholes.
<norc>
shevy: Ruby has no notion of such "static" variables.
<norc>
Nice_BikeMaN: So because you have a shitty day you can go about and insult other people?
<adaedra>
Nice_BikeMaN: whatever the reason is, "asshole" is not acceptable.
<Nice_BikeMaN>
norc: You insulted me first
<norc>
Nice_BikeMaN: I asked you for your motivation behind that question.
impermanence has joined #ruby
<norc>
I am quite unsure how that translates to an insult.
<shevy>
the trolling reference
<Nice_BikeMaN>
norc: In a rude way
<Caerus>
Nice_BikeMaN, no way for us to tell from your questions that you had a shitty day, even so, I fail to see the asshole part, the troll statement was an 'honest question'
<norc>
(Trying to think of a reason why I would want to do that, but hey - its possible)
<shevy>
norc how do I call the above?
<Nice_BikeMaN>
OK, I can accept that I fucked up. I am sorry that I took my temper out on someone that was trying to help me and I do realize that how I reacted was not the right way.
<ruby[bot]>
norc: # => undefined method `bark' for #<Class:#<Binding:0x410699b0>> (NoMethodError) ...check link for more (https://eval.in/569481)
<norc>
Uhm.
blackmes1 has joined #ruby
xue has quit [Ping timeout: 246 seconds]
<shevy>
anyway, I am all in favour of control
<shevy>
since people can do: x = 5
<shevy>
they should do so programmatically too!
<Ox0dea>
Nice_BikeMaN: But are you still here to talk about Python?
astrob___ has quit [Remote host closed the connection]
impermanence has quit [Ping timeout: 260 seconds]
startupality has joined #ruby
<norc>
Ox0dea:
<norc>
Good thing we do not have to indent in IRC.
<norc>
:o)
<Ox0dea>
norc: They don't (can't?) even have an evaluator in #python.
Ebok has joined #ruby
<Ox0dea>
People do the strangest things.
<Nice_BikeMaN>
0x0dea: No. When I asked the question, I didn't think that it would be that bad to talk about Python on a Ruby IRC channel.
<Ox0dea>
Nice_BikeMaN: Say, are you pretending to be retarded?
<adaedra>
!qkick Ox0dea rude
Ox0dea was kicked from #ruby by ruby[bot] [rude]
<Nice_BikeMaN>
HA!
modin has joined #ruby
<Nice_BikeMaN>
But I am not pretending to be rude, I just had a really shitty (I mean really shitty) day.
<adaedra>
Nice_BikeMaN: That's why you got the question about trolling; this is indeed a question with no definite anwser, and here is not really the best place as we may not be the most objective people :o)
<adaedra>
It also depends a lot on what you're trying to do, your background, etc.
tvw has quit []
<norc>
Nice_BikeMaN: Here is another honest opinion. Maybe counselling would be a better approach.
<Caerus>
I've been lurking here from weeks now and I have to say #ruby is a very friendly channel, living up to ruby community rep I'd say.
Noxilex has joined #ruby
<Caerus>
*for some weeks*
Noxilex has quit [Remote host closed the connection]
<Nice_BikeMaN>
norc: Sorry I was an ass to you in particular mate, I truly didn't mean it. I got layed off today, thats why I am shitty.
<adaedra>
Nice_BikeMaN: that's ok, you apologised on this matter, let's not continue this.
tvw has joined #ruby
<Nice_BikeMaN>
adaedra: Sure, sorry about the disruption
Coldblackice has quit [Ping timeout: 244 seconds]
GriffinHeart has quit [Remote host closed the connection]
nadir has quit [Quit: Connection closed for inactivity]
haxrbyte has quit [Remote host closed the connection]
haxrbyte has joined #ruby
yfeldblum has quit [Remote host closed the connection]
yfeldblum has joined #ruby
jgt has joined #ruby
schickung has joined #ruby
hk238 has joined #ruby
jaruga____ has quit [Quit: jaruga____]
jaruga___ has joined #ruby
jaruga___ is now known as jaruga____
haxrbyte_ has joined #ruby
xue has joined #ruby
haxrbyte has quit [Read error: Connection reset by peer]
panpainter has joined #ruby
haxrbyte has joined #ruby
CloCkWeRX has quit [Quit: Leaving.]
workmad3 has joined #ruby
last_staff has quit [Quit: Bye]
vondruch_ has joined #ruby
haxrbyte_ has quit [Ping timeout: 265 seconds]
panpainter has quit [Ping timeout: 250 seconds]
skade has quit [Read error: Connection reset by peer]
ledestin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
skade has joined #ruby
GriffinHeart has joined #ruby
last_staff has joined #ruby
blaxter has joined #ruby
vondruch has quit [Ping timeout: 240 seconds]
GriffinHeart has quit [Remote host closed the connection]
charliesome has joined #ruby
workmad3_ has joined #ruby
jgt has quit [Ping timeout: 246 seconds]
xall has quit [Ping timeout: 244 seconds]
workmad3 has quit [Ping timeout: 276 seconds]
charliesome has quit [Client Quit]
haxrbyte has quit [Quit: Leaving...]
duoi has quit [Max SendQ exceeded]
duoi has joined #ruby
brunto has quit [Ping timeout: 246 seconds]
d0lph1n98 has joined #ruby
workmad3_ is now known as workmad3
MiniFrenchbread has quit [Remote host closed the connection]
Devalo has joined #ruby
vondruch_ is now known as vondruch
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
charliesome has joined #ruby
nettoweb has joined #ruby
charliesome has quit [Read error: Connection reset by peer]
nettoweb has quit [Excess Flood]
Devalo has quit [Ping timeout: 250 seconds]
grs has quit [Ping timeout: 252 seconds]
ur5us has quit [Remote host closed the connection]
Madmanden has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
nankyokusei has joined #ruby
sczizzo has joined #ruby
duncannz has quit [Remote host closed the connection]
jgt has joined #ruby
impermanence has joined #ruby
nankyokusei has quit [Ping timeout: 250 seconds]
yfeldblum has quit [Ping timeout: 276 seconds]
PaulCapestany has quit [Read error: Connection reset by peer]
impermanence has quit [Ping timeout: 246 seconds]
greister has quit [Ping timeout: 240 seconds]
jgt has quit [Ping timeout: 240 seconds]
PaulCapestany has joined #ruby
startupality has quit [Quit: startupality]
greister has joined #ruby
grs has joined #ruby
dionysus69 has joined #ruby
Xiti has joined #ruby
angseus_ has quit [Remote host closed the connection]
startupality has joined #ruby
ur5us has joined #ruby
tagaulap has joined #ruby
sczizzo has quit [Remote host closed the connection]
jaiks has quit [Ping timeout: 276 seconds]
jaiks has joined #ruby
ur5us has quit [Ping timeout: 260 seconds]
startupality has quit [Quit: startupality]
ravishankarjha has quit [Remote host closed the connection]
jackjackdripper has quit [Read error: Connection reset by peer]
jackjackdripper has joined #ruby
giz|work has joined #ruby
gnufied has joined #ruby
millerti has joined #ruby
jackjackdripper1 has joined #ruby
hahuang61 has joined #ruby
bronson has joined #ruby
dvinciguerra has joined #ruby
jackjackdripper has quit [Ping timeout: 260 seconds]
DaniG2k has quit [Quit: leaving]
hahuang61 has quit [Ping timeout: 252 seconds]
jgt has joined #ruby
bronson has quit [Ping timeout: 252 seconds]
bastelfreak has quit [Ping timeout: 264 seconds]
noodle has quit [Quit: /quit]
ur5us has joined #ruby
panpainter has joined #ruby
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
blackgoat has joined #ruby
andikr has quit [Remote host closed the connection]
ur5us has quit [Ping timeout: 250 seconds]
GodFather has joined #ruby
noodle has joined #ruby
papachan has joined #ruby
idefine has joined #ruby
MyMind has joined #ruby
ravishankarjha has joined #ruby
gnufied__ has joined #ruby
andromedian has joined #ruby
deadnull_ has joined #ruby
gnufied__ has quit [Client Quit]
sembei has quit [Ping timeout: 276 seconds]
bastelfreak has joined #ruby
<andromedian>
I have a hash = {foo: '1', bar: '2'} how can I print the key foo: ?
idefine has quit [Ping timeout: 252 seconds]
<adaedra>
hash[:foo]
moeabdol has quit [Ping timeout: 276 seconds]
millerti has joined #ruby
<andromedian>
it prints the value =>1 I want => 'foo'
<andromedian>
is this possible adaedra?
<adaedra>
I'm not sure to understand
agit0 has joined #ruby
crameth has joined #ruby
<adaedra>
you want to get :foo from 1?
<apeiros>
or 'foo' from :foo?
papachan has quit [Quit: Leaving]
<andromedian>
yes 'foo' from :foo
<apeiros>
puts :foo
<apeiros>
or :foo.to_s
<apeiros>
depending on what you actually want
moeabdol has joined #ruby
<apeiros>
I don't understand how that's related to your hash, though.
startupality has joined #ruby
<andromedian>
lets' say that I have image = {medium:'500px' } I want to print medium and 500px without using each
<andromedian>
but it seems like this is not the best way to do it.
rodfersou has joined #ruby
Masonn has joined #ruby
<apeiros>
do you know that the key is :medium?
Masonn has left #ruby ["Leaving"]
Masonn has joined #ruby
<apeiros>
or do you only know that the hash consists of a single key/value pair?
<andromedian>
the second option
uranellus has joined #ruby
<apeiros>
image.first will give you a [key, value] array
akem has quit [Ping timeout: 244 seconds]
<apeiros>
so: `key, value = image.first`
<apeiros>
but if you have single key/value hashes I wonder why you use a hash at all.
<uranellus>
hello, I'd like to install gem onto sles 11 sp4, it comes with ruby 1.8.7.
<apeiros>
even more so if you don't access them by key - which is the point of using a hash.
<uranellus>
how do I proceed?
<apeiros>
uranellus: `gem install gem-to-install`
Vile` has joined #ruby
pawnbox has quit [Remote host closed the connection]
<apeiros>
and let me advise you that ruby 1.8.7 is outdated, unmaintained and shouldn't be used anymore.
rodfersou has quit [Client Quit]
<andromedian>
thanks apeiros
<uranellus>
apeiros: the gem command is not found :/
<uranellus>
apeiros: also I know that, but it is was suse supports for sles 11 sp4
<apeiros>
oh, 1.8.7 didn't come with rubygems bundled, right. rvm did that for me.
pawnbox has joined #ruby
johnmilton has joined #ruby
ldnunes has joined #ruby
<apeiros>
then install rubygems first, either via your package manager or manually
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
rodfersou has joined #ruby
Nice_BikeMaN has quit [Quit: Leaving]
jolamb has joined #ruby
panpainter has quit [Remote host closed the connection]
last_staff has quit [Quit: last_staff]
DaniG2k has joined #ruby
panpainter has joined #ruby
sinkensabe has joined #ruby
araujo has joined #ruby
sepp2k has joined #ruby
<shevy>
uranellus wget https://rubygems.org/rubygems/rubygems-2.6.4.tgz - I think it should work on 1.8.x too but I am not 100% sure. you can try older versions on that page though, via "versions" to see which one works
brunto has joined #ruby
Ebok has quit [Quit: This computer has gone to sleep]
hanmac has quit [Ping timeout: 250 seconds]
Snowy has quit [Quit: ragequit]
Ebok has joined #ruby
umdstu has joined #ruby
<uranellus>
shevy: apeiros: yeah, that's not going to work for me, cause I need some supported way of doing stuff for this particular client..
<uranellus>
but thanks for your efford
<uranellus>
effort*
<Caerus>
that's as good as it gets if you don't want/cant use rvm
<jhass>
uranellus: I'd imagine there's a rubygems package to install?
<Caerus>
which shevy did point out
<jhass>
nope
<jhass>
uranellus: zypper search rubygems or whatever it was
<Caerus>
oh you mean suse package
<jhass>
that's what I would understand under "supported"
CloCkWeRX has joined #ruby
marr has quit [Ping timeout: 250 seconds]
schickung has quit [Quit: schickung]
<apeiros>
that'd be the "then install rubygems first, either ***via your package manager*** or manually" way (emphasis added)
<Caerus>
my 1.8.7-head has it, I don't recall installing it so it should be bundled.
<uranellus>
jhass: yeah, I will. Currently I cannot b/c our mirror is in maintanence .. But I'll check later, thanks for pointing me in the right direction
<Caerus>
and boy did rvm bitch about me using 1.8.7
pwnd_nsfw has quit [Read error: Connection reset by peer]
nadir has joined #ruby
ensyde__ has quit [Read error: Connection reset by peer]
hanmac has joined #ruby
ensyde__ has joined #ruby
pwnd_nsfw has joined #ruby
<jhass>
again, rvm does install it along, package mangers not always
noServic1 has quit [Ping timeout: 260 seconds]
<uranellus>
jhass: yeah, I will have to eval, wether rvm is an option. It'd need CVEs and a supported channel, to make sure updates are available.
Masonn has quit [Quit: Leaving]
Vile` has quit [Ping timeout: 260 seconds]
<apeiros>
uranellus: before you actually install rubygems - is installing gems via rubygems actually considered "supported"?
<Caerus>
1.8.7 is as 'unsuported' as it can get. latest 1.8.7 I got out of rvm was -head
<apeiros>
because if not, you'll have to look whether there's a package for your package manager of that gem anyway
<apeiros>
Caerus: yeah, supported in their case means "supported by suse sles 11 sp4"
flashpoint9 has joined #ruby
<uranellus>
apeiros: depends on the gem. if the gem supplier supports the gem, then I assume it's okay (not my call)
<shevy>
Caerus haha why do you use 1.8.7? :)
Masonn has joined #ruby
<shevy>
I think I can't even compile 1.8.x anymore :(
<Caerus>
shevy, I don't anymore, I read 'Beginning Ruby' and it used 1.8.7 so I wanted to be on par with it.
<uranellus>
Caerus: it might not be officially be support by ruby. but it is supported by suse til 2022
<shevy>
ah I see
<uranellus>
shevy: it's part of sles 11 sp4
Masonn has quit [Client Quit]
tvw has quit []
ctp has joined #ruby
<Caerus>
uranellus, yeah I misunderstood you
Masonn has joined #ruby
<ctp>
hi folks. how to lstrip/rstrip the whitespaces in such expression: ["| a | b | c | d |", "| e | f | g | h |"].map { |arr| arr.split('|')}.map(&:strip)
bruno- has joined #ruby
<ctp>
the .map(&:strip) is at wrong place :)
<uranellus>
but thank you very much for your input, Caerus apeiros shevy jhass
<Caerus>
also jhass, so it was rvm that put it in? kinda like... fine! if you're gonna use 1.8.* you at least gotta have rubygems(bundles rubygems)
<shevy>
not sure what you want, .delete(' ') in a .map should get rid of the internal ' ' though
brunto has quit [Read error: Connection reset by peer]
brunto_ has joined #ruby
<apeiros>
ctp: since you already figured that the map is in the wrong place - what deviates from your desired result?
katija has quit [Quit: Goodbye]
<ctp>
apeiros ["| a | b | c | d |", "| e | f | g | h |"].map { |arr| arr.split('|')} returns [["", " a ", " b ", " c ", " d "], ["", " e ", " f ", " g ", " h "]] so i thought i could map over this array and apply strip on all elements (which are arrays), but i get a NoMethodError: undefined method `strip' for ["", " a ", " b ", " c ", " d "]:Array
<gregf_>
ctp: move the map(&:strip) to the block ;)
<apeiros>
ctp: oh, I thought you had understood that the map is in the wrong place
<apeiros>
as gregf_ says - it belongs into the block, right after the split.
bruno- has quit [Ping timeout: 240 seconds]
<ctp>
ah, ok !
<ctp>
thx
<apeiros>
otherwise you do ["", " a ", " b ", " c ", " d "].strip, and that does not exist, as ruby informs you
startupality has quit [Quit: startupality]
<ctp>
yepp, i understand. thx!
pawnbox has quit [Ping timeout: 244 seconds]
startupality has joined #ruby
stardiviner has joined #ruby
Devalo has joined #ruby
Pumukel has joined #ruby
<apeiros>
ctp: is it always | surrounded by a single space?
<ctp>
ok, last question where i really see no way how to make it. i have now this array of arrays foo = [["", "a", "b", "c", "d"], ["", "e", "f", "g", "h"]]. how to delete an element (array) from it, where second field is "b" and third element is "c"? so afterwards foo should be [["", "e", "f", "g", "h"]]
DaniG2k has quit [Ping timeout: 246 seconds]
<ctp>
apeiros: yes
<jhass>
Caerus: more like "ruby is useless without rubygems, so let's install that too" back then, and it just kept that support
<apeiros>
ctp: then IMO use .map { |str| str[2..-3].split(" | ") }
<apeiros>
that'll also get you rid of those empty elements
<Caerus>
jhass, makes sense, very opinionated of rvm tho :o
<apeiros>
ctp: as for your "how to delete based on a condition" question: see Array#reject
<apeiros>
also technically with the empty element still inside, it's your third element which is "b", not the second :)
Devalo has quit [Ping timeout: 250 seconds]
<ctp>
apeiros: awesome! thx
Gasher has joined #ruby
vaejor has joined #ruby
Pumukel has quit [Quit: ChatZilla 0.9.92 [Firefox 46.0.1/20160502172042]]
<norc>
ary1 is obviously not the same as ary3. Neither is ary2.
bigmike18 has joined #ruby
karmatr0n has joined #ruby
futilegames has joined #ruby
GodFather has quit [Ping timeout: 260 seconds]
bigmike18 has quit [Client Quit]
vondruch has joined #ruby
synthroid has joined #ruby
<ctp>
norc: hmhm, hard to follow for me :) i usually do fp and pattern matching :)
<ctp>
i'll try it with the delete_if
panpainter has quit [Remote host closed the connection]
<norc>
ctp: Well, I misunderstood your problem, so it it wont help you as it is.
<norc>
But delete_if is still really useful if you have a way of expressing a condition when an element should be removed.
<ctp>
oki
Vile` has joined #ruby
DaniG2k has quit [Quit: leaving]
<ctp>
so the delete_if would be the ruby'ish way to delete an element based on pattern, right?
<Caerus>
been a pleasure hanging around here, I'm off to sleep
andikr has joined #ruby
<norc>
ctp: Based on an expression. Not necessarily a pattern.
<Caerus>
see ya latter everybody
karmatr0n has quit [Ping timeout: 260 seconds]
panpainter has joined #ruby
<norc>
ctp: You can also use reject which apeiros suggested. delete_if will modify the array in place, whereas reject will not.
<ctp>
ok, gimme a try
Caerus is now known as Caerus|Away
Masonn has quit [Ping timeout: 246 seconds]
Yeomra has joined #ruby
lxsameer has joined #ruby
<norc>
ctp: For example: (1..10).to_a.reject { rand > 0.5 } is one of many ways to get a random set of numbers between 1 and 10.
<DefV>
norc: why the to_a
<DefV>
Range has reject method
<norc>
Good point.
lxsameer has quit [Ping timeout: 260 seconds]
<ctp>
argh, [["a", "b", "c", "d"], ["e", "f", "g", "h"]].reject { |x| x == ["a", "b", _, _] } was what i thought about, but this doesn't work. [["a", "b", "c", "d"], ["e", "f", "g", "h"]].reject { |x| x[0] == "a" && x[1] == "b" } is obviously what i'm looking for. but why doesn't the "don't care var" version work exactely?
panpainter has quit [Remote host closed the connection]
panpainter has joined #ruby
<apeiros>
because the "don't care" is for devs, not for ruby
futilegames has quit [Quit: futilegames]
<apeiros>
ruby does not have a "don't care".
<apeiros>
i.e. it's convention.
<apeiros>
_ is a valid local variable name
Vile` has quit [Ping timeout: 252 seconds]
<apeiros>
you can simplify your code: .reject { |a,b,*| [a,b] == ["a", "b"] }
schickung has joined #ruby
<ctp>
apeiros uuups, ok, i thought the _ has same meaning as in elixir :) now it
<ctp>
s clear
panpainter has quit [Ping timeout: 240 seconds]
schickung has quit [Client Quit]
<hanmac>
_ has a special meaning so you can use it multiple times
julie_harshaw has quit [Ping timeout: 240 seconds]
kallisti5 has quit [Ping timeout: 260 seconds]
bokayio has quit [Ping timeout: 276 seconds]
bokayio has joined #ruby
kiki_lamb has quit [Ping timeout: 276 seconds]
Caerus|Away has quit [Ping timeout: 276 seconds]
kallisti5 has joined #ruby
kiki_lamb has joined #ruby
hays_ has quit [Ping timeout: 260 seconds]
hays has joined #ruby
nadir has joined #ruby
julieeharshaw has joined #ruby
Devalo has quit [Ping timeout: 250 seconds]
kareeoleez has quit [Remote host closed the connection]
sinkensabe has quit [Read error: Connection reset by peer]
idefine has quit [Remote host closed the connection]
sinkensabe has joined #ruby
grs has quit [Ping timeout: 252 seconds]
Caerus|Away has joined #ruby
idefine_ has joined #ruby
kareeoleez has joined #ruby
nankyokusei has joined #ruby
ullu has joined #ruby
norc has quit [Ping timeout: 250 seconds]
ensyde has joined #ruby
idefine has joined #ruby
sinkensabe has quit [Read error: Connection reset by peer]
idefine has quit [Remote host closed the connection]
sinkensabe has joined #ruby
idefine has joined #ruby
idefine_ has quit [Read error: Connection reset by peer]
tax has joined #ruby
<ullu>
trying to get connected to my local SQL Server via tiny_tds gem, but I'm getting "TinyTds::Error: Unable to connect: Adaptive Server is unavailable or does not exist"
nimrev has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
anisha has quit [Quit: This computer has gone to sleep]
_deadnull is now known as deadnull_
<ullu>
(I'm on a Windows 10 machine
brunto has joined #ruby
armyriad has quit [Ping timeout: 252 seconds]
kareeoleez has quit [Ping timeout: 265 seconds]
ensyde__ has quit [Ping timeout: 250 seconds]
nankyokusei has quit [Ping timeout: 240 seconds]
raeoks has joined #ruby
diegoviola has quit [Read error: Connection reset by peer]
saneax is now known as saneax_AFK
diegoviola has joined #ruby
tatsuo has joined #ruby
blackmes1 has joined #ruby
bzb has quit [Quit: Leaving]
bruno- has joined #ruby
tildes has quit [Remote host closed the connection]
blackmes1 has quit [Client Quit]
bweston92 has quit [Remote host closed the connection]
dhollinger has joined #ruby
grs has joined #ruby
iwmrby has joined #ruby
halfamind has quit [Quit: Leaving.]
freerobby1 has joined #ruby
[Butch] has joined #ruby
moeabdol has quit [Ping timeout: 260 seconds]
kobain has joined #ruby
armyriad has joined #ruby
morochena has quit [Quit: Leaving...]
kobain has quit [Max SendQ exceeded]
sinkensabe has quit [Read error: Connection reset by peer]
afdafdafd has joined #ruby
chouhoul_ has joined #ruby
Yiota has joined #ruby
davedev24 has joined #ruby
chouhoul_ has quit [Remote host closed the connection]
kobain has joined #ruby
sinkensabe has joined #ruby
chouhoul_ has joined #ruby
kobain has quit [Max SendQ exceeded]
kobain has joined #ruby
chouhoulis has quit [Ping timeout: 252 seconds]
kobain has quit [Max SendQ exceeded]
zenguy_pc has quit [Ping timeout: 260 seconds]
kobain has joined #ruby
Guest82026 has quit [Ping timeout: 246 seconds]
chouhoulis has joined #ruby
halfamind has joined #ruby
diegoviola has quit [Read error: Connection reset by peer]
Callum has joined #ruby
TvL2386 has quit [Quit: Ex-Chat]
zenguy_pc has joined #ruby
chouhoul_ has quit [Ping timeout: 276 seconds]
diegoviola has joined #ruby
idefine_ has joined #ruby
jancel has quit [Remote host closed the connection]
rippa has joined #ruby
Ebok has quit [Quit: This computer has gone to sleep]
andikr has quit [Remote host closed the connection]
sinkensabe has quit [Remote host closed the connection]
diegoviola has quit [Changing host]
diegoviola has joined #ruby
idefine has quit [Ping timeout: 246 seconds]
aganov has quit [Remote host closed the connection]
diegoviola has quit [Read error: Connection reset by peer]
Madplatypus has quit [Quit: Connection closed for inactivity]
idle_task is now known as idletask
brunto has quit [Ping timeout: 244 seconds]
diegoviola has joined #ruby
diegoviola has quit [Changing host]
diegoviola has joined #ruby
diegoviola has quit [Read error: Connection reset by peer]
hahuang61 has joined #ruby
diegoviola has joined #ruby
sinkensabe has joined #ruby
rodfersou is now known as rodfersou|lunch
bronson has joined #ruby
diegoviola has quit [Read error: Connection reset by peer]
dikaio has joined #ruby
kobain has quit [Read error: Connection timed out]
agentmeerkat has joined #ruby
kobain has joined #ruby
hahuang61 has quit [Ping timeout: 265 seconds]
kareeoleez has joined #ruby
bronson has quit [Ping timeout: 252 seconds]
sinkensabe has quit [Ping timeout: 246 seconds]
noService has joined #ruby
frem_ has joined #ruby
panpainter has quit [Remote host closed the connection]
chopin has joined #ruby
benlieb has joined #ruby
SilverKey has joined #ruby
diego1 has joined #ruby
panpainter has joined #ruby
pandaant has joined #ruby
jancel has joined #ruby
noService has quit [Ping timeout: 260 seconds]
terlar has quit [Ping timeout: 244 seconds]
rkazak has joined #ruby
davedev24 has quit [Ping timeout: 250 seconds]
davedev24 has joined #ruby
zenguy_pc has quit [Ping timeout: 276 seconds]
diego1 has quit [Quit: WeeChat 1.5]
diego1 has joined #ruby
pandaant has quit [Remote host closed the connection]
lannonbr has joined #ruby
terminal_ has joined #ruby
lannonbr has left #ruby [#ruby]
noService has joined #ruby
zenguy_pc has joined #ruby
kobain has quit [Read error: Connection timed out]
kobain has joined #ruby
davedev2_ has joined #ruby
kobain has quit [Max SendQ exceeded]
synthroid has quit [Remote host closed the connection]
kobain has joined #ruby
kobain has quit [Max SendQ exceeded]
synthroid has joined #ruby
terminal_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
kobain has joined #ruby
kobain has quit [Max SendQ exceeded]
agentmeerkat has quit [Ping timeout: 240 seconds]
kobain has joined #ruby
davedev24 has quit [Ping timeout: 250 seconds]
kobain has quit [Max SendQ exceeded]
rkazak has quit [Quit: Sleep.....ing....]
idefine_ has quit [Remote host closed the connection]
elifoster has joined #ruby
monoprotic has joined #ruby
idefine has joined #ruby
idefine has joined #ruby
joncol has joined #ruby
joncol has quit [Client Quit]
aufi has quit [Ping timeout: 244 seconds]
The_Phoenix has joined #ruby
The_Phoenix has quit [Max SendQ exceeded]
The_Phoenix has joined #ruby
The_Phoenix has quit [Max SendQ exceeded]
The_Phoenix has joined #ruby
SilverKey has quit [Quit: Halted.]
The_Phoenix has quit [Max SendQ exceeded]
grs has quit [Ping timeout: 244 seconds]
The_Phoenix has joined #ruby
tatsuo has quit [Remote host closed the connection]
kies has joined #ruby
giz|work has quit [Ping timeout: 240 seconds]
The_Phoenix has quit [Max SendQ exceeded]
hanmac has quit [Ping timeout: 250 seconds]
The_Phoenix has joined #ruby
darkxploit has joined #ruby
hanmac has joined #ruby
SilverKey has joined #ruby
nando293921 has joined #ruby
startupality has quit [Quit: startupality]
howdoi has quit [Quit: Connection closed for inactivity]
cschneid_ has joined #ruby
DoubleMalt has quit [Remote host closed the connection]
startupality has joined #ruby
diego1 has quit [Changing host]
diego1 has joined #ruby
diego1 is now known as diegoviola
idefine has quit [Ping timeout: 244 seconds]
mosez has quit [Quit: Switching back to real life]
deadnull_ is now known as _deadnull
mosez has joined #ruby
sinkensabe has joined #ruby
theRoUS has joined #ruby
kobain has joined #ruby
theRoUS has quit [Changing host]
theRoUS has joined #ruby
blaxter has quit [Read error: Connection reset by peer]
<cschneid_>
I am looking to find the memory size of an object I have. Looks like Objectspace.memsize_of() does it? Is there a better way?
panpainter has quit [Remote host closed the connection]
kobain has quit [Max SendQ exceeded]
<cschneid_>
just the size of one example object is all I need
Ch4rAss has quit [Ping timeout: 244 seconds]
kobain has joined #ruby
<kgrz>
apeiros: oh! yeah, didn't notice the timestamp there
<kgrz>
dsea: try out exercism.io too. It's like ruby koans, but mostly peer reviewed
kobain has quit [Max SendQ exceeded]
kobain has joined #ruby
mostlybadfly has joined #ruby
kobain has quit [Max SendQ exceeded]
<cschneid_>
hmm, memsize_of() doesn't recurse into subobjects. Sad.
kobain has joined #ruby
idefine has joined #ruby
kobain has quit [Max SendQ exceeded]
kobain has joined #ruby
sinkensabe has quit [Ping timeout: 260 seconds]
eljimbo has quit [Quit: This computer has gone to sleep]
panpainter has joined #ruby
kobain has quit [Max SendQ exceeded]
kobain has joined #ruby
dionysus69 has quit [Ping timeout: 260 seconds]
grs has joined #ruby
trajing has quit [Quit: ZNC - 1.6.0 - http://znc.in]
benlieb has quit [Read error: Connection reset by peer]
<apeiros>
cschneid_: shouldn't be hard to do a recursive one based on it
jaruga____ has quit [Ping timeout: 265 seconds]
<cschneid_>
apeiros: yeah, I just did the manual recursive algorithm myself :)
startupality has quit [Quit: startupality]
startupality has joined #ruby
flashpoint9 has quit [Remote host closed the connection]
trajing has joined #ruby
lxsameer has joined #ruby
crameth has quit [Quit: crameth]
PlasmaStar has quit [Ping timeout: 260 seconds]
jancel has quit [Remote host closed the connection]
jgt1 has joined #ruby
eljimmy has quit [Ping timeout: 240 seconds]
jaruga___ has joined #ruby
jaruga___ is now known as jaruga____
PlasmaStar has joined #ruby
duoi has quit [Max SendQ exceeded]
last_staff has joined #ruby
isjaylee has joined #ruby
duoi has joined #ruby
duoi has joined #ruby
idefine has quit [Ping timeout: 250 seconds]
idefine_ has joined #ruby
ruby-lang673 has joined #ruby
<ruby-lang673>
Hello, I have execute bundler install (for my Gemfile) with root's user ... (i'm tired ...), can I change user ? Thanks very much and sorry for my bad english, I'm french :)
amclain has joined #ruby
freerobby1 has quit [Quit: Leaving.]
whathappens has joined #ruby
edwinvdgraaf has quit [Remote host closed the connection]
evidex has quit [Remote host closed the connection]
freerobby has joined #ruby
dikaio has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
whathapp_ has joined #ruby
<jhass>
ruby-lang673: did you use the --path or --deployment option now or in the past?
smathy has joined #ruby
pietr0 has joined #ruby
<ruby-lang673>
jhass : Mmmm ... no, i'm newbie on Gem. I just created "Gemfile" and execute "bundler install" with root's user. But now, I have this error when I execute " cap production deploy " (this is for PHP application deployement) : " LoadError: cannot load such file -- capistrano/symfony "
<jhass>
what do you get by rerunning bundle install as your normal user?
<ruby-lang673>
I read "Don't run Bundler as root. [...]" but it's too late ...
<ruby-lang673>
I test, thanks
whathappens has quit [Ping timeout: 252 seconds]
hanmac has quit [Ping timeout: 276 seconds]
<hdm>
whatever you do, dont gem install install
* hdm
runs
jaruga____ has quit [Quit: jaruga____]
<ruby-lang673>
After executer " bundler install " with normal user, I have " Bundle complete! 2 Gemfile dependencies, 12 gems now installed. ", I think it's good
rkazak has joined #ruby
<ruby-lang673>
But I have this error again " LoadError: cannot load such file -- capistrano/symfony " when I execute " cap production deploy "
kobain has quit [Read error: Connection timed out]
halfamind has quit [Read error: Connection reset by peer]
Devalo has joined #ruby
halfamind1 has joined #ruby
kobain has joined #ruby
horaceheaven has joined #ruby
idefine has joined #ruby
hanmac has joined #ruby
idefine_ has quit [Ping timeout: 276 seconds]
kobain has quit [Max SendQ exceeded]
kobain has joined #ruby
<hdm>
ruby-lang673: try prefixing it with "bundle exec"
<hdm>
bundle exec cap production deploy
trajing has quit [Quit: ZNC - 1.6.0 - http://znc.in]
TheCubeLord has joined #ruby
kobain has quit [Max SendQ exceeded]
horaceheaven is now known as elfuego
kobain has joined #ruby
jancel has joined #ruby
agentmeerkat has joined #ruby
<elfuego>
i’m trying to allow access to header to a client using headers 'Access-Control-Allow-Headers' => 'ETag’, but for some reason the client still doesn’t have access to the header. it this the correct way to allow access to header in sinatra?
<ruby-lang673>
Oh sorry, it's good, I forgot require in Capfile. Thank's very much :)
ruby-lang673 has quit [Quit: Page closed]
trajing has joined #ruby
agentmeerkat has joined #ruby
senayar has quit []
idefine_ has joined #ruby
Ebok has joined #ruby
idefine has quit [Ping timeout: 252 seconds]
whathapp_ has quit [Quit: Leaving...]
flips has joined #ruby
rodfersou|lunch is now known as rodfersou
panpainter has quit [Remote host closed the connection]
roshanavand has quit [Quit: This computer has gone to sleep]
synthroid has quit [Remote host closed the connection]
synthroi_ has joined #ruby
nemesit|znc has quit [Ping timeout: 260 seconds]
dfockler has joined #ruby
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bronson has joined #ruby
tatsuo has joined #ruby
bronson has quit [Remote host closed the connection]
idefine_ has quit [Ping timeout: 244 seconds]
stardiviner has joined #ruby
cajone has left #ruby [#ruby]
idefine has joined #ruby
last_staff has quit [Quit: last_staff]
rbennacer has quit [Remote host closed the connection]
platzhirsch has quit [Quit: WeeChat 1.4]
Yeomra has joined #ruby
jwren has joined #ruby
isjaylee has left #ruby [#ruby]
symm- has joined #ruby
whathappens has joined #ruby
stardiviner has quit [Client Quit]
cajone has joined #ruby
hanmac has quit [Ping timeout: 250 seconds]
nemesit|znc has joined #ruby
idefine has quit [Ping timeout: 244 seconds]
tatsuo has quit [Read error: No route to host]
mark_66 has quit [Remote host closed the connection]
malconis has joined #ruby
panpainter has joined #ruby
idefine has joined #ruby
govg has joined #ruby
nankyokusei has joined #ruby
hanmac has joined #ruby
weckl has quit [Quit: Leaving]
_biox has joined #ruby
djbkd has joined #ruby
soc42 has quit [Remote host closed the connection]
TomyWork has quit [Ping timeout: 244 seconds]
panpainter has quit [Ping timeout: 244 seconds]
moeabdol has joined #ruby
djbkd has quit [Remote host closed the connection]
djbkd has joined #ruby
ferr1 has joined #ruby
nankyokusei has quit [Ping timeout: 265 seconds]
Don_John has joined #ruby
Don_John has quit [Remote host closed the connection]
barajasfab has joined #ruby
dikaio has joined #ruby
arpegius has joined #ruby
sinkensabe has joined #ruby
hxegon_afk is now known as hxegon
idefine_ has joined #ruby
idefine has quit [Ping timeout: 252 seconds]
babblebre has joined #ruby
dionysus69 has joined #ruby
moeabdol has quit [Quit: WeeChat 1.4]
sinkensabe has quit [Ping timeout: 265 seconds]
gigetoo has quit [Ping timeout: 252 seconds]
ChiefAlexander has quit [Remote host closed the connection]
QORRiE has joined #ruby
idefine has joined #ruby
moeabdol has joined #ruby
idefine_ has quit [Ping timeout: 252 seconds]
PlasmaStar has quit [Ping timeout: 260 seconds]
gigetoo has joined #ruby
eljimmy has joined #ruby
aphprentice has joined #ruby
PlasmaStar has joined #ruby
rbennacer has joined #ruby
idefine has quit [Ping timeout: 244 seconds]
iwmrby has quit [Quit: WeeChat 1.4]
idefine has joined #ruby
flashpoint9 has joined #ruby
skolman has joined #ruby
hanmac has quit [Ping timeout: 250 seconds]
grs has quit [Ping timeout: 240 seconds]
nemesit|znc has quit [Ping timeout: 260 seconds]
synthroi_ has quit [Remote host closed the connection]
flashpoint9 has quit [Ping timeout: 250 seconds]
hanmac has joined #ruby
synthroid has joined #ruby
idefine_ has joined #ruby
edwinvdgraaf has joined #ruby
CoderPuppy has joined #ruby
gizmore has joined #ruby
panpainter has joined #ruby
idefine has quit [Ping timeout: 252 seconds]
Madmanden has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
georg_ has joined #ruby
stannard has quit [Remote host closed the connection]
cpup has quit [Ping timeout: 244 seconds]
armyriad has quit [Quit: Leaving]
TomyLobo has joined #ruby
armyriad has joined #ruby
<zacts>
hi rubyists
nemesit|znc has joined #ruby
<zacts>
I just want to say that my experience with the book Head First Ruby is really good. I'm at ch 6, almost to ch 7 now.
edwinvdgraaf has quit [Ping timeout: 260 seconds]
<zacts>
(for a complete newbie)
<zacts>
And I've been critical of other books in this series
tildes has joined #ruby
skade has joined #ruby
<havenwood>
zacts: nice
<zacts>
This one covers material in a similar way to Ovid's Beginning Perl I feel (the recommended book for newbies on #perl) (although totally different style)
<zacts>
anyway, yeah...
<zacts>
(It even has a ch at the end on making a simple Sinatra app)
jgt1 has quit [Ping timeout: 252 seconds]
Eiam_ has joined #ruby
grs has joined #ruby
skade has quit [Client Quit]
trajing has quit [Quit: ZNC - 1.6.0 - http://znc.in]
agit0 has quit [Quit: zzzZZZ….]
cpup has joined #ruby
flashpoint9 has joined #ruby
toretore has quit [Ping timeout: 244 seconds]
georg_ has left #ruby [#ruby]
toretore has joined #ruby
Cohedrin has joined #ruby
stannard has joined #ruby
stannard has quit [Remote host closed the connection]
trajing has joined #ruby
edwinvdgraaf has joined #ruby
CoderPuppy has quit [Ping timeout: 240 seconds]
apofis has joined #ruby
jancel has quit [Remote host closed the connection]
TreyG has joined #ruby
noobsu has quit [Remote host closed the connection]
rkazak has quit [Quit: Sleep.....ing....]
edwinvdgraaf has quit [Ping timeout: 276 seconds]
startupality has quit [Quit: startupality]
vdamewood has joined #ruby
Madmanden has joined #ruby
Xeago has quit [Ping timeout: 246 seconds]
bronson has joined #ruby
dikaio has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Xeago has joined #ruby
Devalo has quit [Remote host closed the connection]
rkazak has joined #ruby
<TreyG>
.7
<jhass>
,8
flashpoint9 has quit [Remote host closed the connection]
dfockler has quit [Quit: Leaving]
skade has joined #ruby
dfockler has joined #ruby
skade has quit [Client Quit]
karapetyan has joined #ruby
jancel has joined #ruby
<havenwood>
*9
idefine has joined #ruby
<havenwood>
The next in this sequence is paydirt.
<havenwood>
(:
idefine_ has quit [Ping timeout: 276 seconds]
anisha has joined #ruby
mtkd has quit [Ping timeout: 276 seconds]
fmcgeough has joined #ruby
ramfjord has joined #ruby
mtkd has joined #ruby
SilverKey has quit [Quit: Halted.]
SilverKey has joined #ruby
apofis has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
shinnya has joined #ruby
<smathy>
(a
idefine_ has joined #ruby
idefine has quit [Read error: Connection reset by peer]
dikaio has joined #ruby
<shevy>
(b
<smathy>
Broke the sequence.
bronson has quit [Remote host closed the connection]
jancel has quit [Read error: Connection reset by peer]
aupadhye|mtg has quit [Quit: Leaving]
LastWhisper____ has joined #ruby
arpegius has quit [Quit: arpegius]
rkazak has quit [Quit: Sleep.....ing....]
syndikate has joined #ruby
bronson has joined #ruby
gigetoo has quit [Ping timeout: 246 seconds]
zotherstupidguy has joined #ruby
karmatr0n has quit [Ping timeout: 240 seconds]
ldnunes has quit [Read error: Connection reset by peer]
_deadnull is now known as deadnull_
TheCubeLord has quit [Quit: Leaving]
ldnunes has joined #ruby
idefine_ has quit [Ping timeout: 244 seconds]
tvw has quit [Remote host closed the connection]
roamingdog has quit [Remote host closed the connection]
idefine has joined #ruby
agit0 has joined #ruby
gigetoo has joined #ruby
<umdstu>
any homebrew users know how to get brew to use the homebrew version of curl for homebrew functions, not system curl?
roamingdog has joined #ruby
codecop has joined #ruby
Eiam_ has quit [Quit: ╯°□°)╯︵ǝpouǝǝɹɟ]
kgrz has quit [Ping timeout: 265 seconds]
roamingdog has quit [Remote host closed the connection]
Yiota has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
roshanavand has joined #ruby
ChiefAlexander has joined #ruby
gizless has joined #ruby
saneax_AFK is now known as saneax
<sumobob>
is there anyway to override active records internal ID and force it you use a different field?
afdafdafd has quit [Quit: This computer has gone to sleep]
hellcode has joined #ruby
idefine has quit [Ping timeout: 244 seconds]
gizmore has quit [Ping timeout: 244 seconds]
gizless is now known as gizmore
<smathy>
?rails sumobob
<ruby[bot]>
sumobob: Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
skolman has quit [Remote host closed the connection]
<smathy>
umdstu, you don't just make sure the desired curl is first in your PATH ?
skolman_ has joined #ruby
phredus has joined #ruby
skade has joined #ruby
_blizzy_ has joined #ruby
_blizzy_ has quit [Client Quit]
skade has quit [Client Quit]
skade has joined #ruby
zotherstupidguy has quit [Ping timeout: 240 seconds]
idefine has joined #ruby
skolman_ has quit [Ping timeout: 260 seconds]
rbennacer has quit [Remote host closed the connection]
karapetyan has quit [Remote host closed the connection]
postmodern has joined #ruby
cdg has quit [Remote host closed the connection]
SilverKey has quit [Quit: Halted.]
ferr has quit [Quit: WeeChat 1.5]
hahuang61 has joined #ruby
<umdstu>
smathy: unfortunately no. it’s hardcoded in the file. programatically, it looks for ENV[‘HOMEBREW_CURL’] first though, and if it doesn’t exist uses /usr/bin/curl. in reality it appears that variable is ignored and it’s always set to /usr/local/bin
noobsu_ has joined #ruby
<umdstu>
soryr, always set to /usr/bin/curl
CoderPuppy has joined #ruby
yfeldblum has joined #ruby
roshanavand has quit [Quit: This computer has gone to sleep]
karapetyan has joined #ruby
SilverKey has joined #ruby
cpup has quit [Ping timeout: 244 seconds]
ljames has quit []
roshanavand has joined #ruby
karapetyan has quit [Client Quit]
|2701 has quit [Quit: Connection closed for inactivity]
ajax0xd9 has quit [Quit: Leaving]
<shevy>
anyone tried out http://pharo.org/ and can say how it compares to ruby?
agentmeerkat has quit [Quit: Lost terminal]
jhack has joined #ruby
Ishido has quit [Quit: Roads? Where We're Going We Don't Need Roads.]
symm- has quit [Ping timeout: 252 seconds]
edwinvdgraaf has joined #ruby
deadnull_ has quit [Quit: Bye]
siovene has quit [Quit: Connection closed for inactivity]
idefine has quit [Remote host closed the connection]
Yiota has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
gizmore has joined #ruby
gizmore has quit [Client Quit]
cpup has joined #ruby
elaptics is now known as elaptics`away
skade has quit [Quit: Computer has gone to sleep.]
anisha has quit [Quit: Leaving]
stannard has joined #ruby
arpegius has joined #ruby
nankyokusei has quit [Ping timeout: 260 seconds]
idefine has joined #ruby
anisha has joined #ruby
bronson has quit [Remote host closed the connection]
CoderPuppy has quit [Ping timeout: 276 seconds]
idefine has quit [Remote host closed the connection]
ctp has joined #ruby
pawnbox has quit [Remote host closed the connection]
giz|work has joined #ruby
tagaulap has quit [Quit: Connection closed for inactivity]
GinoManWorks has joined #ruby
icarus has joined #ruby
pawnbox has joined #ruby
arpegius has quit [Quit: arpegius]
Eiam_ has quit [Quit: ╯°□°)╯︵ǝpouǝǝɹɟ]
blackmesa has joined #ruby
hdm has left #ruby [#ruby]
Trynemjoel has joined #ruby
rizzatti has joined #ruby
darkxploit has quit [Quit: Leaving]
lacce has quit []
babblebre has quit [Quit: Connection closed for inactivity]
<flips>
I haven't been using Ruby for a long time, so things have changed. (I used it mostly before Rails.) I've got a new webdev project, and was thinking I should research/test if Ruby would be nice for the task. Googling a bit, I'm thinking maybe install nginx, Rack and padrino or Sinatra or something. Makes sense? :)
SilverKey has quit [Quit: Halted.]
brunto has joined #ruby
<smathy>
umdstu, do you need /usr/bin/curl for something? Just delete it and symlink that to your desired curl.
<umdstu>
smathy: definitely an option!
<umdstu>
or at least move it
Yiota has joined #ruby
Yiota has quit [Max SendQ exceeded]
yfeldblum has quit [Ping timeout: 276 seconds]
ferr1 has quit [Ping timeout: 250 seconds]
Yiota has joined #ruby
idefine has joined #ruby
SomeJuan has joined #ruby
idefine has quit [Remote host closed the connection]
panpainter has quit [Ping timeout: 265 seconds]
kirun has joined #ruby
idefine has joined #ruby
edwinvdgraaf has joined #ruby
bronson has joined #ruby
hadronzoo has joined #ruby
<jhass>
flips: yup
<jhass>
no need for nginx for a local dev setup though
<ruby595>
ruby-2.2.1/lib/libruby.so.2.2(vm_call0_body.constprop.78 - what this method do?
Coldblackice has joined #ruby
umdstu has quit [Quit: umdstu]
barajasfab has quit [Quit: Ex-Chat]
freerobby has joined #ruby
edwinvdgraaf has joined #ruby
kith has joined #ruby
djbkd has quit [Remote host closed the connection]
mooe has joined #ruby
flashpoint9 has joined #ruby
ajax0xd9 has joined #ruby
djbkd has joined #ruby
sumobob has quit [Quit: WeeChat 1.3]
giz|work has joined #ruby
flashpoint9 has quit [Remote host closed the connection]
edwinvdgraaf has quit [Ping timeout: 260 seconds]
flashpoint9 has joined #ruby
djbkd has quit [Ping timeout: 265 seconds]
cdg has joined #ruby
dikaio has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
allcentury has quit [Ping timeout: 244 seconds]
hanmac has quit [Ping timeout: 260 seconds]
dikaio has joined #ruby
hangtime21 has joined #ruby
Pumukel has joined #ruby
lxsameer has joined #ruby
rodfersou|coffee is now known as rodfersou
<tubbo>
ruby595: i bet 2.3.0 will not only resolve your issue but also make your program run bette
<tubbo>
rbetter*
hanmac has joined #ruby
anisha has joined #ruby
hangtime21 has quit []
lxsameer has quit [Ping timeout: 252 seconds]
pawnbox has joined #ruby
jancel has joined #ruby
noobsu_ has quit [Remote host closed the connection]
bruno- has quit [Read error: Connection reset by peer]
sinkensabe has joined #ruby
bruno- has joined #ruby
pawnbox has quit [Ping timeout: 260 seconds]
firstdayonthejob has joined #ruby
Trynemjoel has quit [Ping timeout: 264 seconds]
jancel has quit [Ping timeout: 276 seconds]
sinkensabe has quit [Ping timeout: 244 seconds]
gigetoo has quit [Ping timeout: 244 seconds]
Masonn has joined #ruby
jhack has joined #ruby
Yeomra has quit [Quit: WeeChat 1.5]
iwmrby has joined #ruby
anisha has quit [Quit: This computer has gone to sleep]
gigetoo has joined #ruby
Trynemjoel has joined #ruby
<iwmrby>
People, I need help.
<iwmrby>
Say I have a Ruby script and I get to a line that looks like Thread.new { do stuff in the new, separate thread }; more stuff; sleep 10.minutes;
<havenwood>
iwmrby: Say more?
kareeole_ has joined #ruby
<iwmrby>
When I run sleep, does it also sleep the Thread? Is this the intended behaviour?
<jhass>
no and it wouldn't
dstarh has joined #ruby
<ruby595>
its anouther things
djbkd has joined #ruby
<iwmrby>
AAAAH, but it seem to do that.
<iwmrby>
Ok, back to debugging
<iwmrby>
s/seem/seems
djbkd has quit [Remote host closed the connection]
djbkd has joined #ruby
dikaio has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
kareeoleez has quit [Ping timeout: 244 seconds]
jgt1 has joined #ruby
TreyG has quit [Remote host closed the connection]
<iwmrby>
Well, One more question. Say I have script one.rb and I want to call script two.rb with arguments U and Y as in `two.rb U Y`. What's the best way to call two.rb in a separate process? Thread.new{ system("ruby", "two.rb", Y, U) }
halfamind has quit [Read error: Connection reset by peer]
halfamind has joined #ruby
flashpoint9 has quit [Remote host closed the connection]
<iwmrby>
So spawn and Process.detach. Why this?
<jhass>
though smelly to call another ruby script rather than turning it into a library and calling it from a new thread or so
<jhass>
who said anything about Process.detach?
<iwmrby>
Well, since I don't care about it after it starts it comes naturally.
sepp2k has joined #ruby
<jhass>
"it"?
<jhass>
oh
<iwmrby>
it = the other script
blackgoat has joined #ruby
fmcgeough has quit [Quit: fmcgeough]
<jhass>
so you want to keep it running after the current script exits?
ta_ has joined #ruby
<iwmrby>
Yes.
<ruby595>
.join
<jhass>
nope
catpoop has left #ruby ["Leaving"]
nankyokusei has joined #ruby
mnrmnaugh has joined #ruby
<jhass>
detach it is I guess
aryaching has joined #ruby
<jhass>
or just Kernel#exec to it?
mnrmnaugh is now known as catpoop_
<ruby595>
.join - we wait for end
<iwmrby>
ruby595: I don't want to wait for it to end.
<jhass>
spawn doesn't create a thread we could join
catpoop_ is now known as catpoop
aryaching has quit [Client Quit]
mnrmnaugh_ has joined #ruby
aryaching has joined #ruby
sinkensabe has joined #ruby
<jhass>
well I still say this smells like there's a huge opportunity for a library to be extracted
mnrmnaugh_ has quit [Client Quit]
giz|work has quit [Ping timeout: 244 seconds]
<iwmrby>
jhass: I was so trying to avoid that, but it's probably what I am going to to.
mnrmnaugh_ has joined #ruby
<iwmrby>
jhass: thanks a lot for your help!
<jhass>
it's a good thing!
<jhass>
yw
dionysus69 has quit [Ping timeout: 240 seconds]
nankyokusei has quit [Ping timeout: 265 seconds]
riobe has joined #ruby
ta_ has quit [Ping timeout: 260 seconds]
<riobe>
I'm writing a simple console app to do some builds, and I want to flush $stdout before I output to $stderr in a global rescue block. I'm using both `STDOUT.sync = true` at the beginning of the program and $stdout.flush at the beginning of the rescue block and I am still seeing the error output intermixed with the normal puts output. Is there a way to fix this?
safetypin has joined #ruby
ruby-lang696 has joined #ruby
ruby-lang696 has quit [Client Quit]
bruce_lee has quit [Ping timeout: 260 seconds]
konsolebox has joined #ruby
bruce_lee has joined #ruby
<riobe>
Bah, I ask in here and then come up with the fix a minute later. @.@ Putting `STDOUT.sync = STDERR.sync = true` at the beginning of my rescue block (or program) fixes it.
<riobe>
Nevermind...that only works sometimes. Insanity causing issue. They seem to be race conditioning (inconsistent results between runs)
sinkensabe has quit [Read error: Connection reset by peer]
safetypin has quit [Read error: Connection reset by peer]
yeticry has quit [Read error: Connection reset by peer]
sinkensabe has joined #ruby
synthro__ has quit []
konsolebox has quit [Remote host closed the connection]
ur5us has joined #ruby
yeticry has joined #ruby
noobsu has joined #ruby
SomeJuan has quit [Ping timeout: 246 seconds]
chip_ has joined #ruby
<tobiasvl>
riobe: probably a race condition, yeah. STDOUT is buffered, so presumably even the flush is buffered
<tobiasvl>
or well, that doesn't make much sense
<tobiasvl>
hm
domgetter has joined #ruby
<riobe>
I thought the point of sync, and flush, is that I could know that when the flush call got done everything would be....flushed.
<domgetter>
I have IRB.conf[:SAVE_HISTORY] = 1000 in my .irbrc, so shouldn't it show the history of evaluations?
<riobe>
tobiasv1: lol. I'm getting it working atm by putting a `sleep 1` after the `$stdout.flush` It's a build server that's running it, so if there's an extra second of you looking at the log before you get the error, no biggie. But it's frustrating to put in what feels like a hack.
giz|work has joined #ruby
<tobiasvl>
riobe: yeah, that's ugly. and all of a sudden you have lots of iowait and it takes more than a second (OK, that's unlikely, but still) and it's broken again in a worse way
<tobiasvl>
but I don't have an answer
Guest65192 has joined #ruby
<riobe>
Well, thanks for at least thinking about it. :)
jancel has joined #ruby
<tobiasvl>
btw, $stdout's value is STDOUT, right?
jancel has quit [Remote host closed the connection]
<tobiasvl>
I forget how they work
<riobe>
I don't either, but I think I'll solve that after I finish the rest of the project. I only have one sleep so far in a global error handler. Hopefully I can avoid need elsewhere.
dvinciguerra has quit [Ping timeout: 240 seconds]
<tobiasvl>
but you used both $stdout and STDOUT in your example above. that doesn't affect things, does it?
<riobe>
$stdout is the global that refers to the value of the standard out. $> is an alias. STDOUT represents the initial value of $stdout
jancel has joined #ruby
<tobiasvl>
that's how it is.
<riobe>
I figured that STDOUT.sync = true wouldn't do anything, but it does. So I don't really completely understand the relationship
<riobe>
I tried both that and `$stdout.sync = true`
<riobe>
No change
<riobe>
I can set either STDOUT or $stdout's sync to false and do some output of single characters with sleeps and see the buffering it does.
Guest65192 has quit [Client Quit]
mdw has quit [Quit: Sleeping Zzzzz]
jenrzzz has joined #ruby
<eam>
riobe: if you want your writes to be atomic, use #syswrite
<eam>
or use #write with #sync = true
<eam>
if you use puts or some other method you may end up performing multiple write() system calls
mdw has joined #ruby
<eam>
(and there are potentially other constraints, like the pipe buf size if you're writing to a pipe)
jancel has quit [Ping timeout: 260 seconds]
ChiefAlexander has quit [Remote host closed the connection]
<eam>
write goes through the rubyio layer and may be subject to write caching / flushing
dstarh has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<eam>
syswrite does not -- what you send syswrite will translate directly into a write() system call
sinkensabe has quit [Read error: Connection reset by peer]
<riobe>
I'll try converting my puts to STDOUT.syswrite and see if that works. Thanks for the idea eam
<eam>
the particular implementation details of how writes behave past that are subject to your operating system's internals (generally you can assume POSIX behavior on a unix type system, thouhg)
sinkensabe has joined #ruby
<eam>
as long as your writes are under 4k in size you probably won't have an issue
rbennacer has quit [Ping timeout: 260 seconds]
<flips>
Hm, should I install gems using apt (on ubuntu), or following something like the rbenv/bundler method outlined on gorails.com?
roamingdog has joined #ruby
hahuang61 has quit [Ping timeout: 240 seconds]
panpainter has quit [Remote host closed the connection]
<shevy>
flips I would not trust apt
<eam>
flips: it depends. Generally, folks tend to bundle a ruby + gems with their app as it allows you to arbitrarily upgrade those components when you change your app's code
<eam>
the system packages are more useful for smaller things
<flips>
I haven't used ruby in a loong time. I seem to need rbenv&bundle to get the equivalent of pythons virtualenvs?
iwmrby has quit [Quit: WeeChat 1.4]
<flips>
*bundler
nofxx has quit [Ping timeout: 260 seconds]
nofxx has joined #ruby
nofxx has joined #ruby
akem has quit [Ping timeout: 246 seconds]
<riobe>
eam: Putting `def puts(string='') STDOUT.syswrite string + "\n" end` at the top of my entry point file (I proved it was overriding the standard puts) still leaves stderr output using puts intermixed with stdout.
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
<eam>
well, did you do the same for all STDERR bound output?
<eam>
you have to do it for all output
<riobe>
No, I figured it didn't matter if STDERR got buffered or went slower. But I'll try it.
<eam>
ah
rodfersou has quit [Quit: leaving]
<eam>
yeah, you can't use puts() at all if you want atomicity
zapata has quit [Ping timeout: 260 seconds]
Masonn has quit [Ping timeout: 260 seconds]
yfeldblum has joined #ruby
<riobe>
eam: Ok, I put back in the puts override, then switched my 3 stderr outputs to look like this: `STDERR.syswrite "Error: #{e.message}\n"`
<riobe>
I still get the intermixxed output.
eljimmy has quit [Quit: This computer has gone to sleep]
<eam>
riobe: you probably still have a buffered write being used somewhere. Can you post the code?
roshanavand has quit [Quit: This computer has gone to sleep]
<ruby[bot]>
riobe: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
<eam>
riobe: ah, it's possible Windows doesn't provide the same kinds of atomicity guarantees
<riobe>
It's a build script that needs to run on a windows box (To build C# projects)
lubekpl has joined #ruby
<eam>
the behavior of the write() system call being atomic is a thing unix specifies
<riobe>
Good to know about the pastebin hate. o.o
<eam>
rules on windows might be different -- you're depending on the operating system semantics at this point
<riobe>
I see. I wish I were on a *nix system.
<riobe>
Well, given that I might just resign to put a `sleep 1` in that rescue block. I only have the one global error handler that's like that for this project.
<eam>
this probably isn't high performance, right? It shouldn't be too hard for you to implement your own properly serialized output system -- or just write your own puts() with a mutex to serialize it
roamingdog has quit [Remote host closed the connection]
sinkensabe has joined #ruby
<riobe>
It's just for a build server to use to build projects for our < 10 person dev team. So no, not performance critical.
<riobe>
Once I get done with all the basic functionality, I might just take that suggestion.
roshanavand has joined #ruby
roshanavand has quit [Remote host closed the connection]
<riobe>
Thanks for helping. Learned some new stuff from that exercise. :)
zapata has joined #ruby
mnrmnaugh_ has quit [Remote host closed the connection]
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mdw has quit [Ping timeout: 265 seconds]
kareeoleez has quit [Remote host closed the connection]
sinkensabe has quit [Read error: Connection reset by peer]
mjuszczak has joined #ruby
ChiefAlexander has quit [Ping timeout: 252 seconds]
gagrio has quit [Ping timeout: 246 seconds]
johnmilton has quit [Remote host closed the connection]
dfockler has joined #ruby
ta_ has joined #ruby
mdw has joined #ruby
gagrio has joined #ruby
halfamind has quit [Quit: Leaving.]
minimalism has joined #ruby
bobbycvi has joined #ruby
sinkensabe has joined #ruby
d5sx43 has joined #ruby
minot has joined #ruby
minot has quit [Max SendQ exceeded]
minot has joined #ruby
minot has quit [Max SendQ exceeded]
mwlang has joined #ruby
kareeoleez has joined #ruby
malconis has joined #ruby
joneshf-laptop has quit [Ping timeout: 240 seconds]
danostrowski has joined #ruby
<danostrowski>
if I want to pass a block as a symbol to a method accepting params, what's the best way to do that? my_method(arg, arg2) { |i| i.do_something} works, but can't I do some sort of thing with &? What's the syntax?
<danostrowski>
(for argument's sake, I'm keeping parens in the call.
<aegis3121>
my_method(arg1, arg2, &block_arg); block_arg.call; end
<aegis3121>
(I'm pretty sure)
<danostrowski>
Right, but that's... sorry, I just want to use the & syntax to PASS the block's work that I'm doing.
braincrash has quit [Ping timeout: 276 seconds]
<danostrowski>
I want to do: my_method(arg1, arg2) &:do_something
<danostrowski>
actually, lemme just irb this real fast.
cpup has joined #ruby
<danostrowski>
yeah, that doesn't work.
noobsu has quit [Remote host closed the connection]
kareeoleez has quit [Ping timeout: 244 seconds]
sinkensabe has quit [Read error: Connection reset by peer]
eljimmy has joined #ruby
sinkensabe has joined #ruby
sp4rrow has quit [Quit: The Internet needs a break and I need a cookie]
CoderPuppy has quit [Ping timeout: 250 seconds]
eljimbo has joined #ruby
TomyLobo has quit [Ping timeout: 240 seconds]
bronson has quit [Remote host closed the connection]
Jackneill has joined #ruby
isxek has quit [Quit: Leaving]
panpainter has joined #ruby
<aegis3121>
&:method # => a Proc object of that method that expects to be called on something.
<aegis3121>
> :to_s.to_proc.call 3
d5sx43 has quit [Quit: Leaving...]
<ctp>
hi folks. how do i split a string using a delimiter but adding some exception? "foo | bar \| bla | baz".split("|") should split by "|" but not for "\|"
Rickmasta has joined #ruby
d5sx43 has joined #ruby
<danostrowski>
Yeah, I guess basically methods don't accept a Proc object instead of a block, basically. Makes sense.
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<aegis3121>
So you'll 1) need to split on a regex, 2) use lookbehind, and 3) understand what your string actually looks like
<bougyman>
3) is highest priority
<aegis3121>
yup
platzhirsch has joined #ruby
hahuang61 has joined #ruby
mlehrer has joined #ruby
ChiefAlexander has quit [Ping timeout: 244 seconds]
sinkensabe has quit [Remote host closed the connection]
joaumg has quit [Quit: WeeChat 0.4.2]
ramfjord has joined #ruby
_ht has quit [Ping timeout: 244 seconds]
crystal77 has joined #ruby
_ht has joined #ruby
<aegis3121>
ctp: What vaejor output here is what your String looks like to Ruby, so you can see why it's splitting on that. You'll notice in your output that you're getting the slash isn't included in the string like it would be if it were purely splitting on the pipe.
johnmilton has joined #ruby
crystal77 has quit [Max SendQ exceeded]
<aegis3121>
Splitting on the pipe as you saw it*
<havenwood>
/(?<!\\)\|/
sepp2k has quit [Read error: Connection reset by peer]
<aegis3121>
So again, the issue comes down to how ruby handles escape characters (like \|)
danostrowski has quit [Read error: Connection reset by peer]
<ctp>
the context is: it's dokuwiki syntax, pipes are used for table's vertical borders as well as for link texts in [[url|linktext]], so i use [[url\|linktext]] to distinguish
<aegis3121>
with double quoted strings, those are interpolated and you get whatever the output of that escape character is. Single quotes preserve it.
edwinvdgraaf has quit [Ping timeout: 252 seconds]
djbkd has joined #ruby
blackmesa has quit [Ping timeout: 276 seconds]
TobiG77 has joined #ruby
nb_bez___ has joined #ruby
duncannz has quit [Remote host closed the connection]
CoderPuppy has quit [Ping timeout: 244 seconds]
polishdub has quit [Quit: Leaving]
<ctp>
yepp. i understand, but if i use single quoted strings, there's still the problem how to not split at '\|'
<aegis3121>
That's simple regex that havenwood gave you
<ctp>
ok, gimme a try :)
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<vaejor>
ctp: are the spaces around the | required as part of the dokuwiki format requirements?
Masonn has quit [Ping timeout: 276 seconds]
<ctp>
vaejor i don't think so, but the docs i parse autogenerated and produce them
Rickmasta has joined #ruby
<ctp>
would it help, if it wasn't?
<ctp>
s/i parse/i parse are
[Butch] has quit [Quit: I'm out . . .]
<vaejor>
ctp: it could help slightly if it were a requirement, but the regex havenwood put up works either way
boboc has quit []
kareeoleez has quit [Remote host closed the connection]
<vaejor>
ctp: so if you're unsure, catching it by \| is probably a better method at this point
<ctp>
yepp, i see
bluOxigen_ has joined #ruby
ajax0xd9 has quit [Read error: Connection reset by peer]
QORRiE has quit [Quit: Leaving]
bluOxigen has quit [Ping timeout: 250 seconds]
nankyokusei has joined #ruby
<ctp>
i somehow miss the glue between the input string and the regex :) the day today was maybe a little too long ...
<vaejor>
.split() can accept a regex as the parameter
<vaejor>
ctp: ^
ajax0xd9 has joined #ruby
smathy is now known as smathy_afk
impermanence has quit [Quit: leaving]
<ctp>
aaaaaah, ok. thanks guys!
<ctp>
was juggling with .scan etc :)
zeroDi has joined #ruby
panpainter has joined #ruby
brunto has quit [Ping timeout: 252 seconds]
dhollinger has quit [Quit: WeeChat 1.4]
aegis3121 has quit [Ping timeout: 276 seconds]
impermanence has joined #ruby
nankyokusei has quit [Ping timeout: 252 seconds]
zenlot has joined #ruby
johnmilton has joined #ruby
dopamean_ has quit [Quit: :(]
mjuszczak has joined #ruby
panpainter has quit [Ping timeout: 252 seconds]
zenlot6 has quit [Ping timeout: 276 seconds]
ChiefAlexander has joined #ruby
workmad3 has quit [Read error: Connection reset by peer]
ChiefAlexander has quit [Remote host closed the connection]
solocshaw has joined #ruby
skolman_ has quit [Remote host closed the connection]
skolman_ has joined #ruby
roamingdog has joined #ruby
toretore has quit [Ping timeout: 260 seconds]
ajax0xd9 has quit [Read error: Connection reset by peer]
SCHAAP137 has quit [Ping timeout: 240 seconds]
workmad3 has joined #ruby
djbkd has quit [Remote host closed the connection]
skolman_ has quit [Ping timeout: 260 seconds]
lubekpl has quit [Ping timeout: 260 seconds]
djbkd has joined #ruby
vdamewood has quit [Quit: Life beckons.]
Parko has joined #ruby
kfs has joined #ruby
nogic has quit [Ping timeout: 260 seconds]
bronson has joined #ruby
<kfs>
hi guys. i'm trying to install a ruby gem on my Mac and when i run it as my user it says permission denied to write to /Library/Ruby/Gems/2.0.0, so i installed with sudo and it worked but then when i go to run it it says i don't have the decencies.
impermanence has quit [Quit: leaving]
oetjenj has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
impermanence has joined #ruby
dfockler has quit [Ping timeout: 265 seconds]
djbkd has quit [Ping timeout: 260 seconds]
torandu has quit [Ping timeout: 244 seconds]
djbkd has joined #ruby
impermanence has quit [Client Quit]
torandu has joined #ruby
rkazak has joined #ruby
impermanence has joined #ruby
kirun has quit [Quit: Client exiting]
impermanence has quit [Client Quit]
impermanence has joined #ruby
Rutix has quit [Read error: Connection reset by peer]
dikaio has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
firstdayonthejob has quit [Ping timeout: 260 seconds]
roamingdog has quit [Remote host closed the connection]
startupality has joined #ruby
Rutix has joined #ruby
Rutix has quit [Changing host]
Rutix has joined #ruby
ruby595 has quit [Ping timeout: 250 seconds]
rkazak has quit [Client Quit]
cschneid_ has quit [Remote host closed the connection]
roamingdog has joined #ruby
panpainter has joined #ruby
cpup has quit [Ping timeout: 240 seconds]
CloCkWeRX has joined #ruby
hellcode has quit [Quit: quit]
cpup has joined #ruby
smathy_afk is now known as smathy
rkazak has joined #ruby
panpainter has quit [Ping timeout: 265 seconds]
mjuszczak has quit []
saneax_AFK is now known as saneax
aryaching has quit []
dikaio has joined #ruby
arescorpio has joined #ruby
sp4rrow has quit [Quit: The Internet needs a break and I need a cookie]
sdwrage has joined #ruby
zyzioziom has quit [Ping timeout: 252 seconds]
dfockler has joined #ruby
null__ has quit [Ping timeout: 244 seconds]
Jackneill has quit [Ping timeout: 265 seconds]
panpainter has joined #ruby
null__ has joined #ruby
cooldavid has joined #ruby
mjuszczak has joined #ruby
mjuszczak has quit [Max SendQ exceeded]
mjuszczak has joined #ruby
crystal77 has quit [Ping timeout: 250 seconds]
freerobby has quit [Quit: Leaving.]
panpainter has quit [Ping timeout: 250 seconds]
jwren has quit [Quit: leaving]
last_staff has quit [Quit: last_staff]
<cooldavid>
can someone help me solve this spec? https://gist.github.com/anonymous/949d71056a8621728f1dc3a7765bfeba -- my problem is not with ruby but with the logical puzzle, the code is calling the payments_collected_in method and passing a Date object, and it expects a number, I think the trick is with the payment_day and frequency, I don't know what I have to do to match the expected number :(
mjuszcza_ has joined #ruby
mjuszcza_ has quit [Max SendQ exceeded]
<cooldavid>
please kindly explain to me if you know
mjuszczak has quit [Read error: Connection reset by peer]
agent_white has quit [Quit: headinHome]
kasisnu has joined #ruby
spider-mario has quit [Read error: Connection reset by peer]
gigetoo has quit [Ping timeout: 246 seconds]
mjuszczak has joined #ruby
ghoti has quit [Ping timeout: 240 seconds]
kiki_lamb has quit [Ping timeout: 250 seconds]
dikaio has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ghoti has joined #ruby
kiki_lamb has joined #ruby
gigetoo has joined #ruby
djbkd has quit [Remote host closed the connection]
jgt1 has quit [Ping timeout: 246 seconds]
djbkd has joined #ruby
djbkd has quit [Read error: Connection reset by peer]
startupality has quit [Quit: startupality]
djbkd has joined #ruby
djbkd has quit [Read error: Connection reset by peer]
djbkd has joined #ruby
platzhirsch has quit [Quit: WeeChat 1.4]
dfockler has quit [Quit: Leaving]
rkazak has quit [Quit: Sleep.....ing....]
mjuszczak has quit []
SilverKey has quit [Ping timeout: 276 seconds]
djbkd has quit [Read error: Connection reset by peer]
ghoti has quit [Ping timeout: 240 seconds]
djbkd has joined #ruby
mjuszczak has joined #ruby
ghoti has joined #ruby
TobiG77 has quit [Quit: TobiG77]
AnoHito has joined #ruby
JoshGlzBrk has joined #ruby
impermanence has quit [Quit: leaving]
ramfjord has quit [Ping timeout: 276 seconds]
SilverKey has joined #ruby
sp4rrow has joined #ruby
AnoHito_ has quit [Ping timeout: 250 seconds]
dikaio has joined #ruby
kfs has quit [Quit: This computer has gone to sleep]
kfs has joined #ruby
mdw has quit [Quit: Sleeping Zzzzz]
bruno- has quit [Read error: Connection reset by peer]
roshanavand has joined #ruby
kfs has quit [Client Quit]
bruno- has joined #ruby
stardiviner has joined #ruby
chouhoulis has joined #ruby
ramfjord has joined #ruby
Vile` has joined #ruby
mistermocha has joined #ruby
panpainter has joined #ruby
crystal77 has joined #ruby
bronson has quit [Remote host closed the connection]