<riceandbeans>
so this module is reimplementing basic array methods?
<Ox0dea>
Maybe? I'm not omniscient.
<riceandbeans>
there's a module from this code I'm looknig at
_Tariq has joined #ruby
blackmes1 has quit [Ping timeout: 264 seconds]
<Ox0dea>
I can't confirm.
mikeiniowa has joined #ruby
k13nox has quit [Ping timeout: 245 seconds]
ramfjord_ has joined #ruby
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Ox0dea>
riceandbeans: Just to clarify, any object can have its own definition for #<<.
cmckee has joined #ruby
kirillzh has joined #ruby
kirillzh has quit [Client Quit]
ramfjord has quit [Ping timeout: 250 seconds]
<Ox0dea>
It's roughly a synonym for #push on Array, but then it's also left shift for Integer.
kirillzh has joined #ruby
Sucks has joined #ruby
kirillzh has quit [Client Quit]
platzhirsch has left #ruby [#ruby]
kirillzh has joined #ruby
<cmckee>
Im trying to refactor and move logive from view/controller to the model. Anyone free to look at my current code and point me in the right direction?
diegoviola has quit [Read error: Connection reset by peer]
arthropodado has joined #ruby
Ebok has quit [Client Quit]
arthropododo has quit [Quit: Leaving]
Guest89119 has quit [Remote host closed the connection]
yoongkan_ has joined #ruby
jackjackdripper1 has joined #ruby
jackjackdripper1 has quit [Client Quit]
Alazoral has joined #ruby
<droptone>
Question: is this the correct syntax for increasing the timeout for RestClient to 100 seconds? response = RestClient::Request.execute(method: :get, url: "https://our.api.endpoint/api", timeout: 100, headers: {authorization: "#{account.auth_header}" })
<pizzaops>
I have whta's probably a silly question. If I have class Foo::Bar::Baz and I want to write a module called Foo::Bar::Baz::New, is that possible, or once Baz is a class, you can't do that? Since I can't write module Foo; module Bar; module Baz; Module New, once Baz is already a class.
danielwzd has quit [Ping timeout: 260 seconds]
arthropodado has quit [Ping timeout: 240 seconds]
<Alazoral>
pizzaops that should be totally doable, classes can have modules in
chipotle has quit [Quit: cheerio]
ogpastaling has quit [Remote host closed the connection]
<pizzaops>
in?
pwnd_nsfw` is now known as pwnd_nsfw
jackjackdripper has quit [Ping timeout: 265 seconds]
<Alazoral>
you know, inside their scopes
Rodya_ has joined #ruby
pilne has quit [Quit: Quitting!]
<Alazoral>
your class is not called Foo::Bar::Baz, it's Baz in the scope of Bar in the scope of Foo
tjohnson has quit [Quit: Connection closed for inactivity]
workmad3 has quit [Read error: Connection reset by peer]
<Alazoral>
Ox0dea that's the equivalent of an absolute path though
<Ox0dea>
Alazoral: What message do I send Foo::Bar to get it to return just "Bar"?
<pizzaops>
Ox0dea: yeah I didn't type out all the code since typing all the ends doesn't add any information to my question :)
Ebok has joined #ruby
northfurr has quit [Quit: northfurr]
ogpastaling has joined #ruby
at46 has joined #ruby
<Alazoral>
Ox0dea conceptually, it's just like a file system; you can refer to sister modules in the same directory, and you can escape to 'root' with a prefixed ::
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
cpup has quit [Ping timeout: 250 seconds]
baweaver has quit [Ping timeout: 250 seconds]
krobzaur_ has quit [Ping timeout: 264 seconds]
cpup has joined #ruby
<Ox0dea>
Alazoral: I'm quite familiar with the notion of fully qualified names. I maintain that Foo:Bar's "name" (i.e., what it's called) is "Foo::Bar".
arthropodado has joined #ruby
<Alazoral>
Ox0dea whoa hold on there buddy
<Alazoral>
Ox0dea a name is what it's called
<Alazoral>
Ox0dea called
ruby-lang511 has joined #ruby
<Alazoral>
Ox0dea called has a very specific definition in programming, and most of the time you would not use the fully qualified name to call
<Alazoral>
Ox0dea people have fully qualified names but they are rarely called by them
<Ox0dea>
Obfuscatory pedantry! My favorite kind.
_Tariq has quit [Remote host closed the connection]
ruby-lang511 has quit [Client Quit]
ogpastaling has quit [Ping timeout: 240 seconds]
frem has quit [Quit: Connection closed for inactivity]
<Ox0dea>
Alazoral: Would you agree that there is a subtle but important difference between scope and hierarchy?
al2o3-cr has joined #ruby
arthropodado has quit [Ping timeout: 245 seconds]
<Alazoral>
Ox0dea: Without making the context of that statement more concrete, I'm afraid not
paradisaeidae has quit [Read error: Connection reset by peer]
jackjackdripper has joined #ruby
Ebok has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Ox0dea>
We never leave the top-level lexical scope there, and yet an obvious hierarchy has been constructed.
<Alazoral>
obviously
oetjenj has quit [Ping timeout: 260 seconds]
<Alazoral>
in terms of lexical scope
<Ox0dea>
Huh?
oetjenj has joined #ruby
<Ox0dea>
> your class is not called Foo::Bar::Baz, it's Baz in the scope of Bar in the scope of Foo
<Ox0dea>
I said that that wasn't "quite right", but it's really just wrong.
<Alazoral>
no, you can refer to Baz in the scope of Bar in the scope of Foo. it's exactly right
<Ox0dea>
How do we ask a class what it's called?
<Alazoral>
if i am inside module Baz and there is a module Bar in there, I can refer to it, to send it messages, by 'Bar'
<Ox0dea>
Is that its name?
<Alazoral>
because they share scope
zyzioziom has joined #ruby
<Alazoral>
Did I use the word 'name'?
incite has quit [Ping timeout: 252 seconds]
<Ox0dea>
Constant resolution works by walking a hierarchy, not a scope chain; these are often (but hardly always) the same thing.
shadoi has quit [Quit: Leaving.]
<Ox0dea>
Using two notions to explain something where one would suffice is to be frowned upon.
krobzaur_ has joined #ruby
jottr_ has joined #ruby
incite has joined #ruby
jackjackdripper has quit [Quit: Leaving.]
arthropodado has joined #ruby
Guest1834 has quit [Changing host]
Guest1834 has joined #ruby
Guest1834 is now known as paultreny
ogpastaling has joined #ruby
jottr_ has quit [Ping timeout: 276 seconds]
arthropodado has quit [Ping timeout: 250 seconds]
<Alazoral>
i fear you might be the pendant now. if i evaluate source which creates a module, inside the lexical scope of another module, the writer of that source cannot, at time of writing, know what their module will return 'name'. the only truth they have is a truth they define themselves. all they can depend on is the relative name. similarly, the declaration class Foo::Bar::Baz only asserts that Baz is a class. Foo and Bar could be classes or
<Alazoral>
modules. It was this confusion I was trying to clear up, by explaining how I think about it.
infernix has joined #ruby
ogpastaling has quit [Remote host closed the connection]
KnownSyntax has joined #ruby
chipotle has joined #ruby
elifoster has joined #ruby
lessless has quit [Read error: Connection reset by peer]
gidlf has joined #ruby
Rodya_ has quit [Ping timeout: 245 seconds]
arthropodado has joined #ruby
paradisaeidae has joined #ruby
Brklyn has joined #ruby
gidlf has quit [Remote host closed the connection]
supertylerc has joined #ruby
Bloomer has joined #ruby
Brklyn has quit [Ping timeout: 265 seconds]
B1n4r10 has joined #ruby
<Ox0dea>
Alazoral: I appreciated the philosophical touch, but https://eval.in/511485 demonstrates that the writer can in fact act based on whose lexical scope they find themselves in.
babblebre has joined #ruby
<Alazoral>
You misunderstand. During *writing* class C, there is no way to know its name.
<Ox0dea>
You're right that lexical scope and constant resolution don't come apart quite so easily as I might have inadvertently insinuated, but they are most certainly different sides of the same token.
<Alazoral>
other than C
krobzaur_ has quit [Ping timeout: 248 seconds]
vishwa has joined #ruby
<Ox0dea>
Or by invoking #name...
<vishwa>
Hey guys, I'm using this ruby AI gem called ai4r. requiring it works, but I want to import a class inside it called DataSet.
<vishwa>
Whenever I import it, it calls undefined constant
<Alazoral>
how do you invoke #name during writing?
<Alazoral>
you seem obsessive about the results of a method, but methods are not truth in Ruby, because every method can change at any time.
<vishwa>
I've tried defining it as ai4r::Data::Dataset (the complete definition), but this also spoouts an error - undefined ai4r
<vishwa>
wtf is going on? :O
<Ox0dea>
They nevertheless return what was true at the time they were invoked. I, for one, don't want my programs travelling in time.
<Alazoral>
i believe I proved you believe a paradox, Ox0dea. if the #name IS the real true name of the class, but the programmer cannot call it that and have it work under every circumstance, it cannot be the real true name.
<Ox0dea>
Alazoral: Welcome to the inherent dynamism of computational systems.
<Alazoral>
ruby has a ton of syntactic sugar. it's really important when learning it you learn what are the truths you can build on. #name is not one of them. the relative name, however, is.
gidlf has joined #ruby
<vishwa>
Ox0dea: new error, unitialised constant Dataset
gidlf has quit [Remote host closed the connection]
benlakey_ has joined #ruby
jbrhbr has quit [Quit: Leaving.]
benlakey_ is now known as benlakey
jbrhbr has joined #ruby
solocshaw has quit [Ping timeout: 252 seconds]
djbkd has joined #ruby
jbrhbr has quit [Client Quit]
MyMind has joined #ruby
al2o3-cr has quit [Read error: Connection reset by peer]
Sucks has quit [Ping timeout: 245 seconds]
meves has joined #ruby
al2o3-cr has joined #ruby
meves has quit [Remote host closed the connection]
terminalrecluse has joined #ruby
saneax is now known as saneax_AFK
mondok has quit [Ping timeout: 250 seconds]
slawrence00 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
djbkd has quit [Remote host closed the connection]
jottr_ has joined #ruby
dcunit3d has joined #ruby
b2zeldafreak has quit [Quit: Leaving]
davedev2_ has quit []
at46 has quit [Remote host closed the connection]
baweaver has joined #ruby
braincra- has quit [Quit: bye bye]
lemur has joined #ruby
atmosx has quit [Ping timeout: 245 seconds]
jottr_ has quit [Ping timeout: 245 seconds]
peterevjan has joined #ruby
aupadhye has joined #ruby
oetjenj has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
krz has quit [Ping timeout: 240 seconds]
<peterevjan>
if you do a "bundle install --without development" and then run a "bundle exec scriptname.rb" and get an error saying "could not find development-dependency-gemname", what are you doing wrong?
danielwzd has joined #ruby
<Ox0dea>
Not installing the development dependencies when one or more of them is required to run scriptname.rb.
^CrYpto^ has joined #ruby
<danielwzd>
/clear all
<Ox0dea>
Close enough.
<danielwzd>
sorry
<Ox0dea>
Consider mapping that to a key.
baweaver has quit [Ping timeout: 260 seconds]
al2o3-cr has quit [Ping timeout: 265 seconds]
techtomas has joined #ruby
cjbottaro has joined #ruby
Rodya_ has joined #ruby
pawnbox has joined #ruby
<^CrYpto^>
prints "Good Evening"
<^CrYpto^>
print*
cjbottaro has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
supertylerc has quit [Ping timeout: 245 seconds]
braincrash has joined #ruby
atmosx has joined #ruby
tuelz1 has quit [Ping timeout: 248 seconds]
cjbottaro has joined #ruby
<peterevjan>
turns out I didn't have the gems installed when I thought I did. duh
gidlf has joined #ruby
<peterevjan>
Ox0dea: thanks!
barhum2013 has joined #ruby
<Ox0dea>
peterevjan: Derp. :P Happy to help.
betabet has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
northfurr has joined #ruby
<nofxx>
>> p 'Good morning'
<nofxx>
you can use only 'p' ... but it's #puts, not #print ... btw there's no bot here?
SCHAAP137 has quit [Remote host closed the connection]
dc1 has joined #ruby
syk has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
syk has joined #ruby
Ebok has joined #ruby
dc1 has quit [Client Quit]
dc1 has joined #ruby
syk has quit [Ping timeout: 265 seconds]
arup_r has joined #ruby
Mojo_Nixon has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
agent_white has quit [Quit: brb]
tuelz1 has joined #ruby
B1n4r10 has quit [Ping timeout: 256 seconds]
moeabdol has joined #ruby
persistence has quit [Ping timeout: 246 seconds]
PedramT has joined #ruby
tuelz1 has quit [Ping timeout: 245 seconds]
saneax is now known as saneax_AFK
nickjj has joined #ruby
benlieb_ has joined #ruby
arescorpio has quit [Quit: Leaving.]
PedramT has quit [Remote host closed the connection]
nickjj_ has quit [Ping timeout: 276 seconds]
peterevjan has joined #ruby
supremekay has joined #ruby
<supremekay>
hello
<supremekay>
teach me ruby
tvw has joined #ruby
benlieb has quit [Ping timeout: 240 seconds]
PedramT has joined #ruby
PedramT has quit [Client Quit]
saneax_AFK is now known as saneax
hdfhdf has joined #ruby
supremekay has quit [Ping timeout: 245 seconds]
benlieb_ has quit [Ping timeout: 250 seconds]
Limix has joined #ruby
zast has quit [Remote host closed the connection]
stevemackinnon has quit [Remote host closed the connection]
<zacts>
'lo
elifoster has quit [Ping timeout: 250 seconds]
praveen has joined #ruby
Limix has quit [Client Quit]
aupadhye has joined #ruby
^CrYpto^ has quit [Ping timeout: 246 seconds]
atmosx_laptop has joined #ruby
atmosx_laptop has quit [Client Quit]
zacstewa_ has quit [Ping timeout: 250 seconds]
moeabdol1 has joined #ruby
ramfjord has joined #ruby
Chachi has joined #ruby
Rodya_ has joined #ruby
hdfhdf has quit [Ping timeout: 250 seconds]
zacstewart has joined #ruby
Rodya_ has quit [Remote host closed the connection]
Rodya_ has joined #ruby
moeabdol has quit [Ping timeout: 245 seconds]
babblebre has quit [Quit: Connection closed for inactivity]
stevemackinnon has joined #ruby
supremekay has joined #ruby
<baweaver>
supremekay: what have you tried so far?
<baweaver>
zacts: 'lo
paradisaeidae has joined #ruby
elifoster has joined #ruby
<baweaver>
depending on your experience in programming, the answers vary a lot, though by your question I'm guessing not much, so I would suggest tryruby
<Ox0dea>
The most recently uploaded TED talk is about Ruby!
peterevjan has quit [Read error: Connection reset by peer]
<Ox0dea>
(Tangentially.)
hdfhdf has joined #ruby
<baweaver>
Who is this ted, and why is he talking?
Anderson69s_Deb has quit [Ping timeout: 240 seconds]
supremekay has quit [Ping timeout: 240 seconds]
peterevjan has joined #ruby
<baweaver>
Guess they don't want to learn ruby then.
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
zyzioziom has joined #ruby
Yeomra has joined #ruby
peterevjan has quit [Remote host closed the connection]
ziyadb has joined #ruby
zacstewart has quit [Ping timeout: 276 seconds]
freerobby has quit [Quit: Leaving.]
yeticry_ has quit [Ping timeout: 250 seconds]
jottr_ has joined #ruby
zyzioziom has quit [Ping timeout: 250 seconds]
Chachi has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<arup_r>
Well, when we convert say a Hash to Array, this is not called serialization. But when converting Hash to YAML/JSON, this process called serialization. What does this *serialization* mean actually ?
<zacts>
but it seemed like what you are asking to me, but I'm a newbie too
<Ox0dea>
arup_r: The term "serialization" is meant to capture the idea that the data is intended to be transferred from one place to another.
<Ox0dea>
Even if that just means from memory to disk.
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
jottr_ has quit [Ping timeout: 240 seconds]
peterevjan has joined #ruby
rodfersou has joined #ruby
Kryptonic has joined #ruby
<arup_r>
Ox0dea: thanks. You definition is much closer to "Serialization is the process of converting an object into a stream of bytes in order to store the object or transmit it to memory, a database, or a file. Its main purpose is to save the state of an object in order to be able to recreate it when needed. The reverse process is called deserialization." and it seems, I get it why I did so many serialization in different projects..
benlieb has joined #ruby
<Ox0dea>
arup_r: Yep, that's about the size of it. There's bound to be some kind of persistence layer in any application of even modest size.
araujo has quit [Read error: Connection timed out]
tsunamie has joined #ruby
jottr_ has quit [Ping timeout: 250 seconds]
aryaching has quit []
Cohedrin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
pawnbox_ has joined #ruby
aufi has joined #ruby
al2o3-cr has quit [Ping timeout: 256 seconds]
darkf has quit [Ping timeout: 265 seconds]
Azulinho has joined #ruby
TomyWork has joined #ruby
dexter__ has quit [Ping timeout: 250 seconds]
TomyLobo2 has joined #ruby
araujo_ has joined #ruby
pawnbox has quit [Ping timeout: 248 seconds]
<apeiros>
lessless: you don't know inheritance?
donnoc has joined #ruby
darkf has joined #ruby
araujo_ has quit [Max SendQ exceeded]
<apeiros>
class A < B # <-- A inherits from B, B does not have to be a constant, it can be any expression returning a class
neanderslob has quit [Read error: Connection reset by peer]
zacstewart has joined #ruby
lsmola has joined #ruby
yoongkan_ has joined #ruby
lsmola has quit [Client Quit]
<lessless>
apeiros, I didn't knew that B can expression
Atomic_LduoX has joined #ruby
<lessless>
*can be
Macaveli has joined #ruby
huyderman has joined #ruby
mark2 has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
tuelz1 has joined #ruby
karapetyan has joined #ruby
adgtl has joined #ruby
jbrhbr has joined #ruby
yoongkan_ has quit [Client Quit]
yoongkan_ has joined #ruby
Atomic_LduoX has left #ruby [#ruby]
jbrhbr has quit [Client Quit]
weemsledeux has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
yoongkan_ has left #ruby [#ruby]
neanderslob has joined #ruby
tuelz1 has quit [Ping timeout: 250 seconds]
<apeiros>
lessless: there's very few places in ruby where an expression can't be used :)
Cohedrin has joined #ruby
<lessless>
ok, I will take that into account
Macaveli has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
grekko has joined #ruby
Brklyn has joined #ruby
Voyage has left #ruby ["Leaving"]
JaReAx has joined #ruby
troulouliou_div2 has quit [Remote host closed the connection]
ruby-lang064 has joined #ruby
praveen has quit [Remote host closed the connection]
Dimik has joined #ruby
praveen has joined #ruby
toretore has quit [Ping timeout: 265 seconds]
jbrhbr has joined #ruby
einarj has joined #ruby
polysics has joined #ruby
troulouliou_div2 has joined #ruby
karapetyan has quit [Remote host closed the connection]
grekko has quit [Ping timeout: 248 seconds]
<ruby-lang064>
Hello, I have a time issue that has me scratching my head. I am recording time at various points during a program that takes about 10 minutes to run. I am basically recording time in a hash periodically using Time.new.to_s. The problem is that by the time my program finishes, all recorded timestamps are the current time at the end of the run. It's as if the hash stored the Time objects and 'puts'ing the time causes the object to
<ruby-lang064>
Any ideas?
baweaver has quit [Remote host closed the connection]
Brklyn has quit [Ping timeout: 264 seconds]
karapetyan has joined #ruby
<apeiros>
?code ruby-lang064
<ruby[bot]>
ruby-lang064: We can't help you without your code, please post it to https://gist.github.com
<apeiros>
also your message was cut at "causes the object to"
Xeago has joined #ruby
phredus has quit [Ping timeout: 260 seconds]
lsmola has joined #ruby
<ruby-lang064>
Ah, okay. Creating a gist now. thanks. The end of the message was "causes the object to return #now rather than the strings."
<apeiros>
even without having seen the code, I can tell you that that's not whats happening ;-)
<apeiros>
also, why do you store strings instead of time objects?
Macaveli has joined #ruby
karapetyan has quit [Remote host closed the connection]
sepp2k has joined #ruby
karapetyan has joined #ruby
karapetyan has quit [Remote host closed the connection]
TomyWork has quit [Remote host closed the connection]
TomyLobo2 has quit [Remote host closed the connection]
krz has quit [Read error: Connection reset by peer]
mdw has joined #ruby
krz has joined #ruby
firstdayonthejob has quit [Ping timeout: 240 seconds]
<ruby-lang064>
I started with time objects, but then after my hash ended up with 4 identical time stamps, I thought the objects always returned current time or something.
Guest94837 has quit [Ping timeout: 272 seconds]
<ruby-lang064>
I thought string would be a sure fire way to guard against that hunch
mdw has joined #ruby
workmad3 has quit [Read error: Connection reset by peer]
hdfhdf has quit [Ping timeout: 272 seconds]
Macaveli has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<ruby-lang064>
Well, I can't seem to recreate the issue in a simple ruby file. I can't really post my actual code b/c it is for work. I will just keep digging. Thanks for your time!
TomyWork has joined #ruby
al2o3-cr has joined #ruby
djbkd has quit [Remote host closed the connection]
ruby-lang341 has joined #ruby
donnoc has joined #ruby
solars has quit [Quit: WeeChat 0.4.2]
PedramT has joined #ruby
ruby-lang064 has quit [Quit: Page closed]
solars has joined #ruby
pawnbox_ has quit [Remote host closed the connection]
bronson has joined #ruby
pandaant has joined #ruby
pawnbox has joined #ruby
fumk has joined #ruby
Snowy has quit [Remote host closed the connection]
bruce_lee has joined #ruby
mondok has joined #ruby
ruby-lang341 has quit [Ping timeout: 252 seconds]
polysics has quit []
rhg135 has joined #ruby
blackgoat has joined #ruby
Snowy has joined #ruby
bronson has quit [Ping timeout: 248 seconds]
stevemackinnon has quit [Remote host closed the connection]
OS-15951 has joined #ruby
<OS-15951>
Does anyone know how one would pass a URL to a ruby program via ARGV and not have to put double quotes around it?
followinfrared has quit [Ping timeout: 264 seconds]
<shellie_>
I have an object resulting from YAML.load(<file>) which is of string type. I want to convert it into a hash, so that I can modify it and transform it back into yaml string and write it to the file. Any idea how to transform from string representation to hash? some people on the web claim you need to hash = YAML.parse(string) but that results in a Psych::Nodes::Document which I have no idea what the underlying type is
<dangerousdave>
thanks for the help guys
<ljarvis>
?code shellie_
<ruby[bot]>
shellie_: We can't help you without your code, please post it to https://gist.github.com
<jhass>
shellie_: wild guess: YAML.load_file(<file>) instead of YAML.load(<file>)
k13nox has quit [Remote host closed the connection]
<shellie_>
jhass: I'm using the latter
<jhass>
you wrote the earlier
<shellie_>
let me look again
<shellie_>
oops, yeah, I'm using the load_file
<jhass>
then what ljarvis said
<jhass>
it should return a hash
followinfrared has joined #ruby
jgt1 has quit [Ping timeout: 265 seconds]
Kryptonic has quit [Ping timeout: 250 seconds]
zenlot3 is now known as zenlot
<shellie_>
my code is a little entwined. I'll try to write a simple example that replicates the behaviour
Kryptonical has joined #ruby
<shellie_>
btw, is there any semantical difference about calling YAML::load_file vs YAML.load_file ?
JaReAx has joined #ruby
<jhass>
no, use the latter
<shellie_>
cool
baweaver has joined #ruby
Snowy has joined #ruby
phredus has joined #ruby
marr has joined #ruby
binaryplease has joined #ruby
Snowy has quit [Remote host closed the connection]
barhum2013 has joined #ruby
Snowy has joined #ruby
LoneHerm_ has quit [Remote host closed the connection]
<jhass>
shellie_: could you edit it and choose foo.rb as filename?
<shellie_>
done
<jhass>
and take out the ``` mess
Burgestrand has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<jhass>
and maybe add error messages/wrong behavior description or make it runnable
<apeiros>
shellie_: YAML.load_file already parses the data
<apeiros>
there's no point in doing YAML.parse(YAML.load_file(path))
<apeiros>
which is what you essentially do.
<shellie_>
this works fine if the file is empty or does not exist, but the next run it does not work :)
<apeiros>
same thing for the double dumping
<apeiros>
that's silly
<apeiros>
YAML.dump(data.to_yaml, fd) # either drop the to_yaml or use File.write
<shellie_>
ok :)
<jhass>
^ you dump the yaml as yaml string
<jhass>
basically you double serialize it
Brklyn has joined #ruby
<jhass>
and unserialize it once
<apeiros>
and YAML.parse is if you want full control over the parsing. YAML.load if you don't need that (which is the 99% case)
<jhass>
creating the empty file feels a bit stupid too tbh
<jhass>
just return an empty hash
<shellie_>
why does it feel stupid?
User458764 has joined #ruby
<apeiros>
data = file_load # --> data = File.exist?($db) ? YAML.load_file($db) : {}
saneax is now known as saneax_AFK
<jhass>
def load_db(path); File.exists?(path) ? YAML.load_file(path) : {}; end
<jhass>
bah, too slow
<apeiros>
or yeah, keep it in the method
jam_ has joined #ruby
<apeiros>
also writing "---" into a file: File.write(path, "---")
<shellie_>
ok, thanks
<shellie_>
let me adapt
<jhass>
and given your naming you might find YAML::DBM interesting
<apeiros>
aaaand last but not least: use File.open with block-form.
<jhass>
^ or File.read/File.write
<apeiros>
that's what I suggested first ;-)
<apeiros>
basically those 31 lines of code could be reduced to ~9
yfeldblum has quit [Ping timeout: 252 seconds]
zacstewart has quit [Ping timeout: 256 seconds]
Brklyn has quit [Ping timeout: 250 seconds]
<shellie_>
apeiros: what is meant by block form?
k13nox has quit [Ping timeout: 250 seconds]
<apeiros>
File.open(path, 'w') do |fh| fh.puts("---") end
<apeiros>
this is block form. less ways to fuck up.
<shellie_>
I'm removing the empty file creation
jam_ has quit [Ping timeout: 250 seconds]
<shellie_>
the only thing is, the file_load is now returning a yaml formated in a string (if file exists) or a hash. How can I make both result in a hash?
tuelz1 has joined #ruby
<apeiros>
if it is returning a yaml string, then it means you still have double serialization
<apeiros>
it means you've written the file wrongly. don't fix the symptom. fix the cause.
<nobitanobi>
Do you guys see a good way to avoid repeating myself in here: https://gist.github.com/novito/3efb0bb8fc3e6fa5c176 - I define as many attr_accessor as instance variables the class has, so maybe some metaprogramming would help, but I'm unsure how.
evidex has quit [Read error: Connection reset by peer]
evidex has joined #ruby
printf has joined #ruby
ledestin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
govg has quit [Ping timeout: 246 seconds]
iateadonut1 has joined #ruby
<workmad3>
nobitanobi: you could rewrite your create_user as `update_user(User.new)` and re-use that code
govg has joined #ruby
<nobitanobi>
workmad3: good call!
<workmad3>
nobitanobi: you could also consider having an array like `FIELDS = %i(name phone_number address1 address2)` at the top of your class, then you can do `attr_accessor *FIELDS` and `FIELDS.each { |field| user[field] = send(field) }` inside your update
gaiada has quit [Ping timeout: 240 seconds]
adgtl has quit [Remote host closed the connection]
<nobitanobi>
workmad3: I think that's what I am looking for.
<nobitanobi>
Let me try that
Patrezze has joined #ruby
iateadonut has quit [Ping timeout: 248 seconds]
devgiant has joined #ruby
tsunamie has quit [Ping timeout: 246 seconds]
<workmad3>
nobitanobi: you could also consider having your form take a user on initialize, and then you could delegate accessors and setters to the user
DoubleMalt has quit [Remote host closed the connection]
jds has quit [Quit: Connection closed for inactivity]
ogpastaling has joined #ruby
kaka__ has joined #ruby
Shaboum has joined #ruby
<nobitanobi>
workmad3: mmm that's an interesting approach
<nobitanobi>
I'm pretty new to this form pattern :)
bauruine has joined #ruby
arian0n has joined #ruby
Xeago has quit [Remote host closed the connection]
printf has quit [Ping timeout: 240 seconds]
binaryplease has joined #ruby
dEPy has quit [Read error: Connection reset by peer]
blackmes1 has quit [Ping timeout: 265 seconds]
Timba-as has joined #ruby
sftrabbit has quit [Quit: sftrabbit]
ogpastaling has quit [Ping timeout: 252 seconds]
PedramT has joined #ruby
krz has joined #ruby
PedramT has quit [Read error: Connection reset by peer]
tsunamie has joined #ruby
Brklyn has joined #ruby
andikr has joined #ruby
sftrabbit has joined #ruby
DirtyFinn has quit []
bMalum has joined #ruby
Calydon has joined #ruby
Xeago has joined #ruby
pawnbox has quit [Remote host closed the connection]
ElFerna_ has joined #ruby
adgtl has joined #ruby
Brklyn has quit [Ping timeout: 240 seconds]
mdw has quit [Quit: Sleeping Zzzzz]
<nobitanobi>
workmad3: how could I do product.field = send(field) instead of product[field] = send(field)? One of the attributes is not a direct column, but an association. If I do product[field] it complains that it can't write unknown attribute
Snowy has quit [Read error: Connection reset by peer]
bauruine has quit [Read error: Connection reset by peer]
Snowy has joined #ruby
solars has quit [Quit: WeeChat 0.4.2]
DoubleMalt has joined #ruby
kalopsian has joined #ruby
Snowy has quit [Read error: Connection reset by peer]
Snowy has joined #ruby
Meow-J has joined #ruby
bMalum has joined #ruby
zyzioziom has quit [Quit: Leaving]
einarj_ has joined #ruby
AccordsLTN has joined #ruby
PedramT has joined #ruby
solars has joined #ruby
dc4 has joined #ruby
platzhirsch has left #ruby [#ruby]
mrsolo_ has joined #ruby
devgiant has quit [Ping timeout: 256 seconds]
bahar has quit [Changing host]
bahar has joined #ruby
benlakey_ has joined #ruby
flaguy481 has joined #ruby
kalopsian has quit [Ping timeout: 246 seconds]
Xeago has quit [Remote host closed the connection]
Kero_ has joined #ruby
kalopsian has joined #ruby
k13nox has quit [Remote host closed the connection]
bruce__lee has joined #ruby
bove_ has joined #ruby
einarj has quit [Ping timeout: 240 seconds]
flaguy48 has quit [Ping timeout: 240 seconds]
benlakey has quit [Ping timeout: 240 seconds]
benlakey_ is now known as benlakey
Timba-as_ has joined #ruby
Xeago has joined #ruby
crank1988 has quit [Ping timeout: 240 seconds]
mrsolo has quit [Ping timeout: 240 seconds]
A124 has quit [Ping timeout: 240 seconds]
ICantCook has quit [Ping timeout: 240 seconds]
AccordLTN has quit [Ping timeout: 240 seconds]
nug has quit [Ping timeout: 240 seconds]
Guest70124 has quit [Ping timeout: 240 seconds]
dcunit3d has quit [Ping timeout: 240 seconds]
Kero has quit [Ping timeout: 240 seconds]
yonatankoren has quit [Ping timeout: 240 seconds]
amitchellbullard has quit [Ping timeout: 240 seconds]
cbednarski has quit [Ping timeout: 240 seconds]
rfv has quit [Ping timeout: 240 seconds]
Guest4184_____ has quit [Ping timeout: 240 seconds]
bove has quit [Ping timeout: 240 seconds]
bruce_lee has quit [Ping timeout: 240 seconds]
AdamMeghji has quit [Ping timeout: 240 seconds]
bigkevmcd has quit [Ping timeout: 240 seconds]
mrsolo_ is now known as mrsolo
crank1988_ has joined #ruby
gagrio has quit [Ping timeout: 240 seconds]
PedramT has quit [Ping timeout: 240 seconds]
ICantCook has joined #ruby
LoganG_ has joined #ruby
amitchellbullard has joined #ruby
sdothum has joined #ruby
bove_ is now known as bove
bruce__lee has quit [Changing host]
bruce__lee has joined #ruby
rfv has joined #ruby
cbednarski has joined #ruby
A124 has joined #ruby
lancetw has quit [Ping timeout: 240 seconds]
Lloyd has quit [Ping timeout: 240 seconds]
JoL1hAHN has quit [Ping timeout: 240 seconds]
Guest63920 has quit [Ping timeout: 240 seconds]
LoganG_ is now known as LoganG
Affix has joined #ruby
Affix is now known as Guest74375
Timba-as has quit [Ping timeout: 240 seconds]
gnarld_ has joined #ruby
AdamMeghji has joined #ruby
Lloyd has joined #ruby
lancetw has joined #ruby
FooMunki has quit [Quit: FooMunki]
JoL1hAHN has joined #ruby
Radar has joined #ruby
Radar is now known as Guest45453
gagrio has joined #ruby
bigkevmcd has joined #ruby
FooMunki has joined #ruby
Guest4184_____ has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
jottr_ has joined #ruby
Burgestrand has joined #ruby
betabet has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
PedramT has joined #ruby
persistence has joined #ruby
chouhoulis has joined #ruby
bauruine has joined #ruby
IrishGringo has joined #ruby
praveen__ has joined #ruby
blackmes1 has quit [Quit: WeeChat 1.4]
PedramT has quit [Ping timeout: 250 seconds]
mickey_mouse has joined #ruby
blackmesa has joined #ruby
bauruine has quit [Read error: Connection reset by peer]
ferr has joined #ruby
chouhoulis has quit [Ping timeout: 250 seconds]
praveen has quit [Ping timeout: 252 seconds]
icbm has joined #ruby
IrishGringo has quit [Ping timeout: 260 seconds]
devgiant has joined #ruby
arthropododo has joined #ruby
f4cl3y has joined #ruby
yardenbar has joined #ruby
tomphp has quit [Ping timeout: 245 seconds]
tsunamie has joined #ruby
ready has quit [Remote host closed the connection]
musgravejw has quit [Ping timeout: 260 seconds]
mondok has joined #ruby
moeabdol1 has quit [Ping timeout: 276 seconds]
flughafen_ has joined #ruby
bauruine has joined #ruby
gregf has quit [Quit: WeeChat 1.4]
tomphp has joined #ruby
bauruine has quit [Read error: Connection reset by peer]
Mr0rris0 has quit [Read error: Connection reset by peer]
codecop has joined #ruby
vqrs has quit [Max SendQ exceeded]
vqrs has joined #ruby
karapetyan has joined #ruby
devgiant has quit [Ping timeout: 265 seconds]
bronson has joined #ruby
gregf has joined #ruby
karapetyan has quit [Ping timeout: 240 seconds]
dlitvak has quit [Ping timeout: 265 seconds]
zacstewa_ has quit [Ping timeout: 240 seconds]
zacstewart has joined #ruby
nobitanobi has quit [Quit: Page closed]
bronson has quit [Ping timeout: 276 seconds]
mdw has joined #ruby
mondok is now known as ready
dlitvak has joined #ruby
ElFerna_ has joined #ruby
CloCkWeRX has quit [Ping timeout: 240 seconds]
arup_r has joined #ruby
fourq is now known as fourq|away
fsapo has quit [Remote host closed the connection]
bauruine has joined #ruby
fourq|away is now known as fourq
ElFerna_ has quit [Ping timeout: 245 seconds]
synthroid has joined #ruby
sankaber has joined #ruby
tsunamie has quit [*.net *.split]
92AACA3RA has quit [*.net *.split]
jam_ has joined #ruby
<solars>
quick question: I'm requiring a file that definines a class, somehow right below this require, the class is not recognized - can anyone tell me how to debug this?
barhum2013 has quit [Quit: barhum2013]
saush has joined #ruby
<saush>
Are GSOC 2016 ideas for ruby organization out?
blasius has joined #ruby
k13nox has joined #ruby
vqrs has quit [Max SendQ exceeded]
jam_ has quit [Ping timeout: 240 seconds]
blackmesa has quit [Ping timeout: 276 seconds]
Rickmasta has joined #ruby
Burgestrand has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
vqrs has joined #ruby
tsunamie has joined #ruby
92AACA3RA has joined #ruby
malconis has joined #ruby
lxsameer has quit [Quit: Leaving]
tuelz1 has joined #ruby
<zacts>
hello
User458764 has joined #ruby
malconis has quit [Remote host closed the connection]
flughafen_ has quit [Ping timeout: 245 seconds]
malconis has joined #ruby
FernandoBasso has quit [Quit: Leaving]
CloCkWeRX has joined #ruby
DEA7TH has joined #ruby
<saush>
Are GSOC 2016 ideas for ruby organization out?
Lochez has joined #ruby
SCHAAP137 has joined #ruby
hxegon has joined #ruby
<apeiros>
solars: how do you figure it is "not recognized"?
<apeiros>
solars: a) make sure the file you think is being required is actually the one which is required, b) make sure you're correctly setting and referencing the constant
tuelz1 has quit [Ping timeout: 264 seconds]
ZoffixW has joined #ruby
Abrin has joined #ruby
Burgestrand has joined #ruby
tsunamie has quit [Ping timeout: 246 seconds]
bauruine has quit [Read error: Connection reset by peer]
duckpuppy has joined #ruby
gnarld_ is now known as nug
anisha has joined #ruby
<solars>
apeiros, did another test, the file is called Reservation.rb, I'm using require BASE_PATH + 'lib/Reservation' require returns false in the debugger. if I rename the file to Test.rb, it works. I can also require it multiple times (I thought it might be because it is already loaded)
<solars>
I'm not sure how to find out why it returns false
Abrin has quit [Ping timeout: 250 seconds]
<apeiros>
require returning false is not an error. it means it's already loaded.
ZoffixW has quit [Quit: Leaving]
geekbri has joined #ruby
<apeiros>
if it couldn't require the file, you'd get an exception, not just a mere return value. this isn't C ;-p
<solars>
hmm
<apeiros>
you still haven't answered my initial question, though.
<solars>
why can I rename it then and require multiple times?
Abrin has joined #ruby
<solars>
apeiros, well I'm requiring it, it contains a class ResGlobalInfo definition
<solars>
and then try to access the class constant ResGlobalInfo, which is not found
<solars>
in a pry console
<apeiros>
"which is not found" - *always* copy & paste the precise exception
bMalum has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<solars>
it could be that it is loaded in a different namespace or module, but I'm no tsure
jottr_ is now known as jottr
<apeiros>
you wouldn't be the first to badly retell an exception.
<shevy>
/var/opt/disk000/projects/github.com/gjtorikian/mathematical/ext/mathematical/lasem_overrides.c:5:22: fatal error: mtex2MML.h: No such file or directory
<Burgestrand>
CustosLimen it appears you need to follow them if you want to develop on it
<shevy>
yeah you already miss some header files CustosLimen
jaiks has quit [Remote host closed the connection]
william3 has quit [Remote host closed the connection]
<shevy>
I can't get it to work either
william3 has joined #ruby
<shevy>
require 'mathematical'
<shevy>
LoadError: cannot load such file -- mathematical/mathematical
<CustosLimen>
Burgestrand, can I point gem utility to local path like in `pip install --user .`
mostlybadfly has quit [Quit: Connection closed for inactivity]
hinbody_ is now known as hinbody-mobile
praveen has joined #ruby
aegis3121 has joined #ruby
hinbody-mobile is now known as hinbody_
<Burgestrand>
CustosLimen if you have a packaged .gem-file, you can `gem install ./path/to/mygem.gem`
<Burgestrand>
CustosLimen but I don't understand what `pip install --user` is different from.
<Burgestrand>
CustosLimen ah, there's a dot there, no, gems needs to be built, using `gem build`, and then you will have a .gem-file that can be uploaded to rubygems or installed.
<CustosLimen>
Burgestrand, ok cool, thanks `pip install --user .` will just install the python package in current directory (e.g. from cloned git)
bMalum has quit [Ping timeout: 240 seconds]
tuelz1 has quit [Ping timeout: 272 seconds]
<CustosLimen>
Burgestrand, ok cool, I get it now
tekku has quit [Ping timeout: 240 seconds]
hinbody_ has quit [Client Quit]
<Burgestrand>
CustosLimen you point `gem build mypackage.gemspec` and you will get your package out from it.
ftj has joined #ruby
Kero_ has quit [Ping timeout: 240 seconds]
tekk has joined #ruby
ElFerna_ has quit [Ping timeout: 250 seconds]
<CustosLimen>
ugh ok, let me just drop this think, its insanely weird - not sure its worth using
antgel has joined #ruby
griffindy has joined #ruby
Calydon has quit [Ping timeout: 252 seconds]
jaiks has quit [Ping timeout: 240 seconds]
truenito has quit [Ping timeout: 245 seconds]
bkxd has joined #ruby
treehug88 has joined #ruby
binaryplease has quit [Quit: WeeChat 1.3]
platzhirsch has joined #ruby
stannard has joined #ruby
lipoqil has joined #ruby
adgtl has quit [Remote host closed the connection]
adgtl has joined #ruby
dangerousdave has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mary5030 has joined #ruby
Snowy has quit []
bkxd has quit [Ping timeout: 272 seconds]
tomphp has joined #ruby
AimlessRaven has quit [Quit: Page closed]
mary5030 has quit [Remote host closed the connection]
<solars>
apeiros, it's a simple circular dependency that someone added
mary5030 has joined #ruby
gnudon has joined #ruby
zacstewart has quit [Ping timeout: 256 seconds]
chouhoulis has joined #ruby
zyzioziom has joined #ruby
UtkarshRay has joined #ruby
dlitvak has quit [Remote host closed the connection]
zacstewart has joined #ruby
shredding has joined #ruby
dionysus69 has quit [Ping timeout: 252 seconds]
darkxploit has quit [Ping timeout: 265 seconds]
jaiks has joined #ruby
vagnerd has joined #ruby
ready has quit [Remote host closed the connection]
chouhoulis has quit [Ping timeout: 250 seconds]
ready has joined #ruby
moredhel has joined #ruby
centrx has joined #ruby
dajobat has joined #ruby
FernandoBasso has joined #ruby
zyzioziom has quit [Quit: zyzioziom]
hahuang61 has quit [Ping timeout: 250 seconds]
zyzioziom has joined #ruby
yasu_ is now known as yasu
makenoise has quit [Read error: Connection reset by peer]
makenoise has joined #ruby
freerobby has quit [Quit: Leaving.]
Channel6 has quit [Quit: Leaving]
dajobat has quit [Client Quit]
Ebok has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dajobat has joined #ruby
karapetyan has quit [Remote host closed the connection]
<apeiros>
solars: so a full backtrace would have helped figuring that out? cue to my original "full exception" :-p
zyzioziom has quit [Remote host closed the connection]
sftrabbit has joined #ruby
zyzioziom has joined #ruby
<karl___>
I'm using RestClient and need to send a Get request that has JSON in the body of the request (because the API resource I'm using expects parameters that way). Any suggestions on how to accomplish this?
<solars>
apeiros, I was not aware that this is visible in the missing constants exception
<apeiros>
in the backtrace. and that's precisely the point why you always provide the full exception - because you might miss something or your interpretation of the exception may lack an important aspect
babblebre has joined #ruby
aufi has quit [Ping timeout: 252 seconds]
evidex has quit [Ping timeout: 245 seconds]
dhollinger has joined #ruby
momomomomo has joined #ruby
evidex has joined #ruby
whippythellama has joined #ruby
hobodave has joined #ruby
Brklyn has joined #ruby
dlitvak has joined #ruby
jaiks has quit [Ping timeout: 240 seconds]
karapetyan has quit [Remote host closed the connection]
<solars>
"just" have to add the graphviz stuff haha
<apeiros>
zacts: ^
karapetyan has quit [Remote host closed the connection]
<apeiros>
dajobat: no. you can't.
william3 has joined #ruby
<apeiros>
dajobat: overloading requires multiple methods of the same name to be able to coexist. ruby does not have that. no overloading.
sgambino has quit [Client Quit]
<apeiros>
dajobat: you can define +/-/* etc. methods. but that's not overloading.
<aegis3121>
If you're talking about things like '+' or '/', you're just re-defining the method with the name of that symbol as defined for that class.
<zacts>
interesting
Abrin has joined #ruby
<apeiros>
(also technically they aren't operators in ruby either ;-p)
sftrabbit has quit [Quit: sftrabbit]
truenito has quit [Ping timeout: 245 seconds]
adgtl has joined #ruby
tuelz1 has quit [Ping timeout: 245 seconds]
JDiPierro has quit [Remote host closed the connection]
<dajobat>
apeiros: i've read some stuff that refers to redefining operators for classes as operator overloading, so that might be what zacts is referring to
JDiPierro has joined #ruby
Jardayn has joined #ruby
sftrabbit has joined #ruby
<apeiros>
yeah, redefining an operator isn't overloading.
<apeiros>
overloading is when you define the same operator multiple times with different behaviors depending on the arguments
<apeiros>
such as sum(float, float), sum(int, int), …
<apeiros>
depending on the arguments, the proper function is invoked.
<dajobat>
isn't that basically what you're doing (if not technically) when you redefine + to be concat for a string rather than an int?
<apeiros>
only if you consider the receiver to be an argument
<aegis3121>
But it's the calling class that matters, not the parameters. Overloading relies on parameter signatures.
shinnya has quit [Ping timeout: 245 seconds]
<apeiros>
and then it'd be a limited overloading as you can only overload based on a single argument (the receiver)
tjohnson has joined #ruby
catt has joined #ruby
<apeiros>
you can't define String#+(String) and String#+(Integer) at the same time in ruby. you can handle it, but you have to do so within the method, not through multiple definitions of the same method.
<zacts>
my mistake
<zacts>
re: terminology
JDiPierro has quit [Ping timeout: 264 seconds]
<dajobat>
Yeah, you're right.
Snowy has quit [Read error: Connection reset by peer]
Snowy has joined #ruby
baweaver has joined #ruby
blasius has quit [Remote host closed the connection]
dopamean_ has joined #ruby
truenito has joined #ruby
infra-red has quit [Remote host closed the connection]
dangerousdave has joined #ruby
baweaver has quit [Ping timeout: 252 seconds]
sgambino has joined #ruby
ziyadb has quit [Quit: Connection closed for inactivity]
ferr has quit [Ping timeout: 260 seconds]
ElFerna_ has quit [Ping timeout: 245 seconds]
aganov has quit [Remote host closed the connection]
Xeago has quit [Remote host closed the connection]
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
weemsledeux has joined #ruby
solars has quit [Ping timeout: 250 seconds]
atomical_ has joined #ruby
chouhoulis has joined #ruby
yoongkang has quit [Remote host closed the connection]
Xeago has joined #ruby
ta has quit [Remote host closed the connection]
roshanavand has joined #ruby
weemsledeux has quit [Client Quit]
chouhoul_ has joined #ruby
<hxegon>
is there a way to suppress the context output when you start pry with binding.pry?
Xeago has quit [Remote host closed the connection]
slawrence00 has joined #ruby
atomical has quit [Ping timeout: 256 seconds]
mauricio has quit [Read error: Connection reset by peer]
weemsledeux has joined #ruby
chouhoulis has quit [Ping timeout: 250 seconds]
aufi has joined #ruby
<Papierkorb>
hxegon: binding.pry quiet: true
Burgestrand has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<hxegon>
Thanks Papierkorb!
<Papierkorb>
That may silence other things too, not sure
terminalrecluse has joined #ruby
dionysus69 has joined #ruby
Chau has quit [Quit: Leaving]
Rickmasta has joined #ruby
ogpastaling has joined #ruby
jottr has quit [Quit: WeeChat 1.4]
mpistone has joined #ruby
dangerousdave has quit [Ping timeout: 250 seconds]
User458764 has joined #ruby
Guest38 has joined #ruby
<shevy>
I got a question... style question mostly, but also speed consideration
frem has joined #ruby
<shevy>
it is said that using @ivars directly is faster than using an reader method like: def ivars; @ivars
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<shevy>
but I found that, using methods, makes it more convenient for me to read my own code. should I use @vars instead or continue to use methods? (inside the class that is)
machinewar has joined #ruby
aegis3121 has quit [Ping timeout: 276 seconds]
<machinewar>
whats the community's opinion on multiple return values?
<machinewar>
seems useful in some cases, or maybe ive just been writing too much Golang recently
sgambino has joined #ruby
<dajobat>
machinewar: like returning two different values at the same time from a method, or returning different values in different places?
<machinewar>
dajobat: two values at the same time from method
<machinewar>
i.e. a, b = my_method()
ogpastaling has quit [Read error: Connection reset by peer]
Xeago has joined #ruby
ponga has joined #ruby
ogpastaling has joined #ruby
EdwardIII has joined #ruby
<ponga>
hey guys I found this, https://glade.gnome.org would you suggest this is good idea to GUI with ruby?
ogpastaling has quit [Remote host closed the connection]
roshanav_ has joined #ruby
bauruine has joined #ruby
<shevy>
it depends
griffindy has quit [Read error: Connection reset by peer]
<ponga>
shevy: can you elaborate, please
<shevy>
it's mostly XML yes? and XML is not a lot of fun... BUT, you can sorta just describe your whole UI in one file, which is actually pretty cool because you don't have to deal with UI stuff much at all when you write application logic ponga
<shevy>
there are a few examples... let me try to find it
<dajobat>
machinewar: Don't know how I feel about them really, better than having to make loads of custom classes for return values I guess.
<dajobat>
I do like C#'s Tuples though, which are similar
<ponga>
ah xml
<shevy>
ah yes
nofxx has joined #ruby
<shevy>
you are a korean in japan or something right? let me introduce to you to kuja, a korean, who used to be on #rubyforce :)
roshanavand has quit [Ping timeout: 240 seconds]
treehug88 has quit [Ping timeout: 264 seconds]
<shevy>
like 8 years ago he wrote an application called TubePod - let me try to upload
<ponga>
shevy: to me it seemed like I'd not have to worry about XML
stannard has quit [Remote host closed the connection]
<EdwardIII>
hey is it OK to ask about third party libs? i've set savon to :info level, asked it to pretty print xml, but when it gets a SoapFault in a test, it doesn't show the xml that caused it
<shevy>
actually I think he was a korean but born in the USA or something
<ponga>
shevy: It is in XML, but i thought the concept was the glade'user wouldnt have to worry about reading XML :\
<shevy>
yeah the user won't have to worry
<shevy>
and once you finished the UI design part with XML, you also don't have to worry about it
<shevy>
it's a bit odd to deal with perhaps:
<shevy>
<property name="visible">True</property>
<shevy>
<property name="xalign">0.5</property>
<shevy>
in pure ruby you'd have similar means, like
<shevy>
widget.visible = true
<shevy>
widget.xalign = 0.5
stannard has joined #ruby
<ponga>
hm
<shevy>
more work in XML, but the benefit is that you can just grab any arbitrary glade file and have your application work on it
Mon_Ouie has quit [Ping timeout: 250 seconds]
<shevy>
I guess people manage to deal with it by using editors for glade hehe
Limix has joined #ruby
<ponga>
shevy: yeah that's what i was going to do, use editor for glade
<ponga>
then forget about it
<ponga>
*forget about XML
<shevy>
yeah
<ponga>
isn't that what OOP is about? at least partially?
<ponga>
don't bother with what's inside the object
<ponga>
it works
<EdwardIII>
i wish i could forget about xml heh
<EdwardIII>
life would be so glorious
<ponga>
and regex for me
<EdwardIII>
doing a lot of regex?
<shevy>
ponga yeah for objects + messages + communicating with other objects, sorta the way how Alan Kay thought about OOP and less so the C++ or java way
<ponga>
EdwardIII: recently, yeah
<ponga>
regex in asian language
<shevy>
my gripe with XML is that it is so verbose
<EdwardIII>
i don't mind regex heh but my regex is write-only to the extreme
<dajobat>
yeah, xml's pretty heavy.
huyderman has quit [Ping timeout: 260 seconds]
<EdwardIII>
plus the lack of distinction between a single element and a collection
<EdwardIII>
that's my biggest reason for prefering json to xml
<EdwardIII>
*preferring
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
SCHAAP137 has quit [Remote host closed the connection]
<dajobat>
Also the fact that the angle brackets on your keyboard can only sustain so much punishment before breaking.
sgambino has joined #ruby
<ponga>
shevy: I can't bare writing raw codes for GUI, so im looking for an editor
<ponga>
and glade was what I hit by
<shevy>
yeah
<shevy>
my GUIs end up awful
<shevy>
but I gave up on beautiful, I have settled for functional
x77686d has joined #ruby
tomchapin has joined #ruby
<ponga>
do we have any alternative to glade? GUI editor that can work with ruby?
Rodya_ has quit [Remote host closed the connection]
anisha has quit [Quit: Leaving]
avenj has quit [Ping timeout: 240 seconds]
Rodya_ has joined #ruby
MyMind has quit [Read error: Connection reset by peer]
mark2 has quit [Quit: Leaving.]
MyMind has joined #ruby
<EdwardIII>
so.... i'm pretty green. does anyone know how i can find out if savon *should* be logging xml requests/responses when exceptions happen?
<arup_r>
ponga: hi.. take care
infra-red has joined #ruby
anisha has joined #ruby
jbrhbr has joined #ruby
jbrhbr has quit [Client Quit]
<EdwardIII>
it keeps saying '(soap:Server) Server was unable to process request. ---> Not authenticated' but i know i'm giving the right details. this is a stupid soap service, it doesn't use proper auth like plain auth or something, it gets you to include some auth xml in the header based on their own ns/schema, and what i've told it to use is correct
aegis3121 has joined #ruby
tuelz1 has joined #ruby
arup_r has quit [Remote host closed the connection]
<EdwardIII>
my guess is it's an NS issue
zyzioziom has quit [Ping timeout: 240 seconds]
quaristice has joined #ruby
quaristice has quit [Client Quit]
momomomomo has quit [Quit: momomomomo]
Snowy has quit [Remote host closed the connection]
jimmtt has joined #ruby
scepticulous has quit [Ping timeout: 256 seconds]
TomPeed has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ftj has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
treehug88 has joined #ruby
tuelz1 has quit [Ping timeout: 276 seconds]
<ponga>
dajobat: will visualruby support ruby 2.3.0
<ponga>
guess I'd have to install 1.9.3 for safety
sgambino has joined #ruby
Pumukel has joined #ruby
aufi has quit [Ping timeout: 240 seconds]
agentmeerkat has joined #ruby
<Ox0dea>
c0m0: Did you get seeking figured out?
mfb2 has quit [Remote host closed the connection]
roshanav_ has quit [Remote host closed the connection]
<Ox0dea>
For IO#last_line or the like.
dlitvak_ has joined #ruby
roshanavand has joined #ruby
<c0m0>
0x0dea: No
<Ox0dea>
0x5adface
ramfjord has quit [Ping timeout: 250 seconds]
arup_r has joined #ruby
the_drow has quit [Quit: Page closed]
TomPeed has joined #ruby
infra-red has quit [Read error: Connection reset by peer]
SCHAAP137 has joined #ruby
tesuji has quit [Ping timeout: 250 seconds]
dlitvak has quit [Ping timeout: 240 seconds]
infra-red has joined #ruby
symm- has joined #ruby
JDiPierro has quit [Remote host closed the connection]
Rodya_ has quit [Remote host closed the connection]
chouhoulis has joined #ruby
arup_r has quit [Ping timeout: 245 seconds]
infra-re_ has joined #ruby
<dajobat>
ponga: No idea, I only found it just now.
Xeago has quit [Ping timeout: 240 seconds]
chouhoul_ has quit [Ping timeout: 276 seconds]
<ponga>
ok I will try with 2.3.0
Timba-as_ has quit [Ping timeout: 252 seconds]
<ponga>
and if it doesn,t have to follow what guide says
ElFerna_ has joined #ruby
<dajobat>
Good luck!
Timba-as_ has joined #ruby
Rodya_ has joined #ruby
TheMoonMaster has quit [Ping timeout: 265 seconds]
infra-red has quit [Ping timeout: 264 seconds]
al2o3-cr has quit [Ping timeout: 272 seconds]
Lucky__ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dionysus69 has quit [Ping timeout: 240 seconds]
yoongkang has joined #ruby
jbrhbr has joined #ruby
rodfersou|lunch is now known as rodfersou
howdoi has quit [Quit: Connection closed for inactivity]
gnudon has quit [Remote host closed the connection]
adgtl has quit [Remote host closed the connection]
tekk has quit [Ping timeout: 250 seconds]
vishwa has quit [Ping timeout: 260 seconds]
mfb2 has joined #ruby
yoongkang has quit [Ping timeout: 265 seconds]
kirillzh has joined #ruby
infra-re_ has quit [Remote host closed the connection]
anisha has quit [Quit: Leaving]
tekk has joined #ruby
Timba-as_ has quit [Quit: Be back later ...]
davedev24 has joined #ruby
<EdwardIII>
hm managed to get it printing out. it's weird, it's not applying the right namespace to a particular element
adgtl has joined #ruby
freerobby has quit [Quit: Leaving.]
Limix has quit [Quit: Limix]
chouhoulis has quit [Remote host closed the connection]
iateadonut1 has quit [Quit: Leaving.]
iateadonut has joined #ruby
Xeago has joined #ruby
kirillzh has quit [Ping timeout: 250 seconds]
adgtl has quit [Remote host closed the connection]
arup_r has joined #ruby
Rodya_ has quit [Remote host closed the connection]
Rodya_ has joined #ruby
zyzioziom has joined #ruby
infra-red has joined #ruby
djbkd has joined #ruby
agit0 has joined #ruby
weemsledeux has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
adgtl has joined #ruby
Lucky__ has joined #ruby
mdw has quit [Quit: Sleeping Zzzzz]
blasius has joined #ruby
Lucky__ has quit [Client Quit]
Xeago has quit [Remote host closed the connection]
synthroid has quit [Remote host closed the connection]
Rodya_ has quit [Remote host closed the connection]
Rodya_ has joined #ruby
jbrhbr has quit [Quit: Leaving.]
anisha has quit [Quit: Leaving]
UtkarshRay has quit [Quit: Leaving]
infra-r__ has quit [Ping timeout: 252 seconds]
psy_ has joined #ruby
maho has left #ruby [#ruby]
<c0m0>
0x0dea: Nice :) thanks
baweaver has joined #ruby
mostlybadfly has joined #ruby
freerobby has joined #ruby
anisha has joined #ruby
dlitvak has quit [Ping timeout: 240 seconds]
symm- has quit [Ping timeout: 250 seconds]
Rodya_ has quit [Remote host closed the connection]
baweaver has quit [Ping timeout: 250 seconds]
Rodya_ has joined #ruby
TomyWork has quit [Ping timeout: 248 seconds]
dlitvak has joined #ruby
shinnya has joined #ruby
Rodya_ has quit [Remote host closed the connection]
c0m0 has quit [Ping timeout: 252 seconds]
Rodya_ has joined #ruby
symm- has joined #ruby
pwnd_nsfw has quit [Ping timeout: 252 seconds]
yoongkang has joined #ruby
ElFerna_ has joined #ruby
Rodya_ has quit [Remote host closed the connection]
Azulinho has quit [Ping timeout: 248 seconds]
Rodya_ has joined #ruby
IrishGringo has joined #ruby
adgtl has quit [Remote host closed the connection]
dmolina has quit [Quit: Leaving.]
dmolina has joined #ruby
blasius has quit []
GeorgesLeYeti has joined #ruby
pwnd_nsfw has joined #ruby
<GeorgesLeYeti>
Hi
dc4 has quit [Ping timeout: 256 seconds]
dlitvak_ has joined #ruby
yoongkang has quit [Ping timeout: 264 seconds]
infra-red has joined #ruby
JDiPierro has joined #ruby
tjohnson has quit [Quit: Connection closed for inactivity]
iateadonut has quit [Quit: Leaving.]
Mon_Ouie has joined #ruby
hahuang65 has joined #ruby
dlitvak has quit [Ping timeout: 240 seconds]
floatingpoint has joined #ruby
<floatingpoint>
yo
dmolina has quit [Ping timeout: 240 seconds]
Bloomer has quit [Remote host closed the connection]
<floatingpoint>
should Open3.capture3(command) be able to overflow the stdout buffer?
Xeago has joined #ruby
praveen has quit []
wldcordeiro has joined #ruby
JDiPierro has quit [Ping timeout: 260 seconds]
infra-red has quit [Ping timeout: 240 seconds]
<eam>
floatingpoint: what does "overflow" mean to you in that context? can you describe the question a bit more?
grill has joined #ruby
geekbri has quit []
kfpratt has joined #ruby
floatingpoint has quit [Ping timeout: 256 seconds]
karl___ has quit [Ping timeout: 252 seconds]
adgtl has joined #ruby
jbrhbr has joined #ruby
floatingpoint has joined #ruby
<floatingpoint>
should Open3.capture3(command) be able to overflow the stdout buffer?
grill has quit [Ping timeout: 256 seconds]
Xeago has quit [Remote host closed the connection]
kevinml has joined #ruby
jottr has joined #ruby
mhoungbo has quit [Ping timeout: 245 seconds]
meves has quit [Remote host closed the connection]
elifoster has quit [Ping timeout: 252 seconds]
kevinml has left #ruby [#ruby]
dexter__ has joined #ruby
dlitvak_ has quit [Remote host closed the connection]
adgtl has quit [Remote host closed the connection]
treehug88 has joined #ruby
adgtl has joined #ruby
cpup has quit [Ping timeout: 250 seconds]
firstdayonthejob has joined #ruby
cpup has joined #ruby
<GeorgesLeYeti>
I have a float 361.145 and i want to return the closest float where decimal part is 0.04*i (i from 0 to 96 => [0.0, 0.04, 0.08, 0.12, 0.16, 0.2, 0.24, 0.28, 0.32, 0.36, 0.4, 0.44, 0.48, 0.52, 0.56, 0.6, 0.64, 0.68, 0.72, 0.76, 0.8, 0.84, 0.88, 0.92, 0.96] )
<GeorgesLeYeti>
So here it's 361.16
anisha has quit [Quit: Leaving]
Emmanuel_Chanel has quit [Quit: Leaving]
<GeorgesLeYeti>
I'm sorry for this "shitty" explaination but I'dont know how to express it.
rgs has joined #ruby
OS-15951 has left #ruby [#ruby]
chouhoulis has joined #ruby
chouhoulis has quit [Remote host closed the connection]
meves has joined #ruby
<GeorgesLeYeti>
Btw if you want to know the complete problem. I want to convert 25 fps (frame per second) into second.
chouhoulis has joined #ruby
akaiiro has joined #ruby
<GeorgesLeYeti>
And i want my timecode stop at the exact frame
<dudedudeman>
howdy. i have a ruby script that i’m running that ends up giving me the name of afile. what i’d like to do, is have that name of the file accessible for a bash script to pull from and run using that name of the file. any best ways to do this?
lemur has quit [Ping timeout: 240 seconds]
evidex has quit [Ping timeout: 245 seconds]
n_blownapart has joined #ruby
<aegis3121>
You could call the bash script at the end of the ruby script using the filename...
finisherr has joined #ruby
anisha has joined #ruby
zapata has joined #ruby
Xeago has joined #ruby
selfadhesivefilm has joined #ruby
<dudedudeman>
taht’s a really good point
Sucks has quit [Read error: Connection reset by peer]
grill has joined #ruby
<dudedudeman>
and heck, i’m already doing that for a curl command in the script lol
Burgestrand has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jbrhbr1 has joined #ruby
Ebok has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
kwesidev has quit [Ping timeout: 272 seconds]
philtr_ has joined #ruby
mfb2_ has joined #ruby
n_blowna_ has joined #ruby
nofacade has joined #ruby
bauruine has quit [Read error: Connection reset by peer]
floatingpoint has quit [Ping timeout: 256 seconds]
Guest4184______ has joined #ruby
stannard_ has joined #ruby
yoongkang has joined #ruby
icedp has joined #ruby
twodayslate_ has joined #ruby
kirun has joined #ruby
int has joined #ruby
kaspergrubbe has joined #ruby
int is now known as Guest93237
stannard_ has quit [Remote host closed the connection]
frem_ has joined #ruby
bb010g_ has joined #ruby
russt has joined #ruby
Guest4184_____ has quit [Ping timeout: 240 seconds]
ruby[bot] has quit [Ping timeout: 240 seconds]
twodayslate has quit [Ping timeout: 240 seconds]
bakingbread has quit [Ping timeout: 240 seconds]
sarlalian has quit [Ping timeout: 240 seconds]
jbrhbr has quit [Ping timeout: 240 seconds]
Xeago_ has quit [Ping timeout: 240 seconds]
bb010g has quit [Ping timeout: 240 seconds]
frem has quit [Ping timeout: 240 seconds]
kaspergr1bbe has quit [Ping timeout: 240 seconds]
philtr has quit [Ping timeout: 240 seconds]
n_blownapart has quit [Ping timeout: 240 seconds]
mfb2 has quit [Ping timeout: 240 seconds]
akaiiro has quit [Ping timeout: 240 seconds]
stannard has quit [Ping timeout: 240 seconds]
sftrabbit has quit [Ping timeout: 240 seconds]
russt_ has quit [Excess Flood]
sarlalian has joined #ruby
Arcanjo has joined #ruby
meves has quit [Remote host closed the connection]
twodayslate_ is now known as twodayslate
william3 has quit [Remote host closed the connection]
frem_ is now known as frem
bb010g_ is now known as bb010g
Arcanjo has left #ruby [#ruby]
juddey has joined #ruby
yoongkang has quit [Ping timeout: 248 seconds]
serbalgi has joined #ruby
akaiiro has joined #ruby
baweaver has quit [Remote host closed the connection]
ponga has quit [Remote host closed the connection]
<Ox0dea>
dudedudeman: Alternatively, wire things together as was intended: ./bash_script `ruby script.rb`
william3 has joined #ruby
<dudedudeman>
currently there’s one main bash script, that fires off a ruby script, adn then some other bash scripts from within itself
psyq has joined #ruby
yfeldblum has joined #ruby
mfb2_ has quit [Remote host closed the connection]
shadoi has joined #ruby
pwnd_nsfw has quit [Read error: Connection reset by peer]
pwnd_nsfw has joined #ruby
hxegon_AFK has quit [Quit: BRB]
bauruine has joined #ruby
bb010g has quit [Quit: Connection closed for inactivity]
william3 has quit [Ping timeout: 250 seconds]
rdark has quit [Ping timeout: 250 seconds]
boboc has joined #ruby
ramfjord has quit [Ping timeout: 240 seconds]
stannard has joined #ruby
stannard has quit [Remote host closed the connection]
grill has quit [Ping timeout: 256 seconds]
kwesidev has joined #ruby
kwesidev has quit [Max SendQ exceeded]
kwesidev has joined #ruby
kwesidev has quit [Max SendQ exceeded]
theery has quit []
dopie has joined #ruby
Eiam has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
nettoweb has joined #ruby
zambini has joined #ruby
kwesidev has joined #ruby
kwesidev has quit [Max SendQ exceeded]
adac has joined #ruby
ferr has quit [Ping timeout: 250 seconds]
kwesidev has joined #ruby
kwesidev has quit [Max SendQ exceeded]
dlitvak has joined #ruby
hasitha has joined #ruby
gizmore has quit [Quit: bbiab]
Azulinho has joined #ruby
gizmore has joined #ruby
yqt has joined #ruby
BTRE has quit [Quit: Leaving]
kwesidev1 has joined #ruby
kwesidev1 has quit [Max SendQ exceeded]
duckpuppy has joined #ruby
Burgestrand has joined #ruby
kwesidev1 has joined #ruby
kwesidev1 has quit [Max SendQ exceeded]
agentmeerkat has quit [Ping timeout: 250 seconds]
pdoherty has quit [Remote host closed the connection]
kwesidev1 has joined #ruby
kwesidev1 has quit [Max SendQ exceeded]
adgtl_ has joined #ruby
meves has joined #ruby
kwesidev1 has joined #ruby
geekbri_ has joined #ruby
kwesidev1 has quit [Max SendQ exceeded]
geekbri has quit [Read error: Connection reset by peer]
grill has joined #ruby
nettoweb has quit [Ping timeout: 264 seconds]
roshanavand has joined #ruby
kwesidev1 has joined #ruby
kwesidev1 has quit [Max SendQ exceeded]
kwesidev1 has joined #ruby
kwesidev1 has quit [Max SendQ exceeded]
robbyoconnor has joined #ruby
aegis3121 has quit [Ping timeout: 250 seconds]
PedramT has quit [Remote host closed the connection]
adgtl has quit [Ping timeout: 272 seconds]
kwesidev1 has joined #ruby
kwesidev1 has quit [Max SendQ exceeded]
User458764 has joined #ruby
kwesidev1 has joined #ruby
kwesidev1 has quit [Max SendQ exceeded]
FernandoBasso has joined #ruby
kwesidev1 has joined #ruby
kwesidev1 has quit [Max SendQ exceeded]
robbyoconnor has quit [Remote host closed the connection]
robbyoconnor has joined #ruby
kwesidev2 has joined #ruby
aegis3121 has joined #ruby
kwesidev2 has quit [Max SendQ exceeded]
n_blowna_ has quit []
n_blownapart has joined #ruby
mdw has joined #ruby
ferr has joined #ruby
geekbri_ has quit []
kwesidev has joined #ruby
kwesidev has quit [Max SendQ exceeded]
Lucky__ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
meves has quit [Remote host closed the connection]
x77686d has quit [Quit: x77686d]
william3 has joined #ruby
ftj has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jordanm has joined #ruby
kwesidev has joined #ruby
mwlang has joined #ruby
DoubleMalt has joined #ruby
kwesidev has quit [Max SendQ exceeded]
dsilfen has quit [Read error: Connection reset by peer]
kwesidev has joined #ruby
kwesidev has quit [Max SendQ exceeded]
tuelz1 has joined #ruby
aegis3121 has quit [Ping timeout: 252 seconds]
ur5us has joined #ruby
ftj has joined #ruby
kwesidev has joined #ruby
kwesidev has quit [Max SendQ exceeded]
dlitvak has quit [Ping timeout: 240 seconds]
infra-red has joined #ruby
dsilfen has joined #ruby
kwesidev has joined #ruby
kwesidev has quit [Max SendQ exceeded]
dlitvak has joined #ruby
baweaver has joined #ruby
tuelz1 has quit [Ping timeout: 260 seconds]
spider-mario has joined #ruby
grill has quit [Ping timeout: 256 seconds]
kwesidev has joined #ruby
kwesidev has quit [Max SendQ exceeded]
miles has joined #ruby
blackmesa has quit [Ping timeout: 252 seconds]
symm- has quit [Quit: Leaving...]
kwesidev has joined #ruby
infra-re_ has joined #ruby
Lucky has joined #ruby
kwesidev has quit [Max SendQ exceeded]
baweaver has quit [Remote host closed the connection]
serbalgi has quit [Read error: Connection reset by peer]
dlitvak has quit [Ping timeout: 264 seconds]
baweaver has joined #ruby
kwesidev has joined #ruby
lemur has joined #ruby
^CrYpto^ has joined #ruby
kwesidev has quit [Max SendQ exceeded]
k13nox has joined #ruby
infra-red has quit [Ping timeout: 264 seconds]
sandstrom has joined #ruby
kwesidev has joined #ruby
kwesidev has quit [Max SendQ exceeded]
BTRE has joined #ruby
ftj has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dlitvak has joined #ruby
dsilfen has quit [Remote host closed the connection]
tomchap__ has joined #ruby
plonk_ is now known as plonk
ftj has joined #ruby
baweaver has quit [Ping timeout: 245 seconds]
dsilfen has joined #ruby
william3 has quit [Remote host closed the connection]
kwesidev has joined #ruby
grill has joined #ruby
alexherbo2 has joined #ruby
kwesidev has quit [Max SendQ exceeded]
dayjo has joined #ruby
kwesidev has joined #ruby
codecop has quit [Remote host closed the connection]
karapetyan has quit [Remote host closed the connection]
kirillzh has joined #ruby
kwesidev has joined #ruby
kwesidev has quit [Max SendQ exceeded]
ramfjord has joined #ruby
ellistaa has joined #ruby
kirillzh has quit [Max SendQ exceeded]
workmad3 has quit [Ping timeout: 256 seconds]
ftj has joined #ruby
kirillzh has joined #ruby
kwesidev has joined #ruby
pawnbox has joined #ruby
kwesidev has quit [Max SendQ exceeded]
karapetyan has joined #ruby
musgravejw has joined #ruby
atomical has quit [Ping timeout: 252 seconds]
dudedudeman has joined #ruby
kwesidev has joined #ruby
kwesidev has quit [Max SendQ exceeded]
lemur has quit [Remote host closed the connection]
kwesidev has joined #ruby
kwesidev has quit [Max SendQ exceeded]
krz has quit [Ping timeout: 276 seconds]
kwesidev has joined #ruby
kwesidev has quit [Max SendQ exceeded]
pawnbox has quit [Ping timeout: 250 seconds]
musgravejw has quit [Client Quit]
toretore has joined #ruby
kwesidev has joined #ruby
diegoviola has joined #ruby
kwesidev has quit [Max SendQ exceeded]
mkosaki has quit [Quit: Leaving...]
anisha has quit [Quit: Leaving]
dsilfen has joined #ruby
bronson has joined #ruby
at46 has joined #ruby
yfeldblum has quit [Ping timeout: 250 seconds]
glcx has joined #ruby
<shevy>
got a question... if your string is string = "php-7.0.3.tar.xz"
mary5030 has quit [Ping timeout: 245 seconds]
phredus_ has quit [Ping timeout: 250 seconds]
at46_ has joined #ruby
last_staff has quit [Ping timeout: 252 seconds]
<shevy>
is there a standard way in ruby to find out the next logical version candidates? that is.. for "7.0.3", three candidates would be possible... "7.0.4", "7.1.0" and also "8.0.0" ... it's trivial to write this myself I guess but I wondered if gem itself or some other software has this already
<pizzaops>
Do you have to install the `psych` gem generally? I see it listed on rubygems.org but it also seems to always already be present whenever I install Ruby.
infra-re_ has quit [Ping timeout: 245 seconds]
<pizzaops>
So I'm not clear on if it's built in or if I need to list it in my gemspecs.
danielwzd has joined #ruby
bronson has quit [Ping timeout: 250 seconds]
<Ox0dea>
pizzaops: Psych is bundled with Ruby.
at46 has quit [Ping timeout: 252 seconds]
<adaedra>
^
<Ox0dea>
>> require 'yaml'; YAML
dlitvak has quit [Ping timeout: 245 seconds]
<pizzaops>
Yeah, I know about require 'yaml' but I can also require 'psych', so I wasn't sure.
<Ox0dea>
Where's the bot?!
^CrYpto^ has quit [Ping timeout: 240 seconds]
<shevy>
pizzaops you can also require 'syck' :)
<shevy>
(after you installed the gem that is)
<pizzaops>
Thanks folks.
<Ox0dea>
pizzaops: That would've evaluated to `Psych` was the point I meant to make.
n_blownapart has quit [Remote host closed the connection]
boboc has quit [Remote host closed the connection]
mary5030 has quit [Read error: Connection reset by peer]
dsilfen has quit [Remote host closed the connection]
mary5030 has joined #ruby
adgtl has joined #ruby
jxs_ has quit [Remote host closed the connection]
adgtl has quit [Read error: No route to host]
nettoweb has joined #ruby
adgtl_ has quit [Ping timeout: 250 seconds]
jgt1 has joined #ruby
mostlybadfly has quit [Quit: Connection closed for inactivity]
k13nox has quit [Remote host closed the connection]
<VeryBewitching>
shevy: It really depends on who is saying them, and how many drinks they've had.
mary5030 has quit [Ping timeout: 252 seconds]
<eam>
I can speak most languages if I have enough booze
kirillzh has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
zacstewa_ has joined #ruby
last_staff has quit [Quit: last_staff]
zacstewart has quit [Ping timeout: 256 seconds]
<apeiros>
eam: is that like lots of people can sing if they have enough booze?
jcoe has joined #ruby
<eam>
indeed, indeed
k13nox has quit [Remote host closed the connection]
mary5030_ has quit [Remote host closed the connection]
meves has joined #ruby
<kbni>
Aside from Rspec - what other test libraries are out there? I'm specifically after something as easy as possible for a newbie such as myself to use.
<Ox0dea>
minitest.
<kbni>
(new to ruby and to ttd)
<Ox0dea>
*TDD
<kbni>
yes, thanks
<Ox0dea>
No worries.
<havenwood>
kbni: Minitest is simple and ships with Ruby.
mary5030 has joined #ruby
ASTP001 has joined #ruby
ASTP001 has quit [Client Quit]
glcx has quit [Quit: Quitte]
[Butch] has quit [Quit: I'm out . . .]
<Ox0dea>
VeryBewitching: Is it a stretch, then, for AlphaGo's developers to ascribe to it an "intuitive" model of the game?
uri_ has joined #ruby
ASTP001 has joined #ruby
ASTP001 has quit [Client Quit]
<VeryBewitching>
Ox0dea: There is more than one type of game.
<Ox0dea>
I'm learning so many things.
<VeryBewitching>
:D
<eam>
imagine a computer, convinced that its own computations are somehow more than mere computations
GeorgesLeYeti has quit [Quit: Quitte]
<apeiros>
?ot VeryBewitching & eam
<ruby[bot]>
VeryBewitching: this seems to be off-topic. Please move your discussion to #ruby-offtopic, to keep this channel free for Ruby related topics. Thanks!
<havenwood>
eam: I'm familiar with these "humans" you speak of.
<Ox0dea>
^
<VeryBewitching>
apeiros: I had digressed, above, sorry :D
tomphp has joined #ruby
<havenwood>
<3 Minitest
<adaedra>
^
<VeryBewitching>
I prefer RSpec myself.
<eam>
is there a gem for implementing a strange loop in ruby
<pizzaops>
But wouldn't that be the same `derpy? lines = []; File.read('/some/path').each_line { |line| lines.push(line)};
stannard has quit [Remote host closed the connection]
<Ox0dea>
`derpy: All yours.
karapetyan has joined #ruby
mary5030 has joined #ruby
cpup has quit [Ping timeout: 248 seconds]
ferr has joined #ruby
mary5030 has quit [Remote host closed the connection]
diegoviola has quit [Ping timeout: 240 seconds]
k13nox has quit [Remote host closed the connection]
mary5030 has joined #ruby
mary5030_ has quit [Ping timeout: 245 seconds]
baweaver has quit [Remote host closed the connection]
canton7 has joined #ruby
law has joined #ruby
cpup has joined #ruby
<law>
hey all, I'm trying to spider through a bunch of nested hashes and create a NEW nested hash that is more easily parsable for later on in my program.
<law>
I am... getting bogged down by Hash syntax though
<Ox0dea>
pizzaops: #each_line will give you back an Enumerator over all the lines in the file. Assuming you want to do some further transformation, that's basically like having an Array only better.
<Ox0dea>
law: 2.3's Hash#dig method might help ease the pain a little.
<pizzaops>
Ah right I can skip the actual saving it to a variable step as an array step. That makes sense.
s00pcan has quit [Remote host closed the connection]
reactor16 has joined #ruby
<reactor16>
Hi All
karapetyan has quit [Ping timeout: 240 seconds]
decoponio has quit [Quit: Leaving...]
dlitvak_ has joined #ruby
PaulCapestany has joined #ruby
mary5030 has quit [Remote host closed the connection]