baweaver changed the topic of #ruby to: Rules & more: https://ruby-community.com || Ruby 2.4.0, 2.3.3 & 2.2.6: https://www.ruby-lang.org || Paste >3 lines of text to: https://gist.github.com || Rails questions? Ask in: #RubyOnRails || Logs: https://irclog.whitequark.org/ruby || Books: https://goo.gl/wpGhoQ
JeanCarloMachado has joined #ruby
Derperperd has joined #ruby
dviola has quit [Quit: WeeChat 1.7]
enterprisey has joined #ruby
hutch34 has quit [Ping timeout: 246 seconds]
hutch34 has joined #ruby
devgiant has quit [Quit: Leaving]
James123 has quit [Ping timeout: 240 seconds]
jphase has quit [Ping timeout: 246 seconds]
eblip has joined #ruby
jphase has joined #ruby
GodFather has quit [Read error: No route to host]
<sparr> I'm seeking code review / feedback on my first big from-scratch ruby script. I'd like to do things more "the ruby way", and would appreciate pointers in that direction. https://github.com/sparr/rollingstock-squib/blob/master/rollingstock.rb
CloCkWeRX has quit [Ping timeout: 240 seconds]
<Papierkorb> sparr: avoid using global variables, like on line 26. Looks more like a mishap though.
grant has joined #ruby
<sparr> Papierkorb: was intentional, so the function on line 265 could access them
<sparr> and also the function on 291
<sparr> I think where I might want to go with that is to wrap all of the functionality in a class and make SHARE_PRICES a property that all the methods can read
<Papierkorb> Line 259, trailing if after a huge block
jrafanie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<sparr> yeah, rubocop didn't like that either :( I want to be consistent between all the blocks. I'm kinda hoping to find a better paradigm for the whole setup of having a dozen true/false constants to turn a dozen blocks on and off
<sparr> maybe put each block in a function, then just have a short series of conditional calls to the functions
banisterfiend has joined #ruby
<Papierkorb> So, what I don't like is the size of the whole thing. Cut it into separate files, that would already make it much better
aglorei has quit [Remote host closed the connection]
aglorei has joined #ruby
<sparr> I'm not sure how to do that yet
<Papierkorb> You could e.g. put every card into its own file. Maybe you can subclass from Squib::Deck - I don't know squib.
<Papierkorb> That way you split up the condition from the construction, which with the file separation, is already a good improvement
<sparr> I mean, I don't know how to load/run/call the contents of those files after I split it up
<Papierkorb> You'd use `require_relative`
<sparr> ok, thanks, I shall try that. I, too, am unhappy with the size of the file
<sparr> Any tips on deduplicating the common code from all/most of the Squib::Deck blocks?
<Papierkorb> I also don't really like the size of the deck blocks, although avoiding that may be cumbersome. Some cards probably share a fair chunk of the layout, so maybe these could inherit from one another.
<sparr> https://github.com/sparr/rollingstock-squib/blob/master/rollingstock.rb#L253-L258 that part looks very similar across many blocks
<sparr> can I put that in a function and call the function from within the block?
JeanCarloMachado has quit [Ping timeout: 240 seconds]
<Papierkorb> That'd be the step after splitting the file up. I don't know squib, but there sure is a way. Maybe you can call the rect, save, etc. methods on the instance too, and not only in the block. Then, you could move the common parts into methods which do these calls
<sparr> I'll try that, after the split up
<Papierkorb> sparr: You can't the way it's setup. Or maybe you can, it really depends on how Squib does the block stuff. Hard to say
<Papierkorb> You could try and see if it throws a NoMethodError when you call your method, or read in their docs (if they cover this)
ncthom91 has quit [Quit: Textual IRC Client: www.textualapp.com]
<Papierkorb> sparr: This is a card game? Looked a bit like monopoly
JeanCarloMachado has joined #ruby
<Papierkorb> https://github.com/sparr/rollingstock-squib/blob/master/rollingstock.rb#L211 you can merge all these duplications by "outsourcing" the translation part
<Papierkorb> Which will save you 50 lines or so already
<Papierkorb> https://github.com/sparr/rollingstock-squib/blob/master/rollingstock.rb#L288 prefer string interpolation: ` "$#{min} - $#{max}" ` over doing that
teddysmoker has quit [Read error: Connection reset by peer]
<marchelzo> hello
<Papierkorb> See how much nicer it is to not having to write to_s all over the place
<marchelzo> how do i access globals in a method
<marchelzo> like in a .rb file i have x = 10, then def foo; puts x; end
montanonic has joined #ruby
<Papierkorb> marchelzo: That's not a global variable, methods don't inherit the variables of the parent scope
<marchelzo> so what do i do
blackmes1 has joined #ruby
<Papierkorb> marchelzo: Use a class instead
<marchelzo> u for real?
<Papierkorb> Yes?
<marchelzo> i don't like that solution
<marchelzo> is there anything else i can do?
<sparr> Papierkorb: sadly the translation doesn't work well through a library; I do need the second big block of text :( Thanks for the string interpolation idea, I learned about that functionality AFTER writing all of this.
<Papierkorb> sparr: But you can move the whole translation block outside, e.g. LABLES = { english: ..., german: ... }
<Papierkorb> sparr: And then either pass the wanted language to the class you're creating, or store the application-wide language somewhere else
<Papierkorb> sparr: That's not perfect, but it's an improvement
<marchelzo> Papierkorb: what do you think
blackmesa has quit [Ping timeout: 260 seconds]
<Papierkorb> sparr: Later on, if you don't want/can't use one of the existing localization gems, you could probably dump all texts from your game into a YAML file which you read upon starting the game
<Papierkorb> marchelzo: Why don't you like that?
<marchelzo> it doesn't make sense here
CloCkWeRX has joined #ruby
<marchelzo> conceptually this is not a class
<marchelzo> i just have some state that i need access to
<Papierkorb> marchelzo: a toy script doesn't cover the real world
<marchelzo> i'm sorry?
<Papierkorb> sparr: If you haven't already, consider drawing (yes, drawing) the application structure (classes, which inherits from what, ..) on a piece of paper, or sticky notes (my all time favorite).
<marchelzo> it doesn't make sense. toy or no toy, class is the wrong tool here.
<Papierkorb> marchelzo: What's your real problem?
<marchelzo> my real problem is that i have some global state, and i want to make some methods that mutate the global state
<Papierkorb> marchelzo: Why do you know it's the wrong tool?
<Papierkorb> marchelzo: classes. If you want to write bad code, use a proper global variable.
<marchelzo> because classes are for describing objects
<Papierkorb> And state is not an object?
<Papierkorb> That's the definition of an object
<marchelzo> classes that never get instantiated or extended are bad
<Papierkorb> Aha
planigan` has joined #ruby
planigan has quit [Ping timeout: 246 seconds]
<marchelzo> Papierkorb: Aha?
Ishido has quit [Quit: Roads? Where We're Going We Don't Need Roads.]
gloscombe_ has quit [Quit: gloscombe_]
grant has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ElDogo has quit []
priodev has quit [Ping timeout: 260 seconds]
<marchelzo> Papierkorb: running into another problem
ltp has quit [Ping timeout: 240 seconds]
segmond has joined #ruby
priodev has joined #ruby
braderhart has joined #ruby
sepp2k has quit [Read error: Connection reset by peer]
milardovich has quit [Remote host closed the connection]
milardovich has joined #ruby
bmurt has joined #ruby
JeanCarloMachado has quit [Ping timeout: 260 seconds]
ltp has joined #ruby
brent__ has joined #ruby
Nox_ has joined #ruby
<Nox_> Hello there, I'm having troubles with setting up ruby, I'm on Windows 10 and I followed the DevKit instructions (the json thing is working) but when I try "gem update" I get the " Error installing [GEM_NAME]: ERROR: Failed to build gem native extension."
Derperperd has quit [Ping timeout: 240 seconds]
tildes has joined #ruby
hanetzer has quit [Ping timeout: 246 seconds]
BTRE has quit [Quit: Leaving]
tildes has quit [Ping timeout: 256 seconds]
charliesome has joined #ruby
JeanCarloMachado has joined #ruby
hanetzer has joined #ruby
Nox_ has quit [Quit: Page closed]
BackEndCoder has quit [Excess Flood]
brent__ has quit [Remote host closed the connection]
KicStart has joined #ruby
BTRE has joined #ruby
graphettion has joined #ruby
BackEndCoder has joined #ruby
graphettion has left #ruby [#ruby]
<marchelzo> Papierkorb: are you there
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
adrianvalenz has joined #ruby
brent__ has joined #ruby
A124 has quit [Quit: '']
blackmes1 has quit [Ping timeout: 268 seconds]
<adrianvalenz> Hello, Rubyists!
<marchelzo> Ariadeno_: hellloooo!!!!!!!!!!!!
* marchelzo dances with adrianvalenz
<sparr> Papierkorb: good idea, re an array of strings to localize
<adrianvalenz> Hey @marchelzo! I'm new to IRC and I'm trying to find more Ruby programmers!
marr has quit [Ping timeout: 256 seconds]
<marchelzo> adrianvalenz: there are hundreds here! you've come to the right place :D
<sparr> Papierkorb: any feedback on the "TURNORDER = true" stuff at the top? is there a shorter/easier/better way to turn parts of the code on and off than that, without going to a command line arg parser or config file?
JeanCarloMachado has quit [Ping timeout: 246 seconds]
<marchelzo> Ariadeno_: oops sorry for pinging you
<marchelzo> lol
<Papierkorb> sparr: You'd move all of those into a class too, e.g. `Game`. If you don't want to read those from a JSON/YAML file, or somewhere else, it's as good as it gets I fear
itsautomatisch has quit [Ping timeout: 240 seconds]
<Papierkorb> sparr: Oh,
<Papierkorb> sparr: You don't change their value, right? It's not a state machine for the game?
<sparr> they are constants
<sparr> this code isn't a game, per se. it just generates a bunch of images, to be printed as a paper card game
<Papierkorb> sparr: Ah! was wondering where the game logic was lingering ;)
<adrianvalenz> marchelzo: Awesome!
<Papierkorb> sparr: w.r.t. "They're constants", don't have the code open anymore, wasn't sure if you didn't reassign them anyway somewhere. Because in ruby, nothing's really constant. It's more of a suggestion .. if you know how ;)
<Papierkorb> (Which is a terrible thing to do of course in most cases, hehe)
<sparr> I'm .freeze'ing a lot of my constant arrays, in the hopes it helps the interpreter optimize
<marchelzo> in a method, how do i call another method from the same class on the object
<marchelzo> self.foo() ?
adrianvalenz has quit [Remote host closed the connection]
JeanCarloMachado has joined #ruby
<marchelzo> wow i suck at ruby
Derperperd has joined #ruby
<sparr> Is there a way to make my $SHARE_PRICES not-global other than passing it ot the relevant functions or putting everything in a class and making it a property?
<elomatreb> marchelzo: self. is implicit and parentheses are optional, so it's just `foo`
<Papierkorb> sparr: Freezing them is a good idea, I liked that you do it. While it is a tiny tad faster too, you won't notice a difference in general. it's just nicer to actually freeze constants, so to make them more constant :)
<marchelzo> elomatreb: that doesn't work
montanonic has quit [Ping timeout: 256 seconds]
<sparr> I do it so the interpreter will yell at me if I accidentally try to change them
yqt has quit [Ping timeout: 260 seconds]
<marchelzo> elomatreb: i don't know what's wrong
<elomatreb> marchelzo: https://eval.in/748369 -- It should
<Papierkorb> sparr: only the two options you're giving there are the alternatives
benlieb has joined #ruby
<sparr> ok
ruid has quit [Ping timeout: 240 seconds]
<elomatreb> marchelzo: Maybe post the error you're getting, and the corresponding code
<marchelzo> elomatreb: what if, in my method, i have a block where i try to call another method, but that block is passed to some other method that uses instance_eval
Derperperd has quit [Ping timeout: 240 seconds]
<marchelzo> then it won't be able to find my methods -- is that right?
Jackneill_ has quit [Remote host closed the connection]
<elomatreb> Show your code, I'm not sure I understand your problem
<marchelzo> elomatreb: https://eval.in/748370
<marchelzo> ugh oops
AlcoholiC has joined #ruby
JeanCarloMachado has quit [Ping timeout: 260 seconds]
JeanCarloMachado has joined #ruby
<elomatreb> I don't think your instance_eval does what you think it does, it evals the block with the self set to the Foo instance since you don't have an explicit receiver
<marchelzo> right
<marchelzo> that's the problem...
<marchelzo> i know what it's doing
<marchelzo> i'm trying to figure out how to work around it
<marchelzo> i need to pass a block that calls b to Foo#bar
<elomatreb> You want that calling `b` in the block calls Foo#b?
<elomatreb> Or Test#b?
A124 has joined #ruby
pwnd_nsfw has joined #ruby
ruid has joined #ruby
<marchelzo> elomatreb: Test#b
JeanCarloMachado has quit [Ping timeout: 240 seconds]
Robtop__ has quit [Ping timeout: 246 seconds]
<elomatreb> marchelzo: You don't even need instance_eval in that case, that's the default behaviour of yielding to blocks. https://eval.in/748374
<marchelzo> elomatreb: ...i know that
<marchelzo> it's not my choice
<elomatreb> Then I'm not sure what your problem is.
<marchelzo> the api that i'm using uses instance_eval on this block
<marchelzo> but i need to have access to the methods on my class
<elomatreb> A little hacky: https://eval.in/748375
<marchelzo> ah ok let's see
<marchelzo> oh no
djbkd has joined #ruby
benlieb has quit [Quit: benlieb]
<marchelzo> elomatreb: what if i also need to change instance variables ._.
itsautomatisch has joined #ruby
<elomatreb> Either define attr_accessors or use instance_variable_set if you don't care about hackiness
herbmillerjr has quit [Quit: Konversation terminated!]
AlcoholiC has quit []
<marchelzo> elomatreb: thank you
<elomatreb> This does not seem like a good solution to me though, are you sure you're using the API you're given correctly?
tau has joined #ruby
<marchelzo> elomatreb: i think so
djbkd_ has joined #ruby
<marchelzo> well i mean there's no doubt my program is awful
bmurt has joined #ruby
dviola has joined #ruby
djbkd_ has quit [Ping timeout: 240 seconds]
jgnagy has quit [Ping timeout: 260 seconds]
mwlang has joined #ruby
jgnagy has joined #ruby
ruid has quit [Ping timeout: 260 seconds]
Azure has quit [Quit: Oops.]
SteenJobs has joined #ruby
SteenJobs has quit [Client Quit]
enterprisey has quit [Read error: Connection reset by peer]
nowhereman has joined #ruby
astrobunny has joined #ruby
mwlang has quit [Quit: mwlang]
arooni has quit [Quit: ZNC - http://znc.in]
jameser has joined #ruby
mwlang has joined #ruby
brent__ has quit [Remote host closed the connection]
arooni has joined #ruby
<sparr> I'm trying to move some functionality into a Module. I have a block calling a function, and that function calls a DSL function defined in an included gem. That call fails when I put it all in a module and module methods.
<sparr> def Rollingstock.deck_shareprice_faceback(face)
<sparr> background color: :white
hutch34 has quit [Ping timeout: 240 seconds]
<sparr> when deck_shareprice_faceback was a top level function, I could do that. now that I'm calling it as a module method, I get "undefined method `background' for Rollingstock:Module"
hanetzer has quit [Ping timeout: 246 seconds]
mwlang has quit [Quit: mwlang]
mwlang has joined #ruby
cschneid_ has quit [Read error: Connection reset by peer]
cschneid_ has joined #ruby
d^sh has quit [Ping timeout: 256 seconds]
hanetzer has joined #ruby
d^sh has joined #ruby
nowhereman has quit [Ping timeout: 260 seconds]
adrianvalenz has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mwlang has quit [Quit: mwlang]
herbmillerjr has joined #ruby
brent__ has joined #ruby
brent__ has quit [Remote host closed the connection]
cibs has quit [Ping timeout: 264 seconds]
cibs has joined #ruby
skweek has joined #ruby
pwnd_nsfw has quit [Ping timeout: 260 seconds]
hanetzer has left #ruby ["WeeChat 1.7"]
hutch34 has joined #ruby
charliesome has joined #ruby
adrianvalenz has quit [Read error: Connection reset by peer]
milardovich has quit [Remote host closed the connection]
Sammichmaker has quit [Ping timeout: 256 seconds]
benlieb has joined #ruby
marcdel has joined #ruby
zacts has quit [Quit: WeeChat 1.5]
herbmillerjr has quit [Quit: Konversation terminated!]
milardovich has joined #ruby
milardov_ has joined #ruby
Azure has joined #ruby
arescorpio has joined #ruby
ap4y has joined #ruby
pawnbox has quit [Ping timeout: 264 seconds]
libastral has quit [Ping timeout: 240 seconds]
milardovich has quit [Ping timeout: 240 seconds]
libastral has joined #ruby
adrianvalenzuela has joined #ruby
<adrianvalenzuela> hi
herbmillerjr has joined #ruby
ap4y has quit [Remote host closed the connection]
milardov_ has quit [Read error: Connection reset by peer]
ap4y has joined #ruby
<adrianvalenzuela> what's everyone talking about right now?
<Radar> So much.
<Radar> Where do we even begin?
<adrianvalenzuela> Radar: yea I here ya
<adrianvalenzuela> This is my first day on IRC and I'm still trying to learn and navigate my way around IRC
<Radar> cool :) Why'd you pick this channel as your first point out of interest?
<adrianvalenzuela> I'm a web developer and I have a buddy that recommended IRC a while back for padrinorb web framework. Ruby channel also seemed like a natural place to start meeting other rubyists. althought i'm not the best at ruby by far it is my favorite language :D
<Radar> adrianvalenzuela: Ah great :) Welcome
pawnbox has joined #ruby
ap4y has quit [Read error: Connection reset by peer]
<Radar> adrianvalenzuela: It's going to be a bit quiet in here given it's Sunday night in most of the world.
<elomatreb> Commence late-night Ruby IRC rave party
<adrianvalenzuela> Radar: Oh yea? when does it get louder? heh heh
<Radar> adrianvalenzuela: :) typically during the daylight hours of US + EU
<adrianvalenzuela> elomatreb: I'll bring the glow sticks lol
<sparr> when everyone is at work, of course :)
<adrianvalenzuela> I can actually Poi :D
benlieb has quit [Quit: benlieb]
<adrianvalenzuela> I need some ruby colored poi glow sticks *adds to my wishlist*
nofxx has joined #ruby
<adrianvalenzuela> Radar: I'm concerned about nicknames, do people usually just keep their default computer use name? or create nicknames, and if so what does one do when someone else uses your nickname?
<adrianvalenzuela> hmmm
<Radar> adrianvalenzuela: I use a different name here than I do on my computer. You can register your nick with nickserv
<Radar> type "/msg nickserv help" for more info on that part
<elomatreb> NickServ allows you to register your nich with a password, kicking anyone who tries to use it anyway
<adrianvalenzuela> ooo nice! do you guys recommend using nicknames or are real names ok? my real name is pretty much my twitter handles and such
<Radar> adrianvalenzuela: Whatever you wish.
<adrianvalenzuela> I typed that /msg nickserv help and nothing happened
<adrianvalenzuela> I'm on irssi in my termnial
braderhart has quit [Quit: Connection closed for inactivity]
<Radar> adrianvalenzuela: there should be a new window open
Ruby_Rocks_007 has joined #ruby
davezd has quit [Quit: Leaving]
<adrianvalenzuela> let me try again
Ruby_Rocks_007 has quit [Read error: Connection reset by peer]
jdm has quit [Remote host closed the connection]
Ruby_Rocks_007 has joined #ruby
dviola has quit [Quit: WeeChat 1.7]
jdm has joined #ruby
adrianvalenzuela has quit [Quit: Lost terminal]
adrianvalenzuela has joined #ruby
cahoots_ has joined #ruby
<cahoots_> hi, is there anything in ruby equivalent to swift playgrounds?
adrianvalenzuela has quit [Client Quit]
<Radar> cahoots_: There's also irb.
cdg has joined #ruby
AnoHito has joined #ruby
<cahoots_> Radar, i'm not looking for just a repl, i'm looking for something where i can have a large set of text that i can edit, but see the output of each line on the side
<Radar> cahoots_: Ah. I don't know anything like that, sorry.
<cahoots_> normally, my workflow is to have a file with the final script, and a repl alongside it to try ideas out on, but that's slower. i'm surprised it doesn't exist for ruby yet
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
brent__ has joined #ruby
adrianvalenzuela has joined #ruby
hutch34 has quit [Ping timeout: 246 seconds]
<adrianvalenzuela> still a bit confused
<adrianvalenzuela> lol
<adrianvalenzuela> hmm
adrianvalenzuela has quit [Client Quit]
im314ous has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
lumberjack__ has joined #ruby
<matthewd> Oh, it's mentioned there, but skip to 9:00 for more action
ElDoggo has joined #ruby
cahoots_ has quit [Ping timeout: 268 seconds]
numbers092024 has joined #ruby
<lumberjack__> Hey guys, I have saved the output of JSON.parse to a file, Im trying to open that file using File.read and use it like a ruby data structure but its just a string, what am I doing wrong
marcdel has quit [Ping timeout: 246 seconds]
bungoman has joined #ruby
adrianvalenz has joined #ruby
cahoots has joined #ruby
<adrianvalenz> Radar: Ok I think LimeChat will help me out some configs
<adrianvalenz> radar: what client do you use for irc?
enterprisey has joined #ruby
<lumberjack__> This is the console output of the file "[{\"ticker\"=>\"A\", \"name\"=>\"Agilent Technologies Inc\"}, {\"ticker\"=>\"AA\", \"name\"=>\"Alcoa Inc\"}]"
marcdel has joined #ruby
<adrianvalenz> Are there any Rubyists around the Central Coast in California?
<elomatreb> lumberjack__: That's a debug print (output of #inspect). If you want to turn a Ruby Hash into JSON, use JSON.dump. JSON.parse turns the resulting JSON string back into a Ruby structure
adrianvalenz has left #ruby [#ruby]
<lumberjack__> elomatreb: Ok yea, I shouldnt be saving JSON.parse to the file I should be just saving the json directly and parsing it when I need to work with it?
adrianvalenz_ has joined #ruby
<elomatreb> Yes. The format above is intended for debugging output
djbkd_ has joined #ruby
<lumberjack__> elomatreb: Ok Thanks, Ill try it here now and confirm success
ElDoggo has quit [Remote host closed the connection]
ElDoggo has joined #ruby
djbkd_ has quit [Ping timeout: 264 seconds]
<lumberjack__> elomatreb: Beutiful, thankyou much
ElDoggo has quit [Remote host closed the connection]
pattyde has joined #ruby
ahrs_ has joined #ruby
adrianvalenz_ has quit [Ping timeout: 246 seconds]
lumberjack__ has quit [Quit: Page closed]
ahrs has quit [Ping timeout: 260 seconds]
banisterfiend has quit [Quit: Textual IRC Client: www.textualapp.com]
Yzguy has joined #ruby
Yzguy has quit [Max SendQ exceeded]
adrianvalenz_ has joined #ruby
<adrianvalenz_> Radar: I did it! I verified my nickname
<adrianvalenz_> whew!
SteenJobs has joined #ruby
<elomatreb> I think you might have verified the wrong one? (Appending a _ is usually done when the nick is already in use)
brent__ has quit [Remote host closed the connection]
<adrianvalenz_> elomatreb: Oh! no I changed it to adrianvalenz_ ;)
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jenrzzz has joined #ruby
<Radar> adrianvalenz_: well done :)
<elomatreb> You can add multiple nicks to your nickserv registration, you might want to register the one without _ too to avoid possible confusion
<adrianvalenz_> Radar: Thank you sir!
<adrianvalenz_> elomatreb: You are right. I shall do so now!
user_____ has joined #ruby
adrianvalenz_ is now known as adrianvalenz
user_____ has quit [Client Quit]
adrianvalenz has quit [Read error: Connection reset by peer]
charliesome has joined #ruby
tau has quit [Remote host closed the connection]
tau has joined #ruby
jenrzzz has quit [Ping timeout: 268 seconds]
ElDoggo has joined #ruby
marcdel has quit [Ping timeout: 240 seconds]
_whitelogger has joined #ruby
marcdel has joined #ruby
wilbert has joined #ruby
ahrs_ has quit [Ping timeout: 240 seconds]
ahrs has joined #ruby
gix has quit [Read error: Connection reset by peer]
cdg has quit [Remote host closed the connection]
jenrzzz has joined #ruby
zacts has joined #ruby
matju has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
pilne has quit [Quit: Quitting!]
gix has joined #ruby
Polarina has quit [Ping timeout: 240 seconds]
maloik has quit [Remote host closed the connection]
Trynemjoel has quit [Ping timeout: 264 seconds]
maloik has joined #ruby
wilbert_ has joined #ruby
wilbert has quit [Ping timeout: 260 seconds]
Trynemjoel has joined #ruby
Polarina has joined #ruby
wilbert_ has quit [Ping timeout: 240 seconds]
wilbert_ has joined #ruby
ElDoggo has quit [Remote host closed the connection]
numbers092024 has quit [Ping timeout: 246 seconds]
Trynemjoel has quit [Ping timeout: 264 seconds]
nanoz has joined #ruby
Trynemjoel has joined #ruby
sniffer has quit [Ping timeout: 245 seconds]
cschneid_ has quit [Read error: Connection reset by peer]
cschneid_ has joined #ruby
adrianvalenz has joined #ruby
<adrianvalenz> hmm
adrianvalenz is now known as adrianvalenz_
Polarina has quit [Ping timeout: 240 seconds]
pawnbox has quit [Ping timeout: 260 seconds]
cschneid_ has quit [Remote host closed the connection]
statelesscode has joined #ruby
statelesscode has quit [Client Quit]
Trynemjoel has quit [Ping timeout: 245 seconds]
pattyde has quit [Quit: Leaving]
arescorpio has quit [Quit: Leaving.]
reverberations has joined #ruby
xall has joined #ruby
Trynemjoel has joined #ruby
matju has quit [Quit: Leaving]
Anonymoose2 has quit [Ping timeout: 268 seconds]
adrianvalenz_ has left #ruby [#ruby]
Polarina has joined #ruby
marchelzo has quit [Quit: :*]
KicStart has quit [Quit: Leaving.]
aupadhye has joined #ruby
itsautomatisch has quit [Ping timeout: 240 seconds]
AnoHito has quit [Quit: Leaving]
renchan has joined #ruby
Channel6 has quit [Quit: Leaving]
griffindy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
adrianvalenz_ has joined #ruby
adrianvalenz_ has quit [Remote host closed the connection]
Derperperd has joined #ruby
<sparr> how can I call a method whose name is stored in a string variable?
tau has quit [Remote host closed the connection]
<elomatreb> >> "test".send "reverse" # sparr
<ruby[bot]> elomatreb: # => "tset" (https://eval.in/748479)
<elomatreb> Although you should probably use public_send, as to not bypass access control
cibs has quit [Ping timeout: 240 seconds]
padi_ has joined #ruby
cibs has joined #ruby
pwnd_nsfw has joined #ruby
anisha has joined #ruby
djbkd_ has joined #ruby
djbkd_ has quit [Remote host closed the connection]
djbkd_ has joined #ruby
djbkd_ has quit [Remote host closed the connection]
pawnbox has joined #ruby
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
acalycine has joined #ruby
<sparr> thanks
<sparr> a file I've just created isn't being included when I rebuild the project gem
Pumukel has quit [Ping timeout: 264 seconds]
<sparr> it's in the same directory with files that are created. I can't find a manifest listing those files.
<sparr> how can I figure out why it's being skipped?
<elomatreb> It's in your .gemspec file, something like `spec.files = ...`
zacts has quit [Ping timeout: 240 seconds]
pwnd_nsfw has quit [Ping timeout: 256 seconds]
opSUsec has joined #ruby
<sparr> damn, thanks
<sparr> gemspect is using git to get the list, and I hadn't committed the new file
_whitelogger has joined #ruby
pwnd_nsfw has joined #ruby
akkad has quit [Excess Flood]
enterprisey has quit [Remote host closed the connection]
akkad has joined #ruby
<opSUsec> question, I'm planning on moving from systems administration and network security to architectural engineering of robotics systems concurrently following my associates degree. Should I start with python, or ruby?
<sparr> elomatreb: got tips on using send with a hash of named parameters?
zacts has joined #ruby
enterprisey has joined #ruby
haraoka has joined #ruby
enterprisey has quit [Read error: Connection reset by peer]
zacts has quit [Client Quit]
opSUsec has quit [Ping timeout: 256 seconds]
zacts has joined #ruby
adrianvalenz_ has joined #ruby
tildes has joined #ruby
adrianvalenz_ has left #ruby [#ruby]
baweaver is now known as baweaver_away
AnoHito has joined #ruby
<sparr> got it working!
aglorei has quit [Remote host closed the connection]
aglorei has joined #ruby
adrianvalenz_ has joined #ruby
saneax-_-|AFK is now known as saneax
Flonk has quit [Ping timeout: 258 seconds]
nanoz has quit [Read error: Connection reset by peer]
Diabolik_ is now known as Diabolik
djbkd_ has joined #ruby
jud has joined #ruby
SteenJobs has quit [Quit: SteenJobs]
last_staff has joined #ruby
jud^ has quit [Ping timeout: 240 seconds]
* dminuoso pokes jhass
jgnagy has quit [Remote host closed the connection]
<dminuoso> I want Truffle bindings for Crystal so I can use these fancy Ruby libraries.
<dminuoso> Clearly.
whiteline has joined #ruby
Qchmqs has joined #ruby
ae01 has joined #ruby
cschneid_ has joined #ruby
<ae01> Hello, my friends.
<ae01> I have some question with ruby code.
<ae01> I wan to have some help from Ruby's programmers.
conta has joined #ruby
qchmqs_ has joined #ruby
<ae01> http://www.rubydoc.info/gems/aws-graph/0.0.5 <== I working with aws-graph.
<ae01> http://pastebin.com/7mXETBaC <== I found from this errors.
<ruby[bot]> ae01: we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/dca4db34deb99a03cbdf7a6eb97eddd2
<ruby[bot]> ae01: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
djbkd_ has quit [Ping timeout: 240 seconds]
<ae01> http://pastebin.com/6ghxG3Au <== This code.
<ruby[bot]> ae01: as I told you already, please use https://gist.github.com
cschneid_ has quit [Ping timeout: 246 seconds]
Qchmqs has quit [Ping timeout: 240 seconds]
<matthewd> ae01: What's your question?
Ishido has joined #ruby
<ae01> matthewd, I have some errors with code of ruby.
<dminuoso> ae01: Ask.
<matthewd> ae01: That's not a question.
<ae01> a bot warning to me with using pastebin.
<dminuoso> ae01: Feel free to ignore the warning or not, it's not relevant.
<ae01> Ok.
<matthewd> Yes, we can see the code. It's not a question either.
Pumukel has joined #ruby
<dminuoso> matthewd: Boh boy. I've done too much functional programming. I look at that code and realize how horrible it is.
<ae01> http://pastebin.com/7mXETBaC <== Please see a code execution.
<ruby[bot]> ae01: as I told you already, please use https://gist.github.com
<dminuoso> Just because you know.. it mutates state. :|
<dminuoso> ae01: require 'yaml'
<dminuoso> first
<dminuoso> Before using YAML
<ae01> Diabolik, How to install YAML in ubuntu 14.04
<dminuoso> ae01: it's already installed.
<dminuoso> ae01: It comes with Ruby by default but is not required by default.
qchmqs_ has quit [Quit: Konversation terminated!]
nottrollman has joined #ruby
Qchmqs has joined #ruby
djbkd_ has joined #ruby
<dminuoso> ae01: That's the difference between core libraries and standard libraries in Ruby. The former are required by default (and they are written in C), while the latter need to be required manually.
<matthewd> dminuoso: Most of it seems pretty close to functional to me
<dminuoso> matthewd: Look at those assignments to instance variables!
<dminuoso> :P
<ae01> How fix this problems?
<dminuoso> 08:27 < dminuoso> ae01: require 'yaml'
padi_ has quit [Remote host closed the connection]
<ae01> dminuoso, Ok. I will modify a ruby's code.
<dminuoso> If you dont know what that means, tells your boss that "Making this Ruby library work with EC2 is not as easy as you thought it would be, and that you need a few books to learn ruby first"
padi_ has joined #ruby
wilbert_ has quit [Ping timeout: 256 seconds]
<matthewd> s/Ruby library/CLI tool that happens to be written in Ruby/
<dminuoso> matthewd: y u no in -ot?
xall has quit [Ping timeout: 240 seconds]
<dminuoso> How can I bitch about the folks in here with you if you are not there? :S
<matthewd> (and whose full release history spans about a one month period, from three years ago)
livcd has joined #ruby
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
<livcd> Is it only me or is ruby losing momentum ?
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
<dminuoso> livcd: It doesn't as that would be a violation of the first law of Newton.
<elomatreb> dminuoso: Was about to write the same thing :<
padi_ has quit [Ping timeout: 260 seconds]
<dminuoso> elomatreb: :)
tildes has quit [Ping timeout: 240 seconds]
<dminuoso> livcd: Let's look at this from a scientific point of view: What do you base this "feeling" on?
<dminuoso> Is it just cognitive bias?
<dminuoso> Or do you have comparable studies over several years that shows a loss of popularity for Ruby?
<livcd> dminuoso: cognitive bias
<matthewd> It seems fair to say that Ruby's.. enthusiasm, perhaps, is waning
<dminuoso> livcd: Then let's do some research and find out for sure.
<dminuoso> And by the implied "we" I meant "you".
<livcd> :-)
byte512 has joined #ruby
padi_ has joined #ruby
<matthewd> There was a period where it was the "new" shiny, and now it's more unremarkable, and other things have taken on that position
<dminuoso> matthewd: Like Haskell.
<dminuoso> We should all do all the problems in Haskell.
djbkd_ has quit [Remote host closed the connection]
<matthewd> e.g. nodejs, proving that with enough effort, you can, in fact, polish.. anything
djbkd_ has joined #ruby
djbkd_ has quit [Remote host closed the connection]
<dminuoso> JavaScript needs to die.
ta_ has quit [Read error: Connection reset by peer]
<dminuoso> Real men write their programs in Lisp.
padi_ has quit [Remote host closed the connection]
djbkd_ has joined #ruby
ta_ has joined #ruby
pawnbox has quit [Ping timeout: 260 seconds]
padi_ has joined #ruby
<livcd> dminuoso: yeah JS...i am not really happy about JS...
padi_ has quit [Remote host closed the connection]
padi_ has joined #ruby
<dminuoso> livcd: The sad thing is, some parts about it are great.
padi_ has quit [Remote host closed the connection]
nottrollman has quit [Quit: q]
xall has joined #ruby
<dminuoso> It's just that things such as late binding, the "this" mess, implicit conversions and some syntax flaws (<nothing> vs let vs var) hinder things.
<elomatreb> Async-by-default is nice. npm install left-pad is not
adrianvalenz_ has quit [Remote host closed the connection]
<dminuoso> Heh.
<livcd> dminuoso: i liked coffeescript but it looks like it is also slowly dying
<dminuoso> livcd: That's because ES6 has basically fixed all those deficiencies that CoffeeScript tied to address in a much cleaner fashion.
<dminuoso> livcd: But the things I mentioned are still a problem for JavaScript.
djbkd_ has quit [Ping timeout: 256 seconds]
<livcd> dminuoso: i still prefer coffeescript to ES6
<dminuoso> livcd: CoffeeScript adds no real value, other than it disguises too much in my book.
<livcd> dminuoso: i agree
<dminuoso> Even things sucha s ES6 class syntax is dangerous, as it allows new programmers to ignore protoypial inheritance
<dminuoso> prototypial
<dminuoso> My spelling has been sucking lately, I think I have a brain tumor.
<matthewd> My frustration with coffeescript was that instead of just adding new syntax shortcuts for common verbose patterns, it semi-arbitrarily redefined things JS people already knew (the comparison operators, for example)
blackwind_123 has quit [Ping timeout: 240 seconds]
bigkevmcd has joined #ruby
<elomatreb> It got a little too close to Ruby imo, if that makes any sense
<dminuoso> matthewd: Indeed. The only thing that CS had going for it, was the compact function syntax.
<matthewd> == vs === is tricky and nuanced... but giving them two new different names doesn't help me: now I have to remember how they behave *and* the mapping
<dminuoso> But guess what. (es6) => { return "now has it" }
blackwind_123 has joined #ruby
<dminuoso> or better yet
<dminuoso> (es6) => "now has it"
<dminuoso> ;o
<dminuoso> matthewd: It's like <nothing> vs let vs var
<dminuoso> exactly the same story.
dionysus69 has joined #ruby
<elomatreb> ES6-pet peeve: `() => { ... }`. Why can't I do something like `-> {...}` if I don't have any args?
<dminuoso> You Rubyist!
<dminuoso> Go back to #ruby
<dminuoso> And stay there.
elomatreb has left #ruby ["Leaving"]
elomatreb has joined #ruby
pandaant has joined #ruby
<ae01> dminuoso, https://gist.github.com/ouychai/7e1adef5c8caeb8b24dedaa018c82eb8 <== I found an errors in a new line.
bigkevmcd has quit [Quit: Outta here...]
<ae01> dminuoso, http://pastebin.com/6ghxG3Au <== A code that an errors
<ruby[bot]> ae01: as I told you already, please use https://gist.github.com
<matthewd> ae01: We really can't offer end-user level support to any code that happens to be written in ruby
<ae01> matthewd, I will talking with my boss.
xen0fon has joined #ruby
<dminuoso> ae01: However, if you are looking for a consultant, I'm sure we could come to an arrangement..
<dminuoso> :-)
padi_ has joined #ruby
<ae01> dminuoso, I will discuss with my boss. I'm not sure about him.
Pumukel has quit [Ping timeout: 240 seconds]
padi_ has quit [Ping timeout: 240 seconds]
xen0fon has quit [Quit: xen0fon]
djbkd has quit [Quit: Leaving...]
mwlang has joined #ruby
Pumukel has joined #ruby
Pumukel has quit [Remote host closed the connection]
vondruch has quit [Ping timeout: 240 seconds]
Burgestrand has joined #ruby
yeticry_ has joined #ruby
<ae01> dminuoso, My boss has cancle this project.
aganov has joined #ruby
Asher has quit [Ping timeout: 240 seconds]
yeticry has quit [Ping timeout: 268 seconds]
jphase has quit [Ping timeout: 246 seconds]
<ae01> dminuoso, Thank you for your helpfull.
aufi has joined #ruby
zacts has quit [Ping timeout: 256 seconds]
nobitanobi has joined #ruby
nobitanobi has quit [Remote host closed the connection]
nobitanobi has joined #ruby
nofxxx has joined #ruby
mark_66 has joined #ruby
mwlang has quit [Quit: mwlang]
zacts has joined #ruby
nithinbekal has joined #ruby
jphase has joined #ruby
pulkit4tech has joined #ruby
blackmes1 has joined #ruby
nofxx has quit [Ping timeout: 268 seconds]
priodev has quit [Ping timeout: 240 seconds]
ltp has quit [Ping timeout: 256 seconds]
Asher has joined #ruby
TomyWork has joined #ruby
Silthias1 has joined #ruby
pandaant has quit [Remote host closed the connection]
teclator has joined #ruby
Silthias has quit [Ping timeout: 260 seconds]
pawnbox has joined #ruby
Snickers has joined #ruby
vondruch has joined #ruby
mwlang has joined #ruby
j2k has joined #ruby
djbkd has joined #ruby
doublemalt__ has joined #ruby
lenwood has quit [Ping timeout: 256 seconds]
andikr has joined #ruby
cibs has quit [Ping timeout: 258 seconds]
conta has quit [Ping timeout: 260 seconds]
cibs has joined #ruby
neoncortex has quit [Quit: gone]
agit0_ has joined #ruby
mwlang has quit [Quit: mwlang]
heftig[m] has joined #ruby
j2k has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cahoots has quit [Ping timeout: 240 seconds]
biberu has joined #ruby
blackmes1 has quit [Quit: WeeChat 1.6]
ta_ has quit [Remote host closed the connection]
jgnagy has joined #ruby
teddysmoker has joined #ruby
j2k has joined #ruby
Ruby_Rocks_007 has quit [Quit: Ruby_Rocks_007]
Arpanet69 has joined #ruby
mikecmpbll has joined #ruby
adrianvalenz_ has joined #ruby
nottrollman has joined #ruby
astrobunny has quit []
adrianvalenz_ has quit [Remote host closed the connection]
kies has joined #ruby
nottrollman has quit [Client Quit]
nottrollman has joined #ruby
nottrollman has quit [Client Quit]
priodev has joined #ruby
nottrollman has joined #ruby
conta has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ltp has joined #ruby
dlitvak has joined #ruby
tvw has joined #ruby
p1p10l0 has joined #ruby
nithinbekal has quit [Ping timeout: 256 seconds]
conta has quit [Ping timeout: 260 seconds]
nithinbekal has joined #ruby
cibs has quit [Ping timeout: 260 seconds]
djbkd has quit [Remote host closed the connection]
djbkd has joined #ruby
djbkd has quit [Remote host closed the connection]
djbkd has joined #ruby
cibs has joined #ruby
djbkd has quit [Remote host closed the connection]
Flonk has joined #ruby
Cohedrin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tvw has quit []
aryaching has quit [Ping timeout: 264 seconds]
ledestin has joined #ruby
aryaching has joined #ruby
ta_ has joined #ruby
tomphp has joined #ruby
ta_ has quit [Remote host closed the connection]
jtoyy has quit [Ping timeout: 240 seconds]
Beams has joined #ruby
Sammichmaker has joined #ruby
xall has quit [Ping timeout: 240 seconds]
ae01 has quit [Quit: Leaving]
ta_ has joined #ruby
shadeslayer_ is now known as shadeslayer
jtoyy has joined #ruby
haraoka has quit [Ping timeout: 240 seconds]
TomyWork has quit [Ping timeout: 240 seconds]
vuoto has joined #ruby
j2k has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
zaytsev has joined #ruby
<zaytsev> hi folks, stupid n00b question: i want to make a gem that reads its version from vcs (~git desribe) i defined function get_version and did spec.version = get_version.freeze but i get an error message undefined local variable or method `get_version' for Gem::Specification:Class
<zaytsev> is there an example somewhere i can have a look at?
stoffus has joined #ruby
<dminuoso> zaytsev: You defined get_version on the wrong thing, or you invoked it incorrectly.
<zaytsev> oh dang i was close. spec.get_version.freeze seems to work (notice i missed spec initially). nevertheless, is this the way to go?
agit0_ has quit [Ping timeout: 260 seconds]
<dminuoso> What do you mean by "is this the way to go?"
<zaytsev> dminuoso: i pasted def get_version inside Gem::Specification.new do |spec|
<zaytsev> dminuoso: i don't know is there an established way to get version via functions for gem? in python yes. that's why i'm asking
<dminuoso> zaytsev: Hard to say what that would do, because I don't know what the default definee is when a method is defined like that in the block.
stoffus_ has quit [Ping timeout: 240 seconds]
<dminuoso> zaytsev: One sec, Ill show you how I know it to be.
<zaytsev> dminuoso: thank you!
workmad3 has joined #ruby
<dminuoso> zaytsev: No you nailed it pretty much.
nithinbekal has quit [Ping timeout: 240 seconds]
<matthewd> What would a gem version read from git even look like? :/
certainty has joined #ruby
troulouliou_div2 has joined #ruby
xall has joined #ruby
<matthewd> zaytsev: My general advice would be that "how do I do this thing against the normal conventions of the system" is a deeply unwise "n00b" question. If you recognise you're new, it follows that you're going to be better off sticking to conventions until you understand what & why they are, instead of forcing through whatever you're used to from elsewhere.
<LambdaSix> Imprinting the git revision into the file isn't normally a thing that you want to do. Especially for gem versions because a git revision is merely a SHA1 hash
jaruga________ has joined #ruby
<LambdaSix> It's always a bit of a hack
<LambdaSix> Better to refine your development/release/packaging process to establish gated changesets that constitute a 'release' that you can assign a semantic version number to.
<elomatreb> The convention is to provide a `VERSION` constant in the top-level module of your gem. There are some tools that can (partially) automate that
nottrollman has quit [Ping timeout: 240 seconds]
<LambdaSix> "I want to know what exact revision this came from" is answered by creating a commit trail from a release (1.10.2) to the commits that make up the release candidate (HEAD~5..HEAD~20)
nithinbekal has joined #ruby
acalycine has quit [Quit: bye]
workmad3 has quit [Ping timeout: 240 seconds]
<dminuoso> 11:11 < matthewd> What would a gem version read from git even look like? :/
<dminuoso> matthewd: Whatever you want it to be?
<dminuoso> matthewd: I take it you are not aware of git-describe ?
nobitano_ has joined #ruby
<dminuoso> LambdaSix: It's not imprinting the commit hash, but a tag.
<dminuoso> And git-describe just gives you the most recent reachable tag -> in most cases this will be your gems version.
<matthewd> If you just use the previous tag and the counter, that doesn't seem.. compellingly descriptive
<dminuoso> Counter?
<LambdaSix> So just have a rake Package task that executes `git describe > _version` :P
Gk-1wm-su has joined #ruby
<matthewd> git describe is <tag>-<counter>-g<sha>, no?
nobitanobi has quit [Ping timeout: 258 seconds]
<dminuoso> matthewd: yeah
Gk-1wm-su has quit [K-Lined]
djbkd has joined #ruby
mikecmpbll has quit [Ping timeout: 260 seconds]
<dminuoso> LambdaSix: Why bother? You'll want the versions in tags anyway, this forces you to maintain this in git.
<dminuoso> Tossing this in a rake task just means you could forget about it
nithinbekal has quit [Ping timeout: 240 seconds]
workmad3 has joined #ruby
marr has joined #ruby
nithinbekal has joined #ruby
mikecmpbll has joined #ruby
djbkd has quit [Ping timeout: 256 seconds]
hutch34 has joined #ruby
charliesome has joined #ruby
mikecmpbll has quit [Ping timeout: 240 seconds]
hutch34 has quit [Ping timeout: 258 seconds]
vuoto has quit [Remote host closed the connection]
nithinbekal has quit [Ping timeout: 240 seconds]
mikecmpbll has joined #ruby
xall_ has joined #ruby
jameser has quit [Ping timeout: 260 seconds]
xall has quit [Ping timeout: 268 seconds]
troulouliou_div2 has quit [Quit: Leaving]
ledestin has quit [Quit: Textual IRC Client: www.textualapp.com]
tvw has joined #ruby
astrobunny has joined #ruby
xall_ has quit [Ping timeout: 240 seconds]
astrobunny has quit [Remote host closed the connection]
workmad3 has quit [Ping timeout: 240 seconds]
conta has joined #ruby
TomyWork has joined #ruby
conta has quit [Client Quit]
workmad3 has joined #ruby
nadir has quit [Quit: Connection closed for inactivity]
nithinbekal has joined #ruby
jameser has joined #ruby
<zaytsev> matthewd: you might have inferred that being a n00b i cannot judge whether this is against conventions or not, which is exactly why i'm asking the question in the first place.
brent__ has joined #ruby
<dminuoso> Uh..
<dminuoso> Why does this work
<zaytsev> lambdasix: ok i understand that according to what you said the established practice is to commit the version to the repository. we could do this, ttrue, but this doesn't feel awesome. it means i'd have to make some sort of a release script that does version bumps upon releases, and resets them after back merge and what not. in other worlds people discover artifact version from vcs tags and only hardcode versions in release tarballs.
<canton7> dminuoso, you call bar, passing a block which prints "nested". bar calls foo, passing a block which calls the block which was passed to bar. Foo calls the block that was passed to it, which calls the block passed to bar
<dminuoso> canton7: What I mean is..
jespada has joined #ruby
brent__ has quit [Ping timeout: 246 seconds]
<dminuoso> canton7: I would have expected this to error out with a SystemStackError
<canton7> why?
<zaytsev> matthewd: re. git describe, not necessarily. this is what it looks like for non-tagged commits, but if you tag releases you can get exact version number from git describve like v0.2.3
<dminuoso> asm>> def foo; yield end; def bar; foo { yield } end; bar { puts "nested" }
<ruby[bot]> dminuoso: I have disassembled your code, the result is at https://eval.in/748847
<dminuoso> asm>> { yield }
<ruby[bot]> dminuoso: I have disassembled your code, the result is at https://eval.in/748848
<dminuoso> asm>> f() { yield }
<ruby[bot]> dminuoso: I have disassembled your code, the result is at https://eval.in/748849
<dminuoso> canton7: I think I just answered my question.
<canton7> ok, great. Still not sure where the confusion came from, but it doesn't matter
<dminuoso> canton7: I completely forgot that yield is not a Kernel#yield method but a built-in
<dminuoso> And that blocks do not differ from methods much
<dminuoso> Yeah
cschneid_ has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
im314ous has joined #ruby
bkxd has quit [Ping timeout: 256 seconds]
cschneid_ has quit [Ping timeout: 246 seconds]
catphish has joined #ruby
<catphish> can one use poll() in ruby?
<catphish> i've been using epoll using a gem, but need OSX compatibility, poll seems the obvious option
<dminuoso> One does not simply epoll under OSX.
<dminuoso> You should be asking for kqueue.
<catphish> i was hoping to just use something with support for both platforms, doesn't even need to be high performance in this case
<catphish> might use select, but figured poll would be better
<dminuoso> catphish: What exactly do you want to poll/select?
<catphish> several (less than 100) TCP sockets (both listeners and open sockets)
<catphish> unless there's something that will abstract epoll and kqueue for me, that would work
Burgestrand has quit [Quit: Closing time!]
<zaytsev> dminuoso: so `gem build myspec` works, but bundler install says private method `get_version' called for #<Gem::Specification:0x3f9313266598 ... do you happen to know why does it try to run it, and how do i make it public?
<dminuoso> catphish: You could reuse a higher level library such as eventmachine - is that an option for you?
nithinbekal has quit [Ping timeout: 260 seconds]
<catphish> it's certainly possible, i've written everything with epoll, but its not a huge app, could certainly throw it away and use EM instead
<catphish> EM is likely better than my DIY method
<catphish> i've never actually used it, but maybe now's time to try
<catphish> it's basically just a TCP proxy of sorts
nadir has joined #ruby
JeanCarloMachado has joined #ruby
<catphish> thanks dminuoso
<matthewd> catphish: I'd recommend nio4r
certainty has quit [Ping timeout: 240 seconds]
<matthewd> EM is.. invasive
<catphish> matthewd: thanks, that looks cool, EM is certainly overkill, but i'm gonna try it for now, it might make things super easy
<catphish> perhaps i'll read the nio4r docs first
jespada has quit [Quit: WeeChat 1.4]
flying has joined #ruby
<matthewd> There's also e.g. https://github.com/socketry/socketry-async, but I've only worked with nio4r directly
im314ous has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<matthewd> IMO the only thing you need to know about EM is that https://github.com/royaltm/ruby-em-pg-client exists
harfangk has joined #ruby
<matthewd> (which I may be misunderstanding, because it always caused me too many issues to get that far.. but at a glance, it seems to imply the "switch" to EM's scheduler means you really don't want to use 'normal' IO-performing libraries, and need special EM variants for everything)
<catphish> just run into the first hurdle with EM, its start_tls method doesn't accept a CA file
EV3RYDAYPR0GRESS has quit [Read error: Connection reset by peer]
<catphish> that seems like quite an oversight
xall_ has joined #ruby
EV3RYDAYPR0GRESS has joined #ruby
<matthewd> General hazard of a parallel-API-reimplementation strategy
<catphish> indeed
* catphish tries nio4r
<catphish> matthewd: do you know if you can register an instance of something that manages a socket, rather than just the socket itself?
<catphish> like, it's all very well knowing when there's data waiting on a TCP connection, but i have an instance that owns that tcp connection that needs a method calling on it to get the data
<matthewd> Yes
<catphish> matthewd: lovely!
xall_ has quit [Ping timeout: 260 seconds]
<zaytsev> dminuoso: ah, i put get_version in a separate class VersionProvider and it also works with bundler :-)
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
xen0fon has joined #ruby
nobitano_ has quit [Remote host closed the connection]
KicStart has joined #ruby
workmad3 has quit [Ping timeout: 240 seconds]
jameser has joined #ruby
milardovich has joined #ruby
jenrzzz has quit [Ping timeout: 246 seconds]
Violentr has joined #ruby
bruce_lee has joined #ruby
ruid has joined #ruby
ruid has quit [Changing host]
ruid has joined #ruby
hutch34 has joined #ruby
workmad3 has joined #ruby
jameser has quit [Max SendQ exceeded]
bmurt has joined #ruby
nithinbekal has joined #ruby
jameser has joined #ruby
pwnd_nsfw` has joined #ruby
kristofferR has quit [Quit: Textual IRC Client: www.textualapp.com]
nithinbekal has quit [Ping timeout: 240 seconds]
mekeor has joined #ruby
pwnd_nsfw has quit [Ping timeout: 260 seconds]
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<maattdd> matthewd: I'm using EM with normal sync PG gem, it is working if you can afford blocking the EM reactor for the time of the PG request
jdm has quit [Read error: Connection reset by peer]
<matthewd> maattdd: Yeah, that's a pretty big "if"
jdm has joined #ruby
<maattdd> Indeed, but still better than everything sync (In my case, I only do async external http requests)
u10100010 has joined #ruby
CloCkWeRX has quit [Ping timeout: 260 seconds]
mhunt has joined #ruby
shinnya has joined #ruby
anisha has quit [Quit: This computer has gone to sleep]
djbkd has joined #ruby
<cout> I need to repeatedly replace "/__/" with "/../" in a filename. my first attempt was naive: filename.gsub(%r{/__/}, '') but this fails for "foo/__/__/bar" -- any suggestions?
lxsameer has joined #ruby
<canton7> cout, .gsub(%r{(?<=/)__(?=/)}, '..')
pawnbox has quit [Remote host closed the connection]
djbkd has quit [Ping timeout: 260 seconds]
pawnbox has joined #ruby
last_staff has quit [Quit: last_staff]
skolman_ has quit [Remote host closed the connection]
<cout> interesting
ruid has quit [Ping timeout: 260 seconds]
stoffus_ has joined #ruby
Burgestrand has joined #ruby
CloCkWeRX has joined #ruby
<canton7> :) lookarounds can be awesome
<cout> yeah I had to look it up
stoffus has quit [Ping timeout: 264 seconds]
kristofferR has joined #ruby
<cout> danke
jsrn_ has joined #ruby
milardovich has quit [Remote host closed the connection]
milardovich has joined #ruby
certainty has joined #ruby
cfec0b8d has quit [Quit: Leaving.]
milardovich has quit [Ping timeout: 240 seconds]
mhunt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jdm has quit [Quit: Leaving]
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
nobitanobi has joined #ruby
tyang has joined #ruby
jdm has joined #ruby
coatezy has quit [Ping timeout: 258 seconds]
jameser has joined #ruby
Ishido has quit [Quit: Roads? Where We're Going We Don't Need Roads.]
d0nn1e has quit [Ping timeout: 240 seconds]
Derperperd has quit [Ping timeout: 240 seconds]
d0nn1e has joined #ruby
herbmillerjr has quit [Quit: Konversation terminated!]
coatezy has joined #ruby
milardovich has joined #ruby
mrwn has joined #ruby
jose_leeto has joined #ruby
<catphish> matthewd: sorry to ask directly, but do you know offhand how to change the r/w status of a socket registered with nio?
bkxd has joined #ruby
<matthewd> catphish: See that actioncable file I linked to earlier
synthroid has joined #ruby
<matthewd> It's pretty small, and is the only file that touches nio, so should be pretty self-contained
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<catphish> monitor.interests = :rw
<catphish> yep, cool :)
<catphish> thanks again
<matthewd> Yeah, that's the one :)
<matthewd> No worries!
synthroi_ has joined #ruby
<matthewd> catphish: You may also be interested in https://github.com/socketry/nio4r/pull/124
JeanCarloMachado has quit [Read error: Connection reset by peer]
<catphish> i'll try as-is and see if i run into anything nasty :)
JeanCarloMachado has joined #ruby
<zaytsev> so is there a good way to fail ruby script if command fails while still capturing its output in a variable. i.e. foo = `bang`.chomp will ignore return code of bang. i understand there is a special varialbe $? but i'm not sure how to marry it with output capturing
Xentil has joined #ruby
jameser has joined #ruby
<dminuoso> 12:42 < matthewd> EM is.. invasive
<dminuoso> dont be hating
<dminuoso> it uses reactor pattern!
synthroid has quit [Ping timeout: 260 seconds]
<matthewd> So did Chernobyl
<catphish> zaytsev: consider using open2
<zaytsev> catphish: :( i need to do it in gemspec, so would try to avoid anything external
brent__ has joined #ruby
<matthewd> zaytsev: I really recommend against inventing your own release process
<dminuoso> matthewd: Clearly EM wins.
<catphish> zaytsev: looks like IO.popen gives you all you need
Derperperd has joined #ruby
Violentr has quit [Ping timeout: 240 seconds]
<matthewd> zaytsev: But $? gets set after `..`, so you can check whether it is $?.success?
<dminuoso> catphish: nio4r is definitely an alternative by the way
<dminuoso> doesnt rails use nio4r?
<dminuoso> i.e. actioncable
gnufied has quit [Quit: Leaving]
Violentr has joined #ruby
<matthewd> dminuoso: Yep.
<catphish> zaytsev: yeah, i just realised what matthewd is right, backticks set $?
<catphish> so you only need to use `command`; $?
<catphish> dminuoso: i am now using nio4r, works perfectly :)
<dminuoso> catphish: Fun fact, did you know that these special vars are not actual ruby variables?
<dminuoso> (And thus are not actually set)
<catphish> dminuoso: i never understood "special" variables really
<zaytsev> matthewd: i understood your recommendation, but this is not a normal ruby gem i'm working on. it's just a jekyll theme which happens to be packaged as a gem, and i'd hate to have yet another different process for my team to handle just because in the gem community it seems normal to hardcode version numbers in repository. literally, everybody else get them from vcs tags in one form or another.
<catphish> like $1 which looks like a global variable but is thread safe
<zaytsev> catphish: so foo = `bar`.chomp ; fail unless $? == 0 ?
<catphish> zaytsev: yes
<catphish> actuall no
<catphish> $? isn't an integer
last_staff has joined #ruby
brent__ has quit [Ping timeout: 260 seconds]
<catphish> its a Process::Status
<catphish> $?.success?
<catphish> or $?.exitstatus == 0
coatezy has quit [Ping timeout: 260 seconds]
<catphish> not sure what success? does
<matthewd> Looks like `$? == 0` does actually work, because ruby
coatezy has joined #ruby
<matthewd> (but it's not comparing to the exit status, but the raw result; exitstatus 1 is == 256, not == 1)
<catphish> oh ok :)
skolman_ has joined #ruby
<catphish> wow ruby.
<dminuoso> catphish: They are called DVARs (i.e. dynamic variable) internally. These variables are basically functional variables whose value is calculated dynamically at runtime.
<catphish> dminuoso: makes sense :)
itsautomatisch has joined #ruby
brodul has quit [Ping timeout: 260 seconds]
<dminuoso> Or.. Im not so sure about that name right now.
armin has quit [Quit: relate to the matter as i drop the bomb]
<dminuoso> Ox0dea used to have a really neat hack to expose them into Rubyland.
<dminuoso> But my logs from those times are gone. :/
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
armin has joined #ruby
MrBismuth has joined #ruby
<zaytsev> catphish: ah excellent this works now =) if one forgets to push a tag the build fails as it should
skolman_ has quit [Ping timeout: 256 seconds]
<zaytsev> thank you all
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
gnufied has joined #ruby
brodul has joined #ruby
<catphish> you're welcome :)
<nofxxx> $? == $CHILD_STATUS , if you like more readable... unfortunely more php... the dark ages
cfec0b8d has joined #ruby
brodul has quit [Client Quit]
MrBusiness3 has joined #ruby
* nofxxx likes $ before numbers... not vars
brodul has joined #ruby
MrBusiness has quit [Ping timeout: 260 seconds]
griffindy has joined #ruby
<bmurt> anyone running into a segfault with json gem and ruby 2.4.0 or 2.3.3? https://github.com/flori/json/issues/318 but i’m not entirely sure the issue is in the json gem or something else i used rvm to change to ruby 2.3.3 and getting the same result with the json 1.8.6 gem vs 2.0.3
<matthewd> >> %w($? $~ $1).map {|v| RubyVM::InstructionSequence.compile(v).disassemble.lines[2].chomp } * "; "
<ruby[bot]> matthewd: # => "0002 getglobal $?; 0002 getglobal $~; 0002 getspecial 1, 2" (https://eval.in/748962)
MrBismuth has quit [Ping timeout: 260 seconds]
xall_ has joined #ruby
mhunt has joined #ruby
__Yiota has joined #ruby
<dminuoso> bmurt: Please post the complete output of your crash output in a gist.
<bmurt> it's in the github issue
<dminuoso> Oh that is you?
<bmurt> yes
MrBusiness3 has quit [Ping timeout: 260 seconds]
maattdd_ has joined #ruby
<dminuoso> bmurt: Found your issue
<dminuoso> You can close it too.
<bmurt> user error? :D
<dminuoso> bmurt: Yes and no.
<dminuoso> c:0012 p:0115 s:0052 e:000051 METHOD /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55
<dminuoso> c:0011 p:0009 s:0042 e:000041 CLASS /Users/brendan/.rvm/gems/ruby-2.4.0@ruby-jenkins-metrics/gems/json-2.0.3/lib/json/ext.rb:7
<dminuoso> Look at that
<dminuoso> And tell me if you can spot it
<matthewd> (that is of course still a lie: $~, for example, isn't even merely thread-local, but *scope* local)
<dminuoso> bmurt: Dont worry Ill wait until you can see the error.
<bmurt> paths?
<dminuoso> bmurt: Look closer.
MrBusiness3 has joined #ruby
<bmurt> i'm not sure. i see different paths and also method vs class but not sure of the issue
<dminuoso> bmurt: What do those paths means?
maattdd__ has joined #ruby
<dminuoso> bmurt: This is an educational game. I want you to find the issue.
<bmurt> the first is looking at the system ruby vs the rvm
<bmurt> in the later path
<dminuoso> bmurt: Great. So this is definitely an issue. Now look at the versions.
<dminuoso> Do they differ?
<bmurt> yeah, i see that
<dminuoso> That's the issue.
maattdd has quit [Ping timeout: 264 seconds]
Derperperd has quit [Ping timeout: 258 seconds]
<bmurt> gotcha. i'm not sure how i got into that predicament. i use .ruby-version and .ruby-gemset files and RVM
<bmurt> not sure how it went to the system unless it's because of the json system version
* dminuoso sits back making but avoids making any fun remarks about how RVM regularly causes issues
<dminuoso> bmurt: try gem pristine on it
ldnunes has joined #ruby
maattdd_ has quit [Ping timeout: 246 seconds]
<dminuoso> bmurt: The issue is that the gem was wrongly built against ruby 2.0.0
<nofxxx> rvm/rubyenv whatever... creating more trouble than the ruby 1.x -> 2.x move. Almost removing java from the original tool to solve a problem that creates two
<dminuoso> ^-
<dminuoso> Though rbenv creates far less issues.
<dminuoso> But not a day goes by with at least 2-3 people coming in here, having serious issues with rvm.
<matthewd> RVM has many more features than rbenv or chruby
<nofxxx> ruby is not a ill-stupid-designed language (like python) so the move was easy
<bmurt> [brendan@wayward ruby-jenkins-metrics]$ gem pristine json
<bmurt> Restoring gems to pristine condition...
<bmurt> Skipped json-2.0.2, it is a default gem
<bmurt> Building native extensions. This could take a while...
<bmurt> Restored json-2.0.3
malconis has joined #ruby
malconis has quit [Read error: Connection reset by peer]
sepp2k has joined #ruby
<bmurt> after that i executed my script again and same result
<matthewd> Unfortunately, "conveniently switch between ruby versions" often doesn't seem to be one of them
MrBusiness3 has quit [Ping timeout: 258 seconds]
u10100010 has quit [Ping timeout: 258 seconds]
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<matthewd> bmurt: `gem env`
<bmurt> that's showing the pristine command, gem list, etc
<bmurt> also added gem env output per matthewd's request
milardovich has quit [Remote host closed the connection]
<matthewd> Oh.. what's the #! in that file look like?
jameser has joined #ruby
milardovich has joined #ruby
<bmurt> #!/usr/bin/ruby
<matthewd> I don't think rvm interferes heavily enough to override that
last_staff has quit [Quit: vroom vroom]
<matthewd> `/usr/bin/env ruby` might do better?
mhunt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<dminuoso> rvm interferes
<dminuoso> that was the correct terminology
ElDoggo has joined #ruby
jameser has quit [Client Quit]
<bmurt> so is it best to use: /usr/bin/env ruby
Snickers has quit [Ping timeout: 258 seconds]
<matthewd> Probably. That way it'll search the current path when it's run.
<bmurt> gotcha
<bmurt> i do see the error of my ways by doing /usr/bin/ruby -v versus /usr/bin/env ruby -v
milardovich has quit [Ping timeout: 260 seconds]
Derperperd has joined #ruby
cfec0b8d has quit [Remote host closed the connection]
ElDoggo has quit [Remote host closed the connection]
cfec0b8d has joined #ruby
<bmurt> should the shebang be /usr/bin/env ruby?
griffindy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
BackEndCoder has quit [Excess Flood]
arathunku has joined #ruby
<ytti_> if you do gems, it'll create appropriate shebang for you
yqt has joined #ruby
malconis has joined #ruby
jgnagy has quit [Remote host closed the connection]
arathunku has quit [Quit: WeeChat 1.6]
BackEndCoder has joined #ruby
jgnagy has joined #ruby
padi_ has joined #ruby
mhunt has joined #ruby
hutch34 has quit [Ping timeout: 246 seconds]
nowhereman has joined #ruby
<matthewd> bmurt: Yes, for a (non-gem) script, the shebang will be best going via env
lxsameer has quit [Quit: WeeChat 1.5]
padi_ has quit [Ping timeout: 256 seconds]
lxsameer has joined #ruby
mekeor has quit [Ping timeout: 240 seconds]
milardovich has joined #ruby
ramortegui has joined #ruby
ElDoggo has joined #ruby
xen0fon has quit [Quit: xen0fon]
ElDoggo has quit [Remote host closed the connection]
Snickers has joined #ruby
heftig has left #ruby [#ruby]
nobitanobi has quit [Read error: Connection reset by peer]
nobitanobi has joined #ruby
Snickers has quit [Ping timeout: 240 seconds]
jameser has joined #ruby
cdg has joined #ruby
pulkit4tech has quit [Read error: Connection reset by peer]
pulkit4tech has joined #ruby
cfec0b8d has quit [Remote host closed the connection]
mekeor has joined #ruby
jtoyy has quit [Ping timeout: 246 seconds]
ElDoggo has joined #ruby
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<mekeor> what do you think about my first ruby class (for pretty console logs)? http://codepad.org/Wpm7bRzY (example usage at bottom.) it's for pretty terminal output as lists :) it's still tiny but kinda sweet
cfec0b8d has joined #ruby
ElDoggo has quit [Remote host closed the connection]
aupadhye has quit [Quit: Leaving]
baked__beans has joined #ruby
dmn_ has left #ruby ["Leaving"]
djbkd has joined #ruby
cibs has quit [Ping timeout: 240 seconds]
Xentil has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
jameser has joined #ruby
patarr has joined #ruby
cibs has joined #ruby
Burgestrand has quit [Quit: Closing time!]
djbkd has quit [Ping timeout: 240 seconds]
<dminuoso> ?indent
<ruby[bot]> dminuoso: I don't know anything about indent
<dminuoso> ?tab
<dminuoso> ?tabs
<dminuoso> ?spaces
<ruby[bot]> dminuoso: I don't know anything about tab
<ruby[bot]> Ruby community standards recommend using 2 spaces as indentation (see https://github.com/bbatsov/ruby-style-guide#spaces-indentation and https://ukupat.github.io/tabs-or-spaces/).
<dminuoso> mekeor: ^- that
skolman has joined #ruby
DLSteve has joined #ruby
<dminuoso> mekeor: Also I would use explicit method call parens in most of these cases.
<mekeor> dminuoso: i did use 2 spaces for indentation...
<dminuoso> Oh
<dminuoso> mekeor: Nevermind, it was just vertically aligned arguments. Nevermind. :)_
<dminuoso> mekeor: Looks neat as a starter.
<dminuoso> mekeor: Only one real criticsm point: Avoid class variables unless you mean to use them.
<dminuoso> Use class-instance variables instead.
<mekeor> uhm, no idea what that means :D
* mekeor googles
millerti has joined #ruby
<mekeor> ah, that @@ vs @ thing, i see
xen0fon has joined #ruby
<mekeor> well, you know, i was only using the class directly, as Log.blah, so i thought that's what i want
<mekeor> but maybe it'd be better to have to create an instance of that class, indeed
jtoyy has joined #ruby
skolman has quit [Ping timeout: 240 seconds]
dionysus69 has quit [Ping timeout: 240 seconds]
catphish has left #ruby ["Leaving"]
GinoManWorks has quit [Ping timeout: 260 seconds]
baweaver_away is now known as baweaver
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
bkxd has quit [Ping timeout: 240 seconds]
tvw has quit [Ping timeout: 258 seconds]
fuzzyhorns has joined #ruby
cfec0b8d has quit [Remote host closed the connection]
cfec0b8d has joined #ruby
pawnbox has quit [Ping timeout: 256 seconds]
brodul has quit [Quit: My hovercraft is full of eels!!]
brodul has joined #ruby
brodul has quit [Client Quit]
joneshf-laptop has joined #ruby
brodul has joined #ruby
Derperperd has quit [Ping timeout: 246 seconds]
rippa has joined #ruby
jrafanie has joined #ruby
brodul has quit [Client Quit]
cfec0b8d has quit [Remote host closed the connection]
brodul has joined #ruby
sxm has joined #ruby
jtoyy has quit [Ping timeout: 240 seconds]
<sxm> hi!
<mekeor> hi sxm :)
jrafanie_ has joined #ruby
centrx has joined #ruby
centrx has joined #ruby
centrx has quit [Changing host]
<sxm> 有说中文的的吗?
ElDoggo has joined #ruby
<sxm> 大家都是ruby deployer?
rippa has quit [Ping timeout: 256 seconds]
jrafanie has quit [Ping timeout: 240 seconds]
<sxm> 好安静
rippa has joined #ruby
fuzzyhorns1 has joined #ruby
Ruby_Rocks_007 has joined #ruby
<centrx> sxm: ruby deployer: capistrano
<sxm> I'm JAVA deployer
<sxm> no ruby!
<mekeor> sxm: you could try #ruby-tw
fuzzyhorns has quit [Ping timeout: 258 seconds]
<sxm> It's nice!
<mekeor> (for taiwan. they speak almost the same language, i guess? no?)
jschoolcraft has joined #ruby
<sxm> NO,I'm HangZhou.
jtoyy has joined #ruby
mtkd has quit [Ping timeout: 240 seconds]
<sxm> I usually speak Chinese。
antgel has joined #ruby
<sxm> Are you all from the American developer?
mtkd has joined #ruby
aufi has quit [Ping timeout: 240 seconds]
saneax is now known as saneax-_-|AFK
sdxxqa has joined #ruby
<mekeor> i'm from europe. but i think there are many ruby-developers from all over the world. especially, since ruby was designed by Yukihiro Matsumoto, a japanese
Puffball has joined #ruby
ruby-lang329 has joined #ruby
jdm has quit [Remote host closed the connection]
<sxm> Europe is a beautiful place, hope to see Europe in the future.
marahin has joined #ruby
marahin has left #ruby ["Textual IRC Client: www.textualapp.com"]
jdm has joined #ruby
<sxm> At present the more fire technology is micro service.
cschneid_ has joined #ruby
<sxm> One-stop SAAS platform.
SteenJobs has joined #ruby
lxsameer has quit [Quit: WeeChat 1.5]
jdm has quit [Remote host closed the connection]
lxsameer has joined #ruby
jdm has joined #ruby
<sxm> We just got off work!
cschneid_ has quit [Ping timeout: 258 seconds]
<centrx> Work never stops here in America
dionysus69 has joined #ruby
aufi has joined #ruby
cpruitt has joined #ruby
certainty has quit [Ping timeout: 240 seconds]
andikr has quit [Remote host closed the connection]
MrBusiness has joined #ruby
Qchmqs has quit [Ping timeout: 256 seconds]
arathunku has joined #ruby
<sxm> We work here more serious overtime!
pawnbox has joined #ruby
MyMind has joined #ruby
<centrx> I worked 244 hours last week. How many you work?
Sembei has quit [Ping timeout: 260 seconds]
<sxm> 60 hours.
pawnbox has quit [Ping timeout: 246 seconds]
teclator has quit [Remote host closed the connection]
ruby-lang329 has quit [Ping timeout: 260 seconds]
pawnbox has joined #ruby
<sxm> A total of 168 hours a week,how could you work 244 hours?
<sxm> @centrx
<centrx> Serious overtime. Time travel overtime
codeshah has joined #ruby
codeshah has quit [Client Quit]
<sxm> You are too humorous!
<eam> moonlighting
codeshah has joined #ruby
<codeshah> Hey guys, I want to take my first [rootdomain]/:cityname .. the :cityname and then do something on the page... [:cityname] is not in the database, it can be anything. How do I do this?
Burgestrand has joined #ruby
<centrx> codeshah: Are you using a web framework?
pulkit4tech has quit [Quit: My Mac is sleepy ZZZ...]
<sxm> Powerless!
maattdd has joined #ruby
chouhoulis has quit [Remote host closed the connection]
maattdd__ has quit [Ping timeout: 268 seconds]
chouhoulis has joined #ruby
maattdd_ has joined #ruby
aganov has quit [Remote host closed the connection]
BackEndCoder has quit [Excess Flood]
sxm has quit [Quit: WeeChat 1.5]
iwmrby has joined #ruby
aufi has quit [Ping timeout: 240 seconds]
skolman has joined #ruby
cschneid_ has joined #ruby
cschneid_ has quit [Remote host closed the connection]
iwmrby has quit [Client Quit]
cschneid_ has joined #ruby
agent_white has joined #ruby
sid_fules has joined #ruby
maattdd has quit [Ping timeout: 258 seconds]
BackEndCoder has joined #ruby
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<agent_white> Mornin' folks
ElDoggo has quit [Remote host closed the connection]
skolman has quit [Ping timeout: 240 seconds]
bkxd has joined #ruby
ruby-lang721 has joined #ruby
jtoyy has quit [Ping timeout: 268 seconds]
certainty has joined #ruby
synthroi_ has quit [Remote host closed the connection]
ta_ has quit [Remote host closed the connection]
xall_ has quit [Ping timeout: 268 seconds]
mwlang has joined #ruby
vondruch has quit [Quit: vondruch]
tercenya_ has quit []
tercenya has joined #ruby
jtoyy has joined #ruby
mark_66 has quit [Remote host closed the connection]
xen0fon has quit [Quit: xen0fon]
Burgestrand has quit [Quit: Closing time!]
malconis has left #ruby ["Textual IRC Client: www.textualapp.com"]
mekeor has quit [Remote host closed the connection]
cschneid_ has quit [Read error: Connection reset by peer]
cschnei__ has joined #ruby
cibs has quit [Ping timeout: 240 seconds]
antoniobeyah has joined #ruby
cibs has joined #ruby
sdxxqa has quit [Remote host closed the connection]
j2k has joined #ruby
synthroid has joined #ruby
haylon has joined #ruby
hutch34 has joined #ruby
CloCkWeRX has quit [Quit: Leaving.]
xtsaqc has joined #ruby
xall_ has joined #ruby
hutch34 has quit [Ping timeout: 246 seconds]
u10100010 has joined #ruby
j2k has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
troulouliou_dev has joined #ruby
tau has joined #ruby
TomyWork has quit [Read error: Connection reset by peer]
jtoyy has quit [Ping timeout: 240 seconds]
Robtop__ has joined #ruby
ruby-lang721 has quit [Ping timeout: 260 seconds]
cdg_ has joined #ruby
kies has quit [Quit: baaaaiiiiiiiiiii~]
tlaxkit has joined #ruby
Silthias has joined #ruby
pawnbox has quit [Remote host closed the connection]
Silthias1 has quit [Ping timeout: 246 seconds]
oncall-pokemon has joined #ruby
pwnd_nsfw` has quit [Ping timeout: 260 seconds]
cdg has quit [Ping timeout: 246 seconds]
doublemalt_ has joined #ruby
u10100010 has quit [Quit: Verlassend]
Derperperd has joined #ruby
aglorei has quit [Remote host closed the connection]
aglorei has joined #ruby
Pumukel has joined #ruby
Silthias1 has joined #ruby
jtoyy has joined #ruby
shinnya has quit [Ping timeout: 258 seconds]
doublemalt__ has quit [Ping timeout: 240 seconds]
Silthias has quit [Ping timeout: 260 seconds]
reznik has joined #ruby
<reznik> Oh finally I got
<reznik> Hello
brodul has quit [Quit: My hovercraft is full of eels!!]
ElDoggo has joined #ruby
brodul has joined #ruby
last_staff has joined #ruby
brent__ has joined #ruby
<reznik> I.m really a beginner in ruby and I was wondering if somebody could help me out a little
brent__ has quit [Read error: Connection reset by peer]
brent__ has joined #ruby
tau has quit [Ping timeout: 246 seconds]
reznik has quit [Client Quit]
JeanCarloMachado has quit [Read error: Connection reset by peer]
JeanCarloMachado has joined #ruby
reznik has joined #ruby
TomyLobo has joined #ruby
marcdel has quit [Read error: Connection reset by peer]
marcdel has joined #ruby
<reznik> How can I add a pair of key/value to a hash?
<dminuoso> reznik: Get a ruby book
<dminuoso> ?books
<ruby[bot]> You can find a list of recommended books at http://ruby-community.com/pages/links
<reznik> right
<reznik> I use codeacademy
<reznik> is just that
<reznik> The instruction that they give me
<reznik> Makes 0 sense to me
<reznik> numbers = {}
<reznik> numbers["one"] = 1
<reznik> # prints out "4"
<reznik> puts 3 + numbers["one"]
<reznik> Thats supposed to add a key/value?
<reznik> Ah right
<reznik> thanks
<reznik> i.ll try it out
<reznik> :)
<baweaver> Do you know how a hash works?
<baweaver> don't
<baweaver> ?gist
<ruby[bot]> https://gist.github.com - Multiple files, syntax highlighting, even automatically with matching filenames, can be edited
synthroid has quit [Remote host closed the connection]
certainty has quit [Ping timeout: 240 seconds]
<baweaver> use gist for pasting code next time
<baweaver> IRC will autoban you for that
<baweaver> thinks you're spamming
zapata has quit [Ping timeout: 258 seconds]
<baweaver> Also see the channel topic for a list of Ruby books
<reznik> What to do you mean by how a hash work?
<reznik> Its more or less an array
<reznik> like
<reznik> with an each iteration it goes through keys and valuse
<reznik> Sorry I don't understand what you mean
Puffball has quit [Ping timeout: 240 seconds]
<baweaver> In your code you've already done it
<baweaver> so it's an odd question
Puffball has joined #ruby
username1 has joined #ruby
<baweaver> I'd be hesitant to say Hashes and Arrays are similar though much past their accessors
pawnbox has joined #ruby
<baweaver> (which, in that case, would also pull in Procs)
<dminuoso> Hashes and Arrays are the same. Look:
blackwind_123 has quit [Quit: Some folks are wise, and some otherwise.]
* baweaver does not see
<dminuoso> >> [{}, {}] == {[]:[]} || true
* baweaver twiddles thumbs in anticipation
<ruby[bot]> dminuoso: # => /tmp/execpad-4209d95a12f9/source-4209d95a12f9:2: syntax error, unexpected ':', expecting => ...check link for more (https://eval.in/749118)
<dminuoso> >> [{}, {}] == {[]=>[]} || true
<ruby[bot]> dminuoso: # => true (https://eval.in/749119)
<dminuoso> clearly.
<dminuoso> I'd like you to prove me wrong now!
<herwin> actually, in perl arrays and hashes are more or less equal
* dminuoso pokes baweaver with a troll pole
hutch34 has joined #ruby
<reznik> That wasn't my code
* baweaver stares blankly
<reznik> It was the instruction I got from codeacademy
<baweaver> I've not had nearly enough coffee to understand how that worked.
<baweaver> explain
<reznik> It just that made no sense for me thats all
nettoweb has joined #ruby
<baweaver> ah
<baweaver> || true
<baweaver> cheater
<dminuoso> baweaver: Clearly. Id like you stare the code long until, until you hunt me down with the banhammer
<dminuoso> Haha.
<dminuoso> I got you though.
<baweaver> >> hash = {}; hash['key'] = 'value'; hash
<ruby[bot]> baweaver: # => {"key"=>"value"} (https://eval.in/749121)
<dminuoso> baweaver: I can also provide you an example involving the use of Fiddle..
<baweaver> bot?
<baweaver> >> 1
<ruby[bot]> baweaver: # => 1 (https://eval.in/749122)
brendan- has joined #ruby
n1ce has quit [Remote host closed the connection]
synthroid has joined #ruby
aufi has joined #ruby
tsunamie has quit [Ping timeout: 240 seconds]
n1ce has joined #ruby
tsunamie has joined #ruby
<baweaver> Silly bot is silly
zapata has joined #ruby
spmd has joined #ruby
<spmd> Hello
<havenwood> spmd: hi
<spmd> havenwood: sup
resin has quit [Ping timeout: 240 seconds]
nowhereman has quit [Ping timeout: 240 seconds]
tenderlove has joined #ruby
xen0fon has joined #ruby
loechel has joined #ruby
p1p10l0 has quit [Ping timeout: 260 seconds]
SteenJobs has quit [Quit: SteenJobs]
aglorei has quit [Remote host closed the connection]
aglorei has joined #ruby
Pumukel has quit [Ping timeout: 258 seconds]
faces has quit [Read error: Connection reset by peer]
vF3hNGxc47h8 has joined #ruby
faces has joined #ruby
Guest98519 has quit [Remote host closed the connection]
skolman has joined #ruby
cdg_ has quit [Remote host closed the connection]
cdg has joined #ruby
[Butch] has joined #ruby
marxarelli has joined #ruby
CrazEd has joined #ruby
CrazEd is now known as Guest66078
nobitanobi has quit [Remote host closed the connection]
[Butch] has quit [Client Quit]
nobitanobi has joined #ruby
[Butch] has joined #ruby
harfangk has quit [Quit: Textual IRC Client: www.textualapp.com]
nobitano_ has joined #ruby
nobitanobi has quit [Remote host closed the connection]
tlaxkit has quit [Quit: ¡Adiós!]
duderonomy has quit [Ping timeout: 256 seconds]
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
szulak has joined #ruby
nobitano_ has quit [Remote host closed the connection]
cahoots has joined #ruby
Fernando-Basso has joined #ruby
nobitanobi has joined #ruby
nobitanobi has quit [Remote host closed the connection]
nobitanobi has joined #ruby
teclator has joined #ruby
Arpanet69 has quit [Ping timeout: 256 seconds]
Violentr has quit [Quit: jIRCii - http://www.oldschoolirc.com]
jsrn_ has quit [Quit: Leaving]
maattdd has joined #ruby
maattdd_ has quit [Ping timeout: 240 seconds]
zacts has quit [Ping timeout: 258 seconds]
nettoweb1 has joined #ruby
Violentr has joined #ruby
nettoweb has quit [Ping timeout: 260 seconds]
sneakerhax has quit [Ping timeout: 240 seconds]
Anonymoose2 has joined #ruby
spmd has quit [Quit: WeeChat 1.4]
maattdd_ has joined #ruby
sniffer has joined #ruby
last_staff has quit [Quit: last_staff]
reverberations has quit [Ping timeout: 240 seconds]
cahoots has quit [Ping timeout: 240 seconds]
Guest66078 is now known as CrazEd
username1 has quit [Quit: Lost terminal]
Lord_of_Life has quit [Excess Flood]
CrazEd is now known as Guest90411
maattdd has quit [Ping timeout: 260 seconds]
arathunku has quit [Quit: WeeChat 1.6]
Lord_of_Life has joined #ruby
whathappens has joined #ruby
raspado has joined #ruby
whathappens is now known as Guest37542
username1 has joined #ruby
Guest37542 has quit [Client Quit]
gusrub has joined #ruby
xtsaqc has quit [Read error: Connection reset by peer]
SteenJobs has joined #ruby
tpendragon_ is now known as tpendragon
lsousa has joined #ruby
JoshS has quit [Ping timeout: 260 seconds]
djbkd has joined #ruby
username1 has quit [Ping timeout: 240 seconds]
mikecmpbll has quit [Ping timeout: 258 seconds]
mtkd has quit [Ping timeout: 264 seconds]
djbkd has quit [Ping timeout: 260 seconds]
mtkd has joined #ruby
montanonic has joined #ruby
cdg_ has joined #ruby
maattdd_ has quit [Quit: WeeChat 1.7]
Derperperd has quit [Ping timeout: 260 seconds]
bkxd has quit [Ping timeout: 260 seconds]
enterprisey has joined #ruby
maattdd has joined #ruby
cdg has quit [Ping timeout: 246 seconds]
lenwood has joined #ruby
Emmanuel_Chanel has quit [Ping timeout: 240 seconds]
Violentr has quit [Ping timeout: 240 seconds]
nobitanobi has quit []
Violentr has joined #ruby
chouhoulis has quit [Remote host closed the connection]
lenwood has quit [Read error: Connection reset by peer]
lenwood has joined #ruby
cdg has joined #ruby
Ishido has joined #ruby
lxsameer has quit [Quit: WeeChat 1.5]
JeanCarl1Machado has joined #ruby
JeanCarloMachado has quit [Read error: Connection reset by peer]
cdg_ has quit [Ping timeout: 258 seconds]
cdg has quit [Ping timeout: 240 seconds]
fuzzyhorns1 has quit [Quit: Leaving.]
Beams has quit [Quit: .]
aufi has quit [Quit: Leaving]
gusrub has quit [Remote host closed the connection]
gusrub has joined #ruby
sid_fules has quit [Remote host closed the connection]
xall_ has quit [Ping timeout: 240 seconds]
mrwn has quit [Ping timeout: 260 seconds]
padi_ has joined #ruby
SteenJobs has quit [Quit: SteenJobs]
gusrub has quit [Ping timeout: 260 seconds]
Ruby_Rocks_007 has quit [Quit: Ruby_Rocks_007]
padi_ has quit [Ping timeout: 240 seconds]
jtoyy has quit [Ping timeout: 264 seconds]
anisha has joined #ruby
cfec0b8d has joined #ruby
codeshah has quit [Quit: Textual IRC Client: www.textualapp.com]
zacts has joined #ruby
raspado has quit [Quit: Leaving...]
renchan has quit [Quit: Leaving...]
gusrub has joined #ruby
nowhereman has joined #ruby
jtoyy has joined #ruby
nettoweb1 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
maattdd has quit [Quit: WeeChat 1.7]
maattdd has joined #ruby
djbkd has joined #ruby
cfec0b8d has quit [Ping timeout: 246 seconds]
cahoots has joined #ruby
mrwn has joined #ruby
Arpanet69 has joined #ruby
SteenJobs has joined #ruby
enterprisey has quit [Remote host closed the connection]
im314ous has joined #ruby
milardovich has quit [Remote host closed the connection]
Robtop__ is now known as pwnd_nsfw
nithinbekal has joined #ruby
Guest90411 is now known as CrazEd
CrazEd is now known as Guest79035
tdy has quit [Read error: Connection reset by peer]
GinoManWorks has joined #ruby
M-Techni1 has quit [Quit: leaving]
tdy has joined #ruby
conta has joined #ruby
certainty has joined #ruby
djbkd_ has joined #ruby
jorj_ has joined #ruby
adrianvalenz_ has joined #ruby
Volsus has joined #ruby
djbkd_ has quit [Ping timeout: 260 seconds]
SteenJobs has quit [Quit: SteenJobs]
jaruga_________ has joined #ruby
jaruga________ has quit [Read error: Connection reset by peer]
bkxd has joined #ruby
Arpanet69 has quit [Ping timeout: 240 seconds]
gusrub has quit [Remote host closed the connection]
j2k has joined #ruby
Ruby_Rocks_007 has joined #ruby
duderonomy has joined #ruby
Emmanuel_Chanel has joined #ruby
edwinvdgraaf has joined #ruby
nowhereman has quit [Ping timeout: 260 seconds]
edwinvdgraaf has quit [Client Quit]
bhaak has quit [Quit: Reconnecting]
bhaak has joined #ruby
<jorj_> what good good gems exist for making irc clients?
milardovich has joined #ruby
Guest64317 has joined #ruby
xen0fon has quit [Read error: Connection reset by peer]
chouhoulis has joined #ruby
xen0fon has joined #ruby
Cohedrin has joined #ruby
JeanCarl1Machado has quit [Ping timeout: 260 seconds]
Rodya_ has joined #ruby
sid_fules has joined #ruby
senayar has joined #ruby
senayar has quit [Changing host]
senayar has joined #ruby
bhaak has quit [Quit: leaving]
bhaak has joined #ruby
JeanCarloMachado has joined #ruby
mwlang has quit [Quit: mwlang]
kristoff_ has joined #ruby
Guest64317 has quit [Read error: Connection reset by peer]
Emmanuel_Chanel has quit [Quit: Leaving]
m4yfield__ has joined #ruby
kubuntu_ has joined #ruby
m4yfield_ has quit [Ping timeout: 256 seconds]
last_staff has joined #ruby
mrwn has quit [Ping timeout: 240 seconds]
hooper has joined #ruby
Violentr has quit [Ping timeout: 264 seconds]
milardovich has quit [Remote host closed the connection]
fuzzyhorns has joined #ruby
milardovich has joined #ruby
szulak has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
milardovich has quit [Remote host closed the connection]
milardovich has joined #ruby
baked__beans has quit [Ping timeout: 268 seconds]
Emmanuel_Chanel has joined #ruby
adrianvalenz_ has quit [Ping timeout: 246 seconds]
<cout> jorj: I like cinch
MrBusiness is now known as MrBusiness3
mwlang has joined #ruby
<cout> I'd prefer if it were more unit-testing friendly, but I haven't found one that's any better
certainty has quit [Ping timeout: 260 seconds]
toretore has joined #ruby
nithinbekal has quit [Ping timeout: 246 seconds]
ta_ has joined #ruby
senayar has quit []
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<jorj_> MrBusiness? wudda name
<jorj_> oh wait, cinch.
<jorj_> my dyslexia conflated two unrelated lines
j2k has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
reznik has quit [Quit: Leaving]
j2k has joined #ruby
MrBusiness3 has quit [Quit: https://www.youtube.com/watch?v=xIIqYqtR1lY -- Suicide is Painless - Johnny Mandel]
kristoff_ has quit [Quit: Textual IRC Client: www.textualapp.com]
pilne has joined #ruby
tolerablyjake has joined #ruby
gusrub has joined #ruby
<jorj_> what do you mean by unit-testing friendly?
im314ous has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
milardovich has quit [Remote host closed the connection]
milardovich has joined #ruby
milardovich has quit [Remote host closed the connection]
milardovich has joined #ruby
zeroDi has joined #ruby
bocaneri has quit [Read error: Connection reset by peer]
lenwood has quit [Ping timeout: 258 seconds]
maattdd_ has joined #ruby
maattdd_ has quit [Client Quit]
maattdd_ has joined #ruby
mwlang has quit [Quit: mwlang]
Guest79035 is now known as CrazEd
CrazEd is now known as Guest12003
fuzzyhorns has quit [Quit: Leaving.]
vF3hNGxc47h8 has quit [Ping timeout: 260 seconds]
cdg has joined #ruby
Rodya_ has quit [Remote host closed the connection]
tau has joined #ruby
tau has quit [Remote host closed the connection]
SeepingN has joined #ruby
tomphp has joined #ruby
tau has joined #ruby
tau has quit [Remote host closed the connection]
tau has joined #ruby
marxarelli is now known as marxarelli|afk
kubuntu has joined #ruby
tau has quit [Remote host closed the connection]
kubuntu is now known as Guest30544
armin has quit [Quit: relate to the matter as i drop the bomb]
fuzzyhorns has joined #ruby
kubuntu_ has quit [Ping timeout: 240 seconds]
tau has joined #ruby
Rodya_ has joined #ruby
renchan has joined #ruby
Derperperd has joined #ruby
armin has joined #ruby
<dminuoso> Too much?
boombox_ has joined #ruby
benlieb has joined #ruby
<dminuoso> Actually functional programming in Ruby seems fun.
<jorj_> you could just declare that output hash in less lines . . .
<dminuoso> jorj_: That's besides the point. The idea is to have a functional hierarchy that ensures I always get back a Hash matching a specific pattern.
wilbert_ has joined #ruby
tau has quit [Remote host closed the connection]
Rodya_ has quit [Remote host closed the connection]
Rodya_ has joined #ruby
tau has joined #ruby
baked__beans has joined #ruby
jorj_ has quit [Quit: Leaving]
montanonic has quit [Ping timeout: 264 seconds]
milardovich has quit [Read error: Connection reset by peer]
milardovich has joined #ruby
LambdaSix has quit [Ping timeout: 240 seconds]
LambdaSix has joined #ruby
maattdd_ has quit [Quit: WeeChat 1.5]
maattdd_ has joined #ruby
milardovich has quit [Ping timeout: 268 seconds]
jtoyy has quit [Ping timeout: 256 seconds]
JoshS has joined #ruby
boombox_ has quit [Remote host closed the connection]
maattdd_ has quit [Client Quit]
certainty has joined #ruby
maattdd_ has joined #ruby
dn`_ has joined #ruby
machinewar has joined #ruby
Tempesta has quit [Ping timeout: 240 seconds]
naftilos76 has joined #ruby
szulak has joined #ruby
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
dn` has quit [Ping timeout: 246 seconds]
dn` has joined #ruby
jtoyy has joined #ruby
flying has quit []
milardovich has joined #ruby
<dminuoso> Mmm, if I wanted coroutines in Ruby, that'd be Fiber basically right?
<brendan-> anyone using thor know if it's possible to do sub-options
<brendan-> or dependencies on options
dn`_ has quit [Ping timeout: 246 seconds]
Fernando-Basso has quit [Quit: WeeChat 1.7]
<brendan-> meaning if i specify an option, i need this additional options as required
marxarelli|afk is now known as marxarelli
milardovich has quit [Remote host closed the connection]
Volsus has quit [Quit: Leaving...]
milardovich has joined #ruby
GodFather has joined #ruby
Ishido has quit [Quit: Roads? Where We're Going We Don't Need Roads.]
conta has quit [Ping timeout: 240 seconds]
GodFather has quit [Remote host closed the connection]
Derperperd has quit [Max SendQ exceeded]
milardovich has quit [Ping timeout: 268 seconds]
Derperperd has joined #ruby
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jtoyy has quit [Ping timeout: 264 seconds]
montanonic has joined #ruby
jaruga_________ has quit [Quit: jaruga_________]
adaedra has joined #ruby
Rodya_ has quit [Remote host closed the connection]
tildes has joined #ruby
Guest12003 is now known as CrazEd
anisha has quit [Quit: This computer has gone to sleep]
CrazEd is now known as Guest16998
jtoyy has joined #ruby
GodFather has joined #ruby
agent_white has quit [Ping timeout: 240 seconds]
cevett has quit [Read error: Connection reset by peer]
tildes has quit [Ping timeout: 268 seconds]
yfeldblum has joined #ruby
agent_white has joined #ruby
GodFather has quit [Remote host closed the connection]
tildes has joined #ruby
szulak has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
naftilos76 has quit [Quit: Αποχώρησε]
Emmanuel_Chanel has quit [Quit: Leaving]
djbkd_ has joined #ruby
GodFather has joined #ruby
Rodya_ has joined #ruby
patarr has quit [Quit: Lost terminal]
certainty has quit [Ping timeout: 260 seconds]
enterprisey has joined #ruby
enterprisey has quit [Read error: Connection reset by peer]
yfeldblum has quit [Ping timeout: 246 seconds]
patarr has joined #ruby
djbkd_ has quit [Ping timeout: 264 seconds]
onlyjeanbean has joined #ruby
bkxd has quit [Ping timeout: 264 seconds]
fuzzyhorns has quit [Quit: Leaving.]
jtoyy has quit [Ping timeout: 240 seconds]
Rodya_ has quit [Remote host closed the connection]
machinewar has quit []
ozcanesen has joined #ruby
JoshS has quit [Ping timeout: 240 seconds]
fuzzyhorns has joined #ruby
mhunt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Emmanuel_Chanel has joined #ruby
kubuntu has joined #ruby
kubuntu is now known as Guest7108
[Butch]_ has joined #ruby
Guest30544 has quit [Ping timeout: 246 seconds]
elifoster has joined #ruby
Tempesta has joined #ruby
[Butch] has quit [Ping timeout: 240 seconds]
[Butch]_ is now known as [Butch]
mhunt has joined #ruby
<patarr> Does Ruby have a limited heap space, or can it take advantage of all the RAM on the host machine?
blackwind_123 has joined #ruby
cahoots_ has joined #ruby
renatosilva has joined #ruby
troulouliou_dev has quit [Quit: Leaving]
gloscombe_ has joined #ruby
jenrzzz has quit [Ping timeout: 258 seconds]
doublemalt_ has quit [Ping timeout: 260 seconds]
cahoots has quit [Ping timeout: 258 seconds]
t-recx has joined #ruby
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
sid_fules has quit [Remote host closed the connection]
raspado has joined #ruby
jtoyy has joined #ruby
montanonic has quit [Ping timeout: 260 seconds]
<dminuoso> patarr: There is a limitation in the internal ruby heap.
loechel has quit [Ping timeout: 260 seconds]
<dminuoso> patarr: But I think you can't hit that, so it's effectively unbound by Ruby itself.
JeanCarloMachado has quit [Ping timeout: 260 seconds]
sid_fules has joined #ruby
bmurt has joined #ruby
Rodya_ has joined #ruby
hutch34 has quit [Ping timeout: 246 seconds]
dar123 has joined #ruby
mwlang has joined #ruby
montanonic has joined #ruby
horst has joined #ruby
Ahriman has joined #ruby
millerti has joined #ruby
brent__ has quit [Remote host closed the connection]
Ahriman is now known as Exagerado
tau has quit [Remote host closed the connection]
tau has joined #ruby
brent__ has joined #ruby
tau has quit [Remote host closed the connection]
tau has joined #ruby
tau has quit [Remote host closed the connection]
tau has joined #ruby
tau has quit [Remote host closed the connection]
horst has quit [Remote host closed the connection]
<sparr> I need to File.write() many lines with a little bit of interpolation in the middle. What's the cleanest way to format that?
horst has joined #ruby
lsousa has quit [Quit: lsousa]
<sparr> a single multi-line string looks weird since it has no indentation and the code around it is indented
mwlang has quit [Quit: mwlang]
Guest16998 is now known as CrazEd
<adaedra> heredocs!
CrazEd is now known as Guest68406
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
<adaedra> Especially the <<~ form
<havenwood> +1 squiggle
tau has joined #ruby
Exagerado is now known as Nielson
tau has quit [Remote host closed the connection]
<adaedra> 'evening havenwood
MrBusiness has joined #ruby
tyang has quit [Ping timeout: 268 seconds]
tau has joined #ruby
horst has quit [Remote host closed the connection]
horst has joined #ruby
<havenwood> adaedra: g'eve'
<dminuoso> Ruby hackers. Is there any elegant hackery to import desirable features of a given module into a section of code without polluting global namespace?
Nielson is now known as exagerado
izaac has quit [Ping timeout: 260 seconds]
<baweaver> file.puts('it takes', 'comma separated', 'arguments as well')
<adaedra> refinements?
tau has quit [Remote host closed the connection]
<dminuoso> adaedra: Mmmm
jdm has quit [*.net *.split]
Liothen has quit [*.net *.split]
klaas has quit [*.net *.split]
snapcase has quit [*.net *.split]
<adaedra> or, if it's just basic methods from a module, be in another module and import it there
exagerado is now known as positive-vibrati
izaac has joined #ruby
<dminuoso> adaedra: If only we had anonymous namespace. :S
positive-vibrati is now known as exagerado
GodFather has quit [Ping timeout: 240 seconds]
GodFather has joined #ruby
<dminuoso> adaedra: I've done so much JavaScript, that I even started currying ruby methods for partial function application today.. now Im asking for CommonJS.
<dminuoso> What's the treatment, doctor?
ldnunes has quit [Quit: Leaving]
tau has joined #ruby
tau has quit [Remote host closed the connection]
<havenwood> dminuoso: Just an aside, but Kernel#load takes an (I've never seen used) second arg which if set executes the loaded code "under an anonymous module, protecting the calling program’s global namespace."
milardovich has joined #ruby
<dminuoso> havenwood: Yeah I remember that, but it's unused because it kind of makes it useless, unless some export/import functionality was provided.
Liothen has joined #ruby
<c-c> dminuoso: 'desirable features of a given module' is ambiguous
<dminuoso> c-c: Well let's say a import { foo } from './bar'; equivalent
exagerado has quit []
<c-c> dminuoso: also "into a section of code" is vague
<c-c> seems to me like bunch of architecture astronautism
* dminuoso pokes c-c with a stick
<c-c> Do you have an actual real life case?
exagerado has joined #ruby
* c-c pokes dminuoso's 56728 to 23
mwlang has joined #ruby
<dminuoso> wait.. what?
klaas has joined #ruby
GodFather has quit [Client Quit]
bkxd has joined #ruby
<dminuoso> c-c: Essentially I hate require. It basically glues two pieces of code together.
GodFather has joined #ruby
klaas has quit [*.net *.split]
<c-c> dminuoso: do you know include and extend well?
montanonic has quit [Ping timeout: 240 seconds]
<dminuoso> c-c: Yeah.
AnoHito has quit [Ping timeout: 246 seconds]
<c-c> dminuoso: so, you want metparogrammings?
<dminuoso> Say what?
<c-c> *metaprogrammings
<dminuoso> Oh.
<baweaver> hehehehe
<dminuoso> c-c: Most languages around have some concept of modularization.
<dminuoso> Ruby does not.
<baweaver> I had a super dirty idea
im314ous has joined #ruby
<c-c> dminuoso: you seem confused
CloCkWeRX has joined #ruby
<c-c> dminuoso: perhaps you could grab a cup of tea or water and ask me about metaprogramming
tau has joined #ruby
jenrzzz has quit [Ping timeout: 264 seconds]
<dminuoso> c-c: Cant we talk about monads instead and why we need them in Ruby?
<dminuoso> &. is a clear sympton that could have been avoided with monads :S
tau has quit [Remote host closed the connection]
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
<c-c> In nethack & is a demon
<dminuoso> c-c: Same thing in ADOM.
<dminuoso> Except they're much more badass in adom.
<baweaver> def import(modules: [], from: ) modules.map { |m| self.instance_eval { define_method from.method(m) } } end
<baweaver> psuedocode
tau has joined #ruby
snapcase has joined #ruby
klaas has joined #ruby
jdm has joined #ruby
GodFather has quit [Ping timeout: 240 seconds]
<baweaver> import modules: [:my, :methods, :here], from: Kernel
DTZUZU has quit [Read error: No route to host]
<baweaver> :D
<dminuoso> Uh...
<dminuoso> Well. :S
<dminuoso> I guess..
<dminuoso> ?cookie
<ruby[bot]> here's your cookie: 🍪
<dminuoso> for the effort
<baweaver> I mean theoretically you can use that pattern to make an importer.
<dminuoso> baweaver: You still have to require the external file first.
<dminuoso> Though..
<dminuoso> baweaver: I realized, you're onto something.
<baweaver> there are probably ways to hack it.
<dminuoso> You could use ISeq to compile a file first
<dminuoso> and then extract the portions you care about
<dminuoso> Im loving this already.
<baweaver> also remember that Monads are kinda worthless without a Hindley Milner based type system
<c-c> also, because nobody is willing to pay for monads
* baweaver rolls eyes
<dminuoso> Also because we don't want to be dealing with explaining what monads are to the same people day after day.
<dminuoso> #haskell has that problem already
<dminuoso> lol
<dminuoso> 22:49 < baweaver> also remember that Monads are kinda worthless without a Hindley Milner based type system
noan_ is now known as noan
<dminuoso> If only I knew what that was.
<baweaver> spacesuit burrito onions that are simply monoids in the category of endofunctors
<baweaver> Name:: String -> String
<dminuoso> Yeah I looked at that article
<dminuoso> I felt just as confused like the first time I read a "monads explained for idiots" tutorial
<dminuoso> Something tells me this would be much more easy if I had some lambda calculus background
<baweaver> Anyways, probably good for #ruby-offtopic
<dminuoso> Cant we just rename the channels? Switching them in irssi is effort.
exagerado has quit [Remote host closed the connection]
volix has quit [Quit: leaving]
synthroid has quit []
volix has joined #ruby
Nielson has joined #ruby
<sparr> adaedra havenwood: trickier question... is there a way to use squiggly heredoc but specify an indent other than then the least indented line?
Nielson is now known as Exagerado
<sparr> I'm breaking one squiggly heredoc up into two, and I want to maintain output indentation between them, but one of them doesn't have the least indented line
gusrub has quit [Remote host closed the connection]
Exagerado is now known as exagerado
renchan has quit [Remote host closed the connection]
mostlybadfly has joined #ruby
montanonic has joined #ruby
szulak_ has joined #ruby
Arpanet69 has joined #ruby
tau has quit [Remote host closed the connection]
AnoHito has joined #ruby
jose_leeto has quit [Quit: Leaving.]
lxsameer has joined #ruby
mhunt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
kubuntu has joined #ruby
kristofferR has quit [Quit: Textual IRC Client: www.textualapp.com]
kubuntu is now known as Guest50238
tau has joined #ruby
tau has quit [Remote host closed the connection]
blackwind_123 has quit [Ping timeout: 268 seconds]
tau has joined #ruby
Guest7108 has quit [Ping timeout: 260 seconds]
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
blackwind_123 has joined #ruby
hutch34 has joined #ruby
nithinbekal has joined #ruby
lacuna has joined #ruby
kristofferR has joined #ruby
pawnbox has quit [Remote host closed the connection]
dn` has left #ruby [#ruby]
Rutix has quit []
volix has quit [Quit: leaving]
nithinbekal has quit [Ping timeout: 240 seconds]
volix has joined #ruby
JoshS has joined #ruby
kristofferR has quit [Read error: Connection reset by peer]
kristofferR has joined #ruby
GodFather has joined #ruby
tildes has quit [Ping timeout: 240 seconds]
exagerado has quit [Remote host closed the connection]
antgel has quit [Ping timeout: 240 seconds]
snapcase has quit [Ping timeout: 240 seconds]
klaas has joined #ruby
snapcase has joined #ruby
jdm has quit [Ping timeout: 240 seconds]
klaas has quit [Ping timeout: 240 seconds]
fuzzyhorns has quit [Quit: Leaving.]
jdm has joined #ruby
montanonic has quit [Ping timeout: 240 seconds]
GodFather has quit [Ping timeout: 240 seconds]
tau has quit [Remote host closed the connection]
pawnbox has joined #ruby
tau has joined #ruby
<eam> >> "test"
<dminuoso> ?kick eam
<ruby[bot]> dminuoso: I don't know anything about kick
<dminuoso> :(
JeanCarloMachado has joined #ruby
Guest50238 has quit [Quit: Konversation terminated!]
eam has quit [Changing host]
eam has joined #ruby
<dminuoso> eam: You're lucky that apeiros rejected my pull request! ;o
<eam> wut
exagerado has joined #ruby
<eam> why would you be so mean
<eam> I'm just making sure it works (or doesn't) before I offer an interesting question to this otherwise dead channel!
<eam> >> "how about now"
<havenwood> eam: #!> ArgumentError: wrong number of arguments (given 0, expected 2..3)
<ruby[bot]> eam: # => "how about now" (https://eval.in/749230)
<dminuoso> 23:27 < eam> why would you be so mean
<dminuoso> My psychologist keeps asking me the same question. :S
<eam> ok so check this out
<eam> >> stuff = "zzzz.bar.foo"; [1,2].map { stuff.gsub(/^\S+\.(\S+)\.foo/, "#{$1}") }.inspect
<ruby[bot]> eam: # => "[\"\", \"bar\"]" (https://eval.in/749231)
<eam> why the different results?
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<Papierkorb> eam: You're accessing $1 from the previous run
<eam> oh snap
<Papierkorb> eam: Use '\1' instead (Note the single quotes)
<eam> that's totally it
<dminuoso> Or "\\\\\1" (was that too many?)
<havenwood> >> stuff = "zzzz.bar.foo"; [1,2].map { stuff.gsub(/^\S+\.(\S+)\.foo/, '\1') }.inspect
<ruby[bot]> havenwood: # => "[\"bar\", \"bar\"]" (https://eval.in/749232)
<dminuoso> or was it "\\\1" ?
ramortegui has quit [Quit: Ex-Chat]
<dminuoso> I cant remember this double quote syntax, I just know its tons (tm) of backspaces.
<Papierkorb> dminuoso: It was kinda insane, so the first one
mtkd has quit [Ping timeout: 268 seconds]
<dminuoso> Papierkorb: turns out its just 2.
mtkd has joined #ruby
<dminuoso> but as a wise man said: there's only none, one and many.
<Papierkorb> heh then I needed some more at some point for some other reason
gusrub has joined #ruby
Guest68406 is now known as CrazEd
<dminuoso> Papierkorb: Yeah me too, definitely.
CrazEd is now known as Guest81277
montanonic has joined #ruby
gusrub has quit [Ping timeout: 260 seconds]
yfeldblum has joined #ruby
gusrub has joined #ruby
djbkd_ has joined #ruby
lacuna has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tau has quit [Remote host closed the connection]
yfeldblum has quit [Ping timeout: 246 seconds]
planigan` has left #ruby ["ERC (IRC client for Emacs 24.5.1)"]
lacuna has joined #ruby
djbkd_ has quit [Ping timeout: 246 seconds]
milardovich has quit [Read error: Connection reset by peer]
[Butch] has quit [Quit: I'm out . . .]
milardovich has joined #ruby
t-recx has quit [Quit: t-recx]
jscheel has joined #ruby
naprimer_2 has quit [Ping timeout: 240 seconds]
JeanCarloMachado has quit [Ping timeout: 258 seconds]
haylon has quit [Quit: Leaving]
planigan has joined #ruby
JeanCarloMachado has joined #ruby
<jscheel> I’m having trouble with ssl. When I add a ca cert to an openssl store on my dev machine, everything works file. When I do the exact same thing in production, I get “certificate verify failed”
milardovich has quit [Ping timeout: 240 seconds]
JoshS has quit [Ping timeout: 240 seconds]
<jscheel> doing it like so: `store = OpenSSL::X509::Store.new; store.add_cert(OpenSSL::X509::Certificate.new(File.read(‘/path/to/ca.pem’)))`
naprimer_2 has joined #ruby
enterprisey has joined #ruby
szulak_ has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
jrafanie_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
lxsameer has quit [Quit: WeeChat 1.6]
__Yiota has joined #ruby
gizmore has quit [Read error: Connection reset by peer]
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
elifoster has quit [Ping timeout: 246 seconds]
elifoster has joined #ruby
<jscheel> to see what’s going on
banisterfiend has joined #ruby
<jscheel> I have no idea what could possibly be causing this to not work in certain environments
planigan` has joined #ruby
last_staff has quit [Quit: last_staff]
zacts has quit [Ping timeout: 240 seconds]
elifoster has quit [Client Quit]
ChaiTRex has joined #ruby
ChaiTRex has left #ruby [#ruby]
tomphp has joined #ruby
milardovich has joined #ruby
tau has joined #ruby
charliesome has joined #ruby
dar123 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tau has quit [Remote host closed the connection]
Rodya_ has quit [Remote host closed the connection]
dar123 has joined #ruby
tau has joined #ruby
cschnei__ has quit [Remote host closed the connection]
toretore has quit [Ping timeout: 260 seconds]
milardovich has quit [Remote host closed the connection]
cschneid_ has joined #ruby
planigan` has quit [Quit: ERC (IRC client for Emacs 24.5.1)]
milardovich has joined #ruby
planigan has quit [Quit: ERC (IRC client for Emacs 24.5.1)]
planigan has joined #ruby
Arpanet69 has quit [Ping timeout: 240 seconds]
ruid has joined #ruby
zacts has joined #ruby
<jscheel> let me amend my previous issue
<jscheel> and I get `SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (OpenSSL::SSL::SSLError)` when I try to connect
baked__beans has quit [Read error: No route to host]
cschneid_ has quit [Ping timeout: 240 seconds]
milardovich has quit [Ping timeout: 256 seconds]
jdm has quit [Remote host closed the connection]
nofxxxx has joined #ruby
<zenspider> jscheel: I'm no expert by any means... but have you tried using `openssl s_client -connect` on a good env vs a bad one?
<zenspider> iow, remove ruby frome the equation first
<zenspider> *from
dar123 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dar123 has joined #ruby
cahoots_ has quit [Ping timeout: 240 seconds]
<jscheel> zenspider: hmm, no, I haven’t, but I’m starting to see something that doesn’t add up. I thought dev was working, but it might have been masking the error
nofxxx has quit [Ping timeout: 246 seconds]
<jscheel> my reduced case (gist above) fails in dev too
milardovich has joined #ruby
milardovich has quit [Remote host closed the connection]
benlieb has quit [Quit: benlieb]
milardovich has joined #ruby
padi_ has joined #ruby
tau has quit [Remote host closed the connection]
<jscheel> could it be because the root cert isn’t from a trusted authority?
nofxxx has joined #ruby
tau has joined #ruby
maattdd_ has quit [Ping timeout: 260 seconds]
chouhoulis has quit [Ping timeout: 256 seconds]
<jscheel> zenspider: using openssl s_client shows `CONNECTED(00000003)` then `11830:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol`
fuinhoo has joined #ruby
fuinhoo has quit [Client Quit]
hutch34 has quit [Ping timeout: 258 seconds]
nofxxxx has quit [Ping timeout: 246 seconds]
<c-c> jscheel: so is it the correct port?
<c-c> the 443?
saneax-_-|AFK is now known as saneax
<jscheel> c-c: yes, I’m passing the correct port in (though it is a custom one)
<zenspider> make sure you test on the good env first to get the command right
<jscheel> zenspider: I am, see message above (I don’t thing good env was actually good)
gizmore has joined #ruby
<jscheel> thought it was :\
<jscheel> blerg
TomyLobo has quit [Ping timeout: 264 seconds]
<zenspider> blah... that sucks
<jscheel> yep
<zenspider> well... maybe verify against something you DO know is good (like, google), just to practice... then you can use that to turn around and more easily diagnose your envs
<jscheel> oh, interesting
<jscheel> ran in my docker container, which has a newer version of openssl
<jscheel> and openssl s_client worked better
<jscheel> so, it looks like the problem is that it is a self-signed cert
<jscheel> `verify error:num=19:self signed certificate in certificate chain`
tau has quit [Remote host closed the connection]
tau has joined #ruby
fuinho has joined #ruby
<jscheel> I am definitely not an expert on ssl
<jscheel> so, even though I am providing a root cert, because it was not issued by a trusted authority, it is being rejected. Does that sound right?
fuinho has quit [Remote host closed the connection]
<exagerado> yeah, that's it
patarr has quit [Ping timeout: 264 seconds]
Guest81277 is now known as CrazEd
CrazEd is now known as Guest64882
JeanCarloMachado has quit [Ping timeout: 260 seconds]
<nofxxx> jscheel, use Let's Encrypt ... it's the best thing I've seen in years
JeanCarloMachado has joined #ruby
<jscheel> nofxxx: this is a cert used to access a third-party service
<jscheel> issued by them
<nofxxx> jscheel, ops, parachute dropped in the subject sorry hehe.... but if someone didn't knew it
<jscheel> nofxxx: yeah, I’m using let’s encrypt on my personal stuff
<jscheel> super awesome
<nofxxx> jscheel, yeah, totally hats off. Not only great and free, but daemonized never again remember refreshing certs
milardovich has quit [Remote host closed the connection]
milardovich has joined #ruby
bkxd has quit [Ping timeout: 240 seconds]
centrx has quit []
cahoots has joined #ruby
zacts has quit [Ping timeout: 258 seconds]
justicefries has joined #ruby
im314ous has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tvw has joined #ruby
justicefries has quit [Client Quit]
milardovich has quit [Ping timeout: 268 seconds]
shinnya has joined #ruby
milardovich has joined #ruby
BackEndCoder has quit [Excess Flood]
teddysmoker has quit [Quit: Konversation terminated!]
DLSteve has quit [Quit: All rise, the honorable DLSteve has left the channel.]
ozcanesen has quit [Quit: Textual IRC Client: www.textualapp.com]
BackEndCoder has joined #ruby
pepsimax is now known as vimto
Rodya_ has joined #ruby
justicefries has joined #ruby
vimto is now known as pepsimax
kristofferR has quit [Quit: Textual IRC Client: www.textualapp.com]
<sparr> I'm trying to use YAML.dump to put a hash into a yaml file, but it's putting symbols for yaml keys whether I have symbols or strings as keys in my hash. How can I avoid that?
marchelzo has joined #ruby
pepsimax is now known as vimto
<marchelzo> hello ruby community members
agent_white has quit [Quit: leaving]
kristofferR has joined #ruby
milardovich has quit [Remote host closed the connection]
milardovich has joined #ruby
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
georgie has joined #ruby
justicefries has quit [Quit: WeeChat 1.7]
vimto has quit [Changing host]
vimto has joined #ruby
lacuna has quit [Quit: Textual IRC Client: www.textualapp.com]