<Ox0dea>
Either way, just pretend this didn't happen. :P
william3 has quit [Remote host closed the connection]
sapslaj has quit [Ping timeout: 250 seconds]
joonty has joined #ruby
theastrowolfe has quit [Ping timeout: 260 seconds]
<hays>
heh yeah probably something like that. I thought ruby treated _ as a shortcut to define a hash lookup for what preceded the _ using what came after the _ as a symbol
<hays>
ive had a frustrating day with ruby and kinda sparse documentation of various gems
william3 has joined #ruby
<hays>
first 'rmodbus' apparently doesn't allow a server without a slave id of 255 which is super weird
peterevjan has quit [Remote host closed the connection]
peterevjan has joined #ruby
<hays>
then celluloid silently moving all docs of supervise to the celluloid-supervise github
<hays>
which is not linked to
maikowblue has quit [Quit: .]
<hays>
and broken examples are left in the original docs
symbol has quit [Ping timeout: 240 seconds]
johnmilton has joined #ruby
<hays>
./rant
<Ox0dea>
// to escape /
joonty has quit [Ping timeout: 252 seconds]
<hays>
/rant
<Ox0dea>
Whoa!
<baweaver>
do note though that rails questions should go to #RubyOnRails
<baweaver>
but that's just an aside.
<baweaver>
hays: submit PRs for the docs if you have time
symbol has joined #ruby
<baweaver>
whenever I suffer through something I try and fix it or the docs related so it's not such a headache for anyone else afterwards.
<hays>
baweaver: yeah i'll try to do that on my own the time vs. on the clock for customer hehe
peterevjan has quit [Remote host closed the connection]
<baweaver>
fair
peterevjan has joined #ruby
<hays>
i spent about an hour looking through the source code for the darn function. heh turned out it was in a different github
marr has quit [Ping timeout: 260 seconds]
lucasb has quit [Quit: leaving]
<Ox0dea>
A different GitHub?!
<havenwood>
gihtub
rakm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<hays>
Ox0dea: a different github.. repo?
<hays>
is there a generally accepted way to split .rb files into smaller chunks to separate classes and such into smaller files
<kknight>
hays: you are free to to write anything on your git account..
<hays>
i found something called 'require_relative' that looks to be deprecated
benlieb has joined #ruby
x77686d has quit [Quit: x77686d]
<Ox0dea>
Who says it's deprecated?
x77686d has joined #ruby
theastrowolfe has joined #ruby
ElFerna has joined #ruby
andrew__ has quit [Remote host closed the connection]
allcentury has joined #ruby
andrew_ has joined #ruby
<hays>
not sure--different computer
<havenwood>
hays: It's supported by all supported Rubies.
<bougyman>
not older ones.
<havenwood>
hays: Ruby 1.8 is past End-of-Life.
<bougyman>
it was 1.9.x, right?
<havenwood>
bougyman: ayup
<havenwood>
hays: In Ruby 1.8 you can just `require` for the current working directory since "." used to be in the $LOAD_PATH.
andrew_ has quit [Remote host closed the connection]
<hays>
hmm soo i guess put classes in lib/ or something then have a master file that require_relative's them
<havenwood>
hays: Gems set it up so lib/ is in the $LOAD_PATH. So you can `require 'xo/version'` for example for lib/xo/version.
<havenwood>
hays: Ah right, you mean Rails.
<havenwood>
hays: Or do you?
<havenwood>
hays: Gem lib/ or app lib/?
<havenwood>
(I'm reading the scrollback now. So much to catch up on.)
william3 has quit [Remote host closed the connection]
azure32 has quit [Ping timeout: 272 seconds]
dlitvak has quit [Remote host closed the connection]
allcentury has quit [Quit: WeeChat 1.2]
william3 has joined #ruby
dlitvak_ has quit [Ping timeout: 240 seconds]
duckpuppy has joined #ruby
<pipework>
havenwood: Isn't &proc the way to get a hold of the block passed to the method regardless of whether you've made a variable in the signature for it?
<pipework>
Ox0dea: ^
andrew_ has joined #ruby
symbol has quit [Ping timeout: 252 seconds]
<Ox0dea>
pipework: Also Proc.new.
kirillzh has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Ox0dea>
`proc` is actually just a Kernel method that delegates to Proc.new.
<Ox0dea>
It'll use the surrounding block if one isn't explicitly provided.
<Ox0dea>
And all methods take an implicit block.
<hays>
havenwood: i do not mean rqilw
<hays>
rails
<toretore>
thats ghetto af
TomPeed has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<hays>
havenwood: im just thinking generally how to structure things so it fits with the norms/conventions
Jardayn has quit [Quit: Leaving]
<hays>
learningrubythehardway has a structure.. thats pretty extensive
<Ox0dea>
toretore: What is?
<Synthead>
I just installed an SSL cert and when connecting to a server with it via openssl s_client, it shows that it's fine. However, I still get an OpenSSL::SSL::SSLError saying that the certificate verify failed. Is there something I missed?
<Ox0dea>
That all methods take an implicit block and that there's a way to get hold of it?
<toretore>
Proc.new just magically using the method's block Ox0dea
<pipework>
Ox0dea: So if I've defined a method and I'm inside the method and I need to get a hold of the proc/block passed into the method, but I can't add &block or whatever to the signature, then to get a hold of the block from anywhere within the method I use Proc.new ?
<Ox0dea>
pipework: Or `proc`, aye.
duckpuppy has quit [Ping timeout: 276 seconds]
<pipework>
It must not work in irb
jottr has quit [Ping timeout: 240 seconds]
euphoriaa is now known as euphoria
dfinninger has joined #ruby
rhombical has quit [Ping timeout: 240 seconds]
TomPeed has joined #ruby
<havenwood>
pipework: or block_given? with yield
scripore has joined #ruby
andrew_ has quit [Remote host closed the connection]
<pipework>
havenwood: I need to check the arity of the proc.
<havenwood>
ah
<havenwood>
pipework: should work in irb
TomPeed has quit [Client Quit]
TomPeed has joined #ruby
peterevjan has quit [Remote host closed the connection]
Jamo has joined #ruby
<Synthead>
looks like if I do SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt rails c, it works fine
<Ox0dea>
toretore: It's useful to be able to decide whether or not you want to reify the block into an actual Proc.
x77686d has quit [Quit: x77686d]
andrew_ has joined #ruby
<Ox0dea>
`cond ? yield : proc.call(...)`
stannard has joined #ruby
theastrowolfe has quit [Ping timeout: 250 seconds]
<toretore>
Ox0dea: for twhat purpose?
<toretore>
-t
<Ox0dea>
toretore: Just in case. :P
<toretore>
right :)
<Ox0dea>
Procs are comparatively expensive, if that's how you meant.
hololeap has joined #ruby
<toretore>
compared to yield?
<Ox0dea>
Aye.
<Ox0dea>
Blocks are not Objects.
rhombical has joined #ruby
DLSteve has joined #ruby
stannard has quit [Ping timeout: 240 seconds]
maletor has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<pipework>
Ox0dea: Ah, in my case all I need is the proc in a way I can check the arity and then yield without needing to modify the signature.
<pipework>
I'm working on something right miaow though, and it seems to be on the right path.
<Ox0dea>
pipework: That's certainly a valid (and intriguing) use case, but no memory savings.
LuckyABA has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ElFerna has quit [Ping timeout: 245 seconds]
<pipework>
Ox0dea: I'm not too concerned about memory savings, just not changing the actual method signature.
<pipework>
`if proc.arity.nonzero?` is most of what I needed.
pawnbox has joined #ruby
<Ox0dea>
pipework: Blocks aren't lambdas; they don't check their arguments.
<pipework>
Ox0dea: I don't want it checked.
<Ox0dea>
You have no say. :P
<pipework>
Happy situation then
rhombical has quit [Ping timeout: 240 seconds]
<Ox0dea>
It just seems like `proc.call *foo` would do The Right Thing either way?
FooMunki has quit [Quit: FooMunki]
<pipework>
If the caller of this method passes a block with a block variable, I'm doing something different than if they pass a block without a block variable.
<Ox0dea>
What the heck causes it to stop returning them in defined order? :/
<nofxx>
he says that when he was 7 daddy gave it his first gun, he was the first boy in the street with a gun, next yr he was the only boy on the street
<VeryBewitching>
Ox0dea: That's really strange.
duckpuppy has joined #ruby
<Ox0dea>
It happens slightly earlier on my 64-bit machine as well. :(
dlitvak has quit [Ping timeout: 240 seconds]
<VeryBewitching>
Lemme try.
<VeryBewitching>
One sec
<Ox0dea>
Should be 236.
<VeryBewitching>
Wow
<VeryBewitching>
It's nothing like yours
<Ox0dea>
All over the place?
scouth has quit [Ping timeout: 252 seconds]
<VeryBewitching>
Only if I run it in irb
<VeryBewitching>
If I pipe output to a file, it's in order
<Ox0dea>
Totally ordered?
<VeryBewitching>
ruby ~/test.rb > out.txt
<VeryBewitching>
Up, it looks 0 to 254 in sequence.
RegulationD has quit [Remote host closed the connection]
<Ox0dea>
I can't think of a different way to do it without having to make this a C extension that gets all up in the internals. :/
moeabdol3 has joined #ruby
moeabdol2 has quit [Ping timeout: 240 seconds]
DmitryBochkarev has joined #ruby
<VeryBewitching>
Almost the time of the day for me when I'm up for losing a ship.
bronson has quit [Ping timeout: 256 seconds]
<Ox0dea>
Still parsing that.
<VeryBewitching>
Ox0dea: Debug the ruby process, while running that script, in an ide.
A124 has joined #ruby
<Ox0dea>
VeryBewitching: Hm? The problem has been identified.
<Ox0dea>
#instance_methods isn't guaranteed to return methods in definition order.
<Ox0dea>
And the TracePoint API doesn't expose the arguments passed in a call, so I can only know that *a* method has been added, but not which.
scouth has quit [Ping timeout: 272 seconds]
<VeryBewitching>
I guess what I'm wondering is... why is it output in that specific pattern.
<Ox0dea>
Without monkey-patching Module#method_added, to which I'm opposed on principle.
<VeryBewitching>
And what causes it to differ?
<VeryBewitching>
With respect to losing a ship, I play Eve on occasion.
<VeryBewitching>
On my PC it starts at 249.
<VeryBewitching>
Yours it starts later, on both it wraps to fill
<VeryBewitching>
I want to know why those specific starting points.
A124 has quit [Ping timeout: 240 seconds]
<VeryBewitching>
afk a sec, grabbing phone
peterevjan has quit [Remote host closed the connection]
moeabdol3 has quit [Ping timeout: 256 seconds]
<Ox0dea>
These lines stand out as being potentially relevant: https://git.io/vgPos
joonty has joined #ruby
<Ox0dea>
I suspect the sizes are the same on both our 64-bit machines, so maybe it's to do with structure packing differences between our compilers?
A124 has joined #ruby
arlek has joined #ruby
azure32 has joined #ruby
joonty has quit [Ping timeout: 240 seconds]
scouth has joined #ruby
<VeryBewitching>
How much addressable memory plus swap on your end?
<VeryBewitching>
1024 Mb swap plus 7567/7944 MB RAM
idefine has joined #ruby
<Ox0dea>
Are you frying eggs?
<VeryBewitching>
Perhaps.
<VeryBewitching>
That's mem free btw
<Ox0dea>
A little less RAM, infinitely less swap.
kies^ has joined #ruby
<Ox0dea>
Compiler?
kies^ has quit [Remote host closed the connection]
<VeryBewitching>
gcc version 5.2.1 20151010 (Ubuntu 5.2.1-22ubuntu2)
pawnbox has joined #ruby
<VeryBewitching>
Kubuntu 15.10
karapetyan has joined #ruby
<Ox0dea>
I'm on 5.3, but I suspect irrelevance there as well. :/
<VeryBewitching>
I don't see how a collection could be assigned out of order, and in a different pattern.
swills has quit [Ping timeout: 264 seconds]
chipotle has joined #ruby
DmitryBochkarev has quit [Quit: This computer has gone to sleep]
<VeryBewitching>
Certain the iterator would determine the generated index, starting at 0.
<VeryBewitching>
s/Certain/Certainly
<Ox0dea>
It's constructing the list with a hash table, presumably to ignore duplicates from superclasses.
<Ox0dea>
Ruby Hashes are ordered, but the VM goes out of its way to ensure that, and it just doesn't do so with the internal hash constructed by #instance_methods.
atomical has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<VeryBewitching>
But the execution order should always put :m0 at index 0
ur5us has joined #ruby
<Ox0dea>
Only the buckets and their contents matter, not their positions in the chain; when #instance_methods goes to iterate over them, there's "spillage".
<VeryBewitching>
Oh, wait, no that's not at all sensical.
pawnbox has quit [Ping timeout: 276 seconds]
karapetyan has quit [Ping timeout: 272 seconds]
<Ox0dea>
I thought that wasn't a word.
<VeryBewitching>
Which gives the word so much more meaning :D
kies^ has joined #ruby
<VeryBewitching>
So it sounds like it's an efficiency thing?
d10n-work has quit [Quit: Connection closed for inactivity]
peterevjan has joined #ruby
peterevjan has quit [Remote host closed the connection]
wprice has quit [Quit: wprice]
zacstewart has quit [Ping timeout: 260 seconds]
peterevjan has joined #ruby
peterevjan has quit [Client Quit]
<Ox0dea>
MRI just doesn't go out of its way to keep internal hashes ordered.
<VeryBewitching>
Not having to account for position, especially in something as large as a Rails app, would probably keep more free memory available.
<Ox0dea>
Better than that would be if #instance_methods and the like did any caching at all.
scouth has quit [Ping timeout: 240 seconds]
<Ox0dea>
>> methods.__id__ == methods.__id__
<VeryBewitching>
Someone in #RubyOnRails was talking about memoize earlier.
<VeryBewitching>
I'm off for the night, a long day with a framework I don't enjoy. I still want to know why mine starts at 249 though, I'm going to see if I sort that tomorrow.
VeryBewitching has quit [Quit: Konversation terminated!]
s00pcan has joined #ruby
elifoster has quit [Ping timeout: 245 seconds]
duckpuppy has quit [Ping timeout: 248 seconds]
TomPeed has joined #ruby
godzillaenlacasa has quit [Quit: ZZZZZ....]
DmitryBochkarev has joined #ruby
agent_white has quit [Read error: Connection reset by peer]
idefine has quit [Remote host closed the connection]
idefine has joined #ruby
agent_white has joined #ruby
azure32 has joined #ruby
terminalrecluse has joined #ruby
doublemalt_ has quit [Ping timeout: 260 seconds]
scripore has quit [Quit: This computer has gone to sleep]
doublemalt_ has joined #ruby
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
kingsler has joined #ruby
RegulationD has joined #ruby
braincrash has quit [Quit: bye bye]
DLSteve has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tona has joined #ruby
<tona>
hello guys
<tona>
is there one way to create one ssh web browser in ruby to connect with servers using ssh but into one browser ?
RegulationD has quit [Ping timeout: 276 seconds]
stannard has joined #ruby
minimalism has joined #ruby
treaki has quit [Ping timeout: 250 seconds]
dlitvak_ has quit [Remote host closed the connection]
dcope has left #ruby [#ruby]
treaki has joined #ruby
x77686d has joined #ruby
joonty has joined #ruby
siphonage has quit [Ping timeout: 264 seconds]
stannard has quit [Ping timeout: 256 seconds]
andrew_ has quit [Read error: Connection reset by peer]
andrew_ has joined #ruby
DEA7TH has quit [Quit: DEA7TH]
braincrash has joined #ruby
djbkd has quit [Read error: Connection reset by peer]
moeabdol has joined #ruby
mistermocha has joined #ruby
djbkd has joined #ruby
joonty has quit [Ping timeout: 240 seconds]
Bloomer has joined #ruby
theastrowolfe has quit [Ping timeout: 240 seconds]
asccigcc has joined #ruby
arescorpio has quit [Quit: Leaving.]
DmitryBochkarev has quit [Quit: This computer has gone to sleep]
sneakerhax has joined #ruby
zacstewart has joined #ruby
asccigcc has quit [Client Quit]
napstablook has quit [Quit: Leaving]
solocshaw has quit [Ping timeout: 250 seconds]
sneakerhax has quit [Client Quit]
johnmilton has quit [Quit: Namaste]
Sucks has quit [Ping timeout: 240 seconds]
sneakerhax has joined #ruby
floatingpoint has joined #ruby
scripore has joined #ruby
pawnbox has quit [Remote host closed the connection]
arthropododo has quit [Remote host closed the connection]
nofacade has joined #ruby
duncannz has joined #ruby
pawnbox has quit [Remote host closed the connection]
fedexo has joined #ruby
twintail has quit [Remote host closed the connection]
duckpuppy has joined #ruby
terminalrecluse has joined #ruby
chipotle has quit [Quit: cheerio]
twintail has joined #ruby
pawnbox_ has joined #ruby
kirillzh has joined #ruby
Coldblackice has quit [Ping timeout: 250 seconds]
duckpuppy has quit [Ping timeout: 240 seconds]
Gobioidei has joined #ruby
Bloomer has quit [Remote host closed the connection]
william3 has joined #ruby
edwardly has quit [Max SendQ exceeded]
edwardly has joined #ruby
edwardly has joined #ruby
edwardly has quit [Max SendQ exceeded]
william3 has quit [Ping timeout: 245 seconds]
TomPeed has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
edwardly has joined #ruby
edwardly has joined #ruby
chipotle has joined #ruby
perrier__ has quit [Remote host closed the connection]
perrier_ has joined #ruby
_djbkd has joined #ruby
davedev24 has quit []
pawnbox_ has quit [Remote host closed the connection]
saneax_AFK is now known as saneax
chipotle has quit [Ping timeout: 240 seconds]
andrew_ has quit [Remote host closed the connection]
konsolebox has joined #ruby
dragon9783 has joined #ruby
darkf has quit [Read error: Connection reset by peer]
Kryptonical has quit [Read error: Connection reset by peer]
scripore has quit [Quit: This computer has gone to sleep]
arbys has quit [Read error: Connection reset by peer]
armyriad has quit [Read error: Connection reset by peer]
arbys has joined #ruby
aaeron has quit [Quit: aaeron]
armyriad has joined #ruby
pawnbox has joined #ruby
dexter-tzu has quit [Read error: Connection reset by peer]
quakephil has quit [Read error: Connection reset by peer]
Kryptonical has joined #ruby
darkf has joined #ruby
crdpink2 has quit [Excess Flood]
dexter-tzu has joined #ruby
djbkd has quit [Read error: Connection reset by peer]
crdpink2 has joined #ruby
Miron has quit [Ping timeout: 252 seconds]
djbkd has joined #ruby
Gobioidei has quit [Ping timeout: 248 seconds]
p0p0pr37 has quit [Read error: Connection reset by peer]
rideh has quit [Ping timeout: 252 seconds]
sorah has quit [Ping timeout: 250 seconds]
tpendragon has quit [Ping timeout: 250 seconds]
skarn has quit [Excess Flood]
ceej has quit [Ping timeout: 240 seconds]
kent\n has quit [Ping timeout: 252 seconds]
blackjid has quit [Ping timeout: 250 seconds]
hostess has quit [Ping timeout: 250 seconds]
ceej has joined #ruby
Derailed has joined #ruby
rideh has joined #ruby
zast has quit [Remote host closed the connection]
Miron has joined #ruby
skarn has joined #ruby
hostess has joined #ruby
kent\n has joined #ruby
kent\n has quit [Changing host]
kent\n has joined #ruby
joonty has joined #ruby
agent_white has quit [Quit: brbinafew]
budhram has joined #ruby
blackjid has joined #ruby
floatingpoint has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
awk_ is now known as awk
joonty has quit [Ping timeout: 260 seconds]
pigeonhearted has joined #ruby
tpendragon has joined #ruby
idefine has quit [Remote host closed the connection]
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
rsc___ has quit [Quit: rsc___]
Tempesta has joined #ruby
cjheath has joined #ruby
sorah has joined #ruby
baweaver has joined #ruby
<cjheath>
I’ve published a lot of gems, but something today has me baffled. I have an executable in my gem. A clean install installs the runtime dependencies, but when I run the executable, it requires the development deps to be installed. Is this a problem with rbenv?
<cjheath>
Try it: “gem install activefacts-compositions” then try to run: “schema_compositor —help”
<cjheath>
It works fine if you install the development deps as well
<cjheath>
any ideas?
<cjheath>
the executable is *not* a dev tool; it’s the main purpose for the gem.
dfinninger has quit [Remote host closed the connection]
chipotle has joined #ruby
adgtl has joined #ruby
chouhoul_ has quit [Remote host closed the connection]
zacstewart has quit [Ping timeout: 248 seconds]
nodejunkie has joined #ruby
idefine has joined #ruby
kingsler has left #ruby ["AndroIRC"]
<baweaver>
Ox0dea or jhass might know.
idefine has quit [Ping timeout: 240 seconds]
<cjheath>
I’ve also asked in #rubygems, and now asking on stackoverflow
<baweaver>
it's beyond me honestly.
<cjheath>
I suspect that the answer will be that “executables are development tools”. Clearly not true in this case, but that might be the assumption
<baweaver>
probably
ur5us has quit [Remote host closed the connection]
duckpuppy has joined #ruby
diegoviola has joined #ruby
diegoviola has left #ruby [#ruby]
dopamean1 has joined #ruby
duckpuppy has quit [Ping timeout: 264 seconds]
pigeonhearted has quit [Ping timeout: 240 seconds]
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
pigeonhearted has joined #ruby
zacstewart has joined #ruby
zenlot2 is now known as zenlot
pigeonhearted has quit [Ping timeout: 250 seconds]
mdw has joined #ruby
babblebre has quit [Quit: Connection closed for inactivity]
toretore has quit [Ping timeout: 256 seconds]
<djellemah>
cjheath: what's in Gemfile and activefacts-compositions.gemspec ?
<aces1up>
i cannot seem to find a simple answer to this, just want to get current time, in timezone pacific.. in date and timestamp format.
speakingcode has joined #ruby
mdw has quit [Quit: Sleeping Zzzzz]
adgtl has quit [Remote host closed the connection]
<djellemah>
cjheath: My guesses: maybe one of your activefacts- gems has those gems as runtime dependencies; or maybe require 'bundler/setup' is pulling in development dependencies. Bundle.require may help, I'm quite hazy on bundler though.
<cjheath>
I checked the installed files, and none of the deps has activefacts as a runtime dep
<cjheath>
I mean in the installed gem repo
joonty has joined #ruby
tona has quit [Quit: Page closed]
adgtl has joined #ruby
terminalrecluse has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
s00pcan has quit [Remote host closed the connection]
codecop has joined #ruby
last_staff has joined #ruby
ghostfish has joined #ruby
stevemackinnon has quit [Remote host closed the connection]
rsc___ has joined #ruby
mistermocha has quit [Remote host closed the connection]
x77686d has quit [Quit: x77686d]
<cjheath>
djellemah: thanks, looking now (just had dinner)
LoneHerm_ has joined #ruby
blackgoat has quit [Quit: WeeChat 1.3]
SkepBrain has joined #ruby
mdw has joined #ruby
_mak has joined #ruby
agent_white has joined #ruby
s00pcan has joined #ruby
<_mak>
hi there
<cjheath>
No, that didn’t help.
adgtl has quit [Remote host closed the connection]
<_mak>
I have this json api endpoint, which in order to query I need to have a 'session cookie', which in order to get I need to login to the site using a html login form. Is there any gem I could use to get the cookie without resorting to a headless browser to login to the site?
aganov has joined #ruby
<cjheath>
_mak: Mechanize used to be the go-to gem for webscraping.
UtkarshRay has quit [Remote host closed the connection]
ghostfish has quit [Ping timeout: 240 seconds]
p1k has joined #ruby
<_mak>
cjheath: cool, thanks!
<cjheath>
check the ruby toolbox to see if there’s something better, but I expect not
<p1k>
is there any way to make changes to ruby objects but limit the scope within those changes are visible ?
<cjheath>
p1k: That’s what Ruby 2’s Refinements are for
<p1k>
cjheath: more specifically? :o
adgtl has joined #ruby
<cjheath>
Google for Ruby and Refinements, you’ll find more than you wantto know
<cjheath>
be aware that the feature was somewhat controversial
LoneHerm_ has quit [Remote host closed the connection]
mdw has quit [Quit: Sleeping Zzzzz]
pawnbox has quit [Remote host closed the connection]
<p1k>
cjheath: thanks
s00pcan has quit [Ping timeout: 240 seconds]
<djellemah>
p1k: jruby and rubinius don't implement refinements afaik, but it's been a while since I checked.
<djellemah>
cjheath: When I do gem install activefacts-compositions in a clean gemset I get
<solars>
Ox0dea, I know all these things, I just wanted to know if somebody does know a plugin that I do not
<Ox0dea>
solars: Know all what things?
<solars>
adaedra, unfortunately it's outdated
karapetyan has joined #ruby
<Ox0dea>
You're being silly.
<ljarvis>
:/
<solars>
Ox0dea, I mean I know how to use vim
<adaedra>
I'm tempted to reuse Ox0dea's gif here.
<solars>
but I did not find anything decent, oder than eclim, to refactor ruby
<Ox0dea>
solars: What's wrong with the plugin adaedra linked?
<adaedra>
I'm afraid you still have to do some things manually.
<solars>
Ox0dea, it's not actively maintained and has bugs
<Ox0dea>
solars: What kind of bugs?
kirillzh has joined #ruby
<Ox0dea>
Like, name one.
<ljarvis>
those shortcuts are really... simple
<ljarvis>
I guess that's why I'm confused
<solars>
Ox0dea, extract method didn't work
<ljarvis>
like why would you need anything more that just.. vim
<solars>
guys
<Ox0dea>
I knew it!
<adaedra>
gal
<solars>
if you never tried it, there is no point in discussing it
<solars>
so please don't troll
<ljarvis>
I refactor code all the time
<ljarvis>
in vim
<ljarvis>
so please don't troll
<solars>
ljarvis, obviously you didn't even know what extract method is, right
<ljarvis>
...
<ljarvis>
lol
<adaedra>
...
<ljarvis>
well im done here
tvw has quit [Read error: Connection reset by peer]
<solars>
there are refactoring patterns, and that's what I'm referring to with refactoring
<solars>
not changing code style
<solars>
that's certainly not refactoring
<ljarvis>
look lady
<ljarvis>
I asked about style to start with because I was unsure, I know you're talking about refactoring and I know what refactoring is
PedramT has joined #ruby
<solars>
good, then please do not try to convince me that I am wrong just because you do it differently
<adaedra>
Okay, so to close the discussion, no, we do not know plugins that do what you want.
<solars>
I noticed, yes
duckpuppy has joined #ruby
nodejunkie has quit [Ping timeout: 252 seconds]
Snowy has joined #ruby
yfeldblum has joined #ruby
tvw has joined #ruby
duckpuppy has quit [Ping timeout: 260 seconds]
darkf has quit [Quit: Leaving]
william3 has joined #ruby
rodfersou has joined #ruby
unflated has quit [Ping timeout: 248 seconds]
kp666 has joined #ruby
uanl has quit [Ping timeout: 252 seconds]
UtkarshRay has joined #ruby
william3 has quit [Remote host closed the connection]
foo` has joined #ruby
benlieb has joined #ruby
ur5us has quit [Remote host closed the connection]
foo` has quit [Remote host closed the connection]
bilus has joined #ruby
Dimik has quit [Ping timeout: 248 seconds]
marr has joined #ruby
unflinching has joined #ruby
SCHAAP137 has joined #ruby
lipoqil has joined #ruby
william3 has joined #ruby
ziyadb has joined #ruby
valera has joined #ruby
amorbix has quit [Ping timeout: 240 seconds]
sepp2k has joined #ruby
william3 has quit [Ping timeout: 245 seconds]
benlieb has quit [Quit: benlieb]
andrew_ has quit [Remote host closed the connection]
unflinching has quit [Ping timeout: 240 seconds]
Gnut has joined #ruby
kimegede has joined #ruby
unflinching has joined #ruby
mark4 has joined #ruby
binaryplease has joined #ruby
drptbl has joined #ruby
Mon_Ouie has joined #ruby
bkxd has joined #ruby
Darkwater has joined #ruby
huyderman has joined #ruby
drptbl_ has joined #ruby
<Darkwater>
is it good practice to create loads of custom *Error classes? (eg for a build script: UnknownConfigError, UnknownBuildTypeError, NoConfigUsedError, etc)
ur5us has joined #ruby
<yorickpeterse>
ljarvis: bro do you even know about refactoring?
<adaedra>
bro do you even refactor
toretore has joined #ruby
mhoungbo has quit [Quit: Quitte]
andrew_ has joined #ruby
mistermocha has joined #ruby
drptbl has quit [Ping timeout: 248 seconds]
<yorickpeterse>
no I don't know what refactoring is
<djellemah>
Darkwater: do you need to rescue them separately?
<djellemah>
A friend of a friend told me that rubymine refactors.
aupadhye has quit [Quit: Leaving]
<adaedra>
yorickpeterse: are you a programmer? :)
<Darkwater>
djellemah: probably, I at least want unique error messages printed to the user for each one
CloCkWeRX has quit [Read error: Connection reset by peer]
<Darkwater>
and since this build script is meant to be extensible I figured it might be best to pull printing messages out of the main logic
CloCkWeRX has joined #ruby
<Darkwater>
actually I probaly don't have to rescue them separately if I put description messages in the error classes
<djellemah>
Darkwater: there ya go
<Darkwater>
that still leaves the question of RuntimeError with message vs custom *Error with static messages
PedramT_ has joined #ruby
Mon_Ouie has quit [Ping timeout: 240 seconds]
<yorickpeterse>
adaedra: No I'm just a plumber
<adaedra>
I se
<adaedra>
I see*
<ljarvis>
yorickpeterse: adaedra: No, I brofactor
<adaedra>
BRO
mistermocha has quit [Ping timeout: 250 seconds]
PedramT has quit [Read error: Connection reset by peer]
<Ox0dea>
Darkwater: Would a user of your thing ever want to rescue any of your custom errors?
CloCkWeRX has quit [Read error: Connection reset by peer]
CloCkWeRX has joined #ruby
maikowblue has joined #ruby
CloCkWeRX has left #ruby [#ruby]
<Darkwater>
possibly yes
<ljarvis>
then use custom ones, and probably inherit from a parent exception class that your library owns
<norc>
For sharing a resource (a session id) between processes that any process could possibly change, Im guessing my best bet is simply a shared file with proper flocks?
<Ox0dea>
Seems the most straightforward, at any rate.
<Ox0dea>
It's just that there's no guarantee on the order, but the details of when it becomes unordered in MRI are... "interesting" isn't quite the word.
benhuda has quit [Ping timeout: 248 seconds]
dlitvak has joined #ruby
<norc>
Yeah I got that much.
dlitvak_ has quit [Ping timeout: 256 seconds]
symbol has joined #ruby
sandstrom has joined #ruby
adgtl has quit [Remote host closed the connection]
yqfvwal has quit [Ping timeout: 250 seconds]
Napear has quit [Quit: leaving]
toretore has quit [Quit: Leaving]
duckpuppy has joined #ruby
ljames has joined #ruby
Shaboum has joined #ruby
kinetogenic has quit [Ping timeout: 250 seconds]
blackmesa has joined #ruby
Cohedrin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
huyderman has quit [Remote host closed the connection]
krz has quit [Ping timeout: 240 seconds]
huyderman has joined #ruby
einarj has quit [Remote host closed the connection]
sdothum has joined #ruby
duckpuppy has quit [Ping timeout: 260 seconds]
blackmesa has quit [Ping timeout: 240 seconds]
dlitvak has quit [Ping timeout: 240 seconds]
adgtl has joined #ruby
karapetyan has quit [Remote host closed the connection]
shuriu has joined #ruby
karapetyan has joined #ruby
underisive has joined #ruby
wprice has joined #ruby
Kallis has joined #ruby
Mon_Ouie has joined #ruby
dlitvak has joined #ruby
Bloomer has quit [Remote host closed the connection]
flughafen_ has joined #ruby
<flughafen_>
hey shevy
ElFerna has joined #ruby
mdw has quit [Quit: Sleeping Zzzzz]
Bloomer has joined #ruby
ruby-lang877 has joined #ruby
ruby859 has joined #ruby
adgtl has quit [Remote host closed the connection]
ruby859 has quit [Client Quit]
mdw has joined #ruby
Coral has joined #ruby
Coral is now known as tjadc
adgtl has joined #ruby
tjadc is now known as tjad
Macaveli has joined #ruby
underisive has quit [Ping timeout: 250 seconds]
patchedmonkey has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
* hanmac
thinks that #IssueOnRails would also be a funny room name XD
<ponga>
I want to ask user number of questions to fill in, which in result gives out a result filled in with the answers, in Web browser. what would be my best approach regarding; what language to use, what library/framework? to use, etc
<ponga>
I guess sinatra can solve my problem
crowell has joined #ruby
crowell has quit [Changing host]
crowell has joined #ruby
<apeiros>
ponga: with the given requirement, about any language & framework would work.
<apeiros>
there are even completely implemented tools around, like limesurvey (iirc that was the name)
<ponga>
apeiros: thanks I will spend time learning sinatra
<ponga>
or nodejs? maybe
<Bish>
ponga: i liked webmachine
<Bish>
i still like webmachine*
inev has left #ruby ["Leaving"]
<Bish>
wrong channel for nodejs, but still cool
<Bish>
but i guess that depends too much on what you want to do
momomomomo has joined #ruby
william3 has quit [Remote host closed the connection]
william3 has joined #ruby
william3 has quit [Remote host closed the connection]
william3 has joined #ruby
KensoDev has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
william3 has quit [Remote host closed the connection]
dfinninger has joined #ruby
Renich has joined #ruby
<EdwardIII>
hrm trying to create a braindead app. i have lib/ns_finder.rb, but in <root dir>/finder.rb, when i do 'require "ns_finder"' i get "LoadError: cannot load such file -- ns_finder"?
wprice_ has joined #ruby
wprice has quit [Ping timeout: 264 seconds]
<EdwardIII>
in perl i'd probably do perl -I'lib' finder.pl
wprice_ is now known as wprice
JDiPierro has joined #ruby
<tubbo>
hanmac: lol can you read japanese?
karapetyan has joined #ruby
<apeiros>
EdwardIII: and in ruby you do ruby -Ilib
<EdwardIII>
huh, same thing works in ruby heh
<apeiros>
surpriise ;-)
<EdwardIII>
the proper approach is probably to make a gem right?
<tubbo>
i had to turn translating off because chrome would always try to translate this spanish-language web app i'm working on
<apeiros>
EdwardIII: well, even when making a gem I use ruby -Ilib bin/foo
<apeiros>
that is while developing
adgtl_ has joined #ruby
<apeiros>
once installed, the -Ilib is no longer necessary. but then again, neither is the prefixed `ruby` necessary.
<tubbo>
EdwardIII: all -I does is add that directory to the $LOAD_PATH. you can do that *in* Ruby itself as well.
B1n4r10 has quit [Ping timeout: 252 seconds]
<EdwardIII>
right
<hanmac>
tubbo: no but i read a german translation of it in a blog
Mon_Ouie has quit [Ping timeout: 250 seconds]
adgtl has quit [Ping timeout: 260 seconds]
Macaveli has joined #ruby
shreddor has joined #ruby
Tempesta has quit [Ping timeout: 240 seconds]
kmckelvin has quit [Read error: Connection reset by peer]
adgtl_ has quit [Remote host closed the connection]
kmckelvin has joined #ruby
mary5030 has quit [Remote host closed the connection]
einarj has quit [Read error: Connection reset by peer]
william3 has joined #ruby
einarj has joined #ruby
y2mq37 has joined #ruby
decoponio has joined #ruby
arlek has quit [Ping timeout: 252 seconds]
silicio has quit [Remote host closed the connection]
circ-user-NoIIC has joined #ruby
momomomomo has quit [Quit: momomomomo]
<EdwardIII>
in irb can i force it to like, reload a module?
AnonRecluse13 has quit [Remote host closed the connection]
<EdwardIII>
save me quitting & restarting all the time when i'm playing with something?
<apeiros>
load "file.rb"
<dajobat>
Edward: you could probably fork a new instance?
AnonRecluse13 has joined #ruby
<apeiros>
load unlike require needs the suffix
SCHAAP137 has quit [Remote host closed the connection]
mary5030 has joined #ruby
dhollinger has joined #ruby
roshanavand has quit [Remote host closed the connection]
roshanavand has joined #ruby
einarj_ has joined #ruby
einarj has quit [Ping timeout: 248 seconds]
tenderlove has quit [Read error: Connection reset by peer]
dotix has quit [Remote host closed the connection]
tenderlove has joined #ruby
<EdwardIII>
very cool, thanks apeiros
dlitvak_ has joined #ruby
B1n4r10 has joined #ruby
dotix has joined #ruby
<hanmac>
apeiros: i dont know how it totally works, but did you try to call "irb" in "irb" ?;P
<apeiros>
hanmac: it'll open a nested irb session
<apeiros>
works with pry too
<apeiros>
you can even specify an object for context
y2mq37 has quit [Ping timeout: 250 seconds]
<apeiros>
i.e. I often do `pry ActiveRecord::Migration` in a rails console.
anisha has quit [Quit: Leaving]
<hanmac>
hm yeah, is that enough for reloading or doesnt that solve the problem?
<apeiros>
it doesn't reload anything ;-)
rodfersou|lunch is now known as rodfersou
stannard has quit [Read error: Connection reset by peer]
dlitvak has quit [Ping timeout: 250 seconds]
<apeiros>
you could do `exec('irb', *ARGV')`
y2mq37 has joined #ruby
<apeiros>
-'
davedev24 has joined #ruby
<apeiros>
that'd reload everything. but you'd also lose all data from the current session.
sneakerhax has quit [Quit: back later]
jgpawletko has joined #ruby
tomchapin has joined #ruby
<EdwardIII>
speaking of irb, what stupidity am i doing that stops me from being able to do single-line blocks? report.no_nameservers.each({|d| d.to_s })
angelixd has joined #ruby
dotix has quit [Remote host closed the connection]
dotix has joined #ruby
dotix has quit [Changing host]
dotix has joined #ruby
dotix has quit [Client Quit]
<lucasb>
put outside the parens
<Takumo>
Hi all, I'm trying to return a PDF from aGrape
<Takumo>
an API using Grape, but I get a rack error saying it can't convert \xE2 from ASCII-8bit to UTF-8
xapak has joined #ruby
<xapak>
Hello.
dlitvak_ has quit [Ping timeout: 240 seconds]
<Takumo>
should I be instructing rack to set the content encoding to ascii-8bit and not try to convert to utf-8?
<shevy>
Integer.new "0x1a" # NoMethodError: undefined method `new' for Integer:Class
<pushcx>
EdwardIII: Ruby makes a subtle distinction between "things that can be converted" and "things that pretty much are" in the difference between to_s and to_str, to_a and to_ary.
roshanavand has quit [Ping timeout: 240 seconds]
dlitvak_ has quit [Ping timeout: 264 seconds]
nettoweb has joined #ruby
dlitvak has joined #ruby
ur5us has joined #ruby
idefine has joined #ruby
blackmesa has quit [Ping timeout: 250 seconds]
kmckelvin has quit [Ping timeout: 264 seconds]
Jackneill has joined #ruby
lubekpl has quit [Ping timeout: 260 seconds]
sepp2k has quit [Quit: Leaving.]
einarj has quit [Read error: Connection reset by peer]
chipotle has joined #ruby
pihpah has quit [Ping timeout: 252 seconds]
blackoperat has joined #ruby
ur5us has quit [Ping timeout: 240 seconds]
atomical has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
einarj has joined #ruby
agentmeerkat has quit [Ping timeout: 276 seconds]
<EdwardIII>
pushcx: interesting, i'd wondered why they were there too heh
<EdwardIII>
well i think i'll sign off for the week, thanks guys
dextertzu has quit [Quit: WeeChat 1.3]
floror has quit [Quit: floror]
mdw has joined #ruby
chipotle has quit [Ping timeout: 272 seconds]
intrigueD has joined #ruby
k13nox has quit [Remote host closed the connection]
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<drbrain>
thank you all for remaining calm during that incursion
<ljarvis>
oh wow I missed that somehow
jottr has quit [Client Quit]
mostlybadfly has quit [Quit: Connection closed for inactivity]
<pushcx>
He wanted attention, so I figured ignoring him completely would annoy him most. :)
veleno has joined #ruby
<drbrain>
they haven't shown up in in ruby-banned yet, though
<veleno>
hello. we’re hitting a performance issue with the execution of this method when the input is particularly large: https://github.com/splay-project/splay/blob/master/src/controller/lib/jobd.rb#L92 it generates a JSON string. apart from changing radically its code, is there something in there particularly obvious that triggers to the eyes of you experts ?
DmitryBochkarev has quit [Quit: This computer has gone to sleep]
baweaver has quit [Ping timeout: 250 seconds]
<drbrain>
veleno: use interpolation and << instead of +/+=
<lagweezle>
Well, that was interesting...
<drbrain>
>> out = ''; out << %Q({"ref":#{list['ref']}"); out
<ruby[bot]>
drbrain: # => undefined local variable or method `list' for main:Object (NameError) ...check link for more (https://eval.in/517865)
<drbrain>
oh, right
<drbrain>
>> out = ''; out << %Q({"ref":"#{'some_ref'}")
<veleno>
drbrain: not sure to have understood the suggestion.
einarj has quit [Read error: Connection reset by peer]
<veleno>
given the line: out = '{"ref":"' + list['ref'] + '"'
firstdayonthejob has joined #ruby
<drbrain>
or, even, use a JSON library
pawnbox has quit [Remote host closed the connection]
<drbrain>
veleno: see ruby[bot] response above ↑
einarj has joined #ruby
<veleno>
drbrain: i see. the +/+= do create temp strings ?
<drbrain>
yes, then throws them away
<drbrain>
so "a" + "b" creates three strings, while "a" << "b" creates two
B1n4r10 has quit [Ping timeout: 264 seconds]
symm- has quit [Ping timeout: 240 seconds]
dlitvak_ has joined #ruby
<drbrain>
so as `out` grows it gets reallocated every time you + more strings onto it
<veleno>
drbrain: indeed.
<veleno>
ok, that’s relatively easy fix to do i guess
<veleno>
if that’s not enough, using the ‘json’ gem would be a good plan-B ?
rdark has quit [Ping timeout: 248 seconds]
goodcodeguy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<veleno>
as I noticed it’s already being used in there for some reason
<drbrain>
yes
<drbrain>
you can build a Hash then to_json it
stannard has quit [Read error: Connection reset by peer]
goodcodeguy has joined #ruby
codecop has quit [Remote host closed the connection]
jokester has quit [Quit: WeeChat 1.3]
dlitvak has quit [Ping timeout: 240 seconds]
aegis3121 has joined #ruby
speakingcode has quit [Ping timeout: 240 seconds]
<lucasb>
at the end of the method, the generated is getting parsed with JSON.parse to see if it's valid. Maybe you can comment that code to speed things
DmitryBochkarev has joined #ruby
<lucasb>
*the generated string
<drbrain>
oh, I didn't even look down there
<drbrain>
yeah, using JSON to dump it from a Hash means you won't need to do that
jottr has joined #ruby
ElFerna_ has joined #ruby
django_ has joined #ruby
<django_>
hey anyone done the ruby course on Coursera?
speakingcode has joined #ruby
B1n4r10 has joined #ruby
pawnbox has joined #ruby
rakm has joined #ruby
chouhoulis has quit [Remote host closed the connection]
<veleno>
lucasb: indeed.
johnnyt has quit [Ping timeout: 248 seconds]
arlek has joined #ruby
johnnyt has joined #ruby
Azure has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
NeckBeardPrince has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Spami has joined #ruby
TheHodge has quit [Quit: Connection closed for inactivity]
fedexo has quit [Ping timeout: 250 seconds]
<aep>
uuuh this is really confusing. i have a initialize function with no arguments, and i call Class.new with no arguments, and i get "wrong number of arguments (1 for 0)
<aep>
what's.... the magic first argument
<aegis3121>
Do you have code?
maesitos has quit [Remote host closed the connection]
<momomomomo>
has iteration etc. built into markdown
<andrewvos>
what?
<andrewvos>
you mean it uses liquid?
<momomomomo>
yea
<andrewvos>
oh ok
marxarelli|afk has quit [Remote host closed the connection]
<andrewvos>
liquid was too much dependency for me
marxarelli has joined #ruby
circ-user-NoIIC has quit [Remote host closed the connection]
<ljarvis>
wot andrewvos
goodcodeguy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
blackmesa has quit [Ping timeout: 256 seconds]
<Xeago>
why is the bot operator?
<ljarvis>
because it controls the channel
<ljarvis>
one might say, it operates it
goodcodeguy has joined #ruby
lucasb has joined #ruby
<Xeago>
does the bot handle kicks and bans? Haven't seen that happen. Topic is still set by people, not the bot either.
PedramT has quit [Remote host closed the connection]
<ljarvis>
yeah it does
PedramT has joined #ruby
DEA7TH has joined #ruby
<Xeago>
Ok
maikowblue_ has quit [Quit: .]
chouhoulis has joined #ruby
momomomomo has quit [Quit: momomomomo]
<andrewvos>
ljarvis: wot wot inkjet
zacstewart has joined #ruby
<andrewvos>
u wot
podman has joined #ruby
ohaibbq has quit [Quit: Leaving...]
arlek has joined #ruby
einarj has quit [Read error: Connection reset by peer]
einarj has joined #ruby
PedramT has quit [Ping timeout: 276 seconds]
william3 has joined #ruby
chouhoulis has quit [Remote host closed the connection]
chouhoulis has joined #ruby
<veleno>
thanks everyone, it was very helpful
<veleno>
drbrain: thanks to you in particular
<ljarvis>
andrewvos wot bruv
veleno has quit [Quit: veleno]
chipotle has quit [Ping timeout: 248 seconds]
rik_ has joined #ruby
dubek has joined #ruby
william3 has quit [Remote host closed the connection]
<andrewvos>
ljarvis: do you think if I pass active records to that thing then people are going to pwn my server
<andrewvos>
?
kirillzh has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Eiam>
when you print an object and get something like <Class:0x0055a4b0570d28> is there a way to snag that object with just the address later, assuming it still allocated?
dexter-tzu has quit [Ping timeout: 240 seconds]
<ljarvis>
andrewvos: prolly ya nub
<andrewvos>
basically I'm allowing users to do some_model[:whataver_they_want]
<andrewvos>
is that an issue/
rik_ has quit [Remote host closed the connection]
<andrewvos>
scared rails has like a model[:database_connection_string_please] in there
NeckBeardPrince has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
baweaver has quit [Remote host closed the connection]
<andrewvos>
ok
Sucks has quit [Read error: Connection reset by peer]
<andrewvos>
sweet
<andrewvos>
thanks buddy
einarj has quit [Read error: Connection reset by peer]
PedramT has joined #ruby
<Eiam>
aegis3121: trying to debug an issue that occurs in a heroku like instance, so I cannot use something like pry remote to attach the debugger to it when the problem happens.. I just see logs. I figured I could try to pop into the server and try to better interact with whats there without having to just drop every print statement under the sun into the object before I deploy..
einarj has joined #ruby
aryaching has quit []
<Eiam>
I tried running the code in a console on the server and it runs fine no issue.. but when a request comes in, it blows up. so I'm missing something =)
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ysz has joined #ruby
<djellemah>
Eiam: maybe Marshal.dump the object to a file.
<djellemah>
although that would break if the object ivars contain procs, or if the object has singleton methods.
chipotle has joined #ruby
NeckBeardPrince has joined #ruby
vdamewood has quit [Quit: Life beckons.]
RegulationD has joined #ruby
elifoster has joined #ruby
maletor has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<EvilRoey>
Hi! I'm coming from the Python side.. been using it since 1997. I want to learn Ruby because I like learning for learning's sake. Any useful resources you guys can point me at?
baweaver has joined #ruby
<EvilRoey>
* and thanks!
lolcodenewbie has joined #ruby
fourq is now known as fourq|away
fourq|away is now known as fourq
jottr has quit [Read error: Connection reset by peer]
stannard has quit [Read error: Connection reset by peer]
<Eiam>
i was using strptime to try and parse the string
<Eiam>
but it drops the time
intrigueD has joined #ruby
abra0 is now known as and
vr_mex has quit [Quit: vr_mex]
maletor has joined #ruby
p1k has quit [Ping timeout: 264 seconds]
juanfra has quit [Quit: juanfra]
hobodave has joined #ruby
themsay has quit [Ping timeout: 272 seconds]
nunchuck has joined #ruby
genshu has joined #ruby
<genshu>
hi everyone
idefine has quit [Ping timeout: 260 seconds]
pandaant has quit [Remote host closed the connection]
dfinninger has joined #ruby
<havenwood>
genshu: hi
<genshu>
anyone interested in working on my lightweight MIT-licensed Internet Site framework? It is not the second Ruby On Rails, it should stay lighweight. If you are not interested in yet another Framework, have a look at the included SQLite3 wrapper (which will be a separate gem). Link on Github: https://github.com/jrnakk/Lightweight-Site-Framework
dfinninger has quit [Read error: Connection reset by peer]
dfinninger has joined #ruby
<genshu>
I have some dump feelings on how I extract and save values, if I would do some stuff twice, but cannot concentrate after some hours coding.
shadoi has quit [Ping timeout: 264 seconds]
srenatus has quit [Quit: Connection closed for inactivity]
elifoster has quit [Ping timeout: 256 seconds]
<genshu>
the SQLite3 wrapper is the files "overwriting.run.rb", "database_overwriting.run.rb" and "database.module.rb"
dionysus69 has quit [Ping timeout: 256 seconds]
Limix has joined #ruby
and is now known as abra0
<genshu>
regarding myself I judged innovative to overwrite the standard types for database functions, instead of methods of a class which has the object of the type as an argument.
johnmilton has quit [Quit: Namaste]
shadoi has joined #ruby
ZerGabriel has quit []
<genshu>
this time last to be said is that it's the first working alpha version, as the GPL requests, anyways MIT licensed
dlitvak_ has quit [Ping timeout: 240 seconds]
dlitvak has joined #ruby
rizenine has quit [Remote host closed the connection]
stannard has joined #ruby
mistermocha has joined #ruby
blackmesa has quit [Ping timeout: 264 seconds]
mistermocha has quit [Remote host closed the connection]
baweaver has joined #ruby
pawnbox has quit [Remote host closed the connection]
dhollinger has quit [Quit: WeeChat 1.4]
treehug88 has joined #ruby
jottr has quit [Ping timeout: 256 seconds]
treehug88 has quit [Remote host closed the connection]
treehug88 has joined #ruby
baweaver has quit [Ping timeout: 264 seconds]
dlitvak has quit [Ping timeout: 272 seconds]
<btwebdev>
thanks
baweaver has joined #ruby
<genshu>
:)
arbys has quit [Ping timeout: 260 seconds]
andrewvos has joined #ruby
<genshu>
are there any sites to make repos more public? there are often links to github, are there more popular sites to make my repo more public?
pdoherty has quit [Ping timeout: 276 seconds]
B1n4r10 has quit [Ping timeout: 260 seconds]
jordanm has quit [Ping timeout: 252 seconds]
Xeago has joined #ruby
<genshu>
however, got to shutdown now, cya ruby folks!
Azure has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
genshu has left #ruby [#ruby]
jtzero1 has joined #ruby
jtzero1 has left #ruby [#ruby]
TomPeed has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
TomPeed has joined #ruby
cjheath has left #ruby [#ruby]
TomPeed has quit [Client Quit]
yfeldblum has quit [Ping timeout: 250 seconds]
jordanm has joined #ruby
x77686d has quit [Quit: x77686d]
aswen has joined #ruby
Jackneill has quit [Remote host closed the connection]
goodcodeguy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
whippythellama has quit [Ping timeout: 240 seconds]
ESpiney_ has quit [Ping timeout: 240 seconds]
ur5us has joined #ruby
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
elifoster has joined #ruby
kirillzh has joined #ruby
<kirillzh>
How unique is SecureRandom.base58(24)?
rik_ has quit [Quit: rik_]
Limix has quit [Quit: Limix]
jgpawletko_ has joined #ruby
ilhami has joined #ruby
<ilhami>
sup guys?
<ilhami>
should I learn Ruby?
lolcodenewbie has quit [Ping timeout: 252 seconds]
PedramT_ has joined #ruby
jgpawletko has quit [Ping timeout: 250 seconds]
jgpawletko_ is now known as jgpawletko
PedramT has quit [Ping timeout: 240 seconds]
ruby-lang629 has joined #ruby
goodcodeguy has joined #ruby
<nofxx>
kirillzh, you could append a time in microseconds to it, pretty unique (kinda like bson object id)
johnnyt has quit [Ping timeout: 252 seconds]
<nofxx>
ilhami, mens sana in corpore sano ... learn is always good =D
baweaver has quit [Remote host closed the connection]
<ilhami>
why do you speak Latin?
johnnyt has joined #ruby
<shevy>
ilhami why would you want to program?
<kirillzh>
nofxx I just realized that's more Rails related question...
Limix has joined #ruby
n00bdev has joined #ruby
<ilhami>
shevy, it's fun
<kirillzh>
nofxx not sure which method I should use for User token
<ilhami>
and I want to earn money
openstruct has quit []
<nofxx>
kirillzh, 'get a unique string' is pretty language even agnostic ...
<nofxx>
the money part? I like the 'for fun and profit' motto
mistermocha has joined #ruby
<shevy>
he wants to earn money!
<nofxx>
how a guy will buy a motorcycle and eat pizza every week w/o it?
<shevy>
I like pizza
<eam>
do you really need a new motorcycle every week
<nofxx>
and get some booze and drugs? for a top 3 money uses that pops in my head
Limix_ has joined #ruby
ryanwinchester is now known as ryanw|away
<shevy>
who ordered the giga pizza lately... was it eam
<nofxx>
eam, need to gas it =/ but that will go electric some day
<ilhami>
shevy, maybe you can send me some money. :)
<ilhami>
I'd appreciate that.
Limix has quit [Ping timeout: 240 seconds]
Limix_ is now known as Limix
whippythellama has joined #ruby
Lildirt has quit [Ping timeout: 240 seconds]
<shevy>
hmm semi-off topic... if I have written some hello world app in ruby-gtk, I suppose there is no way to put this into a firefox tab right? :D
<nofxx>
shevy, printscreen
sandstrom has joined #ruby
Coldblackice has joined #ruby
jgpawletko has quit [Quit: jgpawletko]
<Youngmathimus0>
how would i, using gets to retrieve a users day,month and year of birth determine the day of year from their input
mistermocha has quit [Ping timeout: 260 seconds]
<Youngmathimus0>
i know how to get day of year with yday
<ilhami>
I want an Ubuntu phone :)
solars has joined #ruby
PedramT_ has quit [Remote host closed the connection]
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
roshanavand has joined #ruby
JoshGlzBrk has joined #ruby
<lucasb>
Time.new(gets, gets, gets).yday :D
<Youngmathimus0>
>.>
<ilhami>
Hehehehehe
<lucasb>
just kidding, it doesn't work :)
floror has quit [Quit: floror]
<ilhami>
:D:D:D:D:D:D::D:D:D
gregf has joined #ruby
<Youngmathimus0>
hah
<Youngmathimus0>
not sure i can use variables when doing yday
_ht has quit [Quit: Konversation terminated!]
<lucasb>
oops, it does work. I thought it wouldn't accept strings as arguments, but it accepts
einarj_ has quit [Read error: Connection reset by peer]
einarj has joined #ruby
Lildirt has joined #ruby
PD028300 is now known as haylon
andrewvos has quit [Ping timeout: 240 seconds]
PedramT has joined #ruby
<Youngmathimus0>
shit you're right
<Youngmathimus0>
it works
roshanavand has quit [Ping timeout: 272 seconds]
<Youngmathimus0>
thanks lucasb
dfinninger has quit [Remote host closed the connection]
dopie has quit [Ping timeout: 240 seconds]
dfinninger has joined #ruby
duncannz has joined #ruby
unl0ckd has quit [Quit: Bye!]
duncannz has quit [Max SendQ exceeded]
idefine has joined #ruby
duncannz has joined #ruby
william3 has quit [Remote host closed the connection]
duncannz has quit [Max SendQ exceeded]
veleno has joined #ruby
william3 has joined #ruby
duncannz has joined #ruby
duncannz has quit [Max SendQ exceeded]
duncannz has joined #ruby
duncannz has quit [Max SendQ exceeded]
dopamean_ has joined #ruby
moeabdol1 has quit [Ping timeout: 264 seconds]
renderfu_ has joined #ruby
<veleno>
hello (again). any eagle-eye around can understand why in these 2 snippts https://gist.github.com/vschiavoni/344d76a34914bcff22f6 the a.rb version produces an invalid string at line 10 ?the b.rb is the previous (slower) version of the same piece of code
william3 has quit [Remote host closed the connection]
duncannz has joined #ruby
s00pcan_ has quit [Ping timeout: 256 seconds]
duncannz has quit [Max SendQ exceeded]
s00pcan_ has joined #ruby
idefine has quit [Ping timeout: 248 seconds]
psmolen has joined #ruby
william3 has joined #ruby
dopamean1 has quit [Ping timeout: 240 seconds]
<Ox0dea>
veleno: Why are you treating your structured data as text?
<Ox0dea>
require 'json'
sandstrom has quit [Quit: My computer has gone to sleep.]
<shevy>
Youngmathimus0 you have to parse that input into some time/date object, then you can do .year for instance
<shevy>
cool... never saw yday before
<shevy>
is that the doomsday?
<Youngmathimus0>
heh
<Youngmathimus0>
just the numbered day of the year
renderful has quit [Ping timeout: 272 seconds]
baweaver has joined #ruby
larsk has joined #ruby
NeckBeardPrince has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
marxarelli is now known as marxarelli|afk
synthroid has quit []
platzhirsch has left #ruby [#ruby]
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Ox0dea>
_why day > #yday
edwinvdgraaf has joined #ruby
floror has joined #ruby
sanguisdex has joined #ruby
blackmesa has joined #ruby
Limix has quit [Quit: Limix]
<sanguisdex>
Hi question about guard. I can see the plug-in that I want to use when I run guard list, but when I try to run the guard init script it reurns and error about not being able to find the plug-in class. is there a process I am missing between installing the gem and running init?
ryanw|away is now known as ryanwinchester
zacstewart has quit [Ping timeout: 272 seconds]
floror has quit [Client Quit]
pawnbox has joined #ruby
KensoDev has quit [Ping timeout: 272 seconds]
ico has joined #ruby
Xeago has quit [Remote host closed the connection]
ElFerna_ has quit [Ping timeout: 240 seconds]
stannard has quit [Read error: Connection reset by peer]
pawnbox has quit [Ping timeout: 240 seconds]
lemur has joined #ruby
<Ox0dea>
sanguisdex: Did you... install that plugin?
tomchapin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
arlek has quit [Ping timeout: 256 seconds]
shadoi has quit [Quit: Leaving.]
einarj has quit [Read error: Connection reset by peer]
<Ox0dea>
sanguisdex: Can you say which plugin you're trying to use?
aegis3121 has quit [Ping timeout: 240 seconds]
yalue has quit [Quit: return 0;]
atomical has joined #ruby
I has joined #ruby
aegis3121 has joined #ruby
<sanguisdex>
Ox0dea, yes I installed the plugin in my users gem dir, I tried both bundle install and gem install. When I run `guard list` I can see that it is there, but not in my Guardfile. when I try to run `guard init jshit-node` I get en error that it can not load or find the Class/ method
<Ox0dea>
sanguisdex: You're misspelling it. :P
lemur has quit [Ping timeout: 256 seconds]
I is now known as Guest99953
einarj has joined #ruby
FooMunki has quit [Quit: FooMunki]
aswen has quit [Quit: WeeChat 1.4]
FooMunki has joined #ruby
<sanguisdex>
Ox0dea: even when I spell it correctly (via copy and paste from the gems readme file) it fails.
kobain has joined #ruby
x77686d has joined #ruby
* sanguisdex
has to sign off but will be back in 10-15 mins
stannard has joined #ruby
<Ox0dea>
sanguisdex: Ah, well, I found the problem.
<Youngmathimus0>
always forget to hit save. it changes the link
<hanmac>
ironcamel: because that upcase! does change the sting itself, and creating a new array is pointless ... and upcase! does return nil when nothing is changed
william3 has quit [Ping timeout: 240 seconds]
<ironcamel>
but i'm doing the exact same assignment twice
<ironcamel>
both times i'm doing the destructive upcase!
<Ox0dea>
The #upcase! is applying the first time (because there are characters to capitalize), but then it doesn't apply the second time since they're all capital.
<shevy>
how heavy would a camel be that is made out of iron
flughafen_ has quit [Ping timeout: 240 seconds]
YR has quit [Ping timeout: 252 seconds]
william3 has joined #ruby
schpn has joined #ruby
<hanmac>
ironcamel: yes but you call the destructive method on the String object, not on the Array
<Youngmathimus0>
i have ruby installed lol, just like to much around in the console and share with people
<Youngmathimus0>
muck*
<hanmac>
first does change the array with new strings
<hanmac>
second does make a new array but with changed strings
<ironcamel>
hanmac: neat
solocshaw has joined #ruby
<hanmac>
Youngmathimus0: question: when you are using "date" why not directly using the Date class and their functions too? because "date1 - date2" does return the diff in days
scripore has quit [Quit: This computer has gone to sleep]
<Youngmathimus0>
uhmm
benlieb has quit [Quit: benlieb]
<Youngmathimus0>
:)
<Youngmathimus0>
good point
ponga has quit [Quit: Connection closed for inactivity]
intrigueD has quit [Remote host closed the connection]
NeckBeardPrince has joined #ruby
scripore has joined #ruby
NeckBeardPrince has quit [Max SendQ exceeded]
<hanmac>
Youngmathimus0: also checkout Date::parse so you can do it that the user can enter "dd.mm.yyyy" (or what ever format you use)
NeckBeardPrince has joined #ruby
william3 has quit [Remote host closed the connection]
<adaedra>
If you have a determined format, Use Date.strptime, not parse.
pawnbox has joined #ruby
stevemackinnon has joined #ruby
Limix has joined #ruby
JoshGlzBrk has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
postmodern has joined #ruby
armyriad has quit [Ping timeout: 260 seconds]
armyriad has joined #ruby
hobodave has quit [Quit: Computer has gone to sleep.]
pawnbox has quit [Ping timeout: 250 seconds]
baweaver has joined #ruby
haylon has left #ruby ["WeeChat 1.3"]
benlieb has joined #ruby
sanguisdex has joined #ruby
baweaver has quit [Ping timeout: 240 seconds]
Mon_Ouie has quit [Ping timeout: 250 seconds]
hahuang61 has quit [Ping timeout: 240 seconds]
stannard has joined #ruby
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
<sanguisdex>
well I am back it took longer than I thought due to walking into a house with an upset daughter
<sanguisdex>
Ox0dea: any thoughts on why guard would show the plug in in the list output but not be able to init it?
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Ox0dea>
sanguisdex: The class is improperly capitalized. :/
btwebdev has quit [Ping timeout: 252 seconds]
kmckelvin has joined #ruby
<Ox0dea>
I'm sure it worked at some point, but Guard has since changed how it loads code, and this plugin hasn't been updated accordingly.
<sanguisdex>
Ox0dea: ahhh
<sanguisdex>
that makes sense
sdothum has joined #ruby
KensoDev has joined #ruby
baweaver has joined #ruby
<hays>
is it completely unnecessary to have #{foo.to_s}
<hays>
vs. just #{foo}
PedramT has quit []
stannard has quit [Ping timeout: 276 seconds]
<Ox0dea>
hays: Yep.
<Ox0dea>
>> class Foo; def to_s; "ohai"; end end; "#{Foo.new}"
hashrocket has quit [Quit: Connection closed for inactivity]
<User1234>
mozzarella
<havenwood>
User1234: mruby is nice but your wallhack isn't really about Ruby at all, there's probably a better gaming community channel to discuss
<User1234>
hmm
<havenwood>
hays: yeah, pretty good
<User1234>
no my question is can i make ruby hacks for a game made in c
<User1234>
or python
<User1234>
?
<havenwood>
mozzarella: yes, if you use the default installation location
<User1234>
that doesnt seem easy
s00pcan_ has quit [Remote host closed the connection]
<havenwood>
User1234: You can embed mruby in C or Python. But this isn't a good question for this channel.
<User1234>
tnx
<User1234>
you helped enough
<User1234>
:)
<User1234>
what channel?
<havenwood>
?offtopic User1234
<ruby[bot]>
User1234: this seems to be off-topic. Please move your discussion to #ruby-offtopic, to keep this channel free for Ruby related problems. Thanks!
nettoweb has joined #ruby
lucasb has quit [Quit: leaving]
<User1234>
hmm ok
einarj has quit [Remote host closed the connection]
<johnmilton>
python is pretty close to c, and you compile it as c code...you might as well you that for such a task User1234
<johnmilton>
use the best tool for the job
<johnmilton>
s/compile/can compile
inhwrb has quit [Quit: Page closed]
<User1234>
i was refering to ruby embeding
<User1234>
into python
pandaant has joined #ruby
ElFerna_ has joined #ruby
stevemackinnon has quit [Remote host closed the connection]
trinaldi has joined #ruby
Guest38 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
s00pcan has quit [Ping timeout: 264 seconds]
hahuang61 has joined #ruby
<Canar>
o.O johnmilton
ljames has quit [Remote host closed the connection]
<Canar>
User1234: Ruby embeds without much difficulty, AFAIK.
<Canar>
vim, for example, has a ruby script module, as does weechat