JeanCarloMachado has quit [Ping timeout: 260 seconds]
binarycodess has quit [Quit: binarycodess]
binarycodess has joined #ruby
binarycodess has quit [Client Quit]
JeanCarloMachado has joined #ruby
BTRE has quit [Read error: Connection reset by peer]
harfangk has joined #ruby
binarycodess has joined #ruby
binarycodess has left #ruby [#ruby]
binarycodess has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
def_jam has joined #ruby
eb0t_ has joined #ruby
gigetoo has quit [Ping timeout: 260 seconds]
eblip has quit [Ping timeout: 240 seconds]
eb0t has quit [Ping timeout: 260 seconds]
last_staff has quit [Quit: last_staff]
andikr has joined #ruby
gigetoo has joined #ruby
boz_ has joined #ruby
raul782 has joined #ruby
binarycodess has quit [Quit: binarycodess]
binarycodess has joined #ruby
jamesaxl has joined #ruby
last_staff has joined #ruby
ctompkinson has joined #ruby
qba73 has quit []
raul782 has quit [Remote host closed the connection]
raul782 has joined #ruby
kernelPaniq has joined #ruby
binarycodess has quit [Quit: binarycodess]
ctompkinson has quit [Ping timeout: 260 seconds]
jusa has joined #ruby
flying has joined #ruby
charliesome has joined #ruby
InsaneSplash has joined #ruby
<InsaneSplash>
morning, could someone tell me what this content looks like in Ruby, is this a hash? #<TEXT:0x815e32c0
esObe_ has joined #ruby
<havenwood>
InsaneSplash: That looks like an instance of a TEXT, whatever that is. Where's it from?
enterprisey has quit [Remote host closed the connection]
<havenwood>
InsaneSplash: Ask it its class?: #<TEXT:...>.class
<havenwood>
InsaneSplash: Consider taking a look at it with Pry.
<havenwood>
?pry
<ruby[bot]>
Pry, the better IRB, provides easy object inspection `ls`, `history`, viewing docs `?`, viewing source `$`, syntax highlighting and other features (see `help` for more). Put `binding.pry` in your source code for easy debugging. Install Pry (https://pryrepl.org/): gem install pry pry-doc
esObe_ has quit [Ping timeout: 240 seconds]
<InsaneSplash>
cool, i tried pp, but that didnt help
<InsaneSplash>
let me have a squiz
Silthias2 has quit [Ping timeout: 260 seconds]
Silthias has joined #ruby
BTRE has joined #ruby
raul782 has quit [Remote host closed the connection]
amclain has quit [Quit: Leaving]
patarr has joined #ruby
brianpWins has joined #ruby
Xiti has quit [Quit: Xiti]
TomyWork has joined #ruby
skweek has joined #ruby
astrobunny has quit [Remote host closed the connection]
Burgestrand has joined #ruby
patarr has quit [Ping timeout: 240 seconds]
astrobunny has joined #ruby
esObe_ has joined #ruby
solocshaw has joined #ruby
esObe_ has quit [Remote host closed the connection]
esObe_ has joined #ruby
aufi has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
cfec0b8d has quit [Remote host closed the connection]
xall has quit [Ping timeout: 260 seconds]
Rodya_ has joined #ruby
hutch34_ has joined #ruby
solocshaw has quit [Ping timeout: 246 seconds]
Arpanet69 has joined #ruby
cyphase has quit [Ping timeout: 240 seconds]
Rodya_ has quit [Ping timeout: 246 seconds]
djbkd has quit [Remote host closed the connection]
djbkd has joined #ruby
hutch34_ has quit [Ping timeout: 264 seconds]
cyphase has joined #ruby
mark_66 has joined #ruby
djbkd has quit [Ping timeout: 240 seconds]
Burgestrand has quit [Quit: Closing time!]
vondruch has joined #ruby
griff has joined #ruby
Arpanet69 has quit [Quit: Leaving]
solocshaw has joined #ruby
griff has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
grh has joined #ruby
Burgestrand has joined #ruby
DaniG2k has joined #ruby
blackmesa has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
duckpupp1 has joined #ruby
raul782 has joined #ruby
duckpupp1 has quit [Ping timeout: 240 seconds]
manjaro-kde5 has joined #ruby
__main__ has joined #ruby
jeyraof^mbpr has quit [Quit: This computer has gone to sleep]
ctompkinson has joined #ruby
nadir has quit [Quit: Connection closed for inactivity]
jeyraof^mbpr has joined #ruby
raul782 has quit [Ping timeout: 240 seconds]
Beams has joined #ruby
dionysus69 has joined #ruby
gdonald has quit [Read error: Connection reset by peer]
gdonald has joined #ruby
grillon_ has joined #ruby
govg has quit [Ping timeout: 264 seconds]
mim1k has joined #ruby
grillon_ has quit [Client Quit]
xall has joined #ruby
rgtk has joined #ruby
marr has joined #ruby
johnzorn has quit [Read error: Connection reset by peer]
johnzorn has joined #ruby
jeyraof^mbpr has quit [Quit: This computer has gone to sleep]
jeyraof^mbpr has joined #ruby
solocshaw has quit [Ping timeout: 246 seconds]
jsrn__ has joined #ruby
DaniG2k has quit [Quit: leaving]
nhhc has joined #ruby
xdqioh has joined #ruby
jlebrech has joined #ruby
<jlebrech>
is there a way for a yield inside of a block to set variable outside of the block rather than need to create a nil value before the block?
<matthewd>
jlebrech: No
govg has joined #ruby
<jlebrech>
bummer :)
lxsameer has joined #ruby
sepp2k has joined #ruby
patarr has joined #ruby
boz_ has quit [Quit: Leaving]
nofxxx has quit [Ping timeout: 268 seconds]
skweek has quit [Ping timeout: 240 seconds]
pandaant has joined #ruby
johnzorn has quit [Read error: Connection reset by peer]
<netmole>
well how to use code which executes when is no params [q ] or key in q datum_eq or sklad_id and recall controller with new search terms
Guest96 has quit [Remote host closed the connection]
<dminuoso>
netmole: mm, Im not sure whether its a wise idea to modify the ransack objec directly
<netmole>
well exist any other way
<centrx>
There is no code
<dminuoso>
Sure, you could do something like def defaultFilter; return { datum_eq: Date.current, cil_id_eq = Sklad.first.id }; end; and then inside your action you do: filters = params[:q] || defaultFilter(); @events = Event.search(filters).result
<dminuoso>
netmole: ^- something along those lines.
Guest96 has joined #ruby
hutch34_ has joined #ruby
<dminuoso>
Oh well, slight typo there in the Hash, but you get the idea.
<dminuoso>
Or better yet to keep things more testable:
cfec0b8d has joined #ruby
johnzorn has quit [Read error: Connection reset by peer]
<dminuoso>
netmole_: You can fix this with the following modification:
<dminuoso>
netmole_: @ransacked_object.sorts = "id DESC" if @ransacked_object.sorts.empty?
misthonk has quit [Quit: leaving]
<dminuoso>
If you want some default sort order.
<dminuoso>
netmole_: Or.. mm. I understand -> but you can still do the same thing. Just activate your brian.
<dminuoso>
Either use a different object to transport sort information, or just check whether params[:q] has anything beyond sort links.
<dminuoso>
netmole_: Keep in mind that I would be careful about default filters in the backend like this, as its opaque to the user.
<dminuoso>
I.e. if you could just default the search fields in the frontend, then your controller gets easier because it will provide *exactly* what its asked of.
rgtk has quit [Ping timeout: 240 seconds]
<dminuoso>
And you could immediately provide some visual clue to the user.
fergal has quit [Quit: fergal]
<dionysus69>
um any ideas how I can run ruboto example app I downloaded from ruboto repo on android?
cfec0b8d has joined #ruby
<dionysus69>
there's no documentation about that I could find
nhhc has quit [Quit: Leaving]
User458764 has joined #ruby
aupadhye has quit [Ping timeout: 260 seconds]
AnoHito has quit [Read error: Connection reset by peer]
AnoHito has joined #ruby
knight33 has joined #ruby
knight33 has quit [Client Quit]
cfec0b8d has quit [Ping timeout: 240 seconds]
raul782 has joined #ruby
GodFather has quit [Quit: Ex-Chat]
GodFather_ has joined #ruby
HoierM has joined #ruby
CloCkWeRX has quit [Quit: Leaving.]
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
duckpupp1 has quit [Quit: WeeChat 1.7]
ayonkhan has joined #ruby
raspado has joined #ruby
ctompkinson has joined #ruby
moeSizlak has joined #ruby
rwb has quit [Ping timeout: 260 seconds]
<moeSizlak>
any idea why installing filemagic gem wants to install 50 other gems, including rails, sinatra, etc?
<allisio>
moeSizlak: I think you probably used a different Ruby wrapper around libmagic.
<allisio>
There's a gem called ruby-filemagic that might be the one you used previously.
<mnemon>
moeSizlak: there's also ruby-filemagic with less dependencies
<allisio>
*fewer
<moeSizlak>
hmmm
bonhoeffer has joined #ruby
danielpclark has quit [Remote host closed the connection]
charliesome has joined #ruby
<canton7>
filemagic has a runtime dependency of rails, ruby-filemagic doesn't. I suspect you used ruby-filemagic before ;)
<allisio>
Why on earth does filemagic have rails as a dependency, though?
<Burgestrand>
Heh, because it provides a form builder helper.
cfec0b8d has joined #ruby
<Burgestrand>
Looks like it also provides controllers for upload/deletion.
<Burgestrand>
Quite simply it's a rails engine.
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<matthewd>
It still shouldn't actually depend on rails, but rather railties -- though that wouldn't really solve the "why am I downloading half the internet" problem
<allisio>
Brutal.
xall has quit [Ping timeout: 264 seconds]
<allisio>
dminuoso: I really want to pass a Proc to Binding#eval. Please halp.
hutch34_ has joined #ruby
<allisio>
InstructionSequence#to_s -> valid Ruby would be <3.
<shortCiruit__>
lets say there is class A def abc puts "super" end end . and class B < A end .. now if I say B.new.abc .. is it possible to know inside abc who called the method
<shortCiruit__>
the problem I am having is with the current setup of an application we have, the letter_opener is not working .. so we have a super class called template .. where I added a show_email method, which write the email to an html file in tmp/ . what I am facing problem is naming the output file .. so if its say EmailVerificationTemplate < EMailTemplate .. then EmailVerificationTemplate.new.show_email would create a file like email_ver
<shortCiruit__>
damn
blackmesa has joined #ruby
<shortCiruit__>
that was easy
<shortCiruit__>
:D
<shortCiruit__>
thanks
netmole has quit [Quit: Page closed]
mim1k has quit [Ping timeout: 246 seconds]
gsilva has joined #ruby
raul782 has quit [Ping timeout: 260 seconds]
blackmesa has quit [Ping timeout: 240 seconds]
cgibsonmm has joined #ruby
hutch34_ has joined #ruby
<moeSizlak>
thank you mnemon that was my problem
moeSizlak has left #ruby ["Leaving"]
milardovich has joined #ruby
jeffreylevesque has quit [Ping timeout: 240 seconds]
fmcgeough has joined #ruby
pulkit4tech has joined #ruby
pupsicle has joined #ruby
haxrbyte has joined #ruby
hutch34_ has quit [Ping timeout: 268 seconds]
haxrbyte has quit [Client Quit]
mim1k has joined #ruby
aupadhye has joined #ruby
milardovich has quit [Ping timeout: 260 seconds]
Burgestrand has quit [Quit: Closing time!]
hutch34_ has joined #ruby
last_staff has quit [Quit: last_staff]
netmole_ has quit [Ping timeout: 260 seconds]
InsaneSplash has quit []
GodFather_ has quit [Ping timeout: 268 seconds]
GodFather_ has joined #ruby
am55 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rwb has joined #ruby
jeffreylevesque has joined #ruby
hahuang61 has quit [Ping timeout: 246 seconds]
shortCiruit__ has quit [Ping timeout: 260 seconds]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
workmad3 has quit [Ping timeout: 240 seconds]
zun has joined #ruby
haxrbyte has quit [Client Quit]
gregf_ has quit [Ping timeout: 260 seconds]
patarr has quit [Ping timeout: 240 seconds]
sifu has joined #ruby
User458764 has joined #ruby
gk_1wm_su has joined #ruby
gk_1wm_su has quit [K-Lined]
mrgrieves has joined #ruby
Ishido has joined #ruby
raul782 has joined #ruby
ledestin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rgtk has joined #ruby
Burgestrand has quit [Quit: Closing time!]
DLSteve has joined #ruby
Ishido has quit [Client Quit]
Ishido has joined #ruby
Ishido has quit [Remote host closed the connection]
charliesome has joined #ruby
Ishido has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
patarr has joined #ruby
mim1k has quit [Ping timeout: 240 seconds]
Burgestrand has joined #ruby
mim1k has joined #ruby
<soahccc>
Do you guys prefer A: class MyException < ArgumentError; end or B: MyException = Class.new(ArgumentError)
<soahccc>
I find B cleaner but with A it's easier to read what it inherits from since it's directly next to each other
<allisio>
Semicolons are strictly verboten by some style guides.
<soahccc>
yeah I don't really like the 2 line version as well :D
<allisio>
The choice is clear.
<allisio>
Class.new with an argument should read just as clearly to anybody who knows the rudiments of the language.
Pumukel has quit [Remote host closed the connection]
patarr has quit [Ping timeout: 240 seconds]
uyptva has quit [Remote host closed the connection]
<soahccc>
allisio: that is true but I see A a lot in gems but Class.new I haven't seen in the wild so far
ctompkinson has quit [Ping timeout: 240 seconds]
<allisio>
soahccc: Read more code, I guess?
renchan has quit [Quit: Leaving...]
Pumukel has joined #ruby
zipper is now known as not-zipper
not-zipper is now known as zipper
ctompkinson has joined #ruby
vuoto has joined #ruby
milardovich has joined #ruby
patarr has joined #ruby
<allisio>
soahccc: Rake, RSpec, RuboCop, and Sequel all use `Class.new(StandardError)` all over the place.
raul782 has quit [Ping timeout: 240 seconds]
haylon has joined #ruby
<allisio>
As do thousands of other gems, I'm sure.
mim1k has quit [Ping timeout: 264 seconds]
pupsicle has quit [Remote host closed the connection]
<soahccc>
allisio: I will do that then I guess. I looked at the wrong gems it seems :) I just noticed that Sequel did it this way but with a weird ().name wrapper
mim1k has joined #ruby
b3l914n has joined #ruby
mello has quit [Remote host closed the connection]
bjfish2 has joined #ruby
<allisio>
soahccc: Only in one place, and it appears to be some kind of stop-gap.
solocshaw has joined #ruby
<allisio>
Oh, never mind. That is weird.
<allisio>
Are they doing that to appease the documentation generator or some such?
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<allisio>
soahccc: Huh. Good find. I've always assumed assigning to a constant was sufficient.
<jlebrech>
caller line number + 1 and monkey patch that method?
<allisio>
jlebrech: It's not clear what you're asking.
yeticry_ has joined #ruby
<soahccc>
allisio: so it's ruby cache? If I have to call name on them now I might as well just use the "old fashion" way?
<jlebrech>
say i want to put "add_new_line_to_all_puts" before def a_method_that_outputs_stuff
<allisio>
soahccc: Seems so. Feels like an unnecessary optimization to me.
<jlebrech>
i see those helper methods that perform an action on the next code
rgtk has quit [Ping timeout: 268 seconds]
workmad3 has joined #ruby
dysfigured has quit [Quit: I hate quit messages.]
dysfigured has joined #ruby
yeticry has quit [Ping timeout: 268 seconds]
User458764 has joined #ruby
<soahccc>
jlebrech: Do you really want this? I already hate the way private/protected works. I personally prefer blocks depending on the actual case
cfec0b8d has quit [Quit: Leaving.]
solocshaw has quit [Ping timeout: 246 seconds]
mim1k has quit [Ping timeout: 256 seconds]
cfec0b8d has joined #ruby
solocshaw has joined #ruby
<jlebrech>
soahccc: not per se, just wanted to know how it works
skweek has joined #ruby
<jlebrech>
soahccc: i'd rather have this type of code inside of what it wants to affect actually :)
griff has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mim1k has joined #ruby
<matthewd>
jlebrech: Probably method_added. Just find the source for one of the examples you're looking at?
vuoto has quit [Remote host closed the connection]
dysfigured has quit [Client Quit]
dysfigured has joined #ruby
<jlebrech>
matthewd: that would be nasty to code :)
JeanCarloMachado has quit [Ping timeout: 260 seconds]
<soahccc>
jlebrech: in case of instrument_method in your example they use class variables (sorta class globals) to "remember" that the next method is going to be instrumented. How they actually hook into the method? Dirty (imho) metaprogramming... See here https://github.com/skylightio/skylight-ruby/blob/master/lib/skylight/helpers.rb#L81
<soahccc>
And yes it's based on method_added as matthewd said
Bock has quit [Ping timeout: 260 seconds]
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dionysus69 has quit [Ping timeout: 260 seconds]
<jlebrech>
ew, i'd rather use caller and do the magic from a method.
__Yiota has joined #ruby
BSaboia has quit [Quit: Leaving]
mephistophocles has joined #ruby
patarr has quit [Ping timeout: 240 seconds]
__Yiota has quit [Client Quit]
RobertBirnie has joined #ruby
Toledo has joined #ruby
JeanCarloMachado has joined #ruby
synthroid has joined #ruby
narval has joined #ruby
Mon_Ouie has joined #ruby
cdg has joined #ruby
ldnunes has quit [Quit: Leaving]
ldnunes has joined #ruby
rakm has joined #ruby
patarr has joined #ruby
skweek has quit [Ping timeout: 260 seconds]
gk_1wm_su has joined #ruby
gk_1wm_su has quit [K-Lined]
joelwallis has joined #ruby
ctompkinson has quit [Ping timeout: 240 seconds]
planigan has joined #ruby
manjaro-kde5 has quit [Ping timeout: 240 seconds]
__Yiota has joined #ruby
Lord_of_Life has joined #ruby
[Butch] has joined #ruby
shinnya has joined #ruby
pulkit4tech has quit [Quit: Connection closed for inactivity]
bjfish2 has left #ruby [#ruby]
ledestin has joined #ruby
davix has quit [Ping timeout: 246 seconds]
jgpawletko has joined #ruby
cpruitt has joined #ruby
ledestin has quit [Ping timeout: 240 seconds]
jgpawletko has quit [Client Quit]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
LuckyABA has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ctompkinson has joined #ruby
etehtsea has joined #ruby
hahuang61 has joined #ruby
anisha has quit [Quit: Leaving]
marr has quit [Ping timeout: 256 seconds]
jusa has joined #ruby
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
howlinbash has quit [Ping timeout: 240 seconds]
synthroid has quit [Remote host closed the connection]
hahuang61 has quit [Ping timeout: 256 seconds]
cschneid_ has joined #ruby
JeanCarloMachado has quit [Ping timeout: 246 seconds]
kristofferR has joined #ruby
mark_66 has quit [Remote host closed the connection]
JeanCarloMachado has joined #ruby
dionysus69 has joined #ruby
etehtsea has quit [Ping timeout: 240 seconds]
minimalism has quit [Quit: minimalism]
etehtsea has joined #ruby
minimalism has joined #ruby
tqswkk has joined #ruby
rakm has quit [Remote host closed the connection]
TomyWork has quit [Ping timeout: 240 seconds]
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
LuckyABA has joined #ruby
Bock has joined #ruby
Bock has quit [Max SendQ exceeded]
__Yiota has joined #ruby
cgibsonmm has quit [Ping timeout: 246 seconds]
howlinbash has joined #ruby
mim1k has quit [Ping timeout: 268 seconds]
solocshaw has quit [Ping timeout: 240 seconds]
Bock has joined #ruby
gizmore|2 has joined #ruby
rakm has joined #ruby
gizmore has quit [Ping timeout: 260 seconds]
jcao219 has joined #ruby
raul782 has joined #ruby
cyberRodent has quit [Ping timeout: 260 seconds]
Pumukel has quit [Remote host closed the connection]
mim1k has joined #ruby
Pumukel has joined #ruby
Pumukel has quit [Remote host closed the connection]
Pumukel has joined #ruby
JeanCarloMachado has quit [Ping timeout: 260 seconds]
raul782 has quit [Remote host closed the connection]
synthroid has joined #ruby
raul782 has joined #ruby
TomyLobo has joined #ruby
Pumukel has quit [Ping timeout: 240 seconds]
am55 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cfec0b8d has quit [Remote host closed the connection]
nowhereman has quit [Ping timeout: 240 seconds]
Mon_Ouie has quit [Ping timeout: 260 seconds]
Hekata has quit [Quit: Leaving]
rakm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
sifu has quit [Ping timeout: 260 seconds]
Mon_Ouie has joined #ruby
aufi has quit [Quit: Leaving]
JeanCarloMachado has joined #ruby
<allisio>
jlebrech: One slightly gross way to do it without #method_added is to take advantage of the fact that method definition resolves to a Symbol for the method name.
marcdel has quit [Ping timeout: 268 seconds]
<jlebrech>
allisio: something like a hypothetical: `rainbowify_methods :method1, :method2`
<matthewd>
allisio: That's not gross... that's *why* the method definition now returns the symbol
<allisio>
matthewd: Well, sure, it's so that you can say `private def foo...`, but I think they should've gone whole-hog with it and made bespoke method "decoration" easy.
<allisio>
matthewd: I once tried to make it look like how Python does it, but just mentioning an instance variable doesn't trigger anything in TracePoint.
<dminuoso>
allisio: There's nothing my Fiddle cant fiddle.
<dminuoso>
:-)
impermanence has joined #ruby
<impermanence>
Is there a channel for more chat-related questions, as opposed to strictly Ruby language-related questions? I have a question about Ruby and SysOps culture.
flying has quit []
hotpancakes has quit [Remote host closed the connection]
<allisio>
baweaver's your man.
hotpancakes has joined #ruby
hotpancakes has quit [Remote host closed the connection]
hotpancakes has joined #ruby
<havenwood>
impermanence: ask away
<impermanence>
havenwood: give me a second to type it out, please.
<impermanence>
well, I guess I'll make it succint:
t-recx has quit [Quit: t-recx]
<sonOfRa>
allisio: I don't quite understand that solution
aryaching has joined #ruby
<sonOfRa>
Maybe my question wasn't well-formed
<allisio>
No, perhaps not. I thought you wanted to know the period of the key for a Vigenère cipher.
<allisio>
What is your input and expected output?
<impermanence>
havenwood: I notice that a lot of senior level DevOps position I look at out of the Silicon Valley area prefer knowledge in Ruby, it seems for SysOps work beyond configuration management tools (i.e. Chef, Puppet). What I'm trying to understand is, for what? Are these companies actually doing SysOps work in Ruby? I know this is possible...but wha
<impermanence>
t else could it be for? So I am a bit confused.
masterasia has quit [Quit: Leaving]
<sonOfRa>
oooh, I see now
<sonOfRa>
Question was well-formed, and the answer now makes sense
<allisio>
Good deal.
<allisio>
/(\w+)\1/ matches some sequence of "word" characters followed by itself; you can take half the length of that result to find the size of the word that's being repeated to form the key.
<havenwood>
impermanence: They may have internal tooling and apis written in Ruby as well. It's a popular lang for such things.
cfec0b8d has quit [Ping timeout: 256 seconds]
blackmesa has joined #ruby
tdy has quit [Quit: tdy]
cfec0b8d has joined #ruby
ltem has joined #ruby
hotpancakes has quit [Remote host closed the connection]
cgibsonmm has joined #ruby
cgibsonm_ has quit [Ping timeout: 246 seconds]
Mon_Ouie has quit [Read error: No route to host]
Mon_Ouie has joined #ruby
<havenwood>
impermanence: They may not be sticklers on it being Ruby if you're able to quickly make command line apps and apis in another lang. Depends.
<impermanence>
havenwood: hm. I suppose the API thing is a good point. I was just trying to figure out if there is going to be a trend in SysOps of: Bash+Python (current state, typical) -> Ruby
<havenwood>
impermanence: I'd think shell scripting as well as Python or Ruby makes perfect sense.
* dminuoso
votes for a new if-syntax: puts foo not if havenwood.nil?
<havenwood>
impermanence: More silicon valley shops might be already using Ruby for other things and just naturally lean in that direction.
johnzorn has quit [Read error: Connection reset by peer]
<allisio>
dminuoso: Huh?
johnzorn has joined #ruby
<nofxx>
ruby for *nix admin is perfect, just fun... as everything ruby
<nofxx>
dminuoso, you can write yrself some coffeescript
<dminuoso>
allisio: But that's against Ruby's policy of making the language read well!
<impermanence>
havenwood: Right. Hence my concern. I'm going to be applying for these jobs, but I'm worried if I dive headlong into Ruby I'll be pinning myself against a corner for all the less-than-bleeding-edge companies that are still a bit behind...
<allisio>
dminuoso: Oh, I see now. Sticking a comma in your original made it make sense.
<allisio>
What you're really saying is we need a `but` keyword.
<matthewd>
my123: (though we should probably head over to #rubyonrails if that doesn't get it going)
<allisio>
dminuoso: Would it be harder to apply the same optimizations to `if not`?
<my123>
matthewd, tried bundle exec... same behavior
<my123>
It works on the Windows Subsystem for Linux, but with around 30-90 seconds *per request*, so...
<impermanence>
havenwood: sorry for the late response. Ruby, of course.
<dminuoso>
allisio: I'd have to look at it to be sure, but from what I remember it should be as trivial.
blackmesa has quit [Ping timeout: 240 seconds]
<matthewd>
my123: Okay, let's continue in #rubyonrails
hotpanca_ has joined #ruby
<impermanence>
havenwood: Let me ask another question. Does Ruby have the gems to be able to speak deeply to a Linux kernel/OS such as Bash and Python? And therefore actually be a viable scripting language?
<matthewd>
Is anyone really going to write `if not`? :/
<matthewd>
`if !`, sure.. but you can't optimize that
<Mon_Ouie>
No, 'unless' just doesn't implicitly call #!
<allisio>
Shouldn't it?
hotpancakes has quit [Ping timeout: 246 seconds]
<matthewd>
Oh, I didn't realise `not` did
<dminuoso>
allisio: No it shouldn't.
<dminuoso>
allisio: All "unless" does is insert an "if" but reverse the branch targets.
<Mon_Ouie>
I don't really think it matters, the problem with defining #! is that the behavior of 'if x' can't be changed
<dminuoso>
^-
binarycodess has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<matthewd>
+1.. "shouldn't unless call #!" heads down a path of "shouldn't if call #! twice", etc
<dminuoso>
Besides, calling #! would have some serious performance impact.
youmu_ has quit [Quit: Connection closed for inactivity]
blackmesa has joined #ruby
hndk has quit [Remote host closed the connection]
binarycodess has joined #ruby
binarycodess has quit [Client Quit]
<dminuoso>
allisio: Interesting yeah, I also was not aware of not calling !, this makes it impossible for the compiler to optimize it.
<dminuoso>
I mean on a limb case could be made for optimizing the case of "if not nil/false" on the assumption that if someone modified NilClass#! they deserve to have their code break, but it still would have no value.
<matthewd>
It does make sense... `and` and `or` aren't more boolean than `&&` / `||`.. so it follows that `not` is strictly a low-associativity spelling of `!`
<dminuoso>
matthewd: Well it's still very interesting as "and/or" are commonly advertised as code flow mechanisms.
aete has joined #ruby
<dminuoso>
At least in the resources that I read, which may not be very representative.
minimalism has joined #ruby
blackmesa has quit [Ping timeout: 240 seconds]
<matthewd>
Yeah, I subscribe to that viewpoint. Which arguably makes `not` a bit weird just for existing, though I guess the argument would be that it's reasonable *inside* an and/or using expression -- though not on its own.
kirun has joined #ruby
skweek has joined #ruby
<dminuoso>
matthewd: I suppose I finally found a good argument for !using "not" anymore. :)
aete has quit [Quit: leaving]
cgibsonm_ has joined #ruby
mikecmpbll has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
SteenJobs has joined #ruby
cgibsonmm has quit [Ping timeout: 246 seconds]
preyalone has quit [Quit: Connection closed for inactivity]
Mon_Ouie has quit [Read error: No route to host]
esObe_ has joined #ruby
LuckyABA has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
aete has joined #ruby
Arpanet69 has joined #ruby
cgibsonmm has joined #ruby
tercenya has quit [Remote host closed the connection]
tercenya has joined #ruby
esObe_ has quit [Ping timeout: 246 seconds]
cgibsonm_ has quit [Ping timeout: 246 seconds]
Mon_Ouie has joined #ruby
perlnecrohacker has joined #ruby
hotpanca_ has quit [Remote host closed the connection]
jusa has quit [Ping timeout: 260 seconds]
stupidsenpai has joined #ruby
SteenJobs has quit [Quit: SteenJobs]
raul782 has quit [Remote host closed the connection]
tercenya has quit [Remote host closed the connection]
tercenya has joined #ruby
raul782 has joined #ruby
BTRE has joined #ruby
mjolnird has joined #ruby
mjolnird has quit [Read error: Connection reset by peer]
raul782 has quit [Read error: Connection reset by peer]
raul782 has joined #ruby
Arpanet69 has quit [Ping timeout: 260 seconds]
hotpancakes has joined #ruby
Xeago_ has quit [Remote host closed the connection]
cgibsonmm has quit [Ping timeout: 246 seconds]
synthroi_ has quit []
jgt1 has joined #ruby
workmad3 has quit [Ping timeout: 240 seconds]
workmad3 has joined #ruby
FastJack has quit [Ping timeout: 260 seconds]
jgt1 has quit [Ping timeout: 264 seconds]
stupidsenpai has quit [K-Lined]
tfitts has quit [Quit: Connection closed for inactivity]
stupidsenpai has joined #ruby
LambdaSix has quit [Ping timeout: 240 seconds]
stupidsenpai has quit [K-Lined]
ghoti has quit [Ping timeout: 240 seconds]
LambdaSix has joined #ruby
hotpancakes has quit [Remote host closed the connection]
enilsen16 has joined #ruby
enilsen16 has quit [Client Quit]
enilsen16 has joined #ruby
blackmesa has joined #ruby
enilsen16 has quit [Client Quit]
hotpancakes has joined #ruby
s1kx has joined #ruby
raul782 has quit [Remote host closed the connection]
raul782 has joined #ruby
ghoti has joined #ruby
jenrzzz has joined #ruby
jgt1 has joined #ruby
hotpancakes has quit [Ping timeout: 246 seconds]
_whitelogger has joined #ruby
jgt1 has quit [Ping timeout: 240 seconds]
workmad3 has quit [Ping timeout: 240 seconds]
nowhereman has quit [Remote host closed the connection]
kristofferR has joined #ruby
nowhereman has joined #ruby
tildes has quit [Ping timeout: 268 seconds]
hotpancakes has joined #ruby
fp- has joined #ruby
hotpanca_ has joined #ruby
hotpanca_ has quit [Remote host closed the connection]
hotpancakes has quit [Read error: Connection reset by peer]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
gdonald has quit [Read error: Connection reset by peer]
gdonald has joined #ruby
<baweaver>
impermanence: I'm in SV and I work with primarily Ruby in a fairly large shop
haxrbyte has joined #ruby
<baweaver>
Well, SF more accurately
<baweaver>
Was off at lunch for a while
haxrbyte has quit [Client Quit]
<baweaver>
Anyways, a lot of the same tools have bindings in Ruby / Python / Perl to the point where you'd be hard pressed to find something one of them _didn't_ do.
jgt1 has joined #ruby
<impermanence>
baweaver: wow!
rwb has quit [Ping timeout: 268 seconds]
jeffreylevesque has quit [Ping timeout: 240 seconds]
<impermanence>
I'm very curious to hear how baweaver: so you write Ruby to complete Ops work. File stuff, Storage Stuff, Linux admin stuff, other stuff...?
Xeago_ has joined #ruby
<baweaver>
Yep.
<baweaver>
To the point where I'd considered at one point writing a Ruby CloudOps book. We're primarily AWS.
<impermanence>
baweaver: wow. So you don't use Bash for working with Linux?
<baweaver>
Dir, File, and some others have globbing options that'd do the same as grep and there are some other native extensions which do the same thing
<baweaver>
there are a few other ways to exec commands, those just tend to be the big ones
<impermanence>
hm. So...would you consider yourself at Ruby developer level now? Whatever that means...
<baweaver>
I've worked full dev, full ops, and devops with Ruby so I suppose so.
esObe_ has quit [Ping timeout: 256 seconds]
<impermanence>
when did you start writing Ruby?
* baweaver
thinks back
<baweaver>
professionally, ~2012.
<baweaver>
screwing around, probably 2006-08 or so, I forget.
hotpancakes has joined #ruby
<baweaver>
RPG Maker XP had Ruby "support" so I ended up learning it to make cool things in it
<allisio>
Was that really your start?
<baweaver>
so maybe even a few years before
<baweaver>
for Ruby, yeah.
sepp2k has quit [Ping timeout: 240 seconds]
<allisio>
Imagine that.
<baweaver>
Think I learned from SephirothSpawn on the forums forever ago.
<impermanence>
hm. So OG, essentially. Okay.
<baweaver>
then I realized in my first job that Ruby was useful for other things and I had free reign to do whatever.
<baweaver>
So I automated an entire network of Ubiquiti antennas
<baweaver>
firmware upgrades, status pages, auto repair, interference mitigation, and a few other fun bits. I think I automated myself out of 3 jobs in a row as an intern and they made me full time after that
<baweaver>
then it was free reign to do whatever was useful.
kiltzman has joined #ruby
<baweaver>
but that involved a lot of SSH, SCP, JSON, and working with Busy Box (ASH) which is lightweight Linux running on wireless antennas
ohcibi has quit [Remote host closed the connection]
<baweaver>
but dang did I have some dirty Ruby back then XD
<impermanence>
I can image. Even as new as I am when I look at code from even a year ago I "smile"
GodFather_ has quit [Remote host closed the connection]
bodgix has joined #ruby
GodFather has joined #ruby
haxrbyte has joined #ruby
haxrbyte has quit [Client Quit]
unreal has quit [Ping timeout: 260 seconds]
outreachdan has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
SteenJobs has quit [Quit: SteenJobs]
outreachdan has joined #ruby
hahuang61 has joined #ruby
rgtk has joined #ruby
haylon_ has quit [Remote host closed the connection]
hahuang61 has quit [Ping timeout: 260 seconds]
howlinbash has quit [Ping timeout: 240 seconds]
Fernando-Basso has quit [Quit: WeeChat 1.7]
t-recx has joined #ruby
ldnunes has quit [Quit: Leaving]
nersoh has quit [Quit: Page closed]
howlinbash has joined #ruby
JeanCarloMachado has quit [Ping timeout: 260 seconds]
Sammichmaker has quit [Read error: Connection reset by peer]
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bodgix has quit [Quit: Leaving.]
__Yiota has joined #ruby
hotpanca_ has joined #ruby
fmcgeough has quit [Quit: fmcgeough]
aspiers has quit [Ping timeout: 260 seconds]
jenrzzz_ has joined #ruby
hotpancakes has quit [Ping timeout: 246 seconds]
b3l914n has quit [Remote host closed the connection]
mim1k has joined #ruby
johnzorn has quit [Read error: Connection reset by peer]
jenrzzz has quit [Ping timeout: 268 seconds]
johnzorn has joined #ruby
outreachdan has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jenrzzz_ has quit [Ping timeout: 240 seconds]
outreachdan has joined #ruby
mim1k has quit [Ping timeout: 240 seconds]
bodgix has joined #ruby
jusa has joined #ruby
bkxd has joined #ruby
patarr has quit [Ping timeout: 264 seconds]
galtgendo has joined #ruby
nofxx has quit [Remote host closed the connection]
nofxx has joined #ruby
jusa has quit [Ping timeout: 240 seconds]
<galtgendo>
in Psych, how does init_with method accounts for yaml anchors ? I'm getting '`*': nil can't be coerced into Fixnum (TypeError)' in such cases with a method that works when no anchors
Xeago_ has quit [Remote host closed the connection]
grh has quit [Ping timeout: 260 seconds]
jamesaxl has quit [Ping timeout: 260 seconds]
[Butch] has quit [Quit: I'm out . . .]
[Butch] has joined #ruby
ltem has quit [Quit: Leaving]
zun has quit [Quit: Connection closed for inactivity]
mephistophocles has quit [Remote host closed the connection]
planigan has quit [Remote host closed the connection]
rwb has joined #ruby
SeepingN has joined #ruby
aete has quit [Quit: Lost terminal]
jeffreylevesque has quit [Ping timeout: 268 seconds]
hutch34 has quit [Ping timeout: 240 seconds]
GodFather has quit [Ping timeout: 240 seconds]
tvw has joined #ruby
cseder has joined #ruby
brianpWins has quit [Quit: brianpWins]
tvw has quit [Remote host closed the connection]
hutch34 has joined #ruby
<cseder>
Does anyone use TextMate 2? I purchased a license for it a while back, but now I hear that it's free (as in beer) and open sourced?
tvw has joined #ruby
<SeepingN>
it's a disaster
<SeepingN>
or, was
<SeepingN>
"here's the code, everyone go do whatever" doesn't work out too cleanly
<baweaver>
Most use Sublime
<cseder>
I like TM2, but I also have a license for Sublime 3
<SeepingN>
^
<SeepingN>
ST3 all the way
<baweaver>
or Atom in some cases
<baweaver>
Depending on what I'm doing I switch between Vim, Sublime 3, and Typora.
<baweaver>
Though Typora is only really for long-form tech docs
<baweaver>
(markdown editor)
<cseder>
Yes, I don't see many reasons to keep using TM, as the time has passed, Sublime has gotten really good
<cseder>
I was just wondering about TM because when I installed it it still asked for my license
<SeepingN>
ah
<ytti>
vim, vcs, atom, slt3, tm3
<cseder>
But people says it's now free and Open Source
<ytti>
seem to be the options toda
<ytti>
+y
<SeepingN>
well you can 1: ignore it, 2: buy it, or 3: edit a few bytes
<cseder>
Ok, so it is still "license is optional" like Sublime?
jenrzzz has joined #ruby
cfec0b8d has quit [Ping timeout: 240 seconds]
hutch34 has quit [Ping timeout: 240 seconds]
bkxd has quit [Ping timeout: 240 seconds]
<ytti>
seems entirely unethical not to buy editor you use hours on end, day in, day out
<ytti>
if it costs money
<SeepingN>
oh TM? TM should be free. open source. if ijt isn't, ... are you sure you found a "current' version?
bonhoeffer has joined #ruby
<cseder>
I purchased a license for Sublime a while back when it was rumoured that it was going into release, not beta, but that didn't happen. Still optional license for Sublime as it is still in beta (v3)
<ytti>
i too have SL license, don't use it though
<ytti>
and i don't imagine i will
<ytti>
been trying to jump on vcs, but hard to move out from vim
<cseder>
One thing I've noticed when using Sublime is that it doesn't work for writing git commit messages when I have it as my default text editor in zsh... Anybody experiencing the same?
cdg has quit [Remote host closed the connection]
<cseder>
I mean if you do git commit -a -m "blabla"
<cseder>
it works, but not if you don't use -m
<cseder>
Sublime pops up, waiting for me to write a commit message, than, when I save the file and quit Sublime, the commit gets discarded
jcao219 has joined #ruby
<cseder>
this is off topic, but I was just curious. Only thing that works for me is vim
ddffg has joined #ruby
aspiers has joined #ruby
DLSteve has quit [Quit: All rise, the honorable DLSteve has left the channel.]
impermanence has joined #ruby
<impermanence>
baweaver: what do you mean in your book list when you refer to "Programming Ruby" as the "pickaxe book"?
<baweaver>
Look at the cover
pupsicle has quit [Quit: pupsicle]
griff has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
postmodern has joined #ruby
<impermanence>
baweaver: I thought it might be something like that, lol. Looking now...
<cseder>
It has always been called the PickAxe
<cseder>
I'm reading the latest edition as we type! Great book!
<havenwood>
impermanence: Learn to Program is a Tree. The Ruby Programming Language is Sparrows. Programming Ruby is the Pickaxe.
<cseder>
What is that second book? Have a link?
nankyokusei has joined #ruby
<baweaver>
By and far my favorite "Learn Ruby" book is Eloquent Ruby.
<impermanence>
I see. For a Ruby beginner, but not a beginning programmer what book is the best? I don't like terse, but I probably need something at least a little advanced. So like...spice == medium.
<baweaver>
Eloquent
<impermanence>
k
<baweaver>
Its entire goal is to teach people to Ruby like Ruby people
<baweaver>
The definitive tome book is The Ruby Way
<cseder>
I really like the way the PickAxe is built. Good progression
esObe_ has joined #ruby
<cseder>
The Ruby Programming Language by Oreilly isn't updated for Ruby 2.0?
<havenwood>
cseder: Nope
<impermanence>
baweaver: but eloquent seems to presume (as you stated in your git list) an already working knowledge of ruby...
charliesome has joined #ruby
<havenwood>
cseder: The Well-Grounded Rubyist, Second Edition is.
<impermanence>
that's another concern. I'd prefer to just start learning 2...wouldn't that be best?
<cseder>
And not the Eloquent Ruby book either?
<havenwood>
impermanence: Thing of Ruby 1.9 as 2.0 release candidate.
<havenwood>
impermanence: As long as it's post 1.8, you should be fine.
rakm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<impermanence>
hm, good advice.
<havenwood>
impermanence: 1.8- was the interpreter MRI. 1.9+ is the virtual machine YARV.
<cseder>
Ok, I think I'll stick with the PickAxe and Ruby Cookbook
<impermanence>
YARV?
<havenwood>
impermanence: yet another Ruby vm
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<impermanence>
looks like I may need to buy a couple books. I guess I need to get "Rubyist" for sure.
esObe_ has quit [Ping timeout: 268 seconds]
<havenwood>
impermanence: The author has written a tool that precompiled the IR bytecode for Ruby then runs it directly in the VM. It reduces runtime by about 30%: https://github.com/ko1/yomikomu#readme
<havenwood>
impermanence: It might be part of Ruby 3. We'll see!
<cseder>
I've been programming on and off for over 20 years, and as a profession for the last 3 years, but I've never had much "fun" learning different languages, until I started learning Ruby. It sounds cliche, but it's true!
<baweaver>
Eloquent assumes that you know some programming
<baweaver>
not necessarily Ruby
<baweaver>
It assumes you tried a basic tutorial, maybe, but nothing past that
ludicocr has left #ruby [#ruby]
<impermanence>
hm. okay.
<cseder>
But I feel that the PickAxe also has a reasonable tempo, even if I've programmed in other languages
<cseder>
And it is updated for Ruby 2.0
<cseder>
And I have it both as pdf and dead tree version
<cseder>
Trivia time: Did you know know that the keyword yield was chosen to echo the yield function in Liskov’s language CLU, a language that is more than thirty years old and yet contains features that still haven’t been widely exploited by the CLU-less
<perlnecrohacker>
Hello, where I can read about mruby?
<havenwood>
perlnecrohacker: Are you just getting into it, or looking for something in particular?
<havenwood>
perlnecrohacker: The mruby gitter is one place to ask questions or review the log: https://gitter.im/mruby/mruby
<cseder>
My main goal with learning Ruby was to start developing in Rails after learning just enough Ruby to get by, but the more I learn about Ruby, the more I want to learn. It's scary.
rakm has joined #ruby
<galtgendo>
in Psych, how does init_with method account for yaml anchors ? I'm getting '`*': nil can't be coerced into Fixnum (TypeError)' in such cases with a method that works when no anchors are present