duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
AJA4351 has joined #ruby
AJA4350 has quit [Ping timeout: 240 seconds]
AJA4351 is now known as AJA4350
hiroaki has quit [Ping timeout: 268 seconds]
ur5us__ has joined #ruby
chalkmonster has joined #ruby
drale2k has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
akemhp has quit [Ping timeout: 265 seconds]
NODE has quit [Quit: changing servers]
jidar has quit [Quit: restarting weechat with different tmux version]
MrCrackPotBob has quit [Ping timeout: 268 seconds]
NODE has joined #ruby
jenrzzz has quit [Ping timeout: 265 seconds]
jidar has joined #ruby
Technodrome has joined #ruby
NODE has quit [Quit: changing servers]
lucasb has quit [Quit: Connection closed for inactivity]
NODE has joined #ruby
nacsurte has quit [Ping timeout: 250 seconds]
NODE has quit [Client Quit]
NODE has joined #ruby
jenrzzz has joined #ruby
NODE has quit [Client Quit]
millerti has quit [Ping timeout: 268 seconds]
wildtrees has quit [Quit: Leaving]
NODE has joined #ruby
NODE has quit [Client Quit]
NODE has joined #ruby
nacsurte has joined #ruby
NODE has quit [Client Quit]
NODE has joined #ruby
cthulchu has quit [Ping timeout: 265 seconds]
nacsurte has quit [Ping timeout: 268 seconds]
Inline has quit [Ping timeout: 264 seconds]
Inline__ has joined #ruby
NODE has quit [Quit: changing servers]
NODE has joined #ruby
nacsurte has joined #ruby
fphilipe_ has joined #ruby
jenrzzz has quit [Ping timeout: 265 seconds]
itarato has joined #ruby
fphilipe_ has quit [Ping timeout: 276 seconds]
davidw has quit [Ping timeout: 250 seconds]
brool has joined #ruby
jenrzzz has joined #ruby
nacsurte has quit [Ping timeout: 265 seconds]
romanblanco has joined #ruby
AJA4350 has quit [Ping timeout: 240 seconds]
bluvinyl has joined #ruby
NODE has quit [Read error: Connection timed out]
nacsurte has joined #ruby
NODE has joined #ruby
NODE has quit [Client Quit]
NODE has joined #ruby
NODE has quit [Client Quit]
bluvinyl has quit [Ping timeout: 250 seconds]
NODE has joined #ruby
nacsurte has quit [Ping timeout: 268 seconds]
nacsurte has joined #ruby
gnufied has quit [Ping timeout: 265 seconds]
bsdbandit-01 has joined #ruby
nacsurte has quit [Ping timeout: 265 seconds]
nacsurte has joined #ruby
bruce_lee has quit [Ping timeout: 265 seconds]
bruce_lee has joined #ruby
bruce_lee has joined #ruby
bruce_lee has quit [Changing host]
brool has quit [Ping timeout: 276 seconds]
TzilTzal has joined #ruby
TzilTzal has quit [Remote host closed the connection]
TzilTzal has joined #ruby
nacsurte has quit [Ping timeout: 268 seconds]
nacsurte has joined #ruby
MrCrackPot has joined #ruby
nacsurte has quit [Ping timeout: 240 seconds]
nacsurte has joined #ruby
TzilTzal_ has joined #ruby
chalkmonster has quit [Quit: WeeChat 2.6]
ur5us__ has quit [Ping timeout: 250 seconds]
TzilTzal has quit [Ping timeout: 240 seconds]
nacsurte has quit [Ping timeout: 268 seconds]
nacsurte has joined #ruby
bluvinyl has joined #ruby
nchamber- is now known as nchambers
sergioro has joined #ruby
leather-s has joined #ruby
graft has quit [Ping timeout: 240 seconds]
nacsurte has quit [Ping timeout: 265 seconds]
nacsurte has joined #ruby
itarato has quit [Ping timeout: 268 seconds]
Rudolph is now known as uplime
leather-s has quit [Read error: Connection reset by peer]
hutch1 has joined #ruby
ur5us has joined #ruby
dionysus69 has quit [Ping timeout: 250 seconds]
fphilipe_ has joined #ruby
fphilipe_ has quit [Ping timeout: 250 seconds]
bruce_lee has quit [Ping timeout: 240 seconds]
bruce_lee has joined #ruby
bruce_lee has quit [Changing host]
bruce_lee has joined #ruby
KramerC has quit [Quit: Leaving]
KramerC has joined #ruby
<TzilTzal_>
confused about something: in Ruby, are instance variable the same as class instance variables?
bluvinyl has quit [Ping timeout: 250 seconds]
TzilTzal_ is now known as TzilTzal
bluvinyl has joined #ruby
titanbiscuit has quit [Quit: ZNC 1.7.4 - https://znc.in]
dan64- has joined #ruby
titanbiscuit has joined #ruby
ur5us has quit [Ping timeout: 250 seconds]
dan64 has quit [Ping timeout: 276 seconds]
<nofxx>
TzilTzal, nope, did you grasp the class instance concept? Eigenclass
nacsurte has quit [Ping timeout: 276 seconds]
bmurt has joined #ruby
<uplime>
b 19
<greenhat>
classes are instances of Class, and class instance variables are instance variables of that instance of Class. If I understand all that correctly.
jenrzzz has quit [Ping timeout: 240 seconds]
bluvinyl has quit [Remote host closed the connection]
<nofxx>
greenhat, yup... and instance are vars from that class objects (Class#new)
<nofxx>
that class instantiated objects*
<greenhat>
When I came to ruby from C# that melted my brain.
<greenhat>
Now it just seems like the right thing to do.
<nofxx>
greenhat, yeah I call it the least surprise that often surprises
<nofxx>
in the good way heh
NODE has quit [Quit: changing servers]
NODE has joined #ruby
NODE has quit [Client Quit]
NODE has joined #ruby
jesfre has quit [Ping timeout: 250 seconds]
<TzilTzal>
So when I have:
<TzilTzal>
class X
<TzilTzal>
@i = 0
<TzilTzal>
end
<TzilTzal>
Is that an instance variable or a class instance variable?
<TzilTzal>
My understanding is the former.
duderonomy has joined #ruby
phaul has quit [Ping timeout: 245 seconds]
<TzilTzal>
actually, the latter, sorry.
phaul has joined #ruby
leather-s has joined #ruby
phaul has quit [Ping timeout: 250 seconds]
<greenhat>
It is a class instance variable
<TzilTzal>
So how do you distinguish between instance variables and class instance variables?
bvdw has quit [Read error: Connection reset by peer]
<greenhat>
instance variables can only be defined within an instance method
<nofxx>
TzilTzal, @@two_ats and that ^
phaul has joined #ruby
<TzilTzal>
nofxx: @@ indicates class varialbes, no?
<TzilTzal>
*variables
<nofxx>
greenhat, actually that code is valid, but will be a bad practice
<greenhat>
It is bad. I'm trying to show a civar is not accessible in an instance method
<nofxx>
TzilTzal, yup, isn't that your question?
<nofxx>
@@x vs @x
<TzilTzal>
So the @name in def name isn't the same as the @name right after class MyClass?
<greenhat>
Right
<TzilTzal>
damn confusing.
<TzilTzal>
:10
leather-s has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<greenhat>
If you are coming from java or similar where you declare instance variables within the class definition, you don't do that in ruby.
<TzilTzal>
Yeah, I come from C++
<TzilTzal>
mainly.
<greenhat>
You don't need to "delcare" them. They just come into existance on first use in an instance method.
<nofxx>
TzilTzal, yeah, because of that confusion its a bad practice
phaul has quit [Ping timeout: 265 seconds]
<TzilTzal>
greenhat: I get that.. but I thought they were referring to the same one @i
<TzilTzal>
... and apparently they don't )
<greenhat>
Nope :)
<TzilTzal>
also seems as thought self.name won't be inherited?
<TzilTzal>
or rather: available in derived classes?
<greenhat>
I've been doing ruby for at least 5 years, and I can count on one hand the number of times I've used a class instance variable.
<nofxx>
TzilTzal, class Foo; attr_accessor :bar; @bar = 10; def self.bar; @bar end end
<nofxx>
lot in play there, Foo.new.bar , Foo.bar
hutch1 has quit [Ping timeout: 240 seconds]
Esa_ has quit [Ping timeout: 245 seconds]
<nofxx>
TzilTzal, another way to think is that "class Foo" == "Foo = Class.new"
<nofxx>
so, Foo as an instance has it's @bar, and each children as instances have their @bar
fphilipe_ has joined #ruby
<greenhat>
You can consider all instance variables "private" in ruby. So while the `self.name` method is inherited, if you call Child.name you'll get nil.
<greenhat>
Becuase the the @name class ivar in MyClass is not visible to the Child class.
fphilipe_ has quit [Ping timeout: 245 seconds]
charon77 has joined #ruby
phaul has joined #ruby
<TzilTzal>
Where are class instance variables stored, exactly?
phaul has quit [Ping timeout: 276 seconds]
drale2k has joined #ruby
<TzilTzal>
in (the object) MyClass?
rafadc has quit [Read error: Connection reset by peer]
bsdbandit-01 has quit [Ping timeout: 276 seconds]
rafadc has joined #ruby
bsdband12 has joined #ruby
phaul has joined #ruby
drale2k has quit [Ping timeout: 268 seconds]
<greenhat>
Right
<TzilTzal>
but not in instances of it, is that right?
<havenwood>
And you can have many instances of both Boat and Vehicle.
<greenhat>
It all makes more intuitive sense when viewed from the standpoint of instance methods and istance variables, and not class methods and class ivars.
<greenhat>
And then just think "Oh, Vehicle is not a special thing. It is just a constant that references an instance of a subclass of Class".
<havenwood>
"Every Ruby object is the combination of a class pointer and an array of instance variables." - Pat Shaughnessy, Ruby Under a Microscope
<greenhat>
Yes. TzilTzal: since you are coming from a C background that would be a great book to help you really grok ruby.
<havenwood>
&>> name = 'TzilTzal'; name.instance_variable_set(:@letter, 'T'); class << name; attr_reader :letter end; name.letter
imadper has quit [Remote host closed the connection]
phaul has joined #ruby
NODE has quit [Quit: changing servers]
dinfuehr has quit [Ping timeout: 265 seconds]
dinfuehr has joined #ruby
NODE has joined #ruby
NODE has quit [Client Quit]
phaul has quit [Ping timeout: 245 seconds]
NODE has joined #ruby
nacsurte has joined #ruby
NODE has quit [Client Quit]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
NODE has joined #ruby
phaul has joined #ruby
NODE has quit [Client Quit]
nacsurte has quit [Ping timeout: 245 seconds]
NODE has joined #ruby
phaul has quit [Ping timeout: 240 seconds]
MrCrackPotBob has joined #ruby
MrCrackPot has quit [Ping timeout: 268 seconds]
phaul has joined #ruby
MrCrackPotBob has quit [Ping timeout: 240 seconds]
xco has joined #ruby
dionysus69 has quit [Ping timeout: 276 seconds]
phaul has quit [Ping timeout: 240 seconds]
nacsurte has joined #ruby
andikr has joined #ruby
phaul has joined #ruby
krandi has joined #ruby
krandi has quit [Remote host closed the connection]
nacsurte has quit [Ping timeout: 265 seconds]
phaul has quit [Ping timeout: 268 seconds]
jenrzzz has joined #ruby
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
phaul has joined #ruby
fphilipe_ has joined #ruby
phaul has quit [Ping timeout: 246 seconds]
SeepingN has quit [Quit: The system is going down for reboot NOW!]
phaul has joined #ruby
phaul has quit [Ping timeout: 268 seconds]
NODE has quit [Quit: changing servers]
NODE has joined #ruby
phaul has joined #ruby
NODE has quit [Client Quit]
DTZUZO has quit [Ping timeout: 268 seconds]
NODE has joined #ruby
NODE has quit [Client Quit]
jesfre1 has joined #ruby
phaul has quit [Ping timeout: 276 seconds]
NODE has joined #ruby
NODE has quit [Client Quit]
schne1der has joined #ruby
NODE has joined #ruby
phaul has joined #ruby
NODE has quit [Client Quit]
howdoi has quit [Quit: Connection closed for inactivity]
NODE has joined #ruby
phaul has quit [Ping timeout: 250 seconds]
titanbiscuit has quit [Quit: ZNC 1.7.4 - https://znc.in]
titanbiscuit has joined #ruby
phaul has joined #ruby
jesfre1 has quit [Ping timeout: 250 seconds]
phaul has quit [Ping timeout: 265 seconds]
phaul has joined #ruby
im0nde_ has joined #ruby
phaul has quit [Ping timeout: 252 seconds]
im0nde has quit [Ping timeout: 276 seconds]
charon77 has quit [Ping timeout: 250 seconds]
conta has quit [Ping timeout: 250 seconds]
phaul has joined #ruby
conta has joined #ruby
neuraload has joined #ruby
NODE has quit [Quit: changing servers]
phaul has quit [Ping timeout: 276 seconds]
NODE has joined #ruby
greenhat has joined #ruby
NODE has quit [Client Quit]
phaul has joined #ruby
NODE has joined #ruby
nowhere_man has quit [Ping timeout: 245 seconds]
phaul has quit [Ping timeout: 240 seconds]
greenhat has quit [Ping timeout: 276 seconds]
phaul has joined #ruby
neuraload has quit [Ping timeout: 276 seconds]
neuraload has joined #ruby
jenrzzz has quit [Ping timeout: 268 seconds]
jenrzzz has joined #ruby
titanbiscuit has quit [Quit: ZNC 1.7.4 - https://znc.in]
titanbiscuit has joined #ruby
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
conta1 has joined #ruby
jinie has quit [Ping timeout: 276 seconds]
conta has quit [Ping timeout: 276 seconds]
conta1 is now known as conta
jinie has joined #ruby
clemens3 has joined #ruby
neuraload has quit [Quit: Leaving]
Nicmavr has quit [Read error: Connection reset by peer]
charon77 has joined #ruby
Nicmavr has joined #ruby
NODE has quit [Quit: changing servers]
Esa_ has joined #ruby
NODE has joined #ruby
MrCrackPot has joined #ruby
claudiuinberlin has joined #ruby
fphilipe_ has quit [Read error: Connection reset by peer]
NODE has quit [Quit: changing servers]
NODE has joined #ruby
NODE has quit [Client Quit]
NODE has joined #ruby
dionysus69 has joined #ruby
NODE has quit [Client Quit]
andikr has quit [Ping timeout: 276 seconds]
NODE has joined #ruby
NODE has quit [Client Quit]
NODE has joined #ruby
paprika has joined #ruby
paprika has quit [Client Quit]
DTZUZO has joined #ruby
NODE has quit [Client Quit]
<Bish>
is there a way to get the memory adress kinda like the normal inspect does?
andikr has joined #ruby
charon77 has quit [Ping timeout: 265 seconds]
NODE has joined #ruby
charon77 has joined #ruby
TzilTzal has quit []
DTZUZO has quit [Ping timeout: 240 seconds]
lxsameer has joined #ruby
Technodrome has joined #ruby
NL3limin4t0r_afk has quit [Ping timeout: 250 seconds]
DTZUZO has joined #ruby
DTZUZO has quit [Remote host closed the connection]
NL3limin4t0r_afk has joined #ruby
<al2o3-cr>
Bish: Kernel#object_id
fphilipe_ has joined #ruby
<al2o3-cr>
bit shift left by one
clemens3 has quit [Ping timeout: 252 seconds]
<Bish>
hm? is that really always the case?
conta1 has joined #ruby
<Bish>
weird, why?
conta has quit [Ping timeout: 268 seconds]
conta1 is now known as conta
DTZUZO has joined #ruby
TomyWork has joined #ruby
clemens3 has joined #ruby
dionysus69 has quit [Remote host closed the connection]
DTZUZO has quit [Ping timeout: 276 seconds]
dionysus69 has joined #ruby
greenhat has joined #ruby
greenhat has quit [Ping timeout: 250 seconds]
charon77 has quit [Ping timeout: 265 seconds]
charon77 has joined #ruby
<Bish>
i really don't like Net:SSH's design
<Bish>
it's very convuluted
<Bish>
and this weird having to call loop yourself has no benefits at all
skx86 has quit [Quit: Connection closed for inactivity]
bvdw has quit [Read error: Connection reset by peer]
bvdw has joined #ruby
NODE has quit [Quit: changing servers]
NODE has joined #ruby
NODE has quit [Client Quit]
NODE has joined #ruby
NODE has quit [Client Quit]
DTZUZO has joined #ruby
NODE has joined #ruby
AJA4350 has joined #ruby
andikr has quit [Remote host closed the connection]
andikr has joined #ruby
davispuh has joined #ruby
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
romanblanco has quit [Ping timeout: 240 seconds]
_whitelogger has joined #ruby
<ytti>
12:56 < Bish> and this weird having to call loop yourself has no benefits at all
<ytti>
would you rather register events/hooks?
<ytti>
like on_input?
<ytti>
utility of the loop is that you have something in your stdout buffer, and it's not getting more, until you get back to the loop
<ytti>
instead of being in this ambiguous state where more data may appear while you are processing it
<ytti>
i may be confused but to me it seems reasonable
<ytti>
or perhaps suffering from stockholm syndrome
tobiasvl has quit [Ping timeout: 276 seconds]
tvl has joined #ruby
tvl is now known as tobiasvl
phaul has quit [Ping timeout: 268 seconds]
johnny56_ has joined #ruby
phaul has joined #ruby
bsdbandit-01 has joined #ruby
bsdband12 has quit [Ping timeout: 250 seconds]
phaul has quit [Ping timeout: 240 seconds]
BTRE has quit [Quit: Leaving]
phaul has joined #ruby
BTRE has joined #ruby
ellcs has joined #ruby
phaul has quit [Ping timeout: 276 seconds]
phaul has joined #ruby
sphex has quit [Ping timeout: 245 seconds]
<Bish>
ytti: oh i didn't know you're in here, i've been checking the last few days
<Bish>
uhm, i don't know i think i don't like the general strucure, i keep forgetting what i am searching for while searching through your tree of functions (which goes somethimes up again)
<Bish>
loop calls process, process checks busy, busy loops over all channels, which goes back to session
phaul has quit [Ping timeout: 240 seconds]
<Bish>
im trying to wrap Net:SSH into my own class right now.. and i locked the loop in a thread with a mutex
<Bish>
like loop { MySession.synchronize { MySession.net_ssh_session.loop 1 } }
sphex has joined #ruby
<Bish>
problem here is that the mutex is blocked for that whole second, and i can't see an easy way out there
<Bish>
so the most approachable way i see here is writing my own eventloop, that handles multiple sessions that synchronizes calls to "MySessions"
<Bish>
what i would've expected Net:SSH to do is .. to magicially handle it without having to f* with loop and such
DTZUZO has quit [Ping timeout: 245 seconds]
<Bish>
Sequel for example (yeah im mentioning that alot) has some sort of "session" aswell and it has automatic pooling of connections and their threads, and you can always synchronize it if you extend it with function and it just works
<Bish>
i admite that you can basicially get away without threads, though
<Bish>
s/admite/admire
phaul has joined #ruby
grilix has joined #ruby
sphex has quit [Ping timeout: 252 seconds]
phaul has quit [Ping timeout: 250 seconds]
greenhat has joined #ruby
lucasb has joined #ruby
sphex has joined #ruby
NODE has quit [Quit: changing servers]
NODE has joined #ruby
phaul has joined #ruby
greenhat has quit [Ping timeout: 240 seconds]
NODE has quit [Client Quit]
NODE has joined #ruby
drincruz has joined #ruby
DTZUZO has joined #ruby
MrCrackPot has quit [Remote host closed the connection]
MrCrackPot has joined #ruby
phaul has quit [Ping timeout: 265 seconds]
DTZUZO has quit [Ping timeout: 250 seconds]
claudiuinberlin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
phaul has joined #ruby
DTZUZO has joined #ruby
phaul has quit [Ping timeout: 268 seconds]
fphilipe_ has quit [Ping timeout: 240 seconds]
DTZUZO has quit [Ping timeout: 240 seconds]
phaul has joined #ruby
h1l3v3l has joined #ruby
dionysus69 has quit [Ping timeout: 250 seconds]
dionysus69 has joined #ruby
phaul has quit [Ping timeout: 265 seconds]
Benett has quit [Ping timeout: 265 seconds]
fphilipe_ has joined #ruby
iNs has quit [Remote host closed the connection]
iNs has joined #ruby
NODE has quit [Ping timeout: 240 seconds]
Benett has joined #ruby
phaul has joined #ruby
claudiuinberlin has joined #ruby
claudiuinberlin has quit [Client Quit]
DTZUZO has joined #ruby
NODE has joined #ruby
akemrir has joined #ruby
NODE has quit [Client Quit]
sixty4bit has quit [Ping timeout: 268 seconds]
NODE has joined #ruby
akemhp has joined #ruby
DTZUZO has quit [Ping timeout: 246 seconds]
NODE has quit [Client Quit]
dionysus69 has quit [Remote host closed the connection]
dionysus69 has joined #ruby
NODE has joined #ruby
conta1 has joined #ruby
NODE has quit [Client Quit]
DTZUZO has joined #ruby
zapata has joined #ruby
NODE has joined #ruby
conta has quit [Ping timeout: 250 seconds]
conta1 is now known as conta
NODE has quit [Client Quit]
conta1 has joined #ruby
NODE has joined #ruby
T-rex has joined #ruby
conta has quit [Ping timeout: 240 seconds]
conta1 is now known as conta
h1l3v3l has quit [Ping timeout: 268 seconds]
rwb has quit [Ping timeout: 240 seconds]
DTZUZO has quit [Ping timeout: 268 seconds]
T-rex has quit [Read error: Connection reset by peer]
h1l3v3l has joined #ruby
T-rex has joined #ruby
DTZUZO has joined #ruby
sergioro has quit [Quit: Lost terminal]
h1l3v3l has quit [Ping timeout: 250 seconds]
DTZUZO has quit [Ping timeout: 268 seconds]
T-rex has quit [Read error: Connection reset by peer]
maasha has joined #ruby
DTZUZO has joined #ruby
<maasha>
Can I dynamic define a module from a variable, i.e change Bar at runtime?: Foo::Bar.mymethod()
prestorium has joined #ruby
<Bish>
maasha: Bar is considered a constant
<Bish>
but you can change the inside of bar as you like
<Bish>
but i wouldn't redefine Bar
<maasha>
Right
<Bish>
ruby will warn if you do that, atleast
<maasha>
So be it
<Bish>
yeah then you can Foo::Bar = whatever
<Bish>
but be aware there is a reason ruby doesn't like that
bsdbandit-01 has quit [Ping timeout: 250 seconds]
DTZUZO has quit [Ping timeout: 240 seconds]
bsdband45 has joined #ruby
phaul has quit [Ping timeout: 246 seconds]
phaul has joined #ruby
Inline has joined #ruby
phaul has quit [Ping timeout: 240 seconds]
AJA4350 has quit [Quit: AJA4350]
phaul has joined #ruby
phaul has quit [Ping timeout: 250 seconds]
ellcs has quit [Ping timeout: 276 seconds]
phaul has joined #ruby
phaul has quit [Ping timeout: 240 seconds]
bmurt has joined #ruby
phaul has joined #ruby
claudiuinberlin has joined #ruby
charon77 has quit [Ping timeout: 240 seconds]
ellcs has joined #ruby
phaul has quit [Ping timeout: 265 seconds]
greenhat has joined #ruby
NODE has quit [Quit: changing servers]
NODE has joined #ruby
phaul has joined #ruby
phaul has quit [Ping timeout: 250 seconds]
akemrir has quit [Ping timeout: 240 seconds]
dionysus69 has quit [Ping timeout: 240 seconds]
dviola has joined #ruby
phaul has joined #ruby
<adam12>
maasha: Depending on your use case, using the Forwardable module with __setobj__ can sometimes work well in this case too.
<maasha>
adam12 I found a better solution using Method.call and no messing with constants
BTRE has quit [Ping timeout: 240 seconds]
phaul has quit [Ping timeout: 240 seconds]
TomyWork has quit [Remote host closed the connection]
BTRE has joined #ruby
drincruz has quit [Ping timeout: 265 seconds]
phaul has joined #ruby
phaul has quit [Ping timeout: 265 seconds]
phaul has joined #ruby
nacsurte has joined #ruby
maasha has quit [Remote host closed the connection]
phaul has quit [Ping timeout: 250 seconds]
galaxie has quit [Ping timeout: 260 seconds]
chalkmonster has joined #ruby
galaxie has joined #ruby
phaul has joined #ruby
DTZUZO has joined #ruby
leather-s has joined #ruby
gnufied has joined #ruby
phaul has quit [Ping timeout: 276 seconds]
nacsurte has quit [Ping timeout: 250 seconds]
phaul has joined #ruby
Mrbuck has joined #ruby
hutch1 has joined #ruby
phaul has quit [Ping timeout: 265 seconds]
phaul has joined #ruby
chalkmonster has quit [Quit: WeeChat 2.6]
chalkmonster has joined #ruby
phaul has quit [Ping timeout: 250 seconds]
englosh has joined #ruby
<englosh>
What is the most popular tool to distribute programs across multiple platforms? Without that the user has to install the Ruby interpreter
phaul has joined #ruby
<adam12>
englosh: Not sure there's a perfect answer to this. Some people were using Travelling Ruby. There's motion in Artichoke Ruby to use WASM. And the Warbler tool from JRuby will build a jar.
<englosh>
oh travelling ruby looks like a good one
romanblanco has joined #ruby
phaul has quit [Ping timeout: 240 seconds]
<adam12>
englosh: If you look into Travelling Ruby, look for the fork. There's one maintained that has newer versions.
fuzzface has joined #ruby
<adam12>
englosh: Actually, let me find the fork. I think I have a URL for it.
claudiuinberlin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<englosh>
xco: you could maybe use a different terminator for every data string, instead of using a comma, e.g.: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAASTOPdata:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA".split("STOP")
happyhans has joined #ruby
phaul has quit [Ping timeout: 268 seconds]
manakanapa has joined #ruby
Ven`` has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Mrbuck has quit [Remote host closed the connection]
rustik has quit [Read error: Connection reset by peer]
<havenwood>
xco: string.split(/,(?=data)/)
rustik has joined #ruby
rustik has quit [Read error: Connection reset by peer]
englosh has quit [Remote host closed the connection]
rustik has joined #ruby
Ven`` has joined #ruby
rustik has quit [Read error: Connection reset by peer]
rustik has joined #ruby
phaul has joined #ruby
happyhans has quit [Remote host closed the connection]
happyhans has joined #ruby
charon77 has joined #ruby
charon77 has quit [Client Quit]
phaul has quit [Ping timeout: 240 seconds]
rustik has quit [Read error: Connection reset by peer]
rustik has joined #ruby
<xco>
havenwood hero! thanks
orbyt_ has joined #ruby
leather-s has quit [Read error: Connection reset by peer]
<havenwood>
xco: Oops, needs the colon: string.split(/,(?=data:)/)
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
phaul has joined #ruby
<xco>
havenwood still works though :p
<havenwood>
xco: Yeah, you could just hit a bug without the colon if the checksum happens to start with: data
<havenwood>
xco: no prob, any time!
<xco>
awesome, will add the :
andikr has quit [Remote host closed the connection]
<Iambchop>
that wouldn't work as-is for non-png data
<xco>
Iambchop thanks, i missed that somehow
rustik has quit [Read error: Connection reset by peer]
duderonomy has joined #ruby
phaul has joined #ruby
duderonomy has quit [Client Quit]
davidw has joined #ruby
davidw has quit [Changing host]
davidw has joined #ruby
phaul has quit [Ping timeout: 268 seconds]
phaul has joined #ruby
claudiuinberlin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
phaul has quit [Ping timeout: 265 seconds]
prestorium has quit [Ping timeout: 240 seconds]
rustik has joined #ruby
cthulchu has joined #ruby
rustik has quit [Read error: Connection reset by peer]
phaul has joined #ruby
rustik has joined #ruby
rustik has quit [Read error: Connection reset by peer]
rustik has joined #ruby
yokel has quit [Ping timeout: 265 seconds]
NL3limin4t0r_afk is now known as NL3limin4t0r
yokel has joined #ruby
phaul has quit [Ping timeout: 268 seconds]
<NL3limin4t0r>
adam12: Although your scan works it's not fool proof since base64 can also contain the "+", "/" and "=" (as padding) and can never contain "_". So I would change `\w+` to `[A-Za-z+/]*=*`
rustik has quit [Read error: Connection reset by peer]
rustik has joined #ruby
<NL3limin4t0r>
^ That is should also contain `0-9` in the character class
rustik has quit [Excess Flood]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nofxx has joined #ruby
phaul has joined #ruby
phaul has quit [Ping timeout: 250 seconds]
yann-kaelig has joined #ruby
duderonomy has joined #ruby
phaul has joined #ruby
duderonomy has quit [Read error: Connection reset by peer]
duderonomy has joined #ruby
clemens3 has quit [Quit: WeeChat 1.6]
<adam12>
I like havenwood's solution. I never realized String.split would accept a regexp with a group in it. Very fancy.
phaul has quit [Ping timeout: 268 seconds]
drale2k has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cthulchu has quit [Read error: Connection reset by peer]
cthulchu has joined #ruby
phaul has joined #ruby
bvdw has quit [Read error: Connection reset by peer]
bvdw has joined #ruby
grilix has quit [Ping timeout: 252 seconds]
phaul has quit [Ping timeout: 250 seconds]
phaul has joined #ruby
<NL3limin4t0r>
Agreed I would also go for `string.split(/,(?=data:)/)`
grilix has joined #ruby
howdoi has joined #ruby
xco has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
TomyWork has joined #ruby
happyhans has quit [Remote host closed the connection]
happyhans has joined #ruby
paraxial has joined #ruby
cxl has joined #ruby
<cxl>
Hi, where can I find a list of built-in converters for the CSV class in plain Ruby?
<cxl>
The doc for the CSV class is very terse on the matter
<cxl>
also, how would you turn this string: "1 200,00" to the float 1200.0? Using gsub is tricky because the same number could also be "1'200,00" or "1'200.00" or... depending on the user's locale
<caduguedess>
How could I retrieve data from a ruby on rails database in an efficient way ? My goal is to retrieve values from a table named "changesets".
<caduguedess>
I need to get the number of changes of each user, and the table has the columns "num_changes" and "user_id".
jinie has quit [Ping timeout: 268 seconds]
jinie_ is now known as jinie
<caduguedess>
There is a console command for it, or its better installing a gem for it?
phaul has quit [Ping timeout: 265 seconds]
akemhp_ is now known as akemhp
phaul has joined #ruby
BTRE has quit [Quit: Leaving]
phaul has quit [Ping timeout: 265 seconds]
<havenwood>
caduguedess: You can run `rails console` and then do a query.
nofxx has quit [Remote host closed the connection]
nofxx has joined #ruby
phaul has joined #ruby
lxsameer has quit [Ping timeout: 240 seconds]
drincruz has joined #ruby
GodFather has joined #ruby
phaul has quit [Ping timeout: 265 seconds]
drincruz has quit [Ping timeout: 250 seconds]
jph98 has quit [Remote host closed the connection]
phaul has joined #ruby
jesfre has quit [Quit: Leaving]
dasher00 has joined #ruby
phaul has quit [Ping timeout: 250 seconds]
happyhans has quit [Quit: Leaving...]
phaul has joined #ruby
dionysus69 has quit [Quit: dionysus69]
GodFather has quit [Ping timeout: 268 seconds]
phaul has quit [Ping timeout: 265 seconds]
rzoss has quit [Ping timeout: 260 seconds]
phaul has joined #ruby
bvdw has quit [Read error: Connection reset by peer]
bvdw has joined #ruby
itarato has quit [Ping timeout: 268 seconds]
AJA4350 has joined #ruby
jenrzzz_ has joined #ruby
redlegion has quit [Remote host closed the connection]
jenrzzz has quit [Ping timeout: 268 seconds]
GodFather has joined #ruby
bsdbandit-01 has quit [Read error: Connection reset by peer]
bsdband92 has joined #ruby
sergioro has joined #ruby
itarato has joined #ruby
claudiuinberlin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bitwinery has quit [Quit: Leaving]
ellcs has quit [Ping timeout: 250 seconds]
akemhp_ has joined #ruby
NODE has quit [Quit: changing servers]
NODE has joined #ruby
akemhp has quit [Ping timeout: 265 seconds]
itarato has quit [Ping timeout: 268 seconds]
AJA4351 has joined #ruby
itarato has joined #ruby
AJA4350 has quit [Ping timeout: 268 seconds]
AJA4351 is now known as AJA4350
davidw has quit [Ping timeout: 252 seconds]
justinweiss has quit [Remote host closed the connection]