capitainIsh has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
<workerbeetwo>
manveru: ah. the console got stuck somehow. had trouble to get out and after quitting succeeded, my new attempts worked as expected. ha.values ! thank you very much
<manveru>
you're on windows? :)
<workerbeetwo>
ubuntu
<manveru>
strange
<manveru>
oh well, mystery solved, kinda
* manveru
heads back to work
<workerbeetwo>
in deed. thanks all.
[k- has joined #ruby
bsrd has quit [Ping timeout: 244 seconds]
jtzero has quit [Ping timeout: 264 seconds]
marr has joined #ruby
alaibe has quit [Ping timeout: 244 seconds]
k3rn31 has quit [Quit: Computer has gone to sleep.]
vondruch has joined #ruby
claudiuinberlin has joined #ruby
vuoto has quit [Remote host closed the connection]
vuoto has joined #ruby
ferr has joined #ruby
raeoks has joined #ruby
nankyokusei has joined #ruby
andikr has joined #ruby
ICantCook has quit [Quit: bye]
capitainIsh has joined #ruby
|ifei5g00d has quit [Ping timeout: 252 seconds]
nankyokusei has quit [Ping timeout: 276 seconds]
devbug has quit [Read error: Connection reset by peer]
ur5us has quit [Remote host closed the connection]
olistik has quit [Remote host closed the connection]
ta_ has joined #ruby
Silthias has joined #ruby
Cohedrin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
pawnbox has quit [Remote host closed the connection]
duncannz has joined #ruby
duncannz has quit [Max SendQ exceeded]
duncannz has joined #ruby
duncannz has quit [Max SendQ exceeded]
LoneHerm_ has joined #ruby
aidalgol has joined #ruby
vuoto has quit [Remote host closed the connection]
miro-haku has joined #ruby
[k- has quit [Read error: Connection reset by peer]
[k- has joined #ruby
A_Drone has joined #ruby
alaibe has joined #ruby
joekarma has quit [Quit: joekarma]
miro-haku has left #ruby [#ruby]
Ebok has quit [Quit: This computer has gone to sleep]
vondruch has quit [Remote host closed the connection]
capitainIsh has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
devbug has joined #ruby
pandaant has joined #ruby
pawnbox has joined #ruby
workerbeetwo has quit [Ping timeout: 244 seconds]
camilasan has quit [Read error: Connection reset by peer]
vuoto has joined #ruby
haxrbyte has joined #ruby
Pupeno_ has joined #ruby
araujo__ has quit [Quit: Leaving]
aries_liuxueyang has quit [Quit: No Ping reply in 180 seconds.]
aufi has joined #ruby
pwnd_nsfw` has quit [Read error: Connection reset by peer]
haxrbyte has quit [Client Quit]
araujo has joined #ruby
camilasan has joined #ruby
pwnd_nsfw has joined #ruby
aries_liuxueyang has joined #ruby
Pupeno has quit [Ping timeout: 240 seconds]
aspiers_ is now known as aspiers
AnFin has joined #ruby
pawnbox has quit [Remote host closed the connection]
<hanmac>
dminuoso: surprise but it isnt, unless does not call the "!" method
<dminuoso>
hanmac: My point is just that if Ruby states that ! is supposed to be boolean negate, then any class not following that convention is probably not well designed.
<hanmac>
thats why i said they are not the SAME
<dminuoso>
Fair enough. "To have the same effect"
<dminuoso>
If you look close enough even things like "for i in ary" is not the same as "ary.each { |i| }"
<hanmac>
in 99.99% of the cases they do (except when someone does define its own ! method)
<dminuoso>
hanmac: It's important to follow these conventions. Just think about ==, ===, eql?, and equal?
pawnbox has quit [Remote host closed the connection]
araujo_ has quit [Quit: Leaving]
postmodern has quit [Quit: Leaving]
banisterfiend has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
phrozen77 has quit [Ping timeout: 260 seconds]
pawnbox has joined #ruby
shmuli has quit [Remote host closed the connection]
sevenfourk has quit [Quit: Connection closed for inactivity]
shmuli has joined #ruby
ctp has joined #ruby
ropeney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
flying has joined #ruby
exadeci has quit [Quit: Connection closed for inactivity]
gilfoyle has quit [Ping timeout: 276 seconds]
N1njturt_ has quit [Remote host closed the connection]
devbug has joined #ruby
N1njturt1e has joined #ruby
Snowy has joined #ruby
blaxter has joined #ruby
devbug has quit [Client Quit]
workerbeetwo has quit [Ping timeout: 244 seconds]
vondruch has quit [Quit: Ex-Chat]
workerbeetwo has joined #ruby
N1njturt1e has quit [Ping timeout: 250 seconds]
jonyijoe has quit [Remote host closed the connection]
jonyijoe has joined #ruby
vondruch has joined #ruby
vuoto_ has joined #ruby
N1njturt1e has joined #ruby
jonyijoe has quit [Ping timeout: 244 seconds]
bkxd has joined #ruby
Bounga has joined #ruby
N1njturt1e has quit [Remote host closed the connection]
N1njturt1e has joined #ruby
alaibe has quit [Ping timeout: 264 seconds]
vuoto has quit [Remote host closed the connection]
vuoto_ has quit [Remote host closed the connection]
vuoto has joined #ruby
vuoto_ has joined #ruby
bkxd has quit [Ping timeout: 276 seconds]
hahuang61 has joined #ruby
N1njturt1e has quit [Ping timeout: 250 seconds]
vuoto__ has joined #ruby
vuoto_ has quit [Remote host closed the connection]
vuoto has quit [Client Quit]
vuoto__ has quit [Remote host closed the connection]
<claw>
hey guys. stupid beginner question on mkmf and nativ extensions
pawnbox has quit [Remote host closed the connection]
<claw>
can i return reusable objects from c ? e.g. speaking of libssh using sftp_new() returning a session and later pass that to sftp_init(session) ?
hahuang61 has quit [Ping timeout: 250 seconds]
<claw>
or can i only use my c-'objects' inside the c-'method' ?
astrobun_ has quit [Remote host closed the connection]
raeoks has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Pumukel has quit [Ping timeout: 250 seconds]
gingray has quit [Ping timeout: 260 seconds]
senayar has joined #ruby
senayar has joined #ruby
senayar has quit [Changing host]
crst has joined #ruby
dinoangelov has joined #ruby
Hyuk has joined #ruby
Hyuk has quit [Client Quit]
k3rn31 has quit [Quit: Computer has gone to sleep.]
Hyuk has joined #ruby
raeoks has joined #ruby
aries_liuxueyang has quit [Quit: No Ping reply in 180 seconds.]
bweston92 has joined #ruby
sdothum has joined #ruby
aries_liuxueyang has joined #ruby
claudiuinberlin has quit [Remote host closed the connection]
tectonic has joined #ruby
dminuoso has quit [Ping timeout: 264 seconds]
zipace has joined #ruby
stamina has quit [Ping timeout: 240 seconds]
<IsoLinCHiP>
hi, can anyone recommend some documentation for activerecord other than the railsguides? Im am really struggling with n-m relations and querying with joins in AR.
<elomatreb>
pragmaticus: Split the string on the newlines ("\n") and search the resulting array, with the index being your line number?
aegis3121 has joined #ruby
nclbr has quit [Quit: Leaving...]
workerbeetwo has quit [Quit: Lost terminal]
<pragmaticus>
elomatreb: thx, worked
malconis has joined #ruby
frozengeek has joined #ruby
banisterfiend has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tyang has quit [Ping timeout: 250 seconds]
malconis has quit [Remote host closed the connection]
Agent001 has joined #ruby
nankyokusei has joined #ruby
thejamespinto has quit [Ping timeout: 240 seconds]
bmurt has joined #ruby
malconis has joined #ruby
ta_ has quit [Remote host closed the connection]
nankyokusei has quit [Ping timeout: 244 seconds]
tyang has joined #ruby
tvon[laptop] has quit [Quit: System is sleeping...]
Jardayn has quit [Read error: Connection reset by peer]
irisseries has joined #ruby
nettoweb has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
karmatr0n has quit [Ping timeout: 240 seconds]
andikr has joined #ruby
tommylommykins has joined #ruby
karmatr0n has joined #ruby
Agent001 has quit [Ping timeout: 240 seconds]
nettoweb has joined #ruby
<irisseries>
Good Morning/Evening , Could someone point me in the right direction. I would to use a linux that teaches all the basics while introducing harder things. Please tell me why that distro too.
irisseries has left #ruby ["Leaving"]
shmuli has joined #ruby
<pragmaticus>
how to remove all whitespaces of every element in an array?
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<pragmaticus>
bonus question, how to delete all whitesapces?
<havenwood>
pragmaticus: What I first showed you deletes all whitespace like you first asked. If you want to just remove leading and trailing just: array.map(&:strip)
coolboy has joined #ruby
Bounga` has joined #ruby
<pragmaticus>
havenwood: i cant figure out the map function
<pragmaticus>
havenwood, where is the array?
<lizard2010>
to remove all whitespace, you can use .gsub(/\s+/, "")
<havenwood>
pragmaticus: `collect` is an alias for `map`
<lizard2010>
Fetch, mybe typo
<havenwood>
pragmaticus: I omitted the `array.`, sorry for the confusion.
<pragmaticus>
havenwood, got it array.map ....
<pragmaticus>
thx
Bounga`` has joined #ruby
bmurt has joined #ruby
<pragmaticus>
love all solutions :D
<lizard2010>
.strip! reuturn nil if no change
b3atr has joined #ruby
<b3atr>
as a ruby programmer what language would you recommend to learn along?
<lizard2010>
without bang - never nil
Bounga has quit [Ping timeout: 260 seconds]
<lizard2010>
b3atr, prolog for mind hurt (=
tvon has joined #ruby
<havenwood>
b3atr: There are so many. Maybe Elixir, Crystal or Rust.
aryaching has quit [Ping timeout: 260 seconds]
jphase has joined #ruby
johnmilton has quit [Remote host closed the connection]
<b3atr>
havenwood: i didn't have a good taste of rust.
claudiuinberlin has joined #ruby
<havenwood>
b3atr: Crystal is statically type checked.
<lizard2010>
с?
<Mon_Ouie>
Haskell?
kp666 has joined #ruby
<b3atr>
lizard2010: already know it.
<lizard2010>
and even java?
<havenwood>
b3atr: Elxiir has Dialyzer (or Dialyxir) for static type analysis.
<lizard2010>
*** i don;t like it personally, but it very useful today (=
jphase has quit [Ping timeout: 250 seconds]
craigp has quit [Ping timeout: 265 seconds]
<b3atr>
lizard2010: IDE-dependent language, puff.
<lizard2010>
and this also :)
Vile` has quit [Ping timeout: 250 seconds]
Bounga``` has quit [Ping timeout: 240 seconds]
<havenwood>
b3atr: How about Elm for a Haskell-light?
fantazo has joined #ruby
<b3atr>
havenwood: i'm not ui developer.
SteenJobs has joined #ruby
<[k->
:> Haskell
<havenwood>
b3atr: I think Elm plans to go server-side, but good point.
[k-_ has joined #ruby
<b3atr>
crystal, clojure and elixir are pretty good.
[k- has quit [Read error: Connection reset by peer]
<b3atr>
how about golang?
<[k-_>
OCaml, ML, Purescript
<havenwood>
b3atr: Quick to learn. Not as fun as Crystal, Clojure or Elixir.
<[k-_>
F#,
GodFather has quit [Remote host closed the connection]
pawnbox has quit [Remote host closed the connection]
<b3atr>
i really liked the syntax, it feels like C but not so memory-senstive.
<[k-_>
How about Scala? Scala is fast and quite expressive
<havenwood>
b3atr: I guess I just prefer Crystal for Go-like concurrency langs. ;)
johnmilton has joined #ruby
johnmilton has quit [Read error: Connection reset by peer]
<b3atr>
[k-_: i really like almost-pure functional languages, but not for now. maybe next year :)
johnmilton has joined #ruby
<[k-_>
almost pure? F#!
<b3atr>
[k-_: there's no pure-functional language on earth.
<[k-_>
mathematics
<b3atr>
that's a different and it's abstract.
CloCkWeRX has quit [Ping timeout: 265 seconds]
M-manveru1 has quit [Read error: Connection reset by peer]
M-mistake has quit [Read error: Connection reset by peer]
M-shine has quit [Read error: Connection reset by peer]
GodFather has joined #ruby
LoneHermit has joined #ruby
<Mon_Ouie>
Doesn't F# have reference types like OCaml?
aufi has quit [Ping timeout: 244 seconds]
biberu has joined #ruby
roamingdog has joined #ruby
pwnd_nsfw` has joined #ruby
LoneHermit has quit [Ping timeout: 240 seconds]
zekriad has joined #ruby
pawnbox has joined #ruby
rubie has joined #ruby
crst has quit [Quit: Leaving...]
bkxd has quit [Ping timeout: 244 seconds]
<[k-_>
I don't know, I have no idea what's the difference between F#, Ocaml and Haskell. I just chose haskell because I felt thar it was mathematical and it appealed to me. I'm still a beginner at haskell.
<[k-_>
I was just broadening the search for new languages
pwnd_nsfw has quit [Ping timeout: 250 seconds]
minimalism has quit [Quit: minimalism]
jazzonmym11nd has quit [Read error: Connection reset by peer]
jazzonmym11nd has joined #ruby
max_v has joined #ruby
pawnbox has quit [Ping timeout: 240 seconds]
govg has joined #ruby
phrozen77 has joined #ruby
chouhoulis has joined #ruby
kies has joined #ruby
stamina has joined #ruby
roamingdog has quit [Remote host closed the connection]
roamingdog has joined #ruby
shinnya has joined #ruby
naftilos76 has joined #ruby
akp has joined #ruby
chouhoulis has quit [Remote host closed the connection]
Bounga``` has joined #ruby
chouhoulis has joined #ruby
minimalism has joined #ruby
anisha has quit [Quit: This computer has gone to sleep]
jhass has quit [Ping timeout: 255 seconds]
<darix>
[k-_: rust
jonyijoe has joined #ruby
<[k-_>
that was already mentioned
jgt has quit [Ping timeout: 244 seconds]
tvon has quit [Quit: System is sleeping...]
jhass has joined #ruby
max_v has quit [Quit: Saliendo]
Bounga``` has quit [Ping timeout: 276 seconds]
nettoweb has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tyang has quit [Ping timeout: 250 seconds]
GodFather has quit [Quit: Ex-Chat]
ebbflowgo has quit [Read error: Connection reset by peer]
GodFather has joined #ruby
shmuli has quit [Remote host closed the connection]
pawnbox has joined #ruby
ebbflowgo has joined #ruby
aryaching has joined #ruby
tvon has joined #ruby
araujo has joined #ruby
araujo has quit [Changing host]
araujo has joined #ruby
araujo has quit [Max SendQ exceeded]
tyang has joined #ruby
araujo has joined #ruby
Agent001 has joined #ruby
M-shine has joined #ruby
GodFather has quit [Ping timeout: 276 seconds]
gopz has joined #ruby
bkxd has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
fmcgeough has joined #ruby
pawnbox has quit [Remote host closed the connection]
danostrowski has joined #ruby
submitnine has quit []
bkxd has quit [Ping timeout: 252 seconds]
rippa has joined #ruby
tyang has quit [Ping timeout: 250 seconds]
astrobunny has quit [Quit: Leaving...]
aganov has quit [Remote host closed the connection]
deadprez has joined #ruby
pawnbox has joined #ruby
govg has quit [Ping timeout: 250 seconds]
jazzonmym11nd has quit [Read error: Connection reset by peer]
aegis3121 has quit [Ping timeout: 264 seconds]
jazzonmym11nd has joined #ruby
fmcgeough has quit [Read error: Connection reset by peer]
cdg has quit [Remote host closed the connection]
danostrowski has quit [Ping timeout: 252 seconds]
jtzero has joined #ruby
zacts has quit [Ping timeout: 264 seconds]
jphase has joined #ruby
olistik has quit [Remote host closed the connection]
Ipe_ has joined #ruby
olistik has joined #ruby
dminuoso has joined #ruby
JeanCarloMachado has quit [Ping timeout: 240 seconds]
roamingdog has quit [Read error: Connection reset by peer]
shmuli has joined #ruby
shmuli_ has joined #ruby
aegis3121 has joined #ruby
hopsoft has joined #ruby
hahuang61 has joined #ruby
arashb has joined #ruby
rodfersou is now known as rodfersou|lunch
shmuli has quit [Ping timeout: 276 seconds]
deadprez has quit [Remote host closed the connection]
banisterfiend has joined #ruby
hahuang61 has quit [Ping timeout: 250 seconds]
shmuli_ has quit [Ping timeout: 240 seconds]
deadprez has joined #ruby
conta has quit [Ping timeout: 240 seconds]
arashb has quit [Ping timeout: 244 seconds]
jgnagy has joined #ruby
Pumukel has joined #ruby
rsampaio_ has joined #ruby
agent_white has joined #ruby
chouhoulis has quit [Remote host closed the connection]
chouhoulis has joined #ruby
flying has quit []
synthroid has quit [Remote host closed the connection]
mark_66 has quit [Quit: Leaving.]
ebbflowgo has quit [Read error: Connection reset by peer]
naftilos76 has quit [Quit: Αποχώρησε]
yardenbar has quit [Ping timeout: 276 seconds]
ebbflowgo has joined #ruby
Sp4rKy has quit [Ping timeout: 240 seconds]
rsampaio_ has quit [Ping timeout: 255 seconds]
Macaveli has joined #ruby
chouhoulis has quit [Ping timeout: 264 seconds]
bmurt has joined #ruby
thegoddew has joined #ruby
jgt has joined #ruby
charliesome has joined #ruby
wugy has quit []
nettoweb has joined #ruby
Snowy has quit [Quit: ragequit]
Guest3871 has joined #ruby
pawnbox has quit [Remote host closed the connection]
edwinvdgraaf has quit [Ping timeout: 265 seconds]
pawnbox has joined #ruby
olistik has quit [Remote host closed the connection]
dionysus69 has joined #ruby
nankyokusei has joined #ruby
Guest3871 has quit [Remote host closed the connection]
devbug has joined #ruby
hopsoft has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
synthroid has joined #ruby
jgt has quit [Read error: Connection reset by peer]
nickelcitymario has joined #ruby
nikivi has joined #ruby
vdamewood has joined #ruby
Axl_ has joined #ruby
devbug has quit [Read error: Connection reset by peer]
devbug_ has joined #ruby
nankyokusei has quit [Ping timeout: 260 seconds]
ferr has quit [Quit: WeeChat 1.5]
Vile` has joined #ruby
duderonomy has quit [Ping timeout: 252 seconds]
bkxd has joined #ruby
SteenJobs has quit [Quit: SteenJobs]
aufi has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
SteenJobs has joined #ruby
bkxd has quit [Ping timeout: 244 seconds]
SteenJobs has quit [Client Quit]
amclain has joined #ruby
<ule>
how can I include byebug on "bundle exec rails console" ?
pawnbox has quit [Remote host closed the connection]
TomyWork has quit [Ping timeout: 276 seconds]
pawnbox has joined #ruby
banisterfiend has quit [Ping timeout: 250 seconds]
SteenJobs has joined #ruby
SteenJobs has quit [Client Quit]
mrgrieves has quit [Ping timeout: 250 seconds]
djbkd has joined #ruby
devbug has joined #ruby
devbug_ has quit [Read error: Connection reset by peer]
cdg has joined #ruby
DanKnox has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<adaedra>
add it to your gemfile
<adaedra>
if the problem persists, see with #RubyOnRails
senayar has quit []
olistik has joined #ruby
Agent001 has quit [Read error: Connection reset by peer]
pwnd_nsfw has joined #ruby
wizzi has joined #ruby
<ule>
adaedra: yeah.. that's right.. I forgot to uncomment it on my Gemfile. Thanks!
AndrewIsHere has joined #ruby
aegis3121 has quit [Ping timeout: 244 seconds]
pwnd_nsfw` has quit [Ping timeout: 250 seconds]
pochoa has joined #ruby
deadprez has quit [Remote host closed the connection]
tyang has joined #ruby
ITT_Graduate has quit [Ping timeout: 276 seconds]
ITT_Graduate has joined #ruby
wizzi has left #ruby [#ruby]
deadprez has joined #ruby
gnufied has quit [Quit: Leaving]
tyang has quit [Ping timeout: 250 seconds]
thegoddew has quit [Ping timeout: 250 seconds]
claudiuinberlin has quit []
frozengeek has quit [Quit: frozengeek]
tyang has joined #ruby
pawnbox has quit [Remote host closed the connection]
rubie has quit [Remote host closed the connection]
pawnbox has joined #ruby
nettoweb has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
gnufied has joined #ruby
Xeago has quit [Ping timeout: 250 seconds]
Immune has joined #ruby
deadprez has quit [Remote host closed the connection]
dionysus69 has quit [Remote host closed the connection]
nettoweb has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
gizless has quit [Ping timeout: 265 seconds]
dionysus69 has joined #ruby
<ruby3581>
Hi, I've noticed that some classes like Integer allow you to use Integer('5') or similar. Is it possible to add such a method to my own class? I know self.[] works for square brackets, so I tried self.() with no success.
Bellthoven has joined #ruby
<aegis3121>
I believe it's that there's a method of Integer on Kernel.
<elomatreb>
ruby3581: Methods like Integer() are defined in the "Kernel" module, which is mixed into Object.
<ruby3581>
Ah, that makes sense. Thank you both7!
<elomatreb>
You can reopen the Kernel module and define your own methods like that, but it is generally frowned upon to pollute the namespace like that
<ruby3581>
Yeah, I'll go with a regular constructor I think. Thanks! :)
tvon has quit [Quit: System is sleeping...]
marxarelli has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dionysus69 has quit [Remote host closed the connection]
karmatr0n has quit [Ping timeout: 252 seconds]
yardenbar has joined #ruby
symm- has quit [Quit: Leaving...]
tvon has joined #ruby
karmatr0n has joined #ruby
shinnya has quit [Ping timeout: 260 seconds]
marxarelli has joined #ruby
Lucky_ABA has joined #ruby
pawnbox has quit [Remote host closed the connection]
lxsameer has quit [Quit: WeeChat 1.5]
deadprez has quit [Remote host closed the connection]
claudiuinberlin has quit [Remote host closed the connection]
skweek has quit [Ping timeout: 240 seconds]
claudiuinberlin has joined #ruby
kanobt61 has quit [Read error: Connection reset by peer]
aegis3121 has quit [Ping timeout: 265 seconds]
AlexRussia has quit [Quit: WeeChat 1.5]
pawnbox has joined #ruby
AlexRussia has joined #ruby
Guest3871 has quit [Remote host closed the connection]
AzureStigma has joined #ruby
nettoweb has joined #ruby
postmodern has joined #ruby
aegis3121 has joined #ruby
deadprez has joined #ruby
Guest3871 has joined #ruby
ruby3581 has quit [Quit: Page closed]
Guest3871 has quit [Remote host closed the connection]
craigp has quit [Ping timeout: 250 seconds]
Guest3871 has joined #ruby
pawnbox has quit [Remote host closed the connection]
kanobt61 has joined #ruby
hahuang61 has joined #ruby
Guest3871 has quit [Remote host closed the connection]
tvon has quit [Quit: System is sleeping...]
jud^ has joined #ruby
deadprez has quit [Remote host closed the connection]
deadprez has joined #ruby
skweek has joined #ruby
hahuang61 has quit [Ping timeout: 255 seconds]
jud has quit [Ping timeout: 276 seconds]
augcesar has joined #ruby
pawnbox has joined #ruby
stamina has joined #ruby
deadprez has quit [Ping timeout: 252 seconds]
charliesome has joined #ruby
deadprez has joined #ruby
AlexRussia_ has joined #ruby
devbug has quit [Read error: Connection reset by peer]
tvon has joined #ruby
coolboy has quit [Remote host closed the connection]
pawnbox has quit [Ping timeout: 276 seconds]
AlexRussia has quit [Ping timeout: 260 seconds]
bjh13 has quit [Remote host closed the connection]
tvon has quit [Client Quit]
<ivanskie>
hi
craigp has joined #ruby
<ivanskie>
question
<ivanskie>
is there a way to write both to the screen and to the file at same time without repeatition?
<ivanskie>
cause right now i'm doing puts "blah" and then f.puts "blah"
jenrzzz has joined #ruby
<ivanskie>
?
<Mon_Ouie>
You can create a class that implements puts and just forwards the call to a set of IO objects
<ivanskie>
set of IO objects?
anisha has quit [Quit: This computer has gone to sleep]
<Mon_Ouie>
Also, if you don't need a solution that modifies your code, you can use tee(1)
chwbacca has joined #ruby
<ivanskie>
hm
<Mon_Ouie>
Yes, multiple objects which are instances of IO (or a similar class)
<ivanskie>
i have File.open ... do |f|
<ivanskie>
and then several loops inside.
tvon has joined #ruby
<ivanskie>
and i want to both output stuff to console and write to the file..
<ivanskie>
i need to write to file and not just append to it. so i guess i'd have to clear the file first. then append to it within that class eh
<ivanskie>
hm
<ivanskie>
thanks
jud^ is now known as jud
jud has quit [Changing host]
jud has joined #ruby
LoneHermit has joined #ruby
gopz has quit [Quit: Leaving]
devbug has joined #ruby
whathapp_ has quit [Remote host closed the connection]
tyang has quit [Ping timeout: 250 seconds]
<ivanskie>
I'd use terminal-table.. for what im doing. but looks like everyone's switched to UTF table instead.
whathappens has joined #ruby
skweek has quit [Ping timeout: 255 seconds]
whathappens has quit [Read error: Connection reset by peer]
LoneHermit has quit [Ping timeout: 240 seconds]
brendan- has joined #ruby
chadhs has joined #ruby
whathappens has joined #ruby
chadhs has quit [Client Quit]
mostlybadfly has quit [Quit: Connection closed for inactivity]
nanoz has joined #ruby
elastix has quit [Quit: elastix]
kies has quit [Ping timeout: 250 seconds]
nankyokusei has joined #ruby
flying has joined #ruby
whathappens has quit [Client Quit]
lel has joined #ruby
vuoto has joined #ruby
pawnbox has joined #ruby
moneylotion has quit [Read error: Connection reset by peer]
nankyokusei has quit [Ping timeout: 250 seconds]
jhass has quit [Ping timeout: 252 seconds]
agit0 has joined #ruby
moneylotion has joined #ruby
jose_leeto has quit [Quit: Leaving.]
sepp2k has quit [Quit: Leaving.]
capitainIsh has joined #ruby
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
jhass has joined #ruby
marxarelli has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
griffindy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
claudiuinberlin has quit []
tvon has quit [Quit: System is sleeping...]
Vingador has quit [Ping timeout: 240 seconds]
pawnbox has quit [Remote host closed the connection]
marxarelli has joined #ruby
gnufied has quit [Quit: Leaving]
codezomb has joined #ruby
tvon has joined #ruby
_djbkd has quit [Remote host closed the connection]
tvon has quit [Client Quit]
_djbkd has joined #ruby
yardenbar has quit [Ping timeout: 255 seconds]
Madplatypus has joined #ruby
_djbkd has quit [Remote host closed the connection]
_djbkd has joined #ruby
cdg has joined #ruby
pochoa has quit [Ping timeout: 240 seconds]
polyidus has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
polyidus has joined #ruby
marxarelli has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
johnmilton has quit [Remote host closed the connection]
jose_leeto has joined #ruby
pochoa has joined #ruby
marxarelli has joined #ruby
flying has quit [Remote host closed the connection]
alfiemax has quit [Ping timeout: 265 seconds]
pawnbox has joined #ruby
nanoz has left #ruby ["Leaving"]
blackgoat has joined #ruby
tdy has joined #ruby
pochoa has quit [Ping timeout: 276 seconds]
DanKnox has joined #ruby
Coldblackice has joined #ruby
pochoa has joined #ruby
spudowiar has joined #ruby
replay has quit [Ping timeout: 244 seconds]
pawnbox has quit [Ping timeout: 265 seconds]
flying has joined #ruby
ur5us has joined #ruby
roychri has joined #ruby
dminuoso has quit [Read error: Connection reset by peer]
jenrzzz has quit [Ping timeout: 250 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
nickelcitymario has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
last_staff has joined #ruby
sepp2k has joined #ruby
pochoa has quit [Ping timeout: 276 seconds]
gnufied has joined #ruby
tvon has joined #ruby
alfiemax has joined #ruby
AnoHito_ has joined #ruby
last_staff has quit [Client Quit]
AnoHito has quit [Ping timeout: 240 seconds]
griffindy has joined #ruby
kanobt61_ has joined #ruby
kanobt61 has quit [Ping timeout: 250 seconds]
pochoa has joined #ruby
Coldblackice has quit []
flying has quit [Remote host closed the connection]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
DEac-_ has quit [Quit: leaving]
DEac- has joined #ruby
hotpancakes has joined #ruby
Coldblackice has joined #ruby
Coldblackice has quit [Max SendQ exceeded]
Technodrome has joined #ruby
kies has joined #ruby
marr has joined #ruby
tripleplus has joined #ruby
bkxd has joined #ruby
ITT_Graduate is now known as wintax1
ctp has joined #ruby
replay has joined #ruby
wintax1 is now known as hammond
Ipe_ has quit [Quit: Konversation terminated!]
hammond has quit [Changing host]
hammond has joined #ruby
hammond has joined #ruby
capitainIsh has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
bkxd has quit [Ping timeout: 264 seconds]
ctp has quit [Ping timeout: 260 seconds]
<tripleplus>
i'd like to pass a long string (an rsa private key) into an ERB template without the newlines (i.e. literal, 2-character '\n' sequences) being parsed. I'm having a difficult time finding documentation that addresses my use case, probably because i'm using the wrong search terms. any thoughts?
deadprez has quit [Remote host closed the connection]
guilherme has joined #ruby
synthroi_ has quit []
creat has quit [Ping timeout: 255 seconds]
deadprez has joined #ruby
<jazzonmym11nd>
tripleplus: are you using ERB.new().result?
flying has joined #ruby
symm- has joined #ruby
<toretore>
?code tripleplus
<ruby[bot]>
tripleplus: We can't help you without your code, please post it to https://gist.github.com
lightheaded has joined #ruby
creat has joined #ruby
<tripleplus>
jazzonmym11nd: i'm using chef, and am not a "ruby guy" in other contexts, so i don't know the answer to your question, although *i'm* not using that explicitly.
Jayson_Virissimo has joined #ruby
<tripleplus>
i was hoping/assuming that there's an erb directive that i could use in my template, rather than some modification to the calling code.
<jazzonmym11nd>
then i'm not sure. how do you use erb with chef? you could try <%= .. -%>.
<jazzonmym11nd>
well, you can configure ERB to omit newlines but that happens when you call ERB.new
fly5566 has quit [Ping timeout: 250 seconds]
r4z has joined #ruby
rodfersou has quit [Quit: leaving]
<jazzonmym11nd>
it's not hard to use ERB directly. ERB.new(template, nil, ">").result(binding).
<jazzonmym11nd>
that would do what you want.
lightheaded has quit [Ping timeout: 250 seconds]
moei has quit [Quit: Leaving...]
hotpancakes has quit [Remote host closed the connection]
hotpancakes has joined #ruby
Synthead has quit [Quit: Synthead]
GinoManWorks has quit [Quit: Leaving]
elifoster has quit [Ping timeout: 244 seconds]
<tripleplus>
'<%= ... -%>' did not work. here's a little context:
<toretore>
tripleplus: where does `privatekey` come from?
<toretore>
+ _
kitikonti has joined #ruby
m4rCsi has quit [Read error: Connection reset by peer]
kx has joined #ruby
m4rCsi has joined #ruby
hahuang61 has joined #ruby
<kitikonti>
<%= p.options %> returns in my case {:locale=>:de}
<kitikonti>
how can i get the locale value? i want 'de' or 'en'
ldnunes has quit [Quit: Leaving]
<kitikonti>
i tried <%= p.options.locale %> and <%= p.options['locale'] %>
jobewan has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<kitikonti>
but this dont work
[Butch] has quit [Quit: I'm out . . .]
<xpitr>
[:locale]
<jazzonmym11nd>
p.options[:locale]
<kitikonti>
thx
<kitikonti>
this works
<tripleplus>
toretore: privatekey is a local variable for the calling chef code. it's getting to the template, as my string is ending up in the rendered document.
polyidus has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<jazzonmym11nd>
you're sure the string doesn't have newlines embedded?
<optiz0r>
Banging my head against "bundle install" in Jenkins. I get "cannot load such file -- bundler" when run as a job, but if I su to the jenkins user, cd to the workspace and run "/usr/bin/ruby21 /usr/bin/bundle install" it works fine, repeatably: https://gist.github.com/optiz0r/a8b31b2bc34d62cada4c83341ea0bc83. I'm guessing it's environmental, but RUBY_HOME is not set in either case, I'm being explicit about which interpreter to use. What have I missed?
<toretore>
they're probably reading in a key file, putting it in a variable and then the newlines go in the final result. then what they want is to replace "\n" with "\\n"
<tripleplus>
jazzonmym11nd: the string has literal, 2-character '\n' sequences embedded throughout the string. i want them preserved in the rendered document.
ramortegui has quit [Quit: Ex-Chat]
<tripleplus>
toretore: ha, seriously?
<tripleplus>
toretore: okay.
<toretore>
if you actually have \ and n then you shouldn't have to do anything at all
N1njturt1e has quit [Ping timeout: 250 seconds]
polyidus has joined #ruby
<toretore>
something is not what it seems
vuoto has quit [Remote host closed the connection]
<jazzonmym11nd>
oh ok, i thought you didn't want the newlines in your output.
<kitikonti>
ok p.options[:locale] now returns 'de' or 'en' but why if p.options[:locale] == 'de' dont't work
Silthias1 has joined #ruby
<jazzonmym11nd>
because it is :de
<jazzonmym11nd>
you're making the same mistake again
<jazzonmym11nd>
are you using puts to print its value?
Silthias has quit [Ping timeout: 260 seconds]
<optiz0r>
jazzonmym11nd: same output
karmatr0n has quit [Ping timeout: 244 seconds]
<kitikonti>
ahhh i have triedif p.options[:locale] == ':de' not just :de
<jazzonmym11nd>
optiz0r: i guess /usr/bin/bundle isn't for ruby21.
Ebok has joined #ruby
<optiz0r>
jazzonmym11nd: the shebang line confirms it is for ruby21, I was just being explicit about path. it's installed systemwide with native package manager, and as I say command runs fine when I run it in an interactive shell under the same user account
evanleck has joined #ruby
SeepingN has quit [Read error: Connection reset by peer]
<optiz0r>
just calling "bundle install" instead of "/usr/bin/ruby21 /usr/bin/bundle install" also gives same result, fwiw
<optiz0r>
so "gem install bundler" as the user (non-root), and now "bundle install" in jenkins is doing the right thing, but I don't understand why it's not using the system copy
<jazzonmym11nd>
tripleplus: yw
deadprez has quit [Remote host closed the connection]
<jazzonmym11nd>
optiz0r: could GEM_HOME be set when you log in and not when running the jenkins build?
<optiz0r>
not set interactively, will check jenkins environment when this build completes
dreamyspell has quit [Quit: Leaving]
<jazzonmym11nd>
your gem setup seems somehow borked.
karmatr0n has joined #ruby
lel has quit [Quit: lel]
biberu has quit [Read error: Connection reset by peer]
symm- has quit [Ping timeout: 250 seconds]
baweaver has quit [Max SendQ exceeded]
jose_leeto has quit [Quit: Leaving.]
baweaver has joined #ruby
JoshS has joined #ruby
hammond has quit [Ping timeout: 250 seconds]
<optiz0r>
GEM_HOME not set in jenkins env either =/
hammond has joined #ruby
hammond has quit [Changing host]
hammond has joined #ruby
deadprez has joined #ruby
<optiz0r>
having blown away ~/.gem again, there's only one copy installed, which is systemwide native package, only one ruby interpreter installed, which is systemwide native package, and the bundle script being called is the one provided by the systemwide package
N1njturt1e has joined #ruby
spudowiar has quit [Quit: zzZzzZzzZzz]
Silthias has joined #ruby
augcesar has quit [Quit: Connection closed for inactivity]
pochoa has quit [Ping timeout: 276 seconds]
rubie has joined #ruby
hotpancakes has joined #ruby
Silthias1 has quit [Ping timeout: 276 seconds]
nettoweb has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ekinmur has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hotpancakes has quit [Ping timeout: 250 seconds]
evanleck has quit [Remote host closed the connection]
evanleck has joined #ruby
tripleplus has left #ruby ["WeeChat 1.5"]
machinewar has joined #ruby
alfiemax has quit [Ping timeout: 244 seconds]
<machinewar>
what is a use case for strucs?
<Jayson_Virissimo>
Data clumps, like ordered pairs: (x, y)?
<optiz0r>
jazzonmym11nd: hmm ok, so strace shows it's looking in the system paths but not in the versioned path where the file actually lives: http://pastebin.com/Evx1j6i7
AzureStigma has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
nankyokusei has quit [Ping timeout: 264 seconds]
capitainIsh has joined #ruby
Silthias has joined #ruby
alaibe has quit [Ping timeout: 264 seconds]
gizmore has quit [Remote host closed the connection]
Dimik has joined #ruby
<optiz0r>
jazzonmym11nd: aaah got it, jenkins is setting GEM_PATH, but not in a way i found by just doing "echo $GEM_PATH", a manual "unset GEM_PATH" in my script just before I call bundle has resolved it