<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>
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)
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
<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
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
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>
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?
<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…]
<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]
<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]
<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?
<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]
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.
<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
<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
<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
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…]
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
<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
<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
<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>
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]
<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.
<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]
<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
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.
<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…]
<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…]
<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.]
<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…]