n0m4d1c has quit [Remote host closed the connection]
ur5us has quit [Read error: Connection reset by peer]
ur5us has joined #ruby
morenoh149 has quit [Read error: Connection reset by peer]
roshanavand has joined #ruby
morenoh149 has joined #ruby
Dimik has quit [Ping timeout: 256 seconds]
roshanavand has quit [Ping timeout: 265 seconds]
x77686d has quit [Quit: x77686d]
ta_ has joined #ruby
x77686d has joined #ruby
jenrzzz has quit [Ping timeout: 264 seconds]
pilne has quit [Quit: Leaving]
MoskitoHero has joined #ruby
ipe has quit [Read error: Connection reset by peer]
RougeR has quit [Ping timeout: 264 seconds]
halt has joined #ruby
jeffreylevesque has joined #ruby
halt is now known as Guest15510
weaksauce has quit [Ping timeout: 248 seconds]
konsolebox has quit [Ping timeout: 264 seconds]
konsolebox has joined #ruby
mroutis_ has quit [Ping timeout: 264 seconds]
banisterfiend has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ta_ has quit [Ping timeout: 248 seconds]
chocoelho has quit [Quit: Konversation terminated!]
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
MoskitoHero has quit [Quit: MoskitoHero]
karapetyan has joined #ruby
gix has joined #ruby
gix- has quit [Ping timeout: 248 seconds]
karapetyan has quit [Ping timeout: 268 seconds]
orbyt_ has joined #ruby
donofrio has quit [Remote host closed the connection]
white_lilies has quit [Ping timeout: 240 seconds]
jenrzzz has quit [Ping timeout: 240 seconds]
jyaworski has joined #ruby
cagomez has quit [Remote host closed the connection]
ciscam has quit [Ping timeout: 256 seconds]
ciscam has joined #ruby
jenrzzz has joined #ruby
jyaworski has quit [Ping timeout: 240 seconds]
jyaworski has joined #ruby
coderphive has quit [Quit: coderphive]
jyaworski has quit [Ping timeout: 248 seconds]
danguita has quit [Ping timeout: 260 seconds]
danguita has joined #ruby
arescorpio has quit [Quit: Leaving.]
alfiemax has joined #ruby
jyaworski has joined #ruby
howdoi has joined #ruby
anisha has joined #ruby
jyaworski has quit [Ping timeout: 256 seconds]
jenrzzz has quit [Ping timeout: 264 seconds]
ta_ has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jyaworski has joined #ruby
ryzokuken has joined #ruby
morenoh149 has quit [Ping timeout: 256 seconds]
TheDukh_ has left #ruby [#ruby]
jyaworski has quit [Ping timeout: 240 seconds]
sauvin has joined #ruby
Mrgoose has quit [Ping timeout: 248 seconds]
Mrgoose2 has joined #ruby
CBebop has quit [Quit: See you later, Space Cowboy.]
_antares_ has joined #ruby
aupadhye has joined #ruby
morenoh149 has joined #ruby
chris349 has quit [Ping timeout: 240 seconds]
morenoh149 has quit [Ping timeout: 240 seconds]
aufi has joined #ruby
csaunders has quit [Quit: later tater]
tvw has joined #ruby
ur5us has quit [Remote host closed the connection]
arooni has quit [Ping timeout: 276 seconds]
Guest27 has joined #ruby
csaunders has joined #ruby
arooni has joined #ruby
ujjain2 has joined #ruby
ujjain has quit [Ping timeout: 240 seconds]
conta has joined #ruby
troulouliou_dev has quit [Quit: Leaving]
Burgestrand has joined #ruby
morenoh149 has joined #ruby
anisha has quit [Read error: Connection reset by peer]
anisha has joined #ruby
rabajaj has quit [Ping timeout: 264 seconds]
troys has quit [Quit: Bye]
baweaver_away is now known as baweaver
aufi has quit [Ping timeout: 248 seconds]
morenoh149 has quit [Ping timeout: 248 seconds]
banisterfiend has joined #ruby
<garyserj>
how do I call cp so that it copies the source to the destination overwriting the destination file? include FileUtils::Verbose cp('file1', 'file2')
suukim has joined #ruby
TomyWork has joined #ruby
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
saTchymoto has joined #ruby
amar has joined #ruby
saTchymoto has quit [Client Quit]
dionysus69 has joined #ruby
saTchymoto has joined #ruby
saTchymoto has left #ruby [#ruby]
saTchymoto has joined #ruby
<dminuoso>
garyserj: You spend so much time typing that question.
<dminuoso>
Why didn't you spend that time trying it out.
jenrzzz has quit [Ping timeout: 264 seconds]
saTchymoto has quit [Client Quit]
saTchymoto has joined #ruby
arahael has joined #ruby
lucas has joined #ruby
<arahael>
So I've got a callable in a local variable. I can 'puts' it fine, but I can't actually call it. Ruby asays: "Undefined method".
<arahael>
Does ruby have a separate scope for functions?
<dminuoso>
arahael: Show the full error message, and correlate it with the corresponding line in your paste.
<larcara>
?
<larcara>
sorry.. a typo :)
<arahael>
dminuoso: Sorry - just worked it out: I had to use getCursorPos.Call(point), rather than just getCursorPos(point)
<arahael>
It does appear that methods have a different scope.
x77686d has quit [Quit: x77686d]
jyaworski has joined #ruby
<dminuoso>
arahael: Your question does not make sense.
<dminuoso>
Or your statement.
claudiuinberlin has joined #ruby
<arahael>
dminuoso: Well, I worked it out that I effectively had: blah = lambda {|x| }; blah(1)
<arahael>
dminuoso: Confusingly, the error message is "undefined method `blah' for main:Object". But I just defined it!
<arahael>
If I puts it, it outputs perfectly:#<Proc:0x00000004a601e0@foo.rb:1 (lambda)>
<havenwood>
arahael: blah.(1), blah[1], or blah.call(1), but not blah(1)
jyaworski has quit [Ping timeout: 248 seconds]
<arahael>
havenwood: Yeah - the methods do seem to be a different scope.
<havenwood>
arahael: You're calling a lambda? That's not a method. Lambdas are called differently than methods.
<arahael>
havenwood: That was a test case... I'm actually calling a win32api function.
<arahael>
havenwood: So, lambda's are different again?
amar has quit [Remote host closed the connection]
Guest27 has quit [Remote host closed the connection]
amar has joined #ruby
karapetyan has joined #ruby
<dminuoso>
arahael: Not different scope really.
<dminuoso>
arahael: It's just messy language details.
<dminuoso>
arahael: Formally a lambda is not a method.
<dminuoso>
arahael: so the syntax to call a lambda or a method are different
amar has quit [Ping timeout: 265 seconds]
kapil___ has quit [Quit: Connection closed for inactivity]
<dminuoso>
arahael: The way ruby works, an identifier is assumed to be a method, unless Ruby has lexigographically seen an assignment inside the same scope before.
morenoh149 has joined #ruby
<dminuoso>
arahael: However.. if you explicitly add parens () then the thing is _always_ assumed to be a method.
<dminuoso>
methods and variables live in different namespaces
<arahael>
dminuoso: Effectively, it's a lisp2?
karapetyan has quit [Ping timeout: 276 seconds]
<havenwood>
From the Ruby manpage: ... [if] you do like the
<havenwood>
concept of LISP, but don't like too many parentheses, Ruby might be your language of choice.
<arahael>
havenwood: Right - it seems to be more of a LISP-2, rather than LISP-1, as I somehow originally thought
Chch has joined #ruby
morenoh149 has quit [Ping timeout: 276 seconds]
_antares_ has quit [Quit: Connection closed for inactivity]
<dminuoso>
arahael: Can you determine what this will print out?
<dminuoso>
Look at it and make a prediction before you try it out.
<arahael>
dminuoso: "puts foo" uses variable-scope, so it probably puts that function definition.
<dminuoso>
arahael: what do you mean "that function definition"
phaul has joined #ruby
<arahael>
"define function foo; 42; end".
<arahael>
aka "def".
<dminuoso>
arahael: nope then you're still a bit confused
<dminuoso>
arahael: so there's a namespace for functions, and a namespaces for variables right?
<dminuoso>
and when I say functions I mean methods
<dminuoso>
arahael: the question of whether an identifier `foo` is looked up inside the method namespace or the variable namespace depends on a few factors.
<dminuoso>
if you specify an explicit receiver `quux.foo` then foo is considered a method
minimalism has quit [Quit: minimalism]
Chch has quit [Quit: Leaving]
<dminuoso>
if you add explicit parens `foo()` then foo is considered a method
<dminuoso>
if you just type `foo` then it depends on what ruby has seen lexigographically (that is the _lexer_) before in the scope.
<dminuoso>
If ruby has seen an assignment to an identifier named `foo`, then for the rest of the scope the identifier `foo` shall refer to a local variable
<dminuoso>
`foo = 1; puts foo`
<arahael>
Wait... So "foo" is different to "foo()"?
<dminuoso>
Possibly!
<arahael>
The parens aren't *completely* optional?
<dminuoso>
Right.
<dminuoso>
so if you write `foo = 1; puts foo()`
<dminuoso>
then it will look for a method named `foo`
<arahael>
With the default reciever, which is the current object...
<arahael>
Which has so far been the main:Object?
<arahael>
That makes a lot more sense now. :)
<dminuoso>
well `self` whatever that may be in your context.
avelldiroll has quit [Quit: WeeChat 1.6]
<dminuoso>
arahael: and conversely if you write `foo = 1; puts foo`
<dminuoso>
then it will print 1, even if you have a method called foo
<dminuoso>
because the lexer has seen an assignment to an identifier called `foo`
inerthia has joined #ruby
<dminuoso>
so for the rest of the scope `foo` is regarded a local varaiable
<dminuoso>
you could say `the variable foo` then shadows `the method foo`
<dminuoso>
to still access the original method you can add an explicit receiver or parens
<dminuoso>
arahael: Can you determine what this will print out?
sysvalve has joined #ruby
sysvalve has quit [Client Quit]
<arahael>
Lexographically, probably that first foo, but /not/ 42.
sysvalve has joined #ruby
<dminuoso>
careful!
<dminuoso>
arahael: at the timem of `putsing` is foo considered a method or a variable?
<arahael>
A variable, that's the best lexographic understanding of it.
<dminuoso>
That's all that matters
<dminuoso>
that first `foo` is a method, so thats not relevant.
<dminuoso>
its ignored completely
avelldiroll has joined #ruby
<dminuoso>
arahael: the answer is, it will print nothing because `foo` is nil. which is even more confusing right?
<dminuoso>
the way ruby works is.. if ruby sees an assignment to a local variable called `foo` *anywhere* in some code, it will provide for a local variable called "foo" at the beginning of the stack frame.
<arahael>
dminuoso: That's absolutely confusing!
<arahael>
Right, so that's a LISP-2, then.
<dminuoso>
which has the weird consequence that this will not throw
<arahael>
Except, as it turns out, it lexographically determines wether the name is a variable, or a function/method.
<dminuoso>
arahael: so formally you could say `if false; foo = nil; end` *declares* a variable without initializing it.
<dminuoso>
And to make things worse, it's hoisted.
<dminuoso>
Xeago: Ah, I guess the variant with string literals was added in 2.2
ellcs has joined #ruby
<dminuoso>
Didn't know that :)
<arahael>
dminuoso: Interesting.
<dminuoso>
arahael: The main problem is there's no clean definition of any semantics in Ruby anywhere. So you're basically left to discover all the subtleties of MRI by trying things out.
<dminuoso>
There is an ISO standard but it's forgotten and not maintained.
venmx has joined #ruby
VladGh_ has quit [Ping timeout: 260 seconds]
ryzokuken has quit [Remote host closed the connection]
<dminuoso>
If this feels terrible, that's because it is.
drale2k_ has joined #ruby
guille-moe has joined #ruby
<phaul>
but here https://eval.in/997988 the first p output 42. not nil so it's not really hoisted there. I'm confused.
alfiemax has quit [Remote host closed the connection]
<dminuoso>
phaul: It's hoisted.
<dminuoso>
phaul: Check my last eval.in
venmx has quit [Ping timeout: 260 seconds]
<dminuoso>
phaul: the only thing that changes is whether ruby considers `foo` to be a method or a variable_or_method
alfiemax has joined #ruby
alfiemax has quit [Remote host closed the connection]
venmx has joined #ruby
alfiemax has joined #ruby
<phaul>
pff. So even if there is a local variable blah, blah still might refer to method call
<phaul>
great
<dminuoso>
isnt it.
<phaul>
is the only thing that controlls this is whether we are before or after the variable declaration?
<dminuoso>
phaul: "lexicographical assignment"
<dminuoso>
phaul: The cool thing is, the compiler will optimize the code even away.
<dminuoso>
because `if false; ... end` is obviously dead code.
<dminuoso>
but deleting it changes the meaning of the rest of the program
<dminuoso>
"deleting dead code changes the meaning of a program"
<arahael>
dminuoso: Yeah... Too much magic. :(
<dminuoso>
think its a feature? I dont.
mikkel- has joined #ruby
drale2k_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<arahael>
dminuoso: That code example (997995) is awful!
arooni has quit [Ping timeout: 276 seconds]
neuromanc_r has quit [Ping timeout: 245 seconds]
alfiemax has quit [Ping timeout: 276 seconds]
yokel has quit [Ping timeout: 248 seconds]
jyaworski has joined #ruby
nima_m has joined #ruby
amar has joined #ruby
ur5us has joined #ruby
neuromanc_r has joined #ruby
drale2k_ has joined #ruby
alfiemax has joined #ruby
garyserj has quit [Ping timeout: 264 seconds]
garyserj has joined #ruby
arooni has joined #ruby
amar has quit [Ping timeout: 276 seconds]
alfiemax has quit [Remote host closed the connection]
alfiemax has joined #ruby
jyaworski has quit [Ping timeout: 276 seconds]
nima_m_ has joined #ruby
morenoh149 has joined #ruby
nadir has quit [Quit: Connection closed for inactivity]
nima_m_ has quit [Quit: nima_m_]
drale2k_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
morenoh149 has quit [Ping timeout: 260 seconds]
conta has quit [Remote host closed the connection]
conta has joined #ruby
venmx has quit [Ping timeout: 240 seconds]
rabajaj has joined #ruby
nowhere_man has joined #ruby
cabotto has joined #ruby
jyaworski has joined #ruby
amar has joined #ruby
drale2k_ has joined #ruby
jyaworski has quit [Ping timeout: 264 seconds]
aufi has joined #ruby
hs366 has joined #ruby
ryzokuken has joined #ruby
dhollin3 has joined #ruby
dhollinger has quit [Ping timeout: 276 seconds]
morenoh149 has joined #ruby
morenoh149 has quit [Ping timeout: 256 seconds]
tomphp has joined #ruby
tomphp has quit [Client Quit]
venmx has joined #ruby
karapetyan has joined #ruby
tomphp has joined #ruby
roshanavand has joined #ruby
hanmac has quit [Ping timeout: 240 seconds]
mikkel- has quit [Quit: WeeChat 0.4.3]
mlkkk has joined #ruby
roshanavand has quit [Client Quit]
roshanavand has joined #ruby
amatas has joined #ruby
<Bish>
did someone ever use savon to connect to magento
<Bish>
and not kill his/her wife/husband and children?
<dminuoso>
Bish: My experience with savon is: dont use it.
<dminuoso>
Use SOAP manually.
<Bish>
how does one do that
<Bish>
like Net::Http manually?
<arahael>
Bish: Regular expressions and dark magic. (No, don't do that).
<apeiros>
you send an email to you when a request should be done. then you type the XML by hand and send it via curl. then you use your database tool to enter the response as a record.
<Bish>
i can't be worse
<Bish>
than this shit
<dminuoso>
Bish: Well savon is great until you need to use non-basic features not supported by savon.
<Bish>
like.. doing a normal call?
<dminuoso>
soap has no notion of "normal"
<Bish>
last time i used it, i read it all on github
<arahael>
Frankly, with most scripting languages, I'd just get the http response, shove it into an XML parser, and use it as-is. Manually.
<Bish>
and figured i could do everything with build_request or whatever
drale2k_ has quit [Ping timeout: 264 seconds]
<arahael>
And fix it whenever it breaks.
<dminuoso>
Bish: Chances are you dont need most of SOAP magic. So arahael's suggestion will actually work for a lot of cases.
<Bish>
but this code has stopped working for 123812381283 times now and im getting pissed
hanmac has joined #ruby
<arahael>
Bish: Did it stop working because of some weird subtlety in SOAP, or because the soap library was buggy?
<Bish>
to be hoenst: i have no clue, i am trying to connect magento. they might have changed something in their crappy soap api
<dminuoso>
SOAP is AbstactEnterpriseJavaBuzzwordMachineryBeanStalkerMagicPatternFactory applied to internet.
<arahael>
dminuoso: Bonus points when it doesn't work with stock .NET, and you require a week of consultancy just to connect it, but it DOES work in SoapUI! :(
sysvalve has quit [Read error: Connection reset by peer]
conta has quit [Ping timeout: 268 seconds]
x77686d has quit [Quit: x77686d]
tpendragon has quit [Remote host closed the connection]
giraffe has quit [Remote host closed the connection]
Charliebr73 has joined #ruby
ferr has joined #ruby
ferr has left #ruby [#ruby]
<zenspider>
Radar: I believe I've banned bish before in the past. maybe this should be final?
conta has joined #ruby
<arahael>
I'm not an op on freenode, but I'd tend not to like permanent bans. Besides, they could evade.
<Radar>
I like whackamole.
<arahael>
Heh - I'm too lazy to do whackamole. It's why I avoid being an OP. :)
<Radar>
This ban is only a week long anyway.
<zenspider>
arahael: get back to me after being in here for >10 years. :P
<Radar>
All bot bans are a week long.
jyaworski has quit [Ping timeout: 276 seconds]
<zenspider>
rdfind... where have you been all my life? fdupes has nothing on you.
<arahael>
zenspider: Heh. I haven't been in a channel constantly for 10 years. :)
<zenspider>
maybe they needed more permanent bans
<zenspider>
tho now that we do everything via bot, looks like some (all?) of our perms are gone
<Radar>
zenspider: I'm only tracking one ban in my logs from Bish.
<zenspider>
I wonder if they'le wander back in or not
<Radar>
I've asked them in PM to show their code + explain their problem first thing so maybe next time they'll be better?
kedare has joined #ruby
sysvalve has joined #ruby
<zenspider>
looking at the logs... I've had interactions with this person back to 2014 or so... a couple accusations of trolling... I should have banned them in 2014 in one interaction but I just /ignored instead for some reasone
RougeR has joined #ruby
RougeR has joined #ruby
RougeR has quit [Changing host]
guille-moe has quit [Ping timeout: 276 seconds]
<zenspider>
not a good citizen as far as I'm concerned... but... *shrug*
kapil___ has joined #ruby
biberu has joined #ruby
ur5us has quit [Remote host closed the connection]
kedare has quit [Quit: Konversation terminated!]
GodFather_ has joined #ruby
donofrio has joined #ruby
Puffball has joined #ruby
guille-moe has joined #ruby
_aeris_ has quit [Read error: Connection reset by peer]
ta_ has quit [Remote host closed the connection]
inerthia has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
banisterfiend has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
sepp2k has joined #ruby
n008f4g_ has joined #ruby
_antares_ has joined #ruby
marr has joined #ruby
vondruch has quit [Ping timeout: 255 seconds]
gheegh has joined #ruby
konsolebox has quit [Max SendQ exceeded]
bmn has joined #ruby
chouhoulis has quit [Remote host closed the connection]
za1b1tsu has joined #ruby
chouhoulis has joined #ruby
konsolebox has joined #ruby
chouhoulis has quit [Ping timeout: 268 seconds]
vondruch has joined #ruby
gheegh has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bmurt has joined #ruby
za1b1tsu has quit [Quit: WeeChat 2.1]
rfoust has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dn` has quit [Ping timeout: 255 seconds]
houhoulis has quit [Ping timeout: 256 seconds]
dn` has joined #ruby
banisterfiend has joined #ruby
anisha has quit [Quit: This computer has gone to sleep]
venmx has joined #ruby
gheegh has joined #ruby
alfiemax has quit [Remote host closed the connection]
amar_ has joined #ruby
banisterfiend has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jottr has joined #ruby
amar has quit [Ping timeout: 264 seconds]
jyaworski has joined #ruby
alfiemax has joined #ruby
banisterfiend has joined #ruby
macduck has joined #ruby
jyaworski has quit [Ping timeout: 260 seconds]
alfiemax has quit [Ping timeout: 240 seconds]
<dminuoso>
Rage time.
<dminuoso>
undefined method `strip' for #<Array:0x007fb52307b6a8>
<dminuoso>
Nice.
_aeris_ has quit [Ping timeout: 255 seconds]
k0mpa has quit [Ping timeout: 255 seconds]
jottr has quit [Quit: WeeChat 2.1]
houhoulis has joined #ruby
<banisterfiend>
dminuoso why would you expect to work homie
jottr has joined #ruby
andikr has quit [Remote host closed the connection]
_aeris_ has joined #ruby
giraffe has quit [Changing host]
giraffe has joined #ruby
giraffe has joined #ruby
zumbi_ is now known as zumbi
<dminuoso>
banisterfiend: I wouldn't.. but for so many reasons it's annoying to have this bug in the first place.
<dminuoso>
:|
<banisterfiend>
in your own code? or 3rd party?
<dminuoso>
Yes.
jottr has quit [Read error: Connection reset by peer]
CBebop has joined #ruby
tomphp has joined #ruby
rwb has quit [Ping timeout: 248 seconds]
venmx has quit [Ping timeout: 240 seconds]
txdv has joined #ruby
<txdv>
argghhhhH!!!!
venmx has joined #ruby
<txdv>
Ruby is the only true "OOP" language, where you "send messages" between objects, what are the design implifications of that when coding ruby?
<txdv>
does it enable only dynamic functionality ala active record?
<tobiasvl>
txdv: what?
<dminuoso>
txdv: Ruby is not original. It's a feature inherited by Smalltalk.
<dminuoso>
txdv: Some other languages have incorporated the Smalltalk model of OOP where objects talk to each other by means of messages.
<txdv>
please specify "some other languages"
n008f4g_ has quit [Ping timeout: 240 seconds]
<dminuoso>
txdv: Erlang, Python
<tobiasvl>
scala
<txdv>
of all the languages, python?
<txdv>
how scala?
<tobiasvl>
txdv: what exactly do you want answered here? or what do you want to discuss exactly?
<dminuoso>
txdv: It greatly influenced the actor model which goes beyond focusing on a single language. Which is very frequently used in the erlang/elixir world.
<dminuoso>
And any other language where actor model is a thing.
<txdv>
the benefits of passing messages between objects like ruby does
<dminuoso>
txdv: Ruby does it under the hood
<dminuoso>
txdv: Beyond some metaprogramming techniques its not properly or widely use.
howdoi has quit [Quit: Connection closed for inactivity]
<dminuoso>
Most dont think in terms of messages and receiver, but procedures attached to classes (aka methods)
gokhan_ has joined #ruby
<dminuoso>
So it's usually used as a vehicle to make dynamic dispatch easier (as in command passing)
<dminuoso>
(*command pattern)
banisterfiend has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<dminuoso>
But without the crazy overhead of trying to encapsulate the command into a separate class
<txdv>
you mean overhead of additional code in static languages?
<txdv>
staticly typed languages
<dminuoso>
txdv: It's not about static typing, but rather languages that are too much based on simula object orientation.
drona6 has quit [Ping timeout: 260 seconds]
venmx has quit [Ping timeout: 240 seconds]
<dminuoso>
Where Java may need an entire freaking class to encapsulate the notion of "the command foo" that you have to construct (possibly with factories involved), you can just fling `:foo` around in Ruby.
<canton7>
from the languages which use "message passing" that I've used (which don't include things like erlang or elixir, granted), the only practical difference I've noticed is the ability to say "when someone calls a method on this class, which I haven't defined, run this code instead of raising an error"
<dminuoso>
invoking it amounts to just sending `:foo` to an object. We rarely think in Smalltalk terms sadly.
<canton7>
(and perhaps to easily say "invoke the method foo on an object", without the overhead of reflection)
<dminuoso>
canton7: Yup. And even from that it's usually only DSLs that use that feature.
<dminuoso>
`jimweirich/builder` is a prime example of this
drona6 has joined #ruby
<txdv>
looks like a nice lib
<txdv>
looks like the maintainer also died 5 years ago
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
vondruch has joined #ruby
kapil___ has quit [Quit: Connection closed for inactivity]
ramfjord has joined #ruby
<ujjain2>
payload = "{'apikey': 'blabla´... how can I make this allow newspaces?
<ujjain2>
hey, how did I end up in #ruby -my bad
<ujjain2>
newlines by the way lol
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
alfiemax_ has joined #ruby
aupadhye has quit [Quit: Leaving]
jyaworski has quit [Ping timeout: 240 seconds]
DataChunk has joined #ruby
raynold has quit [Quit: Connection closed for inactivity]
ramfjord has quit [Ping timeout: 260 seconds]
mroutis has joined #ruby
n0m4d1c has joined #ruby
rodd has joined #ruby
venmx has quit [Ping timeout: 264 seconds]
alfiemax_ has quit [Ping timeout: 248 seconds]
alfiemax has joined #ruby
Charliebr73 has quit []
chocoelho has joined #ruby
tvw has quit [Ping timeout: 268 seconds]
TomyWork has quit [Quit: Leaving]
Burgestrand has quit [Quit: Closing time!]
dhollin3 is now known as dhollinger
Rapture has joined #ruby
TomyWork has joined #ruby
saTchymoto has quit []
nausea has joined #ruby
nausea has joined #ruby
nausea has quit [Changing host]
alfiemax_ has joined #ruby
alfiemax has quit [Ping timeout: 276 seconds]
rwb has joined #ruby
RougeR has joined #ruby
RougeR has joined #ruby
RougeR has quit [Changing host]
n0m4d1c has quit [Remote host closed the connection]
alfiemax_ has quit [Ping timeout: 240 seconds]
cschneid_ has joined #ruby
biberu has quit []
alfiemax has joined #ruby
dionysus69 has joined #ruby
chocoelho has quit [Quit: Konversation terminated!]
drale2k_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<TomyWork>
apeiros i just found the culprit for that error on monday: when_rendering :console do |(cert, crl)| ... # array deconstruction in a block argument list isn't supported in ruby 1.8.7, i guess
weird_error has joined #ruby
alfiemax_ has joined #ruby
ryzokuken has quit [Read error: Connection reset by peer]
Burgestrand has joined #ruby
Cavallari has quit [Quit: Cavallari]
<TomyWork>
at least the next line says "CA expiration is now #{cert.content.not_after}\n", so there's the "content" i was looking for. dunno why i didnt find that with grep
cyberg has joined #ruby
alfiemax has quit [Ping timeout: 256 seconds]
houhoulis has quit []
minimalism has joined #ruby
mozzarella has joined #ruby
troys has joined #ruby
conta has quit [Ping timeout: 264 seconds]
RougeT430 has joined #ruby
Burgestrand has quit [Quit: Closing time!]
rouget430__ has joined #ruby
banisterfiend has joined #ruby
RougeR has quit [Read error: Connection reset by peer]
suukim has quit [Quit: Konversation terminated!]
jyaworski has joined #ruby
gheegh has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
RougeT430 has quit [Ping timeout: 264 seconds]
amar_ has quit [Ping timeout: 264 seconds]
schneider- has quit [Ping timeout: 276 seconds]
rippa has joined #ruby
banisterfiend has quit [Ping timeout: 240 seconds]
jyaworski has quit [Ping timeout: 260 seconds]
roshanavand has quit [Ping timeout: 264 seconds]
KCmetro has joined #ruby
anisha has joined #ruby
anisha has quit [Client Quit]
drale2k_ has joined #ruby
iceden has quit [Remote host closed the connection]
iceden has joined #ruby
weird_error has quit [Quit: weird_error]
tomphp has joined #ruby
GodFather_ has quit [Ping timeout: 248 seconds]
hays_ has joined #ruby
hays_ has joined #ruby
hays_ has quit [Changing host]
<hays_>
if I am using chruby, would this conflict with rbenv if I wanted to start using that?
moss has joined #ruby
<moss>
I'm using ruby to test if 2 files exist, and it is not working. I'm doing the following: if File.exists?(variable1) && File.exists?(variable2)
alfiemax_ has quit [Remote host closed the connection]
RougeT430 has joined #ruby
<moss>
It is not working. I'm getting "no implicit conversion of nil into String"
<darix>
moss: one of your 2 variables is nil
<moss>
both variables are set though
<moss>
im looking right at it
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
clemens3 has quit [Ping timeout: 240 seconds]
<darix>
moss: gem install pry -> add require 'pry';binding.pry before that if line
rouget430__ has quit [Read error: Connection reset by peer]
rouget430__ has joined #ruby
<moss>
darix: if i do that statement without the '&&' and test each variable individually, they both work
<moss>
looking up what pry does now...
ryzokuken has joined #ruby
FrostCandy has quit [Remote host closed the connection]
RougeT430 has quit [Ping timeout: 248 seconds]
jcarl43 has joined #ruby
FrostCandy has joined #ruby
KCmetro has quit [Quit: Leaving...]
<darix>
moss: it will give you an interactive shell into your script right at that position
<moss>
yeah - the problem is that this is in chef
<moss>
i thought i was doing something incorrect w/ Ruby
<hays_>
is it possible to have different gemsets for the same version of ruby using rbenv?
cagomez has joined #ruby
<nzst>
hays_: if you use bundle you can have different gemsets on a per project / folder basis. I'm not sure about multiple global gemsets
<darix>
hays_: gemfile
FrostCandy has quit [Ping timeout: 248 seconds]
Yzguy has joined #ruby
<hays_>
darix: does that include executables?
<hays_>
like those in bin/
amar has joined #ruby
<hays_>
as part of the gme
<darix>
hays_: it depends on what you want to do exactly
<elomatreb>
If you prefix with `bundle exec`, yes. Otherwise, no
amar has quit [Remote host closed the connection]
<darix>
hays_: if you do "bundle install" then the bin stubs will also end up in your app dir
<darix>
(with the right options)
amar has joined #ruby
<elomatreb>
Or binstubs, right
<darix>
for opensuse we add suffixes to the system wide gem stubs
<darix>
and last but not least
<darix>
you can do things like
<darix>
rails _5.1.2_ <other args>
<darix>
to force a certain version
<darix>
so many options
DataChunk has quit [Ping timeout: 248 seconds]
ellcs has quit [Remote host closed the connection]
gokhan_ has quit [Remote host closed the connection]
mr_foto has quit []
nitric has joined #ruby
s2013 has joined #ruby
roobie has joined #ruby
<roobie>
hi
<roobie>
anyone know any spree channels
Bacta has quit [Quit: Leaving]
roobie has quit [Client Quit]
x77686d has joined #ruby
jyaworski has joined #ruby
orbyt_ has joined #ruby
<hays_>
what are best practices for gem update and gem update --system on production systems?
<hays_>
I guess it doesn't really matter too much as long as the gems get installed
jyaworski has quit [Ping timeout: 264 seconds]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hays_ has quit [Remote host closed the connection]
inerthia has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<havenwood>
hays: There are occasional CVEs and depending on how you've installed Ruby, it may be up to you to update RubyGems.
spiette has quit [Remote host closed the connection]
<havenwood>
hays: If a package manager isn't taking care of updating/backporting, then I'd regularly run: gem update --system
<havenwood>
Or at least watch for new releases and update.
rouget430__ has quit [Ping timeout: 268 seconds]
FrostCandy has joined #ruby
<elomatreb>
They're gone already
jottr has joined #ruby
cliluw has quit [Ping timeout: 248 seconds]
cliluw has joined #ruby
tomphp has joined #ruby
bmurt has joined #ruby
nicesignal has quit [Read error: Connection reset by peer]
nicesignal has joined #ruby
roshanavand has joined #ruby
Arney has joined #ruby
<Arney>
if i have a dsl in the form of config { |var1| someOtherThing { |var2| ...dostuff... } } how would i get the value of var1 inside "someOtherThing"
<havenwood>
Arney: Just: var1
<Arney>
yeah, but i don't know if #{programer} decides to use the name "var1"
<Arney>
im trying tp enable the programmer to write config files that way
<Arney>
so it would be cool if i find a generalized way of getting the first parameter of the "root" block
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
spiette has joined #ruby
<Arney>
but i guess i won't another way then creating a namespace of some sort, right?
karapetyan has quit [Remote host closed the connection]
TomyWork has quit [Ping timeout: 240 seconds]
amar has joined #ruby
ldepandis has joined #ruby
bmurt has quit [Ping timeout: 260 seconds]
larcara has quit [Ping timeout: 240 seconds]
cliluw has quit [Ping timeout: 264 seconds]
amar has quit [Ping timeout: 265 seconds]
amar has joined #ruby
xenops has joined #ruby
ericmathison has quit [Ping timeout: 265 seconds]
c_nick has joined #ruby
<c_nick>
3
c_nick has left #ruby [#ruby]
xenops has quit [Client Quit]
ericmathison has joined #ruby
larcara has joined #ruby
amar has quit [Ping timeout: 265 seconds]
nitric_ has joined #ruby
kapil___ has joined #ruby
alfiemax has quit [Remote host closed the connection]
larcara has quit [Client Quit]
rubemlrm has joined #ruby
nitric has quit [Ping timeout: 256 seconds]
jottr has quit [Ping timeout: 240 seconds]
karapetyan has joined #ruby
alfiemax has joined #ruby
jyaworski has joined #ruby
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
sameerynho has joined #ruby
jyaworski has quit [Ping timeout: 248 seconds]
vircung has quit [Quit: Nothing to do here]
clemens3 has joined #ruby
<Mike11>
if variables prefixed with @ are instance variables, and ones prefixed with @@ are class variables, what about variable that aren't prefixed neither with @ nor with @@?
<Mike11>
are they no allowed at all?
<elomatreb>
They're just "regular" local variables
<clemens3>
Mike11: local variable
<elomatreb>
I.e. they only exist in the scope where they were defined
<Mike11>
so, if they were defined in a class (where class variables would be normally defined). what would be its scope?
<Mike11>
shouldn't be accessible from any function within that class?
<Mike11>
shouldn't it*
alfiemax has quit [Remote host closed the connection]
<apeiros>
no it shouldn't
<apeiros>
they're only accessible to code within the class body
<Mike11>
apeiros: I see, thanks :)
<apeiros>
`def` creates a new local variable scope. that's why each method has its own.
<Mike11>
so, local variables in a scope aren't accessible from a nested scope, right?
<Mike11>
apeiros: ^^
<apeiros>
things which create new local variable scopes: `class`, `module`, `def` and to a degree blocks.
DataChunk has joined #ruby
<apeiros>
I don't think they're considered nested. so, no, they aren't accessible from "nested" scope.
jenrzzz has quit [Quit: Lost terminal]
jyaworski has joined #ruby
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
alfiemax has joined #ruby
sauvin has quit [Remote host closed the connection]
<jhass>
Radar: nope, just got lucky to get my PR merged
amar has joined #ruby
vircung has joined #ruby
alfiemax has quit [Ping timeout: 240 seconds]
jyaworski has quit [Ping timeout: 256 seconds]
guille-moe has quit [Ping timeout: 248 seconds]
pilne has joined #ruby
ramfjord has joined #ruby
ldepandis has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
c0ncealed1 has quit [Remote host closed the connection]
c0ncealed1 has joined #ruby
x77686d has quit [Quit: x77686d]
Cavallari has joined #ruby
bmurt has joined #ruby
amatas has quit [Quit: amatas]
bmurt has quit [Client Quit]
ellcs has joined #ruby
x77686d has joined #ruby
x77686d has quit [Client Quit]
alfiemax has joined #ruby
biberu has quit []
ellcs has quit [Ping timeout: 264 seconds]
Mondongo has joined #ruby
alfiemax has quit [Ping timeout: 268 seconds]
Mike11 has quit [Quit: Leaving.]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Drakevr has quit [Ping timeout: 256 seconds]
bmurt has joined #ruby
GodFather_ has joined #ruby
bmurt has quit [Ping timeout: 260 seconds]
jyaworski has joined #ruby
brent__ has joined #ruby
karapetyan has quit [Remote host closed the connection]
jyaworski has quit [Ping timeout: 248 seconds]
karapetyan has joined #ruby
mroutis has quit [Ping timeout: 240 seconds]
<dionysus69>
are you using frozen_string_literal: true
jottr has joined #ruby
jenrzzz has quit [Ping timeout: 276 seconds]
cliluw has joined #ruby
sammi`_ has joined #ruby
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jottr has quit [Ping timeout: 260 seconds]
cagomez has quit [Remote host closed the connection]
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
cagomez has joined #ruby
karapetyan has quit [Remote host closed the connection]
alfiemax has joined #ruby
orbyt_ has joined #ruby
sammi` has quit [Quit: Lost terminal]
karapetyan has joined #ruby
s2013 has joined #ruby
x77686d has joined #ruby
ta_ has quit [Remote host closed the connection]
cagomez has quit [Ping timeout: 240 seconds]
jamiejackson has joined #ruby
jottr has joined #ruby
karapetyan has quit [Remote host closed the connection]
x77686d has quit [Quit: x77686d]
cagomez has joined #ruby
conta has joined #ruby
ramfjord has quit [Ping timeout: 256 seconds]
cagomez has quit [Ping timeout: 248 seconds]
x77686d has joined #ruby
conta has quit [Remote host closed the connection]
drona6 has quit [Quit: leaving]
alfiemax has quit [Remote host closed the connection]
voker57 has quit [Remote host closed the connection]
EvilJStoker has quit [Remote host closed the connection]
alfiemax has joined #ruby
ta_ has joined #ruby
n0m4d1c_ has joined #ruby
n0m4d1c_ has quit [Remote host closed the connection]