<nfk|laptop>
foobar020, fyi, bash already has built-in remote shell, iirc
<foobar020>
Actually
<foobar020>
Sorry I derped
<foobar020>
I'm not looking to do code execution
<Cohedrin>
but if you must use break, the keyword is `break`
<foobar020>
remotely
jbrhbr has joined #ruby
bronson has joined #ruby
<voidDotClass>
Cohedrin, array.find will also loop over the whole array and return all matches
<voidDotClass>
whereas i want to break on finding the first match
<Cohedrin>
no
<foobar020>
I have code running on a remote machine I admin. I want all the http requests made by that code to be proxied through my local machine, which is behind a restrictive firewall
<Cohedrin>
array.find_all will loop over them al
<Cohedrin>
array.find will break at the first match
<Cohedrin>
read the code
<voidDotClass>
ah
cschneid_ has quit [Remote host closed the connection]
<voidDotClass>
so if i wanted to break in each, what would i do for that?
<foobar020>
I figured if I start a reverse tunnel from my local machine to the remote machine, I can bypass the firewall my local machine is behind
<Cohedrin>
but if you must use break, the keyword is `break`
<foobar020>
Forgive me if my terms are off, learning this as i go
<bnagy>
foobar020: do you even need an http proxy?
joonty has quit [Ping timeout: 276 seconds]
<foobar020>
well, I want the http requests being made with my local IP
<foobar020>
I can't think of another way to do that
<nfk|laptop>
foobar020, tunnel a port?
<nfk|laptop>
i'm confident ssh can do whatever you need
<nfk|laptop>
presumably either -R or -L will do the trick
<nfk|laptop>
you just need to figure out which one you need and then apply it to the right port
<foobar020>
i mean
<bnagy>
if you have inner I and outer O and you do a reverse tunnel from O:12345 to I:80 then why won't that work?
binaryplease has joined #ruby
<bnagy>
you'll see the request on I coming from O though
<bnagy>
because, like, it does
peeja has quit [Ping timeout: 250 seconds]
crime has joined #ruby
<foobar020>
Okay, I'm assuming a lot of my confusion just comes from lack of knowledge of terminology or how to properly use ssh.
<foobar020>
I've tried, from local machine, `ssh -R 80:localhost:80 <remote_user>@<remote_ip>
<foobar020>
`
ramfjord_ has quit [Ping timeout: 245 seconds]
<foobar020>
but I get "Warning: remote port forwarding failed for listen port 80"
<Cohedrin>
hold on.
<foobar020>
...probably because it's already being used
<bnagy>
seems likely, yeah
<zambini>
foobar020: Something is already bound to port 80
<foobar020>
i am not incredibly knowledgable about this
dfinninger has quit [Remote host closed the connection]
<Cohedrin>
foodbar020: Why are you trying to do this? This sounds like a problem with the way of going about it
<zambini>
foobar020: Can you make your remote go through something besides port 80?
asthasr_ has joined #ruby
<bnagy>
foobar020: I was envisioning O with a webserver on 80 and you want for some requests O to internally use I as a server for those
<bnagy>
in which case you want to reverse tunnel O:12345 to I:80 and have O use 127.0.0.1:12345 for those requests
ramfjord has joined #ruby
agent_white has joined #ruby
psyq has quit [Quit: Conversation terminated]
Snowy has quit []
edwinvdgraaf has quit [Remote host closed the connection]
<bnagy>
so user hits O:80, does something that makes O want to make a req, which it does using the revtunnel and then responds to user with that info
asthasr has quit [Ping timeout: 250 seconds]
<foobar020>
so the server has an app that uses mechanize to parse various info from a secure website
<foobar020>
but that secure website is only accessible to the client IP
<fuzzyfuzz>
You want an apache proxy?
<foobar020>
the client doesn't have the dependencies necessary to run the parser app
<fuzzyfuzz>
With a redirect from plain-text to ssl?
<fuzzyfuzz>
*clear-text
jgt1 has joined #ruby
<foobar020>
Those are just words to me at this particular moment in time. I'll look into them but right now I don't know if that's what I want
<foobar020>
Sorry I'm not coming into this as well-equipped as I'd like
<foobar020>
or knowledgable
cdg has quit [Remote host closed the connection]
nerfando has joined #ruby
kies^ has joined #ruby
northfurr has quit [Quit: northfurr]
<zambini>
Is port 80 listened to on your remote machine?
jgt has quit [Ping timeout: 245 seconds]
pawnbox has joined #ruby
dlitvak_ has quit [Remote host closed the connection]
<foobar020>
Yes
<zambini>
What about your local machine? It looks like with your current setup it's going to redirect traffic to your local machine:80
tomchapin has joined #ruby
tulak has quit []
<zambini>
or, sorry wrong terminology
agent_white has quit [Quit: brb]
<foobar020>
well that's the idea (I'm pretty sure anyway). so we have A, B, and C. A is local machine, B is remote machine, C is machine only accessible to A's IP
<zambini>
It's going to try opening a tunnel to local machine via port 80
<foobar020>
A wants to parse output from C, but doesn't have the dependencies necessary to do so. So I want to open C from B, using A's IP
djbkd has quit [Ping timeout: 265 seconds]
<foobar020>
I see where the current command is wrong, I'm trying to figure out how to make it right I guess
<zambini>
Okay, cool. Did you run it as sudo? Port 80 is a privileged port
blackmesa has joined #ruby
saneax_AFK is now known as saneax
<fuzzyfuzz>
Dude, unless this is for academic purposes, you should check out AMQP.
saneax is now known as Guest42435
pawnbox has quit [Ping timeout: 255 seconds]
<foobar020>
googling it now
<fuzzyfuzz>
AMQP runs on both your nodes, you send your request across AMQP to a listener and yoru listener does a thing.
ascarter has joined #ruby
<fuzzyfuzz>
Check out Ruby's 'bunny' library and RabbitMQ.
ascarter has quit [Client Quit]
dlitvak has joined #ruby
<fuzzyfuzz>
You're essentially asking how to build an event bus.
<fuzzyfuzz>
And that's what AMQP is.
<zambini>
In your setup: B says "A, send this to C and tell me what it says" via requests, not via tunneling
sinkensabe has quit [Remote host closed the connection]
sinkensabe has joined #ruby
nerfando has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
scottschecter has joined #ruby
ascarter_ has joined #ruby
CloCkWeRX has joined #ruby
episplat is now known as epithet
freerobby has joined #ruby
who42 has quit [Quit: Leaving]
superscott has quit []
scoot has quit [Ping timeout: 250 seconds]
Rodya_ has joined #ruby
dlitvak has quit [Ping timeout: 256 seconds]
<foobar020>
so it's looking like what i really want to do
blackmesa has quit [Ping timeout: 260 seconds]
<foobar020>
is route requests through A
<foobar020>
can i send an entire request object over this protocol?
jam_ has joined #ruby
asccigcc has quit [Quit: asccigcc]
sinkensabe has quit [Ping timeout: 260 seconds]
asthasr__ has joined #ruby
felltir has joined #ruby
PERSIAN has quit []
mclong has joined #ruby
janebootydoe has joined #ruby
<zambini>
Instead of sending the received request, you'll send a message with parameters to A from B, asking it to talk to C and respond
Rodya_ has quit [Ping timeout: 264 seconds]
asthasr_ has quit [Ping timeout: 265 seconds]
harai54 has joined #ruby
jam_ has quit [Ping timeout: 240 seconds]
<foobar020>
That makes sense
kies^ has quit [Ping timeout: 246 seconds]
dlitvak has joined #ruby
davedev2_ has quit []
tomchapin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dlitvak has quit [Ping timeout: 245 seconds]
chipotle has quit [Quit: cheerio]
krobzaur has quit [Ping timeout: 256 seconds]
jackjackdripper has joined #ruby
lemur has quit [Remote host closed the connection]
jackjackdripper1 has joined #ruby
jackjackdripper has quit [Read error: Connection reset by peer]
kies has quit [Ping timeout: 246 seconds]
Guest83269 has joined #ruby
minimalism has joined #ruby
spider-mario has quit [Remote host closed the connection]
ReK2 has quit [Ping timeout: 240 seconds]
<Guest83269>
how much to clone this site, seedr.cc
<Guest83269>
node cloud torrent site
<Radar>
Guest83269: $25k
<pizzaops>
Can somebody remind me of the way to test a gem from source while you're working on it, without having to build it every time first? I seem to remember that there's a way, but I can't remember what it is :/
<pizzaops>
E.g. if I have an executable in the bin directory that I want to test.
kies^ has joined #ruby
graffix222 has quit [Ping timeout: 260 seconds]
<Guest83269>
25k jesus thats so much
graffix222 has joined #ruby
pawnbox has joined #ruby
<Darmani>
@Radar - Hey boo.
<Radar>
Guest83269: $30k now
<Radar>
due to inflation
<zambini>
pizzaops: pass in `path: /path/to/gem` in your Gemfile (make sure version matches) after building it
<pizzaops>
zambini: I'm trying to do the opposite.
<pizzaops>
I'm trying to test it *before* building it.
<pizzaops>
It looks like you can just bundle exec though.
<Guest83269>
Radar seriously ho much to build a clone of that site
<pizzaops>
E.g. I don't want to have to build it every time I make a minor change, while I'm developing, to see if it works.
<zambini>
Before building it or before 'publishing' it?
<Darmani>
I can do it for $12.
felixdd has joined #ruby
<Radar>
Guest83269: Pay peanuts get monkeys.
<Darmani>
and some food stamps.
<pizzaops>
Before running gem build.
<pizzaops>
Before building it.
<zambini>
ah
<Radar>
Guest83269: and I never ever do fixed priced bidding
<pizzaops>
zambini: but bundle exec appears to handle it fine
<Radar>
Guest83269: It's $250/hr if you want to hire me.
ReK2 has joined #ruby
<Darmani>
@Radar holy shit Radar you worth that much
<Darmani>
goddamn
<Radar>
Darmani: Wrote some books about Rails.
<Radar>
Darmani: Kind of a Bigg deal.
<Radar>
bbl
<Guest83269>
250 you are drunk
<pizzaops>
Darmani: ahah, that's roughly what my company charges for my time.
<Darmani>
what the fuuuuck
<pizzaops>
(Not as a developer)
<Guest83269>
consultant lol
<Darmani>
@pizzaops - I'm trying to get there fam
<pizzaops>
Darmani: I don't get $250/hr. I'm salaries.
<domgetter>
Darmani: notice he said "what my company charges" not "what my company pays me"
<pizzaops>
s/salaries/salaried
DLSteve has joined #ruby
<zambini>
pizzaops: rspec not cutting it?
<Darmani>
@domgetter - :o good point.
moei has quit [Quit: Leaving...]
<pizzaops>
zambini: I'm sorry?
crime has quit [Quit: Page closed]
<zambini>
To test your gem
<Guest83269>
sounds like agency worker
<pizzaops>
zambini: oh, no, rspec is fine, but sometimes I'm just trying a bunch of things.
pawnbox has quit [Ping timeout: 276 seconds]
<pizzaops>
So I want to run something, drop a binding.pry in, etc. without having to build over and over
yqt has quit [Ping timeout: 272 seconds]
atomical_ has joined #ruby
freerobby has quit [Quit: Leaving.]
rakm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
freerobby has joined #ruby
ascarter_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mistermocha has quit [Remote host closed the connection]
atomical has quit [Ping timeout: 240 seconds]
sankaber has joined #ruby
joonty has joined #ruby
northfurr has joined #ruby
mikecmpbll has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jackjackdripper1 has quit [Quit: Leaving.]
<Radar>
Guest83269: I am completely sober. Again: pay peanuts, get monkeys. I am not a monkey, I am expensive.
<Radar>
Guest83269: What a monkey does in 10 hours I do in 1.
<Radar>
Monkey charges $50/hr
Mr_Pancake has quit [Ping timeout: 264 seconds]
<Radar>
Do the math
El3ktra has joined #ruby
El3ktra has quit [Changing host]
El3ktra has joined #ruby
Seich has quit [Ping timeout: 240 seconds]
joonty has quit [Ping timeout: 276 seconds]
<felltir>
10x klaxon
atomical has joined #ruby
<nfk|laptop>
Radar, i don't think anyone's hourly rate is above some $160
akem has quit [Quit: Bye]
dorei has quit []
Seich has joined #ruby
<nfk|laptop>
anyway, sleep, tomorrow/today will be hellish, probably
baweaver has joined #ruby
nfk|laptop has quit [Quit: yawn]
<eam>
$160/hr is annualized $320k/yr?
<Radar>
nfk|laptop: Well, you've met someone who charges that.
<eam>
assuming 40hrs/week which contractors generally won't hit
zeroDivisible has quit [Quit: WeeChat 1.3]
<Radar>
Base rate of $150/hr but I add up to $100 if I think the client is going to be troublesome. it's based on a percentage.
<mg^>
reminds me of a conversation when I worked at Big Company. Them: "We can pay for 3 FTEs worth people at Outsourcing Firm for the cost of you" Me: "Go ahead and try that out."
<Radar>
So 100% chance of client being difficult == $100
<eam>
I know a guy who doesn't write code. All he does is computer work at people's home (think geek squad) and his hourly rate is >$100
atomica__ has joined #ruby
binaryplease has quit [Ping timeout: 245 seconds]
atomical_ has quit [Ping timeout: 276 seconds]
Mr_Pancake has joined #ruby
<eam>
I think the shop billing rate for a car mechanic or a plumber is around $150/hr
AlphaAtom has joined #ruby
<mg^>
I went and worked for Outsourcing Firm for Big Company so they got to pay for me *and* three people because I was not allowed to bill more than 40 hours a week and they needed my skills.
<eam>
mg^: hired the people under you?
<eam>
seems to be a pretty standard thing for name-brand contractors
<eam>
"we've brought on so-and so and his team" and then the name brand so and so gets a percentage
<mg^>
more complicated from an HR/international perspective but essentially that
<eam>
and then outsources the crapwork to dudes in eastern EU or whatever
atomical has quit [Ping timeout: 265 seconds]
<mg^>
My overseas team was actually pretty good. Definitely several I'd hire in a heartbeat.
baweaver has quit [Ping timeout: 276 seconds]
<eam>
oh yeah, I absolutely don't mean to denigrate the quality of that kind of outsourcing
<eam>
the idiot in this equation is the company who can't recruit competent talent on their own :)
<diegoviola>
Radar: where do you find your clients?
finisherr has quit [Ping timeout: 260 seconds]
<eam>
mg^: some of the best international hires we recruited over a decade ago now live and work in my office :)
<mg^>
nice
Guest83269 has quit [Quit: Leaving]
<mg^>
I wish the startup would finish cranking already, I'd love to get some of my old teammates back.
<eam>
ah, well, we all went to the same startup years back sooo :D
<mg^>
nice
blackgoat has quit [Quit: WeeChat 1.3]
<mg^>
I did the same thing, initially with one other guy and now two from the old Big Company, but we're not bringing enough in yet for us to bring on more
marr has quit [Ping timeout: 245 seconds]
<mg^>
but I've got a whole list of potential recruits in my back pocket for when the cash starts rolling in
<eam>
sounds about right, thank goodness for CA's employee protections which invalidate noncompetes and non-recruit clauses
Mr_Pancake has quit [Ping timeout: 265 seconds]
kiidbrian has quit [Ping timeout: 256 seconds]
Mr_Pancake has joined #ruby
djbkd has joined #ruby
bitri has joined #ruby
<zambini>
^
mclong has quit [Quit: Leaving]
frem has quit [Quit: Connection closed for inactivity]
sdwrage has quit [Quit: This computer has gone to sleep]
snockerton has quit [Ping timeout: 265 seconds]
Mr_Pancake has quit [Ping timeout: 246 seconds]
pdoherty has joined #ruby
blackmesa has joined #ruby
ledestin has joined #ruby
Mr_Pancake has joined #ruby
nerfando has joined #ruby
nerfando has quit [Max SendQ exceeded]
baweaver has joined #ruby
nerfando has joined #ruby
bricker has quit [Quit: leaving]
nerfando has quit [Max SendQ exceeded]
Rodya_ has joined #ruby
nerfando has joined #ruby
nerfando has quit [Max SendQ exceeded]
oz has quit [Ping timeout: 250 seconds]
nerfando has joined #ruby
nerfando has quit [Client Quit]
Kryptonical has left #ruby ["See ya"]
ajf- has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
oz has joined #ruby
Rodya_ has quit [Ping timeout: 245 seconds]
ico has quit [Remote host closed the connection]
janebootydoe has quit [Remote host closed the connection]
janebootydoe has joined #ruby
gambl0re has quit []
krz has joined #ruby
casadei has joined #ruby
Anderson69s has joined #ruby
davedev24 has joined #ruby
dlitvak has joined #ruby
axsuul has quit [Ping timeout: 250 seconds]
jgt1 has quit [Ping timeout: 260 seconds]
woodruffw has quit [Changing host]
woodruffw has joined #ruby
griffindy has joined #ruby
chipotle has joined #ruby
RobertBirnie has quit [Ping timeout: 272 seconds]
duckpuppy has joined #ruby
dlitvak has quit [Ping timeout: 276 seconds]
sleepee has quit [Quit: Leaving]
iwaffles has joined #ruby
pawnbox has joined #ruby
foobar020 has quit [Quit: Leaving]
n00bdev has joined #ruby
casadei has quit [Remote host closed the connection]
DLSteve has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
arthurix has quit [Ping timeout: 250 seconds]
pawnbox has quit [Ping timeout: 246 seconds]
Ebok has quit [Read error: Connection reset by peer]
dlitvak has joined #ruby
Ebok has joined #ruby
janebootydoe has quit [Quit: Leaving]
arthurix has joined #ruby
kt2 has joined #ruby
Seich has quit [Ping timeout: 250 seconds]
mistermocha has joined #ruby
casadei has joined #ruby
Seich has joined #ruby
DLSteve has joined #ruby
mostlybadfly has joined #ruby
b2zeldafreak has joined #ruby
lkba_ has joined #ruby
crdpink has quit [Quit: q term]
yeticry_ has joined #ruby
dlitvak has quit [Ping timeout: 276 seconds]
lkba has quit [Ping timeout: 245 seconds]
mistermocha has quit [Ping timeout: 276 seconds]
yfeldblum has quit [Remote host closed the connection]
crdpink has joined #ruby
TomPeed has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
podman has quit [Quit: Connection closed for inactivity]
Limix has quit [Quit: Limix]
yeticry has quit [Ping timeout: 240 seconds]
b2zeldafreak has quit [Quit: Leaving]
b2zeldafreak has joined #ruby
casadei has quit [Remote host closed the connection]
n00bdev has quit []
zambini has quit [Quit: Leaving.]
kt2 has quit [Quit: ...]
blackmesa has quit [Quit: WeeChat 1.3]
b2zeldafreak has quit [Client Quit]
b2zeldafreak has joined #ruby
gambl0re has joined #ruby
Yzguy has joined #ruby
kalopsian has joined #ruby
solocshaw has joined #ruby
<b2zeldafreak>
Hi, can anyone point me to a good example (or tutorial) for using Hexagonal or Clean architecture with Rails?
<harly>
what's that?
kt2 has joined #ruby
Anderson69s has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<b2zeldafreak>
Decoupling your business logic from the Rails framework essentially
RobertBirnie has joined #ruby
felltir has quit [Remote host closed the connection]
dcunit3d has quit [Ping timeout: 240 seconds]
gbgdev has quit [Remote host closed the connection]
<pizzaops>
I don't quite understand why the config.whatever calls inside my hash here return undefined method config. Shouldn't I be able to call a class method anywhere inside the class? E.g. it works outside the initialize method but not inside it. https://gist.github.com/pizzaops/bd0378bfe9ce6795a4cf
pawnbox has joined #ruby
<bnagy>
pizzaops: if in doubt `p self`
Yzguy has quit [Quit: Zzz...]
<pizzaops>
nil...
fourq is now known as fourq|away
fourq|away is now known as fourq
atomical has joined #ruby
<pizzaops>
But self.class is cronenberg::connection
<bnagy>
you can call _instance_ methods anywhere because self is the instance inside instance method bodies
<bnagy>
if you want to call something on self.class then do that :)
<pizzaops>
Oh I see, the instance is not the class.
<pizzaops>
That makes sense.
al2o3-cr has quit [Read error: Connection reset by peer]
welovfree has joined #ruby
al2o3-cr has joined #ruby
RobertBirnie has quit [Ping timeout: 256 seconds]
<bnagy>
_personally_ I often use self.some_method when I do that just to make it clear
<welovfree>
Hello guys, what are the prerequisites to start learning Ruby? and what's Ruby on Rails?
<bnagy>
because auto-dispatch to self sometimes makes it look like you're calling some keyword or magic or something
pawnbox has quit [Ping timeout: 246 seconds]
jam_ has joined #ruby
<pizzaops>
I changed self to an instance method. It doesn't really matter.
atomica__ has quit [Ping timeout: 264 seconds]
<pizzaops>
It will always get the same values since it's reading a config file.
<bnagy>
well they're very different, especially for config
kt2 has quit [Quit: ...]
<bnagy>
but whatever works :) You could also make the config a class or even a singleton and pass it as an initialize param to stuff
RobertBirnie has joined #ruby
Jardayn has quit [Quit: Leaving]
<pizzaops>
Config is a class already, which does some logic around reading env variables or a config file
<pizzaops>
Thus Cronenberg::Config.new
<Radar>
diegoviola: internet
<Radar>
diegoviola: I don't go looking usually. They find me.
|ifei5good has joined #ruby
<diegoviola>
Radar: cool
Darmani has quit [Ping timeout: 252 seconds]
|ifei5g00d has quit [Ping timeout: 246 seconds]
stannard has joined #ruby
bronson has quit [Remote host closed the connection]
al2o3-cr has quit [Read error: Connection reset by peer]
houhoulis has joined #ruby
Rodya_ has joined #ruby
welovfree_ has joined #ruby
al2o3-cr has joined #ruby
stannard has quit [Ping timeout: 240 seconds]
bruce_lee has quit [Read error: Connection reset by peer]
welovfree has quit [Ping timeout: 256 seconds]
Rodya_ has quit [Ping timeout: 250 seconds]
shinnya has quit [Ping timeout: 246 seconds]
dlitvak has joined #ruby
duckpuppy has quit [Ping timeout: 250 seconds]
Darmani has joined #ruby
domgetter has joined #ruby
jgt1 has joined #ruby
bb010g has joined #ruby
dlitvak has quit [Ping timeout: 264 seconds]
TomPeed has joined #ruby
jgt1 has quit [Ping timeout: 256 seconds]
<b2zeldafreak>
What does the ':' operator do?
baweaver has quit [Remote host closed the connection]
diegoviola has quit [Quit: WeeChat 1.3]
duckpuppy has joined #ruby
welovfree_ has quit [Quit: Leaving]
pawnbox has joined #ruby
arescorpio has joined #ruby
<Ox0dea>
There's no such thing.
sdwrage has joined #ruby
<Ox0dea>
Prefixing an identifier with ':' turns it into a Symbol.
viperman has quit [Read error: Connection reset by peer]
<Ox0dea>
And then there's `foo ? if_truthy : if_falsy`, which is a ternary expression.
pawnbox has quit [Ping timeout: 255 seconds]
<Ox0dea>
b2zeldafreak: ^
<harly>
and the hash alternative. :key => 'value' vs key: 'value'
peeja has joined #ruby
<b2zeldafreak>
And what is a symbol?
<Ox0dea>
A Symbol is essentially a String, except that it compares by identity rather than character-wise.
dcunit3d has joined #ruby
<Ox0dea>
:foo is always the same Object, whereas two separate instances of the String "foo" will be different objects.
<b2zeldafreak>
So is :thisstring representing "thisstring" or some other value?
<Chewy1121>
Harly, how can I make a method go back to the prevouise method once it is done?
<harly>
by calling it from the previous method :)
<Chewy1121>
What?
joonty has joined #ruby
B1n4r10 has quit [Ping timeout: 250 seconds]
<Chewy1121>
I mean as a new method
<Ox0dea>
Chewy1121: That'll "just happen".
<Chewy1121>
No no,
<Chewy1121>
I mean, method 1 runs, then method 2 is called and is run. I want method 1 to run again
dcunit3d has quit [Ping timeout: 276 seconds]
<Chewy1121>
But I do not want to specify method 1 at the end of method 2
<harly>
well, for what you're trying to achieve you can either have method 1 as recursive, or loop in method one based on the result of method 2. but thinking "i want method 2 to jump to method 1" is probably the wrong way to think about it.
<Chewy1121>
Ok
<Ox0dea>
Chewy1121: Do you want method 1 to resume or start over?
B1n4r10 has joined #ruby
<Chewy1121>
start over
<Ox0dea>
Then you're being crazy.
<Chewy1121>
What?
<harly>
method1 { while (some condition) { method2; other stuff; } p 'method 1 done' }
<Chewy1121>
Someone might me in the admin method, alternatively someone might be in the user (cp) method
iwaffles has quit [Quit: iwaffles]
Ebok has quit [Read error: Connection reset by peer]
joonty has quit [Ping timeout: 240 seconds]
<Chewy1121>
I want both to be able to access the g99 method, and rerun after wards
atomical_ has joined #ruby
Ebok has joined #ruby
<Chewy1121>
do i just return g99?
<Chewy1121>
in the admin and cp?
fsapo has quit [Remote host closed the connection]
Sembei has quit [Ping timeout: 240 seconds]
bronson has joined #ruby
<harly>
so g99 is a way to ask the user to enter a new pass?
|ifei5good has quit [Ping timeout: 260 seconds]
<Chewy1121>
Yes, to update it
<harly>
why don't you call it promp_pass
<harly>
because g99. that's strange.
<Chewy1121>
what is promp?
<Chewy1121>
do you mean prompt?
<harly>
yeah.
<Chewy1121>
Or is promp a thing?
<Chewy1121>
Ok, what does that do?
<harly>
just a made up name
<Chewy1121>
How would that work?
<harly>
you could call it prompt_for_pass_and_awkwardly_store_in_globals too
baweaver has joined #ruby
<Chewy1121>
Well I need to store it in an array
<Chewy1121>
Sorry
<Chewy1121>
Hash
<Chewy1121>
(brain fart)
<Chewy1121>
I could do everything in the control panel
atomica__ has joined #ruby
<Chewy1121>
But I am trying to keep everything separate
astrobun_ has joined #ruby
atomical has quit [Ping timeout: 264 seconds]
jbrhbr has quit [Ping timeout: 260 seconds]
_Tariq has joined #ruby
gregf has quit [Ping timeout: 240 seconds]
<harly>
well. first. all of that code is a bit kind of messy and hard to read. but to answer your specific question in cp and admin you would just call g99 when you want it.
<Ox0dea>
What makes somebody name their variables like this?
<Chewy1121>
I love it when u get confused like this
<harly>
personally I do that with g99() cos the () makes it clearer it's a function call and not some random variable.
<Ox0dea>
I'm not confused, I'm worried.
yfeldblum has quit [Ping timeout: 250 seconds]
<Chewy1121>
Hehehe
<harly>
but first thing. rename every one of those strange values like e50 b3 b4 with what they *represent*
<Chewy1121>
Anways, harly. I want people to be able to access the same panel again
<Chewy1121>
Actually
<Chewy1121>
I figured out how to do it
baweaver has quit [Ping timeout: 240 seconds]
<harly>
figured out *one way* to do it maybe. :)
ss_much has joined #ruby
<harly>
there's many. the fun bit is picking the right one that's structured well and readable to other people.
atomical_ has quit [Ping timeout: 272 seconds]
<Chewy1121>
Well check it, look at line 32
<harly>
seriously though. go and rename all your variables to have names that represent what they are. not random letters and numbers.
<Chewy1121>
With the case. if they pick pass I can just call g99, then put cp
<Chewy1121>
Else if it is in the admin sections Ill just do g99 and then admin
<Chewy1121>
No
<harly>
b3 to password. b4 to unecessary_and_unused_copy_as_a_class_variable_of_entered_password, etc.
<Chewy1121>
NO
<Chewy1121>
No!
<Chewy1121>
I luv it like that
<Chewy1121>
Plus I don't want to because it would be too long to re write it
peeja has joined #ruby
<harly>
woulnd't be long at all.
<Chewy1121>
I got about 10,000 lines of code already written using those variables
<harly>
now i think you're trolling
<Chewy1121>
I am
<Chewy1121>
Lol
<Chewy1121>
Only like 300
<Chewy1121>
But I still don't feel like re writing it
<Chewy1121>
Plus they are simple and Easy to understand :D
<Chewy1121>
Well for me at least
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ramfjord has quit [Ping timeout: 246 seconds]
LMity has joined #ruby
bronson has quit [Remote host closed the connection]
|ifei5good has joined #ruby
dcunit3d has joined #ruby
pawnbox has joined #ruby
<shevy>
you are still picking silly-short method names?
<shevy>
why not do alphabetical names... def a ... def b ... def c
|ifei5g00d has quit [Ping timeout: 245 seconds]
DrCode has quit [Read error: Connection reset by peer]
Dimik has quit [Ping timeout: 255 seconds]
<harly>
or use a password generator for them? CrNJhhWp2CnEGxJgA6fR2h2FXW7XsV is particularly nice.
<shevy>
haha
<harly>
and with tab completion, you'd only have to enter 2-4 letters probably!
pawnbox has quit [Ping timeout: 265 seconds]
<eam>
well, that's a constant
<harly>
dang, my method is flawed.
<eam>
I mean, you can do it
<harly>
stop raining on my parade! *cries*
<eam>
AFAIK a method can contain any characters at all
<eam>
or none
<shevy>
cool
<eam>
it just gets a little awkward to use it
<harly>
working on my variable name generator vim plugin now. it's going to be a hit!
<shevy>
:P
LMity has quit [Ping timeout: 260 seconds]
allcentury has quit [Ping timeout: 265 seconds]
Rodya_ has joined #ruby
blackgoat has joined #ruby
bronson has joined #ruby
vdamewood has joined #ruby
hxegon has quit [Ping timeout: 272 seconds]
citrusfizz has joined #ruby
Rodya_ has quit [Ping timeout: 240 seconds]
ashemark has joined #ruby
<ashemark>
Hello!!
arthropododo has joined #ruby
TomPeed has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Radar>
hey ashemark
<Radar>
How are things today?
Seich has quit [Ping timeout: 260 seconds]
moei has joined #ruby
<citrusfizz>
hello, i have a crazy problem, i'm using activerecord to grab a simple value from a database. i'm then taking that and sending it to slacks API to a channel. in slack you can make text have a link. by doing <http://www.whatever.com|clickhere> so in my command in ruby it looks like this message = "<#{q.url}|clickhere> this should just post "click here" in...
<citrusfizz>
...the slack channel. but it outputs <http://www.whatever.com|clickhere> . the furstrating thing is, i tested it with ab = "http://www.whatever.com" then put in message = <#{ab}|click here> it works fine. so for some reason, it doesn't like my active record db call. what could be the issue?
<Radar>
citrusfizz: In Slack, <http://whatever.com|clickhere> is not a link.
Seich has joined #ruby
<citrusfizz>
if you pass "http://www.whatever.com|click here>" to a slack channel VIA the api, it resolves as "click here" with a link
<Radar>
TIL
<Radar>
code that is fetching this value from a database please.
<arthropododo>
so are people starting to use Ruby in scientific computing yet?
bronson has quit [Remote host closed the connection]
<Radar>
helpa is muted here, so I can't !8ball you
freerobby has quit [Quit: Leaving.]
<Radar>
[14:46:53] <Radar>!8ball
<Radar>
[14:46:54] <helpa>Yes – definitely.
<Radar>
But I can run the command in another channel.
<Radar>
HELPA HAS SPOKEN.
tomjoro has quit [Remote host closed the connection]
<chipotle>
so i use sublime text 3 because the last time i tried atom in the pre 1.x days, it was slow as hell. i read a long thread saying they would fix it for 1.x ... is that true? or is it still maddening slow?
<Radar>
?try chipotle
<ruby[bot]>
chipotle: Why don't you try it and see for yourself?
<chipotle>
i can't at the moment
<Radar>
in my experience it's still slow as molasses and Sublime Text 3 wins
<Radar>
even MacVim was terrible
<shevy>
hehe
DLSteve has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<shevy>
arthropododo I think it depends on how many people will use ruby there, from my experience, the "normal" ruby user is more likely to use ruby for commandline scripting or rails, rather than for science-related stuff
harai54 has quit [Ping timeout: 272 seconds]
<harly>
mmm, but is the "normal" science programmer likely to use ruby?
northfurr has quit [Quit: northfurr]
northfurr has joined #ruby
terminalrecluse has joined #ruby
finisherr has joined #ruby
<shevy>
more likely to use python!
rodolfowtf has quit [Remote host closed the connection]
sankaber has joined #ruby
bronson has joined #ruby
<ashemark>
is there a way I could get autocompletion for imported gems in atom?
sankaber has quit [Remote host closed the connection]
sankaber has joined #ruby
n00bdev has joined #ruby
<citrusfizz>
what do you mean
grassass has quit [Ping timeout: 240 seconds]
<Radar>
citrusfizz: Everything you're doing is exactly as I would do it. I don't see what could be wrong.
graphettion has joined #ruby
<citrusfizz>
its crazy, if i do output gg.class i get String, q.url.class i get string
<Radar>
lowercase s?
<citrusfizz>
my bad
<citrusfizz>
i meant String
<citrusfizz>
is there any trick to getting the value and re-assgining it before i put it in the message? something that not just a pointer
<citrusfizz>
i just don't freaking understand this one
<chipotle>
arthropododo: my background is a PhD in theoretical physics...we never used ruby. python has a huge headstart on ruby with all its libraries etc for scientific computing. and then there is c/c++
<citrusfizz>
maybe something to do with encoding?
<shevy>
citrusfizz depends on the encoding, if you have an umlaut then .upcase .downcase may fail depending on your encoding; e. g. I have that sometimes when I use some ISO encoding
<shevy>
>> "ü".upcase
graffix222 has quit [Ping timeout: 260 seconds]
braincrash has quit [Quit: bye bye]
<arthropododo>
shevy , chipotle thanks
<Guest96374>
list
Guest96374 has left #ruby ["WeeChat 0.4.2"]
yfeldblum has joined #ruby
terminalrecluse has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<arthropododo>
I'm starting a project and since nobody imposed anything might as well try to mix ruby and C++ and see how that works out
<shevy>
arthropododo I usually saw the combination of c++ and python there, for instance relion, but also some projects that require cluster computation via openmpi and such, always C++, and always python :)
baweaver has joined #ruby
<chipotle>
shevy: oh and of course, R
<shevy>
I dunno, usually R was more of an addon then, mathematica was also used, but I meant for integrated packages, when the author wrote it in C++, the scripting language that followed with it usually was python
braincrash has joined #ruby
B1n4r10 has quit [Ping timeout: 240 seconds]
radgeRayden has quit [Read error: Connection reset by peer]
yfeldblum has quit [Ping timeout: 260 seconds]
<arthropododo>
for all those scientific python applications do people generally stick to python 2.x?
zast has joined #ruby
baweaver has quit [Ping timeout: 240 seconds]
ashemark has left #ruby ["WeeChat 1.3"]
peeja has quit [Ping timeout: 260 seconds]
ramfjord has joined #ruby
jgt1 has joined #ruby
<shevy>
I think most did
<shevy>
I hate the python2 versus python3 split
JohnT has joined #ruby
kp666 has joined #ruby
kp666 has quit [Max SendQ exceeded]
kp666 has joined #ruby
hxegon has joined #ruby
framling has joined #ruby
elnur has left #ruby ["Leaving"]
pawnbox has joined #ruby
jgt1 has quit [Ping timeout: 272 seconds]
voidDotClass has quit [Ping timeout: 240 seconds]
ur5us has quit [Remote host closed the connection]
<_Tariq>
shevy: Is there any attempt to remedy the divide?
<_Tariq>
Or is the fork going to stay forever?
<shevy>
I don't think they'll will remedy much at all, they will probably go the "more and more people will use python 3 and then this will resolve on its own eventually"
<_Tariq>
ok
hxegon has quit [Ping timeout: 264 seconds]
pawnbox has quit [Ping timeout: 240 seconds]
krz has quit [Ping timeout: 245 seconds]
ropeney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<ruby[bot]>
Ox0dea: # => /tmp/execpad-70f0df6590c7/source-70f0df6590c7:2: warning: invalid character syntax; use ?\s ...check link for more (https://eval.in/502477)
<Ox0dea>
Worth a shot.
usershell has quit [Remote host closed the connection]
yfeldblum has joined #ruby
northfurr has joined #ruby
gix has quit [Ping timeout: 246 seconds]
duckpuppy has quit [Ping timeout: 260 seconds]
benlieb has quit [Quit: benlieb]
<Ox0dea>
I sent a literal ^C; ruby[bot] was supposed to say 3. :<
<shevy>
I want ruboto back!
benlieb has joined #ruby
benlieb has quit [Client Quit]
carella has quit [Read error: Connection timed out]
<Ox0dea>
^
northfurr has quit [Client Quit]
kalopsian has quit [Ping timeout: 255 seconds]
carella has joined #ruby
graffix222 has quit [Read error: Connection reset by peer]
graffix222 has joined #ruby
chipotle has quit [Ping timeout: 255 seconds]
arup_r has joined #ruby
gix has joined #ruby
<Darmani>
I can't code anymore.
<Darmani>
I don't mean ever.
joonty has joined #ruby
<Darmani>
Just not anymore today.
<Darmani>
Fuck me.
* Darmani
cries in a corner
bronson has quit [Remote host closed the connection]
b2zeldafreak has quit [Remote host closed the connection]
<Ox0dea>
All I hear is... oh.
northfurr has joined #ruby
<Darmani>
What happened to our intellectual conversation? T.T
<Darmani>
@Ox0dea - You suck.
<shevy>
lol
<Ox0dea>
What happened to the P in PM standing for pterodactyl?
iateadonut has joined #ruby
<Darmani>
Is that what it stood for?
<shevy>
I just read that they showcase the biggest dinosaur in new york soon
<Darmani>
I had no idea.
pawnbox has joined #ruby
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
cornerma1 has joined #ruby
<Ox0dea>
*ptarmigan
<Darmani>
@shevy - dam for real? What kinda dinosaur?
<shevy>
Darmani dunno, only saw it briefly on a TV teleprompter some minutes ago
lacuna has quit [Remote host closed the connection]
hxegon has quit [Ping timeout: 246 seconds]
pawnbox has quit [Ping timeout: 245 seconds]
mistermocha has quit [Ping timeout: 260 seconds]
hxegon has joined #ruby
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Ox0dea>
Darmani: Exercise: find the longest sequence of unique speakers in #ruby history.
<Ox0dea>
It's probably 7.
<Radar>
[16:00:44] <Darmani>I can't code anymore.
<Radar>
Congratulations you have become a programmer.
<Darmani>
@Radar - Lmao is that all it took? xD
usershell has joined #ruby
<Radar>
Darmani: Programming is really all about... well, put it this way: "Yes, yes... use your hate."
<Darmani>
@Ox0dea - The longest sequence of unique speakers being people who have only commented like once or twice? How long does the sequence need to be?
<Ox0dea>
Darmani: Like, right now, the sequence is three.
<Darmani>
@Radar - You sound like the Dark Lord of the Sith.
<Ox0dea>
And now it's two.
<Darmani>
@Radar - That's who you really are isn't it?
<Radar>
Darmani: Maybe.
harai54 has joined #ruby
<Radar>
Darmani: I'd like to think of myself more as a Frank Underwood.
<Darmani>
@Radar - Haha ruthless and charming. Good combination lol
<pizzaops>
Is there a way to test a class instance method without invoking the initialize method? This method should work on its own, and doing the scaffolding to make the initialize method work at that point doesn't feel necessary.
Mackerel has joined #ruby
<Chewy1121>
sigh
<Chewy1121>
Test out the code
Kneecaps has joined #ruby
<Ox0dea>
pizzaops: It shouldn't be an instance method if it's not intended to be invoked on instances.
<Chewy1121>
It will show you the probelm 10x faster than explaining it
<Chewy1121>
But if you really want me too
<pizzaops>
@Ox0dea ah...that's true, this method really only need to ever be invoked once per "run" of the application.
<Chewy1121>
The puts at the end, where it prints out username, pin, password and rank print out multiple times
<Chewy1121>
I dunno how to fix that
<duoi>
hi guys, im the cto of a large company. can i use rubies to make my company cloud-aware?
joonty has joined #ruby
<Ox0dea>
!cops
bronson has joined #ruby
vikas027_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
nerium has joined #ruby
vikas027 has joined #ruby
pawnbox has quit [Remote host closed the connection]
<Chewy1121>
duoi
<Chewy1121>
Retard-Alert
<harly>
"scaffolding to make the initialize method work" sounds so compliated.
<Cohedrin>
duoi gem install skynet
<Cohedrin>
should solve the problem for you
<Chewy1121>
Lol
<Chewy1121>
"Skynet"
<harly>
gitlab.com header message: Microsoft Azure is performing maintenance between 13 Jan 16:00 UTC and 16 Jan 16:00 UTC. This may cause up to 15 minutes of outage.
<Chewy1121>
Hahahaha
<harly>
lol azure.
vikas027 has quit [Read error: Connection reset by peer]
<pizzaops>
Ox0dea: this — https://gist.github.com/pizzaops/7349fe150137b7c5a92f — should really just be `@@default_config_location = File.join(Dir.home, '.vcenter.conf')` right? E.g. there's really no need for a method. And it never changes.
<Ox0dea>
pizzaops: Make it a constant.
joonty has quit [Ping timeout: 265 seconds]
<Ox0dea>
It's right there in the name. :P
<duoi>
Cohedrin i am more interested in using the "ruby on rains" method i found in yahoo but i am scared of flooding.
<pizzaops>
haha
<Chewy1121>
ox0dea Can you help me with da problemo?
<pizzaops>
Ox0dea: is it acceptable to have @@CONSTANTS ?
<Ox0dea>
pizzaops: Why, though?
sigurding has quit [Quit: sigurding]
bronson has quit [Ping timeout: 265 seconds]
<Ox0dea>
Why won't a CONSTANT suffice?
<shevy>
he likes the extra @@
<pizzaops>
Is CONSTANT accessible inside methods? I thought they weren't for some rason.
<pizzaops>
s/rason/reason
<Ox0dea>
They are.
<pizzaops>
Welp, never mind then.
<pizzaops>
Thanks for the advice!
<Ox0dea>
Sure thing.
<harly>
*submits coding test for job**feels angst over not spending enough time on it* where to draw the line!
<Cohedrin>
duoi Ah I understand. Sounds like what you need is a 10x programmer
djbkd has quit [Ping timeout: 265 seconds]
<Cohedrin>
a 9x programmer is never going to be able to stop the flood from happening
<Cohedrin>
only a 10x
<shevy>
a code monkey!
<shevy>
a flood monkey!
<Chewy1121>
lol
<harly>
a 10x unicorn will solve all your clouds.
<Chewy1121>
flood
kknight has quit [Ping timeout: 260 seconds]
<pizzaops>
I'm a 10x pizza-eater. What does that get me?
<Cohedrin>
10x unicorn will cause your heroku server to go down
<harly>
they're hard to attract. free disgustingly cheapest available pizza every friday is a great way!
<shevy>
lol
<duoi>
Cohedrin ok i will put the job advert out now for a 10x cloud-aware ruby on rain junior assistant software developing enginnering associate. thank u for ur help.
<harly>
duoi: how about intern with a view to full time?
<pizzaops>
And presumably testing the value of `DEFAULT_CONFIG_LOCATION = File.join(Dir.home, '.vcenter.conf')` is unnecessary because I'm just testing Ruby functionality at that point?
lyjia has joined #ruby
<duoi>
harly don't trust interns with the data (i am cto of a missile defense contractor). we need an experienced 10x programmer with minimum 40 years exp.
<duoi>
in ruby on rains.
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<pizzaops>
Surely you mean boilerstrapjs
<harly>
lol
<Cohedrin>
what are you using the rains for in your missle
<norc_>
Ox0dea: No it should be relatively easy as long as you have a separate dictionary for verbs.
<norc_>
Stemming verbs is just removing the "en" suffix.
<norc_>
And any non-verbal noun can be just used as is from the dictionary.
<norc_>
So yeah, should be doable.
yardenbar has joined #ruby
roshanavand has joined #ruby
SCHAAP137 has joined #ruby
<norc_>
Nevermind, this is not my topic. :S
<Ox0dea>
Linguistics is hard, let's go programming.
pawnbox has quit [Remote host closed the connection]
roshanavand has quit [Remote host closed the connection]
roshanavand has joined #ruby
<norc_>
Currently I am busy trying to install this rather expensive piece of API gateway. But it seems the installer is so bugged that it does not work out of the box.
<norc_>
Not very reassuring...
tubuliferous_ has joined #ruby
ohaibbq has joined #ruby
roshanavand has quit [Remote host closed the connection]
pawnbox has joined #ruby
roshanavand has joined #ruby
PedramT has quit [Remote host closed the connection]
ur5us has joined #ruby
PedramT has joined #ruby
pawnbox has quit [Read error: Connection reset by peer]
tvw has quit [Ping timeout: 255 seconds]
roshanav_ has joined #ruby
pawnbox has joined #ruby
jbrhbr has joined #ruby
carraroj has joined #ruby
<Ox0dea>
The pain means it's working. /s
Rodya_ has joined #ruby
roshanavand has quit [Ping timeout: 240 seconds]
tvw has joined #ruby
arup_r has quit [Remote host closed the connection]
mark1 has joined #ruby
ericfreese has joined #ruby
<ljarvis>
moin
PedramT has quit [Remote host closed the connection]
Rodya_ has quit [Ping timeout: 240 seconds]
sigurding has quit [Quit: sigurding]
arup_r has joined #ruby
PedramT has joined #ruby
ericfreese has quit [Ping timeout: 250 seconds]
jas02 has quit [Quit: jas02]
antgel has joined #ruby
LMity has quit [Ping timeout: 240 seconds]
PedramT has quit [Remote host closed the connection]
firstdayonthejob has quit [Ping timeout: 256 seconds]
blackms has joined #ruby
djbkd_ has joined #ruby
PedramT has joined #ruby
kalopsian has joined #ruby
PedramT has quit [Remote host closed the connection]
codecop has joined #ruby
sigurding has joined #ruby
sandstrom has quit [Quit: My computer has gone to sleep.]
craysiii has quit [Remote host closed the connection]
sandstrom has joined #ruby
ur5us has quit [Remote host closed the connection]
<jackcom>
i think that ruby is graph is more cuty and beautiful, but python have Anaconda. if i use Anaconda, then i can excute graph file easily
<jackcom>
:(
<jackcom>
so i will use Ana……. :(
zotherstupidguy has joined #ruby
ohaibbq has quit [Quit: Leaving...]
sandstrom has quit [Quit: My computer has gone to sleep.]
craysiii has joined #ruby
craysiii has quit [Max SendQ exceeded]
craysiii has joined #ruby
PedramT has joined #ruby
rippa has joined #ruby
jas02 has joined #ruby
avril14th has joined #ruby
PedramT has quit [Remote host closed the connection]
Kneecaps has quit [Remote host closed the connection]
allcentury has joined #ruby
ta has joined #ruby
kalopsian has quit [Ping timeout: 276 seconds]
djbkd_ has quit [Remote host closed the connection]
joonty has joined #ruby
allcentury has quit [Ping timeout: 240 seconds]
<ljarvis>
use whatever works
kiidbrian has joined #ruby
joonty has quit [Client Quit]
mikecmpbll has joined #ruby
joonty has joined #ruby
einarj has joined #ruby
Cohedrin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
edwinvdgraaf has joined #ruby
sigurding has quit [Quit: sigurding]
edwinvdgraaf has quit [Remote host closed the connection]
edwinvdgraaf has joined #ruby
<jackcom>
ljarvis: thanks for understanding my situation.
RandomNickname has quit [Read error: Connection reset by peer]
<jackcom>
but i will study ruby after 10 days.
Ting_ has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
benjohn has joined #ruby
jgt1 has joined #ruby
sftrabbit has joined #ruby
edwinvdg_ has joined #ruby
Xeago has joined #ruby
arup_r has quit [Remote host closed the connection]
<norc_>
Ox0dea: It is not.
<Ox0dea>
norc_: Are you sure it's hurting enough?
<norc_>
It is hurting so much, that I am about to hurt some people.
haraigo has joined #ruby
framlinqp has joined #ruby
<norc_>
If you hear a news story later tonight with the head line "Tech Salesmen Found in 3 Locations Across Town" you will know.
harai54 has quit [Ping timeout: 240 seconds]
minimalism has quit [Ping timeout: 245 seconds]
edwinvdgraaf has quit [Ping timeout: 276 seconds]
framling has quit [Ping timeout: 272 seconds]
absolutejam_ has quit [Ping timeout: 265 seconds]
SOLDIERz has quit [Ping timeout: 276 seconds]
sandstrom has joined #ruby
pandaant has joined #ruby
<Ox0dea>
I initially read "Salesman", which made the proposition considerably grimmer.
astrobun_ has quit [Remote host closed the connection]
quaristice has joined #ruby
dpg_ has quit [Ping timeout: 260 seconds]
<norc_>
Ox0dea: I meant to write "Salesman". :-S
kalopsian has joined #ruby
<norc_>
Blame my hasty typing habit.
<Ox0dea>
And also that they're homophones, of course.
c0m0 has joined #ruby
<Ox0dea>
Which is a wart.
absolutejam has joined #ruby
<norc_>
The added advantage of blaming homophony is that it has nothing to do with me.
<norc_>
I like your proposition.
Dimik has quit [Ping timeout: 245 seconds]
allcentury has joined #ruby
carraroj has quit [Ping timeout: 240 seconds]
<Ox0dea>
Homophony, synonymy, antonymy.
<Ox0dea>
These are great words.
yfeldblum has quit [Ping timeout: 240 seconds]
carraroj has joined #ruby
<Ox0dea>
"Homonomy" sounds like "I'm onto me".
<norc_>
Ox0dea: Here is a quote from a wikipedia article that I find amusing: "The analysis of synonymy, polysemy, and hyponymy and hypernymy is vital to taxonomy and ontology in the information-science senses of those terms"
<Ox0dea>
*Homonymy
<Ox0dea>
norc_: Is that really real?
<norc_>
Yes it is.
karapetyan has joined #ruby
<Ox0dea>
It feels like it was written by a rapper.
<norc_>
A rapper with a PHD in linguistics you mean.
<Ox0dea>
Just so.
<Ox0dea>
There must be some?
<norc_>
Evidently so.
allcentury has quit [Ping timeout: 264 seconds]
<Bish>
anyone familiar with the aws gem? im trying to get my bounces/complaints of the SES/SNS service of AWS
nettoweb has joined #ruby
<Ox0dea>
Bish: I'm not, but I do have something for you if you're still interested in an implicit variable for blocks.
herbst has joined #ruby
<Bish>
Ox0dea: hit me
<herbst>
When i have a struct in a struct. Can i somehow .to_h and get only a hash without embed struct?
dwfait has quit [Read error: Connection reset by peer]
dwfait has joined #ruby
dlitvak has quit [Remote host closed the connection]
kalopsian has joined #ruby
techsethi has joined #ruby
El3ktra has quit [Ping timeout: 246 seconds]
fluchtreflex has quit [Read error: Connection reset by peer]
KillerFox has quit [Ping timeout: 246 seconds]
zenlot1 is now known as zenlot
dlitvak_ has joined #ruby
PedramT has joined #ruby
valeri_uF0 has joined #ruby
_fumk has joined #ruby
El3ktra has joined #ruby
FooMunki has joined #ruby
edwinvdg_ has quit [Read error: Connection reset by peer]
ta has joined #ruby
Snowy_ has joined #ruby
fumk has quit [Ping timeout: 246 seconds]
KillerFox has joined #ruby
Snowy has quit [Read error: Connection reset by peer]
valeri_ufo has quit [Ping timeout: 272 seconds]
fsapo has joined #ruby
valeri_uF0 is now known as valeri_ufo
Hexter has joined #ruby
PedramT has quit [Remote host closed the connection]
volty has joined #ruby
edwinvdgraaf has joined #ruby
ta_ has quit [Ping timeout: 246 seconds]
felixdd has joined #ruby
usershell has quit [Read error: Connection reset by peer]
PedramT has joined #ruby
edulix_ has joined #ruby
<edulix_>
hello people
<ljarvis>
voidDotClass: anchors are not visible to the server
<voidDotClass>
which server? ljarvis
usershell has joined #ruby
<ljarvis>
voidDotClass: i.e in rails, you can't read the anchor since it's not sent to the server, and I believe current_path will use the path that the server sees
toretore has joined #ruby
<ljarvis>
so, you probably want to test it in javascript
dlitvak_ has quit [Remote host closed the connection]
quaristice has joined #ruby
agent_white has joined #ruby
<agent_white>
Evenin'
<ljarvis>
voidDotClass: anyway, you should just assert what's on the page if it's a feature spec
<ljarvis>
i.e expect(page).to include("Login")
<voidDotClass>
kk
<ljarvis>
have_content, or w/e it is
<voidDotClass>
ty
PedramT has quit [Remote host closed the connection]
yos7ph has joined #ruby
<edulix_>
I ahave opensuse tumbleweed, I have execute sudo gem install bundle, but still the command bundle is not in the path. I know it is in /usr/lib64/ruby/gems/2.2.0/gems/bundler-1.11.2/exe/bundler, but why it's not automatically in the path?
abc has joined #ruby
abc is now known as Guest97516
<Guest97516>
Hey, are there equivalents of "puts" and "p" which only print a newline after last argument, instead of after every argument?
_mh_ has quit [Remote host closed the connection]
<Guest97516>
E.g. I would want puts 1,2,3 to print "1 2 3\n" instead of "1\n2\n3"
kerunaru has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<norc_>
By alias you mean alternate way of obtaining the same information?
<Ox0dea>
Aye.
<norc_>
Or do you mean alias?
<norc_>
Ok.
<Ox0dea>
*synonym, then.
Hexter has quit [Quit: Hexter]
<norc_>
Fair enough.
volty has left #ruby ["Konversation terminated!"]
<norc_>
Im not really surprised. Blocks are hacked deeply into Ruby all over the implementations.
<Ox0dea>
Which is a shame; they're quite elegant at the surface.
Ting_ has quit [Ping timeout: 260 seconds]
chussenot has quit [Quit: chussenot]
ericfreese has quit [Ping timeout: 264 seconds]
<norc_>
Ox0dea: A pure lambda approach would have been better imho.
<norc_>
Ox0dea: That would have been fairly easy to implement.
<Ox0dea>
norc_: How do you mean?
<Ox0dea>
Procs! Procs everywhere?
<norc_>
Ox0dea: Indeed. Lets just ignore that they are costly to use.
<norc_>
Ox0dea: Just the fact that you are inside a method, and you have no sensible way of referring to a block other than a random "yield" is so random.
<norc_>
Ox0dea: Accepting a proc as an argument, and invoking #call on it - that is clean.
<Ox0dea>
You're not wrong, but I do think some of the language's appeal would be lost there.
sftrabbit has quit [Quit: sftrabbit]
cornerman has quit [Remote host closed the connection]
<norc_>
Ox0dea: It kind of reminds of one of the worst quirks in JavaScript design regarding "this".
jam_ has joined #ruby
<norc_>
Aside from that part, it is actually a wonderful language.
<shevy>
omg
<Ox0dea>
The thing that most reminds me of JS's `this` is the difference between `self` and the default definee.
Ting_ has joined #ruby
<Ox0dea>
Blocks and `yield` are A-okay by my lights.
sftrabbit has joined #ruby
<norc_>
Ox0dea: "this" is really the same as the first argument of instance methods in Python.
Macaveli has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<norc_>
Its just as bizarre and feels unpolished.
<voidDotClass>
I have a site where most of the functionality is behind different login areas, e.g an admin area, a buyer area, a seller area, etc. how can i write rspec feature tests for it it so for all the features in admin area, it logs in as admin first, then logs out and logs back in as buyer for the buyer features, and so on?
Macaveli has joined #ruby
<norc_>
Ox0dea: self is quite right, the name can be misleading though.
<Ox0dea>
norc_: But the implicit receiver isn't always `self` is the point I meant to make.
karapetyan has quit [Remote host closed the connection]
bluOxigen has joined #ruby
karapetyan has joined #ruby
<wolfedale>
It works fine but when the file name has: ' it's saying that there is no such file. So for example: Test File.docx works fine. But Test File's.docx it's not :(
dlitvak has joined #ruby
<shevy>
did you try via "File'" quotes?
mondok has joined #ruby
bronson has quit [Ping timeout: 265 seconds]
<wolfedale>
I tried "#{@rand_dir}#{file}" and `#{@rand_dir}#{file}` but without the good result.
<lucasb>
what about split the string into several arguments?
<Ox0dea>
Or just escape the single quotes.
yfeldblum has joined #ruby
AlexRussia has quit [Quit: WeeChat 1.4-dev]
dlitvak_ has quit [Ping timeout: 260 seconds]
ta has quit [Remote host closed the connection]
<wolfedale>
Ox0dea: I'm not sure if I understand. How I can escape it?
asmodlol has quit [Ping timeout: 255 seconds]
<Ox0dea>
wolfedale: It's just as if you're invoking the command like `/usr/bin/foo 'Alice's Secrets.txt'`.
<Ox0dea>
The single quote in "Alice's" is terminating the string prematurely.
<lucasb>
filename = "Alice';rm -rf /"
asmodlol has joined #ruby
aswen has joined #ruby
<shevy>
haha
Rodya_ has joined #ruby
AlexRussia has joined #ruby
<norc_>
Screw this. Im starting to adopt internal ruby function naming. fix_fck_brk_str_from_dtag is a wonderful method name.
<Papierkorb>
fsck_dtag
yos7ph has quit [Ping timeout: 260 seconds]
<norc_>
;-)
sonOfRa has quit [Quit: Bye!]
Jackneill has quit [Ping timeout: 265 seconds]
Meow-J has joined #ruby
<wolfedale>
Ox0dea: I still don't know how to escape #{file} :(
anisha has quit [Quit: This computer has gone to sleep]
Rodya_ has quit [Ping timeout: 240 seconds]
ajf- has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<ponga>
god damn it why is everything named to a certain noun to trick me everytime
sdothum has joined #ruby
sdothum has quit [Client Quit]
<ddv>
lol
<Ox0dea>
"It's written in Python." "Python what? Scales? Python fangs?" "Blood."
arup_r has quit [Remote host closed the connection]
Guest42435 is now known as saneax_AFK
maia has joined #ruby
freerobby has quit [Quit: Leaving.]
sdothum has joined #ruby
mondok has quit [Quit: Leaving]
<maia>
Hello. I have a gem that supports 20+ languages, and for each language there are quite a lot of defined constants (arrays and hashes of strings and regexs).
<maia>
Is there a way to dynamically require only the languages currently needed, instead of loading all supported languages into memory?
<ponga>
wow i never thought of that
<ponga>
multilingual gem
blaxter has quit [Quit: foo]
sdothum has quit [Client Quit]
<shevy>
maia you could try to use load() and only load when the language is needed (the respective .rb files)
<Ox0dea>
For which autoload is a thing.
sdothum has joined #ruby
<shevy>
matz does not approve
dlitvak has quit [Ping timeout: 240 seconds]
<ponga>
matz does not approve autoload?
<shevy>
I dunno, it was changed at one point again
<lucasb>
I saw somewhere that autoload would go away in Ruby 3
dwfait has quit [Remote host closed the connection]
<maia>
shevy: I thought Kernel#load will load the code on each call, without checking if already loaded?
<shevy>
maia yeah but you can specify which files you need right?
<ponga>
maia: can you not deconstruct gem and remove the multilinguals?
aswen has quit [Quit: WeeChat 1.3]
<Papierkorb>
Try loading the language specific parts from a configuration-esque file, e.g. a YAML file
usershel_ has joined #ruby
<Papierkorb>
(If that is possible in your case)
<maia>
ponga: well, I’m trying to improve the gem, not to rip it apart. and I don’t like the fact that it requires all supported languages.
aswen has joined #ruby
ta has joined #ruby
binaryplease has joined #ruby
hanneli has joined #ruby
<Ox0dea>
maia: How do you determine which languages are necessary?
<maia>
Papierkorb: oh, so its possible to load from yaml on demand, and only once per session?
synthroid has joined #ruby
hannelita has quit [Ping timeout: 255 seconds]
<Papierkorb>
maia: it's code afterall. Something like the internationalizing stuff in rails does.
myntcake has quit [Remote host closed the connection]
Rodya_ has joined #ruby
usershell has quit [Ping timeout: 276 seconds]
<maia>
Ox0dea: it’s a gem that processes strings. When passing a string to the gem, you pass the language of the string.
aswen has quit [Client Quit]
hannelita has joined #ruby
asmodlol has quit [Ping timeout: 272 seconds]
<maia>
So it could happen that all strings are english, but in other use cases the languages could differ.
fourq|away is now known as fourq
aswen has joined #ruby
<Papierkorb>
maia: in that case, beware of multi-threading issues you may have when 'autoloading' that configuration. How big is the overhead anyway?
<ponga>
shevy: actually, i became curious, can you manually declare what to use inside a gem?
<ponga>
I always thought of require 'thingi' and that's it
<Ox0dea>
maia: So then just maintain a Set of the currently loaded languages, and only Kernel#require the requisite files if the Set doesn't yet contain that language, and then insert it so you only load once.
<maia>
Papierkorb: it’s not bit at the moment, but it might increase in time (the gem is in early development).
<Ox0dea>
ponga: That's it.
<Papierkorb>
Just require it? Ruby keeps track of what has been required anyway
<shevy>
ponga it is just ruby code, with different .rb files, you can do all the magic inside there the moment you pull in these .rb files (which usually happens by require 'name_here')
aswen has quit [Client Quit]
<Ox0dea>
Papierkorb: True enough.
<shevy>
ponga the author of the did-you-mean gem had a trick
<maia>
Ox0dea: would your suggestion cause problems when multi-threading?
hanneli has quit [Read error: No route to host]
<Ox0dea>
maia: It's overkill. I derped.
aswen has joined #ruby
<ponga>
shevy: ok this is becoming stupid of me, but isn't # require 'gem' automatically puts all its codes onto memory right away?
<ponga>
:(
ericfreese has joined #ruby
<ponga>
i always thought that is what is done behind the curtain
<Ox0dea>
It is.
<Papierkorb>
maia: Just load everything that could be needed AOT on startup. How much is it? Probably much less than 1MiB of memory?
<shevy>
ponga depends on the code, you can have code such as: def foo; require 'bar'; end
<Ox0dea>
require('foo') is essentially eval(File.read('foo'))
<ponga>
Ox0dea: omg that clarifies so many things sir
<Ox0dea>
ponga: Happy to help. ^_^
Rodya_ has quit [Ping timeout: 246 seconds]
asmodlol has joined #ruby
<Papierkorb>
maia: That will keep you from hitting interesting multi-threading issues later on. I'd just not load files which you know will never be needed, e.g. because a certain language is not activated for the environment.
<maia>
Papierkorb: it could be a few MB. I don’t want to overcomplicate things, but thought there might be a common way to handle localization files, other than requiring them all.
<ponga>
so if all 20 languages are included in a single gem, how could he seperate them
<ponga>
i wonder
<Papierkorb>
maia: What are those 'localization files'? You mentioned regexes - So is it actually some kind of language processing?
certainty has quit [Quit: WeeChat 1.3]
kalopsian has quit [Ping timeout: 250 seconds]
yfeldblum has quit [Ping timeout: 260 seconds]
<ponga>
shevy: I looked at it, thnx 'did you mean' looks very helpful
<shevy>
he even fixed "def initialize" !
<ponga>
Papierkorb: I guess it is, he said its string processing gem
<shevy>
nope
<shevy>
I meant "def intialize"
<ponga>
shevy: i don't get your joke there sir
<maia>
Papierkorb: yes. there’s a constant array storing stop words, a hash storing contractions ('can’t’ => 'can not’), and some language specific rules that are stored as regex (e.g. common ways of displaying a date differ between languages).
duckpuppy has quit [Ping timeout: 245 seconds]
<krz>
Cant get this quite right. ap ["a", "b", 5, "c", 4, "d", "a1", "a12", 3, 13, 2].sort_by { |x| x.to_s } I want to order the array by int and strings
<shevy>
yeah I wanted to mistype it but ended up typing it correctly. But I used to have errors like: class Foo; def intialize and I did not know why this did not work
gbgdev_ has quit [Remote host closed the connection]
ericfreese has quit [Ping timeout: 265 seconds]
jackjackdripper has quit [Quit: Leaving.]
<krz>
in this case the output should be [2, 3, 4, 5, 13, "a", "a1", "a12", "b", "c", "d"]
<krz>
Any ideas?
<shevy>
ponga it's one of those "extra features" part of his gem, that is not enabled by default
dwfait has joined #ruby
<Papierkorb>
maia: Then at some point you'll likely have language specific code, so a YML file or something is not a great idea. I wouldn't waste too much thought into this. You could say that users have to require 'the_gem/languages/language_name' themselves for every language they want to support
duckpuppy has joined #ruby
<Papierkorb>
maia: That's basically the model gems like 'parser' for different versions of ruby do it. Sounds like a fair model to me, and avoids threading issues. As it will be needed, it's also not wasted memory.
<maia>
Papierkorb: I guess that’s a very smart suggestion. Thanks a lot.
<ponga>
what? you can do # require 'gem/hello/bonjour' ?
mfb2 has joined #ruby
<ponga>
should write this down on my cheatsheet
allcentury has joined #ruby
aswen has quit [Quit: WeeChat 1.3]
<shevy>
yeah
<Papierkorb>
ponga: mh? all gems are in the lookup path, when you do require 'the_gem' it thus looks into the paths and will eventually get to the_gem/lib/the_gem.rb and load it. So, yes.
jam_ has joined #ruby
<shevy>
ponga you can even use it for tricks such as: require 'gem/autoinclude' if you are too lazy to do a include Bla
<ponga>
Papierkorb: then isn't his problem easily solved by # require 'gem/english' ?
<ponga>
only importing what he needs
<shevy>
that would work as well
<Papierkorb>
ponga: correct, that's what I suggested above
<ponga>
then I wonder what all the fuss is about
<shevy>
maia can now be on the way to happiness
<maia>
lol.
dlitvak has joined #ruby
<Papierkorb>
maia: is that gem OSS?
karapetyan has joined #ruby
<maia>
The suggestion above is very helpful, I just initially hoped there’s a way to require files on demand, without running into threading issues.
<ponga>
shevy: my prior saying of the need to switch to python was hindered by an unexpected fact
<ponga>
looks like I have to carry on with ruby
<shevy>
yay!
kp666 has quit [Remote host closed the connection]
<shevy>
I thought your whole team consists of snakes
<ponga>
shevy: thing was, python is a minority for japanese, ruby is major for them
<maia>
Papierkorb: it has a MIT license, so yes.
<shevy>
cool, the japanese have got it right
<ponga>
and as you know, my target is japanese, so..
griffindy has joined #ruby
jam_ has quit [Ping timeout: 272 seconds]
Xeago has quit [Remote host closed the connection]
arup_r has joined #ruby
<Ox0dea>
krz: How did this happen?
<ponga>
shevy: I just never liked python's style anyway, ruby code looks more natural to me
<ponga>
I still go 'wtf' at using colon for method
<shevy>
for me it is the explicit self that is throwing me off
<Ox0dea>
krz: Not nearly as easy as you might've hoped, indicating that your data is too crazy.
aswen has joined #ruby
<Bish>
ponga: so you want crystal?
<ponga>
Bish: yes I am in that channel
stannard has quit [Remote host closed the connection]
<ponga>
oh no this IRC client isn't
<Bish>
good for you!
skade has joined #ruby
peeja has joined #ruby
<ponga>
Bish: Im a huge fan of crystal :)
<Bish>
i tested it, liked it, but they don't have (good) multithreading yet
<Bish>
still, super interesting project
Jardayn has joined #ruby
<Bish>
llvm is a god sent
asmodlol has joined #ruby
joonty has quit [Quit: Leaving]
<Papierkorb>
No threading yet in there, they're working on it though.
atomical has quit [Ping timeout: 250 seconds]
<shevy>
ponga yeah we have self too but we don't have to pass it like noobs as part of an argument list
<Bish>
yep, as soon as it's ready i will try some stuff with it
<Bish>
wait, can you actually write a kernel with crystal :D that'd dope
<ponga>
shevy: ah yeah true... It has self as an argument in every line..why would they do that?
K1MOS has joined #ruby
skade has quit [Read error: Connection reset by peer]
<Bish>
RubyO™
dlitvak has quit [Ping timeout: 265 seconds]
<ponga>
ok fine then a hybrid between C# and ruby
northfurr has quit [Quit: northfurr]
<ponga>
actually I really like C#
joonty has joined #ruby
<Bish>
shit i made it worse
atomical has joined #ruby
<Bish>
:D
K1MOS is now known as moos3
<shevy>
ponga I assume because they had no alternative; probably they also did not use @ ... they use @ already for something else, these weird decorator things
Xeago has joined #ruby
<Bish>
how is c# any different from ruby?
aswen has quit [Client Quit]
<ljarvis>
...
<ponga>
lol
<Bish>
i mean.. they both run on the same vm ( ironruby ) so they can do the same stuff?
<Bish>
i didn't mean it as i said it
aswen has joined #ruby
<ponga>
Bish: what? C# runs on ironruby?
<ljarvis>
they both run on ironruby, what?
<Bish>
i tried c# because i liked monodevelop ( i hate all other ides )
<Bish>
yeah that's what i meant, clearly
duckpuppy has quit [Ping timeout: 245 seconds]
<ljarvis>
c# does not run on ironruby
<ponga>
what?
<Bish>
don't act like you don't know what i mean
peeja has quit [Ping timeout: 255 seconds]
<ponga>
no, I don't
p8m has quit [Remote host closed the connection]
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<ponga>
Im the mascot of foolishness in this channel
<Bish>
ironruby runs on a vm, c# runs on a vm, hey it's the same vm
<ponga>
shevy: aren't I shevo?
<ponga>
:\
<ljarvis>
ironruby is just a ruby implementation that's integrated with the .NET framework
<ljarvis>
that's it
<shevy>
ponga I can't remember! you have been gone for too long a time
<ljarvis>
yes you can use ironruby code from c#, is that what you meant?
<ljarvis>
this question is incredibly ambiguous
<Bish>
yep
<ponga>
anyway
<ponga>
C# to me looks like a whole upgrade from horrible Java
<Bish>
i said they have the same vm, so there is a possibility they can interact, that was actually the plan with ironruby and .net itself, isn't it?
<ljarvis>
yeah c# is actually really nice
<ponga>
its like you had a shit experience with a girl, then you meet a totally better girl
<Bish>
i tried c# and hated even more than java
aryaching has quit [Ping timeout: 246 seconds]
<Bish>
or should i say
<Bish>
HatedItMore()
<ponga>
Bish: why?
sftrabbit has quit [Quit: sftrabbit]
<ponga>
how can you hate something more than java?
<ponga>
that's impossible
* ljarvis
kinda likes java
<ponga>
omg
<shevy>
GRAB THE PITCHFORKS!!!
dionysus69 has joined #ruby
<Bish>
i started with sockets, and ended up creating 5 objects until i had a connection
techsethi has quit [Ping timeout: 265 seconds]
<ponga>
shevy: I will ask the north to prepare his alledged hydrogen bomb
<Bish>
and then i uninstalled it
<ljarvis>
luckily i'm happy enough in life to avoid the hate and instead point it towards php and javascript
<shevy>
ponga send in ITF Taekwondo, they be more effective
<Bish>
i like php and javascript
<Bish>
well javascript more than php
<ponga>
and we have who likes php ?
kalopsian has joined #ruby
<ponga>
shevy: mine got what has this channel turned into?
sftrabbit has joined #ruby
<shevy>
ponga it is now moderated with happiness and love!
<ljarvis>
?ot
<ruby[bot]>
this seems to be off-topic. Please move your discussion to #ruby-offtopic, to keep this channel free for Ruby related topics. Thanks!
<Bish>
happiness and love is offtipic :(
<ponga>
thanks ruby[bot], I didn't know your AI was so impressive
<ponga>
does he run on some sort of NLP?
<ponga>
or is he man-driven?
<ljarvis>
he's op-driven
aryaching has joined #ruby
<ljarvis>
s/he/it/
<ponga>
ruby[bot]: hello do you run on weak AI consisted of NLP scripts?
<Papierkorb>
ponga: [15:05] <ljarvis> ?ot
<ljarvis>
spoil sport
<ponga>
Papierkorb: what is ?ot
<ponga>
ah ?off-topic, sorry
<shevy>
:)
<pawnbox>
ponga: I think s/he/it just catches instances of other languages. :)
<ponga>
so ruby[bot] reads the lines and use NLP to check if its off-topic? impressive!!
<pawnbox>
Like javascript maybe.
hannelita has quit [Remote host closed the connection]
<jhass>
ponga: don't drink and IRC
<ponga>
jhass: Im not pissed, im just uneducated yet
<ponga>
for example, I can't understand what 's/he/it/' is
hannelita has joined #ruby
<ponga>
s/ is sarcasm righ?
<jhass>
it's offtopic at this point
<jhass>
don't continue
<ponga>
oh ok
<jhass>
(here)
kalopsian has quit [Ping timeout: 240 seconds]
peeja has joined #ruby
weckl has joined #ruby
kt2 has joined #ruby
sinkensabe has quit [Remote host closed the connection]
<shevy>
see ponga - love and happiness!
<arup_r>
ponga: hi.. hw r u ?
kalopsian has joined #ruby
<arup_r>
I see u after years.. :)
<ponga>
I'm stunned
<ponga>
and very sad
nettoweb has joined #ruby
<arup_r>
ok, but it is 2016..
kt2 has quit [Client Quit]
<ponga>
arup_r: hello I'm very confused of many terminologies that appear here
<arup_r>
yeah, channel still belongs to 90's :p
<ponga>
arup_r: thing is I was experimenting myself with python, didn't like use of : and many things, came back to ruby
darkf_ has joined #ruby
<arup_r>
yeah, like me. My first python program didn't run due to indentation, but my first ruby program ran. So I am still with Ruby..
duckpuppy has joined #ruby
<solars>
haha
<ponga>
arup_r: and thankfully ruby is more major than python in ruby, at least it seems so to me
<ponga>
* i mean in japan
jxs_ has quit [Remote host closed the connection]
dorei has joined #ruby
darkf has quit [Ping timeout: 260 seconds]
chussenot has quit [Quit: chussenot]
<arup_r>
hmm
<norc_>
What kind of encoding is this? ▯▯▯▯
<norc_>
o_o
<norc_>
How can I figure this out?
nanoz has joined #ruby
puria has joined #ruby
tvw has joined #ruby
<Bish>
norc_: what encoding :o?
kalopsian has quit [Ping timeout: 240 seconds]
griffindy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dionysus69 has quit [Ping timeout: 240 seconds]
kalopsian has joined #ruby
sdwrage has joined #ruby
bascht has quit [Quit: WeeChat 1.4]
bascht has joined #ruby
chussenot has joined #ruby
dlitvak has joined #ruby
<Papierkorb>
norc_: store it in a file and use the 'file' utility
TomPeed has joined #ruby
grill has joined #ruby
rodfersou has quit [Ping timeout: 240 seconds]
<norc_>
Papierkorb: It claims UTF-8 Unicode.
<norc_>
Then the codepoints would be completely borked though.
|ifei5g00d has joined #ruby
roa is now known as Roa
Snowy_ is now known as Snowy
aswen has quit [Quit: WeeChat 1.3]
dlitvak_ has quit [Ping timeout: 250 seconds]
|ifei5good has quit [Ping timeout: 265 seconds]
<TomyWork>
norc_ if you paste it to a file using a text editor chances are your editor saves it as utf-8
<TomyWork>
find a better way
B1n4r10 has joined #ruby
Outlastsheep has quit [Ping timeout: 276 seconds]
<shevy>
:D
UtkarshRay has joined #ruby
fsapo has quit [Ping timeout: 272 seconds]
dcunit3d has quit [Ping timeout: 272 seconds]
<norc_>
TomyWork: Nope.
<TomyWork>
wel then not
<norc_>
[1048605, 1048603, 1048603, 1048606, 1048607, 1048593, 1048608, 1048603, 1048604] are the codepoints for a string that should be "Beethoven"
<norc_>
This is confusing.#
<ponga>
norc_: to find out what the letter encoding is, I often just put that onto browser, and do the 'automatic encoding for the webpage'
Rodya_ has joined #ruby
<TomyWork>
that looks like it's close to 2^20 if that helps in any way
usershel_ has quit [Read error: Connection reset by peer]
<norc_>
Have not found a way to transform it, but it has to.
<TomyWork>
it's infinite and periodic in base 2
chipotle has joined #ruby
<ev_>
eh, nice :)
karapetyan has quit [Remote host closed the connection]
<TomyWork>
arbitrary precision is still finite :)
hxegon has joined #ruby
momomomomo has joined #ruby
momomomomo has quit [Client Quit]
jackcom has joined #ruby
kiidbrian has quit [Ping timeout: 240 seconds]
<ev_>
still looks like a bug, no?
pawnbox has quit [Remote host closed the connection]
gizmore has joined #ruby
sftrabbit has quit [Quit: sftrabbit]
<norc_>
TomyWork: Sigh I give up. Every tool keeps telling me this is UTF-8
kiidbrian has joined #ruby
kiidbrian has quit [Max SendQ exceeded]
fl__ has joined #ruby
moos3 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
whippythellama has joined #ruby
pawnbox has joined #ruby
kiidbrian has joined #ruby
carraroj has joined #ruby
voidDotClass has quit [Ping timeout: 246 seconds]
akemrir has quit [Quit: WeeChat 1.3]
rodfersou is now known as rodfersou|lunch
kalopsian has joined #ruby
skade has joined #ruby
bronson has joined #ruby
yardenbar has quit [Ping timeout: 256 seconds]
rodolfowtf has joined #ruby
nerfando has joined #ruby
pawnbox_ has joined #ruby
pawnbox has quit [Ping timeout: 240 seconds]
st0opkid has joined #ruby
shredding has joined #ruby
pawnbox_ has quit [Remote host closed the connection]
pawnbox has joined #ruby
dlitvak has joined #ruby
dtordable has quit [Quit: leaving]
sftrabbit has joined #ruby
bronson has quit [Ping timeout: 265 seconds]
ponga has quit [Quit: Leaving...]
dtordable has joined #ruby
Vitor has quit [Ping timeout: 246 seconds]
norc_ has quit [Ping timeout: 252 seconds]
dn5 has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
dlitvak_ has quit [Ping timeout: 240 seconds]
mary5030 has quit [Remote host closed the connection]
Limix has quit [Quit: Limix]
kbni has joined #ruby
<kbni>
Hi there.
mrtomme has quit [Ping timeout: 246 seconds]
dwfait_ has joined #ruby
<Bish>
kbni: HI
matp_ has joined #ruby
kerunaru has joined #ruby
sonne has quit [Ping timeout: 250 seconds]
mrtomme has joined #ruby
dionysus70 has joined #ruby
dfoolz has quit [Ping timeout: 240 seconds]
dionysus69 has quit [Ping timeout: 250 seconds]
dionysus70 is now known as dionysus69
<kbni>
I'm very new to Ruby, I am just sort of playing with a bit. I was wondering if someone could help me explain some Ruby behavior for me that I am a little miffed by.
dwfait has quit [Ping timeout: 250 seconds]
abyss has quit [Ping timeout: 250 seconds]
snapcase has quit [Ping timeout: 250 seconds]
Rodya_ has joined #ruby
jinie has quit [Ping timeout: 256 seconds]
dannluciano_ has quit [Ping timeout: 265 seconds]
<kbni>
What exactly is the difference between object do |x| stuff end and object stuff
matp has quit [Ping timeout: 276 seconds]
yardenbar has joined #ruby
grassass has quit [Ping timeout: 265 seconds]
pawnbox has quit [Remote host closed the connection]
gbgdev has joined #ruby
veloutin has quit [Ping timeout: 260 seconds]
gilesww has quit [Ping timeout: 245 seconds]
isene has quit [Ping timeout: 265 seconds]
janno has quit [Ping timeout: 240 seconds]
async_prince has quit [Ping timeout: 276 seconds]
dfoolz has joined #ruby
<ev_>
kbni, hi! soo in your case `object` must be a method for this to make sense
ruisantos has quit [Ping timeout: 265 seconds]
<ev_>
in first case you will be passing a `do ... end` block to it, in second - argument `stuff`
Scient has quit [Ping timeout: 250 seconds]
aryaching has joined #ruby
<kbni>
hm
ericfreese has joined #ruby
dlitvak has quit [Remote host closed the connection]
jinie has joined #ruby
<kbni>
ev_, I am using Nokogiri::XML::Builder to play with some XML stuff, and from within a block I can do xml.foo and it just creates a foo tag
dfinninger has joined #ruby
Scient has joined #ruby
dlitvak has joined #ruby
<kbni>
ev_, however - if I do @cursor = xml.foo to save that location to my class, when I reference it later on (using self.cursor) it behaves completely differently
Rodya_ has quit [Ping timeout: 240 seconds]
<dn5>
Is there a way to run a method on any exception/error thrown by script?
async_prince has joined #ruby
aegis3121 has joined #ruby
veloutin has joined #ruby
<dn5>
Like instead of crashing and displaying error, the script will continue with particular method called
dannluciano has joined #ruby
isene has joined #ruby
dlitvak has quit [Remote host closed the connection]
sonne has joined #ruby
<ev_>
kbni, I think you can't use Nokogiri::XML::Builder like that
gilesww has joined #ruby
<kbni>
is there a xml library that would allow me to dynamically build an xml document? maybe something like lxml/etree in Python?
ericfreese has quit [Ping timeout: 256 seconds]
grassass has joined #ruby
usershell has joined #ruby
carraroj has quit [Ping timeout: 260 seconds]
abyss has joined #ruby
ruisantos has joined #ruby
<ddv>
kbni: nokogiri?
arup_r has quit []
Madmanden has quit []
snapcase has joined #ruby
janno has joined #ruby
dlitvak has joined #ruby
al2o3-cr has quit [Quit: WeeChat 1.3]
rippa has joined #ruby
cornerman has quit [Read error: Connection reset by peer]
<aegis3121>
I'm a bit confused as to how overriding new is...a good plan.
mchu has joined #ruby
sftrabbit has quit [Quit: sftrabbit]
karapetyan has joined #ruby
sftrabbit has joined #ruby
lsmola has quit [Ping timeout: 260 seconds]
El3ktra has quit [Ping timeout: 260 seconds]
chussenot has quit [Quit: chussenot]
<awox>
Why does Ruby have so many popular versions?
<jhass>
awox: what do you mean?
<jhass>
aegis3121: no, it's a quite bad idea
sftrabbit has quit [Client Quit]
bubbys has quit [Ping timeout: 245 seconds]
arup_r has joined #ruby
<aegis3121>
jhass: yea. I've never encountered code like that before and it's a bit off-putting.
chussenot has joined #ruby
bubbys has joined #ruby
sftrabbit has joined #ruby
<jhass>
aegis3121: do you know what the term singleton class means in the Ruby context and what extend has to do with it?
ljames has joined #ruby
<awox>
can I make Ruby use curly braces instead of do/end?
karapetyan has quit [Ping timeout: 240 seconds]
<jhass>
awox: what do you mean by make? braces are an almost equal alternative to do/end
<awox>
def foo {
<awox>
}
<havenwood>
awox: When you say "versions" what do you mean?
sinkensabe has quit [Remote host closed the connection]
<jhass>
awox: there's no do after def
<jhass>
so no
<aegis3121>
jhass: Not as well as I should. My use of extend, as far as I know, is to allow a Module's methods to be Class methods rather than instance methods.
<awox>
havenwood, like, 1.9/2.0/2.3.. so many cool versions to chose from. so much more choice than Python. :D
<Bish>
how did those part messages find it's way into his quit message :o
st0opkid has joined #ruby
st0opkid has quit [Max SendQ exceeded]
<awox>
Alright, it's like 3 am and I'mnot getting anywhere so It's time for sleep
<awox>
thank you for answering my very dumb questions :)
stannard has quit [Remote host closed the connection]
dfinninger has quit [Remote host closed the connection]
synthroid has quit [Remote host closed the connection]
terminalrecluse has joined #ruby
stannard has joined #ruby
stamina has quit [Quit: WeeChat 1.3]
bluOxigen has quit [Ping timeout: 260 seconds]
dfinninger has joined #ruby
dn5 has joined #ruby
Rodya_ has joined #ruby
haraigoshi has joined #ruby
dlitvak has quit [Remote host closed the connection]
allcentury has quit [Ping timeout: 240 seconds]
framlinqp has quit [Read error: Connection reset by peer]
frem has joined #ruby
minimalism has quit [Ping timeout: 276 seconds]
haraigo has quit [Ping timeout: 276 seconds]
minimalism has joined #ruby
mary5030 has joined #ruby
Rodya_ has quit [Ping timeout: 260 seconds]
lacuna has quit [Remote host closed the connection]
emilford has quit [Ping timeout: 245 seconds]
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
scepticulous has quit [Ping timeout: 240 seconds]
bigkevmcd has quit [Quit: Outta here...]
willv has quit [Quit: Lost terminal]
amclain has joined #ruby
du5tball has joined #ruby
<jackcom>
there is a ruby on that package like gruff is preinstalled. like anaconda in python?
zast has joined #ruby
Limix has joined #ruby
konsolebox has quit [Ping timeout: 265 seconds]
<du5tball>
hi there. i'm just learning ruby and came across public and private today. how long are those keywoards valid? as in, if i define several private functions, is private valid untill i cancel it?
jaiks has quit [Ping timeout: 250 seconds]
<ghr>
du5tball yeah
<bougyman>
if I understand your question right: yes.
<jhass>
du5tball: depends on whether you pass them an argument or not
<jhass>
du5tball: note that def returns a symbol and thus can be an argument
stannard has quit [Remote host closed the connection]
<du5tball>
so, methods return a symbol, which would terminate public / private. from what i understand, i can't prevent ruby from returning something, but could define the return myself. would something like 'return "asdf"' prevent that?
<aegis3121>
no....
sivoais is now known as sivoais-ms
<aegis3121>
so you could define a bunch of methods, then decide you want x, y, and z to be private like so -> private :x, :y, :z
sepp2k has joined #ruby
<aegis3121>
the fact that those return symbols is, more or less, what allows that to work like that, I believe.
chipotle has joined #ruby
<du5tball>
wait - the methods can be addressed via symbols?
stannard has joined #ruby
stannard has quit [Remote host closed the connection]
<du5tball>
ohh, okay
<jhass>
and since method definitions return the symbol of their name, you can write things like private def foo these days
<jhass>
which is passing the return value of def foo to the method private
<du5tball>
okay, that's weird, but it does make sense
<Ox0dea>
Using "return" when you mean "evaluate to" is unnecessarily confusing.
<Ox0dea>
Especially in the context of method definition.
stannard has joined #ruby
sftrabbit has quit [Quit: sftrabbit]
<jhass>
mh, yes I usually say have the value or something, my bad
myntcake has joined #ruby
<Ox0dea>
du5tball: Why weird?
rodfersou is now known as rodfersou|lunch
<du5tball>
i've never seen "private <method> <method> <method>" somewhere else
lacuna has joined #ruby
lacuna has quit [Changing host]
lacuna has joined #ruby
synthroid has joined #ruby
<Ox0dea>
Nor will you see it in Ruby.
<lucasb>
yeah, some confusion here. just to clarify: method definition returns their name as a symbol. method execution returns the last value in their bodies.
<soahccc>
Does anyone know how to gracefully shutdown when using daemons gem? I used to trap the signals but now I saw in the source that you are not supposed to overwrite the trap :S
<Ox0dea>
That method definition *evaluates to* :foo, but the foo method *returns* 42.
<Ox0dea>
soahccc: Traps can stack, for what that's worth.
scottschecter has joined #ruby
hxegon has quit [Read error: Connection reset by peer]
polishdub has joined #ruby
<lucasb>
pedantically, I consider an expression *returning* some value or *evaluating to* some values to be synonyms :)
aegis3121 has quit [Ping timeout: 240 seconds]
minimalism has quit [Ping timeout: 264 seconds]
<soahccc>
Ox0dea: oh they do? If I untrap my own hook (returning to default behaviour) the other trap is still there? Or do I have to not "untrap"
<Ox0dea>
lucasb: And yet that clearly doesn't hold in the case of Ruby method definitions.
einarj has quit [Remote host closed the connection]
<lucasb>
Ox0dea: how come? isn't a method definition an expression in itself?
DaniG2k has quit [Quit: leaving]
ruby-lang042 has joined #ruby
<lucasb>
I thought everything in ruby was an expression
Jackneill has quit [Ping timeout: 264 seconds]
snockerton has joined #ruby
<Ox0dea>
soahccc: The latter.
<shevy>
everything in ruby is a cat
baweaver has quit [Remote host closed the connection]
<TomyWork>
`cat`
ericfreese has quit [Quit: WeeChat 1.4]
ericfreese has joined #ruby
<Ox0dea>
lucasb: It's certainly quite strange to say that `def foo; 42; end` evaluates to 42.
<Ox0dea>
And by "strange" I of course mean wrong. :P
<lucasb>
because it doesn't evaluate to 42, it evaluates to :foo
<Ox0dea>
It does evaluate to :foo, yes, but it would be strange to call that its return value.
<lucasb>
but it *is* it's return value :)
webus has joined #ruby
colegatron has quit [Ping timeout: 260 seconds]
<Ox0dea>
Its return value is the value the method returns, which is 42.
<Ox0dea>
It's totally okay for these to be different things.
zambini has joined #ruby
<TomyWork>
I'm installing some gems to .bundle using "rvm 2.2.1 do bundle install" and then i run my app with "rvm 2.2.1 do ./app.rb". It can't find that new gem. it can find a different gem, though that is also under .bundle
centrx has joined #ruby
<TomyWork>
i'm a bit confused :)
<TomyWork>
"rvm 2.2.1 do bundle exec ./app.rb" works
<TomyWork>
but that doesnt work with rerun
<Ox0dea>
Way spooky.
<TomyWork>
okay, it works if i put rerun outside the bundle exec
<Ox0dea>
Try `rvm implode`.
<jhass>
TomyWork: make sure to either require "bundler/setup" or bundle exec
centrx has quit [Remote host closed the connection]
blarghlarghl has joined #ruby
<TomyWork>
i'll use bundle exec
kerunaru has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
karapetyan has joined #ruby
<blarghlarghl>
Hi. I'm stuck in Unicode hell. There is an external library that I'm using which accepts a string, and does ... something ... to it. I think it _assumes_ the string is a UTF-16 variant. Then all it does is spit the string back out - but it does _something_ to it again on the way out. Basically I put in "hi" and get back a bunch of Chinese characters. Treating this as a black box - how can I figure out what it's expecting and what it's givin
Takumo is now known as Jagmill5
Jagmill5 is now known as Takumo
shredding has quit [Ping timeout: 246 seconds]
<blarghlarghl>
I've noticed that single character strings work fine - a => a. but "aa" gives me a four-\x-character string back
|ifei5good has quit [Read error: Connection reset by peer]
<gizmore>
imperator: maybe add a "rescue nil"
rodferso1|lunch has joined #ruby
rodferso1|lunch has quit [Client Quit]
rodfersou has joined #ruby
sonOfRa has joined #ruby
<imperator>
oh, I think it has to be: [x,y,z] <=> [other.x, other.y, other.z]
rodfersou|lunch has quit [Ping timeout: 256 seconds]
ramfjord has quit [Ping timeout: 272 seconds]
<norc>
imperator: That implementation of <=> is faulty btw
<imperator>
norc, what should it be?
<norc>
imperator: You need to return -1 / 0 / +1 depending on < = >
arthurix has quit [Read error: Connection reset by peer]
arthurix_ has joined #ruby
myntcake has quit [Quit: Leaving]
cfinley has joined #ruby
arthurix has joined #ruby
braincrash has quit [Ping timeout: 240 seconds]
Rodya_ has joined #ruby
arthurix_ has quit [Ping timeout: 256 seconds]
arthurix has quit [Ping timeout: 255 seconds]
<Ox0dea>
norc: Just -/0/+, mind.
<Ox0dea>
Such that simple subtraction sometimes suffices.
braincrash has joined #ruby
polishdub has quit [Quit: Leaving]
<norc>
Have not looked at that implementation yet.
<norc>
But as you know me, I am about to correct that mistake.
solars has quit [Ping timeout: 240 seconds]
arthurix has joined #ruby
Rodya_ has quit [Ping timeout: 240 seconds]
zambini has quit [Quit: Leaving.]
pdoherty has quit [Remote host closed the connection]
zambini has joined #ruby
<norc>
Okay good to know. :)
cornerman has joined #ruby
<Ox0dea>
It's just a saner semantics, really.
<djellemah>
imperator: http://ruby-doc.org/core-2.2.3/Comparable.html#method-i-3E Your (original) <=> returns a boolean, and comparing a boolean with an integer using < raises an exception. Which gets caught in Comparable#< and triggers the warning.
Snowy has quit [Remote host closed the connection]
arthurix has quit [Ping timeout: 246 seconds]
pskosinski_ is now known as pskosinski
arthurix has joined #ruby
djbkd has quit [Ping timeout: 265 seconds]
lucasb has quit [Quit: leaving]
<Ox0dea>
norc: Could Fiddle be used to relax the restrictions on unary *, **, and &?
<Ox0dea>
Like, just strike the return value type constraint but leave everything else in place?
dwfait has joined #ruby
baweaver has joined #ruby
arthurix has quit [Remote host closed the connection]
kerunaru has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
cdg has quit [Remote host closed the connection]
dwfait has quit [Remote host closed the connection]
pietr0 has joined #ruby
mistermocha has joined #ruby
bb010g has quit [Quit: Connection closed for inactivity]
framling has joined #ruby
dopie has quit [Quit: Lost terminal]
cpup has quit [Ping timeout: 260 seconds]
dopie has joined #ruby
pdoherty has joined #ruby
The_Phoenix has quit [Read error: Connection reset by peer]
baweaver has quit [Remote host closed the connection]
mchu has joined #ruby
braincrash has quit [Ping timeout: 272 seconds]
mercerist has quit [Ping timeout: 250 seconds]
<djellemah>
Andite operators, lol
<grill>
yo. are there any methods that check whether if a string is formatted like a file path?
kadoppe has quit [Ping timeout: 276 seconds]
Meow-J has quit [Quit: Connection closed for inactivity]
shadoi has quit [Quit: Leaving.]
<Ox0dea>
> whether if
cpup has joined #ruby
voidDotClass has joined #ruby
<grill>
yes
<Ox0dea>
grill: You can name a file just about anything in *nix.
Vitor has quit [Remote host closed the connection]
<voidDotClass>
Trying to get an rspec featue test to pass, when I do 'fill_in '#email', with: 'invalid' , its unable to find the textbox, even though I have it on the page as <input id='email' />
<djellemah>
I would be happy with a couple more assignogens in ruby.
mary5030 has quit [Remote host closed the connection]
<aegis3121>
describe blocks are for what you're testing; context blocks are for setting up the "state of the world" before a test; it blocks are for actual assertions
dfinninger has quit [Remote host closed the connection]
<grill>
yes, but can you set up the world and then describe what you're testing?
Axy has joined #ruby
Axy has quit [Changing host]
Axy has joined #ruby
<aegis3121>
probably shouldn't
jgpawletko has joined #ruby
<grill>
or must you say what you're testing and then set up the world
ur5us has quit [Remote host closed the connection]
arthurix_ has quit [Ping timeout: 250 seconds]
<aegis3121>
I believe convention would say "indicate what you're testing" before setting up the scenarios to test it
karapetyan has quit [Remote host closed the connection]
Joshua__ has quit [Client Quit]
<grill>
the disadvantage the the latter method is that the world would ostensibly need to be set up very similarly multiple times
<aegis3121>
Shared contexts are a thing
choke has joined #ruby
<aegis3121>
Also, leveraging let helps with that
Melpaws has joined #ruby
<aegis3121>
also, contexts nest
<grill>
yes they do
taq has joined #ruby
al2o3-cr has joined #ruby
arthurix has joined #ruby
Melpaws1 has quit [Ping timeout: 240 seconds]
bronson has quit [Remote host closed the connection]
dn5 has quit [Quit: Leaving]
<aegis3121>
So I can't imagine the state of the world is THAT shared between methods. And if it is, you can use a shared context. Shared contexts have the disadvantage of being relatively easy to bloat/obfuscate what's happening with your tests, but they do de-clutter it.
<aegis3121>
Everyone's use cases are different :)
chipotle_ has joined #ruby
graffix222 has quit [Read error: Connection reset by peer]
Mia has quit [Ping timeout: 250 seconds]
graffix222 has joined #ruby
Rodya_ has joined #ruby
chipotle has quit [Ping timeout: 256 seconds]
Snowy has joined #ruby
Sirithcam has joined #ruby
baweaver has joined #ruby
mary5030 has joined #ruby
mary5030 has quit [Remote host closed the connection]
arthurix has quit [Read error: Connection reset by peer]
yqt has joined #ruby
arthurix has joined #ruby
<norc>
Ox0dea: Intuitively I would say no. But you know me....
mary5030 has joined #ruby
symm- has quit [Quit: Leaving...]
<norc>
Let me give you a correct answer in a moment!
<grill>
ok. here's a partial example. I have a bunch of nested contexts that jump off parent contexts. http://hastebin.com/aravolemon.dos
Snowy has quit [Remote host closed the connection]
<grill>
i have several methods that can operate in (and should be tested) within these states. how do I describe multiple methods with shared state?
tlaxkit has joined #ruby
arthurix has quit [Read error: Connection reset by peer]
arthurix_ has joined #ruby
Rodya_ has quit [Ping timeout: 276 seconds]
arthurix has joined #ruby
fl__ has quit [Quit: Leaving]
djbkd has joined #ruby
guacamol_ has joined #ruby
dfinninger has joined #ruby
<eam>
what's the easiest way to search through all classes to find a method matching /poll/ ?
_djbkd has quit [Remote host closed the connection]
<norc>
Ox0dea: Point taken.
arthurix has joined #ruby
<norc>
Ox0dea: The result of your example is probabilistic though if the GC works just before you inspect OS again.
<Ox0dea>
norc: The intended demonstration remains. :)
<norc>
Yeah.
<Ox0dea>
Every method takes an implicit block; it would be insane if they were all automatically reified.
CloCkWeRX has quit [Remote host closed the connection]
<norc>
Insanity is the mark of some of our authors.
mchu has joined #ruby
<Ox0dea>
`&block` at the end of a parameter list is almost always either noise or a little malodorous.
dfinninger has quit [Remote host closed the connection]
sivoais-ms is now known as sivoais
jackjackdripper has joined #ruby
dpg_ has joined #ruby
CloCkWeRX has joined #ruby
dfinninger has joined #ruby
<soahccc>
Ox0dea: I use it a lot when passing or saving the procs in variables rather than just yielding... Or do you mean the "descriptivness" of block?
arthurix has quit [Ping timeout: 255 seconds]
<Sou|cutter>
Ox0dea: I sorta like knowing that methods expect to take blocks sometimes
<ruby[bot]>
norc: # => <compiled>:1: syntax error, unexpected '.', expecting ')' ...check link for more (https://eval.in/502802)
tubuliferous_ has joined #ruby
<norc>
Sou|cutter: That was what I learned a while ago too, but its time to figure out whether that is true, and why.
* Sou|cutter
nods
<Synthead>
is there a way I can make inifile ignore '#' symbols as comments? I have an inifile that uses "InitialProgram=#Internet Explorer 11" ... (facepalm)
<ruby[bot]>
norc: # => == disasm: #<ISeq:<compiled>@<compiled>>================================ ...check link for more (https://eval.in/502804)
<Ox0dea>
soahccc: Nah, that's the valid use case I had in mind.
spider-mario has joined #ruby
musl_ has quit [Ping timeout: 264 seconds]
pietr0 has quit [Quit: pietr0]
<norc>
Ox0dea: Okay I think it is a little misunderstanding. It is not as much the &arg part that is the penalty, but passing a block *and* specifying a &arg
psyq has joined #ruby
<norc>
I completely agree that just specifying the parameter should not be relevant.
saturnmir_mate2 has joined #ruby
<soahccc>
Ox0dea: depending on what you are doing you have that a lot (a lot of view related stuff requires to pass the block to capture, etc.)
bluOxigen has joined #ruby
<norc>
Synthead: Try wrapping the content in "" perhaps? This is just a random guess.
northfurr has joined #ruby
SaturnMir has joined #ruby
<SaturnMir>
what is the best way to test datatype
<Ox0dea>
soahccc: Certainly many libraries use it to great effect, but there's a lot of Ruby code out there that uses Proc#call where `yield` would suffice.
<Synthead>
norc: the ini file has this originally, unfortunately. I was thinking of doing a .tr('#', '\#') on the file's contents, but this seems kinda smelly
Limix has quit [Quit: Limix]
<Synthead>
it'd be much better if I could do an IniFile.load("file", comments: :ignore) or something
<ruby[bot]>
SaturnMir: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
<Ox0dea>
SaturnMir: No.
<Ox0dea>
It's just sticking a hyphen on the front for negatives.
<SaturnMir>
0x0dea it is removing a hyphen
last_staff1 has joined #ruby
<SaturnMir>
-4.to_s(2) yields -100
<Ox0dea>
I don't see a removed hyphen.
speakingcode has joined #ruby
<SaturnMir>
0x0dea oh damn -.- I see now. Really sorry
lucasb has quit [Read error: Connection reset by peer]
<SaturnMir>
I am stuck on how to get a proper binary value as a string on ruby.
hexchat_ has joined #ruby
<Ox0dea>
SaturnMir: Ruby has arbitrary-precision integers, so you'll need to self-impose a maximum.
<norc>
Ox0dea: Honestly the thing I just hated about python is how massively inconsistent the stdlib is about where the receiver goes. Sometimes its rec.meth(a, b), sometimes its a.meth(rec, b), sometimes its a.meth(b, rec)
last_staff has quit [Ping timeout: 265 seconds]
last_staff1 is now known as last_staff
akem has quit [Read error: No route to host]
<SaturnMir>
0x0dea uhm... (I am new to ruby as you can probably tell)
akem2 has joined #ruby
<grip>
ruby has a concept of default arugments, right? e.g. some_method(some_var="")
<norc>
grip: Yes, exactly like that.
hexchat_ has quit [Remote host closed the connection]
<SaturnMir>
grip yes
<grip>
why am I getting an error then? ArgumentError: wrong number of arguments
<norc>
grip: We also have keyword arguments (which really have not found much popular use because Hashes are often used instead)
<norc>
grip: Show us your code.
blackgoat has joined #ruby
<grip>
I am not using ruby 2
atomical has joined #ruby
<Ox0dea>
SaturnMir: On, say, a 32-bit system, -1 in binary is 32 1s.
<SaturnMir>
I just found this easiest to prototype in ;) I am actually trying to get pixeldata from bitmaps...but I am new to the entire concept of stuff like bitmasking and things...so I wanted to suss out how to handle binary first.
joonty has quit [Client Quit]
<SaturnMir>
0x0dea...so if I set my maxima to 4 (bits)...and enter 12... I get an output of 1100 which would be -8+4=-4... so is this the overflow?
synthroid has quit [Remote host closed the connection]
<SaturnMir>
like when you go over the max of int 32 and it wraps backaround
TomPeed has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
TomPeed has joined #ruby
karapetyan has joined #ruby
scottschecter has joined #ruby
jayne_ has joined #ruby
sftrabbit has joined #ruby
TomPeed has quit [Client Quit]
nfk|laptop has joined #ruby
TomPeed has joined #ruby
chipotle has joined #ruby
TomPeed has quit [Client Quit]
jayne has quit [*.net *.split]
<Ox0dea>
SaturnMir: Just so. The high bit being on indicates negative, and then you interpret the rest as usual.
cdg has joined #ruby
Snowy has quit [Remote host closed the connection]
<SaturnMir>
0x0dea so overflow is detected as being true if foo > 0 but (foo % 2 ^^ 32).to_s(2)[0].eql?"1"
<nfk|laptop>
for the first time in my life I hope i have gotten my math wrong, i mean, i knew i was signing up for a a lot but if i did my math right the trivial algorithm i'm still struggling to get right is gonna have complexity that's not that bad until you consider it's 200**<some 4 digit number)
<Ox0dea>
SaturnMir: I think that should suffice for your purposes, yep.
<SaturnMir>
cheers!
<Ox0dea>
Happy to help. :)
imperator has left #ruby ["Leaving"]
<nfk|laptop>
i don't know how much that turns out to be but i expect too much even if every one of those was a basic x86 instructions (they aren't)
Darmani has quit [*.net *.split]
norc has quit [*.net *.split]
ruby-lang042 has quit [*.net *.split]
Mackerel has quit [*.net *.split]
northfurr has quit [Quit: northfurr]
JohnT has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rolfb has joined #ruby
sinkensabe has quit [Remote host closed the connection]
Bloomer has quit [Remote host closed the connection]
karapetyan has quit [Ping timeout: 276 seconds]
Yzguy has joined #ruby
govg has quit [Quit: leaving]
govg has joined #ruby
<dtordable>
-
Snowy has joined #ruby
Snowy has quit [Remote host closed the connection]
fl has joined #ruby
nb_bez___ has quit [Quit: Connection closed for inactivity]
mistermocha has joined #ruby
<djellemah>
>> 0.to_s(37)
<ruby[bot]>
djellemah: # => invalid radix 37 (ArgumentError) ...check link for more (https://eval.in/502822)
emilford has quit [Ping timeout: 246 seconds]
mistermocha has quit [Remote host closed the connection]
bensarz has joined #ruby
jgpawletko has quit [Quit: jgpawletko]
carraroj has joined #ruby
mistermocha has joined #ruby
mistermocha has quit [Read error: Connection reset by peer]
emilford has joined #ruby
zambini has quit [Quit: Leaving.]
hannelita has quit [Remote host closed the connection]
<djellemah>
Hmm, I never thought about whether numbers can be represented in base 0 or 1. Kinda defeats the purpose is my intuitive reaction.
Melpaws has quit [Ping timeout: 250 seconds]
djbkd has joined #ruby
mistermocha has joined #ruby
jbrhbr has joined #ruby
zcreative has quit [Ping timeout: 240 seconds]
CloCkWeRX has quit [Quit: Leaving.]
Yzguy has quit [Quit: Zzz...]
<djellemah>
() in ruby, rust, ocaml, lisp denotes unit/nil/empty . Now I'm curious. What other languages?
<ruby-n00by>
i'm having issues with gem on OSX 10.10.5. i've installed rbenv with homebrew. 'which gem' points to my custom version in my /Users/ directory, however, when i try to run 'gem update --system' i get a permissions error telling me i can't write to the system gem directory. any ideas on PATH changes or anything similar?
Snowy has quit [Remote host closed the connection]
theery has quit []
jbrhbr has quit [Client Quit]
emilford has joined #ruby
mistermocha has quit [Remote host closed the connection]
yalue has quit [Quit: return 0;]
<Ox0dea>
djellemah: Haskell.
speakingcode has quit [Remote host closed the connection]
mistermocha has joined #ruby
sdwrage_ has quit [Quit: This computer has gone to sleep]
jbrhbr has joined #ruby
asccigcc has quit [Ping timeout: 245 seconds]
Cohedrin has quit [Remote host closed the connection]
carraroj has quit [Quit: Konversation terminated!]
SaturnMir has quit [Ping timeout: 264 seconds]
Cohedrin has quit [Max SendQ exceeded]
Cohedrin has joined #ruby
bronson has joined #ruby
<ruby-n00by>
Ox0dea: that seems to be pointing to my system directory. /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems.rb
sdwrage_ has joined #ruby
emilford has quit [Ping timeout: 246 seconds]
<Ox0dea>
ruby-n00by: Well, there it is.
mistermocha has quit [Read error: Connection reset by peer]
mistermocha has joined #ruby
last_staff has quit [Quit: last_staff]
jbrhbr1 has joined #ruby
Rodya_ has joined #ruby
jbrhbr has quit [Ping timeout: 265 seconds]
emilford has joined #ruby
Melpaws has joined #ruby
K1MOS has joined #ruby
bronson has quit [Ping timeout: 265 seconds]
Melpaws1 has quit [Ping timeout: 264 seconds]
Chewy1121 has joined #ruby
asthasr_ has joined #ruby
victortyau has joined #ruby
djcp has quit [Ping timeout: 245 seconds]
asthasr_ is now known as asthasr
Rodya_ has quit [Ping timeout: 265 seconds]
flappynerd has joined #ruby
arup_r has quit []
dpg_ has quit [Ping timeout: 240 seconds]
theery has joined #ruby
Yzguy has joined #ruby
emilford has quit [Ping timeout: 264 seconds]
preyalone has joined #ruby
choke has joined #ruby
mistermocha has quit [Remote host closed the connection]
<shevy>
RubyPanther I remember... he seems to have vanished years ago
Xeago has quit [Remote host closed the connection]
<Ox0dea>
shevy: Did you do something weird to rack up so many messages?
kerunaru has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Ox0dea>
Some kind of script gone haywire? :P
<shevy>
oh wow 3162 fowl ... he went to nim a few years ago
emilford has joined #ruby
<shevy>
no, I just keep some things
<shevy>
July 2015
<shevy>
<Master44> why would you not include the last item btw?
<shevy>
<sevenseacat> when you dont want the last item
FernandoBasso has quit [Quit: Leaving]
klaas has quit [Remote host closed the connection]
<Ox0dea>
Er... I was referring to the leaderboard.
TheAnachron has quit [Ping timeout: 240 seconds]
casadei has quit [Remote host closed the connection]
<shevy>
just talking about the quotes pushes me above!
<Ox0dea>
Fair enough.
<shevy>
funny that the numbers interest you :P
<Ox0dea>
There's [k-. :(
<bruce_lee>
shevy: thanks, your shellscript solves my issue
pdoherty has joined #ruby
dhollinger has quit [Quit: WeeChat 1.3]
<shevy>
bruce_lee \o/
flappynerd has quit [Quit: flappynerd]
<Ox0dea>
shevy: I wanted to find the longest sequence of unique speakers. Had to get all the messages as a prerequisite.
<shevy>
bruce_lee the only problem I have had was to get in-directory files completion, and commandline options work at the same time... there is probably some simple shell solution but I don't know what that is
<Sou|cutter>
PSA last day for early bird registration for Mountain West Ruby Conference
emilford has quit [Ping timeout: 240 seconds]
dlitvak has quit [Remote host closed the connection]
dlitvak has joined #ruby
dpg_ has joined #ruby
sepp2k has joined #ruby
scottschecter has joined #ruby
pawnbox has joined #ruby
Snowy has joined #ruby
stannard_ has joined #ruby
Sirithcam has quit [Quit: Leaving]
emilford has joined #ruby
karapetyan has quit [Remote host closed the connection]
gizmore has quit [Ping timeout: 265 seconds]
karapetyan has joined #ruby
jackcom has joined #ruby
stannard has quit [Ping timeout: 245 seconds]
dopie has quit [Quit: Lost terminal]
stannard_ has quit [Ping timeout: 240 seconds]
dopie has joined #ruby
Snowy has quit [Ping timeout: 255 seconds]
pawnbox has quit [Ping timeout: 240 seconds]
TomPeed has joined #ruby
dlitvak has quit [Ping timeout: 276 seconds]
alem0lars has quit [Ping timeout: 250 seconds]
emilford has quit [Ping timeout: 264 seconds]
colegatron has quit [Ping timeout: 264 seconds]
Klumben has quit [Ping timeout: 250 seconds]
blur3d has joined #ruby
Pupeno has joined #ruby
emilford has joined #ruby
pawnbox has joined #ruby
dpg_ has quit [Ping timeout: 265 seconds]
scottschecter has quit [Quit: Leaving]
chouhoulis has joined #ruby
sandstrom has quit [Quit: My computer has gone to sleep.]
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
pawnbox has quit [Ping timeout: 260 seconds]
ruby-n00by has quit [Ping timeout: 252 seconds]
ivanskie has joined #ruby
northfurr has joined #ruby
colegatron has joined #ruby
pawnbox has joined #ruby
usershell has joined #ruby
atomical has quit [Ping timeout: 276 seconds]
atomical has joined #ruby
Moblin has joined #ruby
rdark has quit [Ping timeout: 245 seconds]
theery has quit [Remote host closed the connection]
usershell has quit [Ping timeout: 240 seconds]
pawnbox has quit [Ping timeout: 250 seconds]
agentmeerkat has quit [Ping timeout: 276 seconds]
mistermocha has joined #ruby
northfurr has quit [Quit: northfurr]
cdg has quit [Remote host closed the connection]
kalopsian has joined #ruby
Moblin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
pawnbox has joined #ruby
mistermocha has quit [Ping timeout: 256 seconds]
bronson has joined #ruby
solars has quit [Ping timeout: 260 seconds]
Moblin has joined #ruby
Yzguy has joined #ruby
Moblin has quit [Client Quit]
scottschecter has joined #ruby
lucasb has joined #ruby
bronson has quit [Ping timeout: 265 seconds]
mchu has joined #ruby
pawnbox has quit [Ping timeout: 250 seconds]
<jackcom>
i have success by installing imagemagick and gs on mac
mchu has quit [Client Quit]
<jackcom>
so i can use gruff
<jackcom>
now
Mon_Ouie has joined #ruby
baweaver has joined #ruby
zeroDivisible has joined #ruby
krz has quit [Ping timeout: 272 seconds]
theery has joined #ruby
Xeago has joined #ruby
scottschecter has quit [Remote host closed the connection]
theery has quit [Client Quit]
pawnbox has joined #ruby
TomPeed has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
preyalone has quit [Quit: Connection closed for inactivity]
alem0lars has joined #ruby
northfurr has joined #ruby
pawnbox has quit [Ping timeout: 250 seconds]
firstdayonthejob has quit [Ping timeout: 240 seconds]