<Dairenn_>
I literally just noticed that seems to be the one people are using instead.
<Dairenn_>
But it seems to require libgit2?
trosborn has joined #ruby
anisha has quit [Ping timeout: 240 seconds]
trosborn has quit [Client Quit]
ICantCook has quit [Quit: bye]
ICantCook has joined #ruby
zenguy_pc has joined #ruby
bruno-_ has quit [Ping timeout: 240 seconds]
Icey has quit [Ping timeout: 252 seconds]
ramfjord_ has joined #ruby
Jardayn has quit [Read error: Connection reset by peer]
ramfjord has quit [Ping timeout: 260 seconds]
bryanray has joined #ruby
Cyther_ has quit [Quit: Leaving]
<jhass>
Dairenn_: doesn't it vendor that in even? like nokogiri libxml2 these days?
Cyther has joined #ruby
<Dairenn_>
Yeah it might; it's just that what I'm writing had to work on kind of an older, "frozen" version of Linux so I'm trying to have to worry about too many dependencies.
skade has quit [Quit: Computer has gone to sleep.]
bastion has quit [Read error: Connection reset by peer]
nemo_ has joined #ruby
<arup_r>
no.. I did to you experts!!!
<arup_r>
You guys made ruby Rock!!
bastion has joined #ruby
artmann has joined #ruby
norc has joined #ruby
<norc>
Hi, I have written a proof of concept library that interfaces with various network interfaces for statistics aggregation and provisioning.
papercode has joined #ruby
nemo__ has quit [Ping timeout: 246 seconds]
<norc>
Since I want to develop the real thing, I would like to start off with rspec early on. Obviously I will need to mock/stub a lot of these interfaces (since they would require hardware on the other hand for testing)
idefine has joined #ruby
kp666 has joined #ruby
kp666 has quit [Max SendQ exceeded]
<norc>
So Im looking for some resource that guides me through the process of mocking/stubbing these interfaces in the early development phase.
jessemcgilallen has quit [Quit: jessemcgilallen]
kp666 has joined #ruby
lsmola_ has quit [Ping timeout: 240 seconds]
shoutsid has joined #ruby
EllisTAA has joined #ruby
EllisTAA has quit [Client Quit]
GriffinHeart has joined #ruby
idefine has quit [Ping timeout: 240 seconds]
dopie has joined #ruby
n008f4g_ has joined #ruby
yfeldblum has quit [Ping timeout: 240 seconds]
gustav_ has quit [Remote host closed the connection]
kp666 has quit [Read error: Connection reset by peer]
firstdayonthejob has quit [Ping timeout: 240 seconds]
<certainty>
norc: add an abstraction barrier that you own, which you can then mock.
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
lsmola_ has joined #ruby
TomyWork has joined #ruby
contradictioned has quit [Remote host closed the connection]
<norc>
certainty: I just cannot figure out how to do this design wise.
last_staff has joined #ruby
mdih has joined #ruby
krz has quit [Read error: Connection reset by peer]
<certainty>
norc: you certainly know which messages your interfaces will need to respond to, no?
mistermocha has quit [Remote host closed the connection]
yfeldblum has joined #ruby
skade has joined #ruby
danman has quit [Quit: danman]
nfk|laptop has joined #ruby
bMalum has joined #ruby
<norc>
certainty: Sure. I could simply record the responses from a hardware device to specific commands for my stubs
inteq has quit [Ping timeout: 256 seconds]
balazs has quit [Ping timeout: 265 seconds]
krz has joined #ruby
diegoviola has joined #ruby
ishikawa91 has quit [Quit: Connection closed for inactivity]
ruurd has joined #ruby
tkuchiki has quit [Remote host closed the connection]
andikr has joined #ruby
<certainty>
norc: yeah then categorize them and build tests for each category. be sure to include failure scenarios
skade has quit [Quit: Computer has gone to sleep.]
shoutsid has quit [Remote host closed the connection]
<v4n>
Me an my coworker wasted a lot of time debugging a memory leak in our rails app. It was being caused by zipruby. He has has created a list of Gems we are aware that leak memory: https://github.com/ASoftCo/leaky-gems
<v4n>
Might come handy!
tubuliferous_ has joined #ruby
lolmaus has joined #ruby
<mloy>
v4n, nice
<mloy>
v4n, have you submitted bug reports for any?
tubuliferous_ has quit [Max SendQ exceeded]
bruno- has quit [Ping timeout: 264 seconds]
<v4n>
mloy: the gem links in the readme file links to the bug reports
Ropeney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
stan has joined #ruby
<mloy>
v4n, oh awesome. I didn't check where the links pointed.
<mloy>
v4n, kudos to you and your coworker!
yardenbar has quit [Read error: Connection reset by peer]
yardenbar has joined #ruby
solocshaw has joined #ruby
lea has quit [Ping timeout: 240 seconds]
uber has quit [Ping timeout: 260 seconds]
futilegames has left #ruby [#ruby]
kimegede has joined #ruby
ncopa has joined #ruby
<ncopa>
hi
<ncopa>
does anybody know if CVE-2015-4020 fix is included in ruby 2.2.3?
Asher has quit [Quit: Leaving.]
<ncopa>
CVE-2015-4020 was introduced by the fix for CVE-2015-3900
adac has quit [Ping timeout: 240 seconds]
Ebok has quit [Read error: Connection reset by peer]
gustav_ has joined #ruby
tubuliferous_ has joined #ruby
astrobun_ has quit [Remote host closed the connection]
Alina-malina has quit [Ping timeout: 244 seconds]
shoutsid has joined #ruby
<Ox0dea>
ncopa: Are you not allowed to `gem up --sys`?
ta_ has quit [Quit: Leaving...]
xcesariox has joined #ruby
ta has joined #ruby
aufi has joined #ruby
aryaching has joined #ruby
ndrei has joined #ruby
brook has quit [Quit: HydraIRC -> http://www.hydrairc.com <- In tests, 0x09 out of 0x0A l33t h4x0rz prefer it :)]
lea has joined #ruby
jxs_ has joined #ruby
shai123bn has joined #ruby
<shai123bn>
Hi :) Can someone please point me to the documentation on Ruby 1.8.7 for the method 'first' of a hash object? Like: a.first
<ncopa>
Ox0dea: i am packaging ruby for alpine linux
GriffinHeart has quit [Remote host closed the connection]
bruno- has joined #ruby
<apeiros>
AxonetBE: why'd you care? the csv gem ensures the data is valid csv.
<apeiros>
a value would be double quoted if it contains one of the seperators
<AxonetBE>
for example, I work with phone numbers and the values are 0321752520 for example and when importing into excel he doesn't import the leading 0
<apeiros>
it might also be possible to force the csv gem to just quote all values. check the options.
<AxonetBE>
apeiros: yes force_quotes let's quote all the values, that is good but my 3rd party doesn't want to have quoted the header row
<apeiros>
AxonetBE: I doubt that'll change by quoting it. as far as I remember excel, you tell it that it's a text column, not a number column.
Igorshp has quit [Remote host closed the connection]
cwong_on_irc has joined #ruby
cwong_on_irc has quit [Max SendQ exceeded]
diegoaguilar has quit [Remote host closed the connection]
cwong_on_irc has joined #ruby
cwong_on_irc has quit [Max SendQ exceeded]
dmolina has joined #ruby
cwong_on_irc has joined #ruby
rodfersou has joined #ruby
rcs has quit [Ping timeout: 272 seconds]
Sou|cutter has quit [Ping timeout: 244 seconds]
<shevy>
orning
d34th4ck3r has quit [Quit: zzz]
ndrei has joined #ruby
aryaching has quit [Ping timeout: 256 seconds]
lea has joined #ruby
khebbie has joined #ruby
mary5030 has joined #ruby
GriffinHeart has quit [Remote host closed the connection]
jenrzzz has joined #ruby
cornerma1 has joined #ruby
zenguy_pc has joined #ruby
uber has joined #ruby
blaxter has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
cornerman has quit [Ping timeout: 268 seconds]
cornerma1 is now known as cornerman
trosborn has quit [Quit: trosborn]
mary5030 has quit [Ping timeout: 256 seconds]
Contigi has quit [Read error: Connection reset by peer]
stamina has joined #ruby
kraljev11 has joined #ruby
mdih has joined #ruby
dmolina has quit [Quit: Leaving.]
Pumukel has quit [Remote host closed the connection]
dviola has joined #ruby
minimalism has quit [Quit: leaving]
GriffinHeart has joined #ruby
jenrzzz has quit [Ping timeout: 256 seconds]
platzhirsch has joined #ruby
gustav_ has joined #ruby
Rickmasta has joined #ruby
David27 has quit [Ping timeout: 240 seconds]
pathrocle has joined #ruby
trosborn has joined #ruby
Akagi201_ has quit [Ping timeout: 260 seconds]
pwnd_nsfw has joined #ruby
Igorshp has joined #ruby
bnagy has joined #ruby
htmldrum has quit [Ping timeout: 240 seconds]
ldnunes has joined #ruby
mdih has quit [Read error: Connection reset by peer]
ahmetkapikiran has joined #ruby
Cyther has joined #ruby
hectortrope has quit [Read error: Connection reset by peer]
bruce_lee has joined #ruby
doddok has joined #ruby
Akagi201 has joined #ruby
diego1 has joined #ruby
diego1 has quit [Changing host]
diego1 has joined #ruby
diegoviola is now known as Guest33227
dviola has quit [Ping timeout: 250 seconds]
diego1 is now known as dviola
pdoherty has quit [Remote host closed the connection]
Guest33227 has quit [Quit: leaving]
zacts has quit [Read error: Connection reset by peer]
<apeiros>
AxonetBE: solved your issue?
<AxonetBE>
apeiros: not really
lubarch has joined #ruby
<apeiros>
you can try adding a leading ' to the value
<apeiros>
within excel, that's an indicator to treat it as a string value and the ' itself is not shown
<apeiros>
maybe it behaves that way too when importing
lubarch has quit [Client Quit]
raphagodoi has joined #ruby
zacts has joined #ruby
raphagodoi has left #ruby [#ruby]
kraljev11 has quit [Quit: kraljev11]
krz has quit [Quit: WeeChat 1.2]
allcentury has joined #ruby
spider-mario has joined #ruby
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
but3k4 has joined #ruby
dviola has quit [Ping timeout: 240 seconds]
CooloutAC has quit [Ping timeout: 252 seconds]
karapetyan has joined #ruby
Pupp3tm4st3r has quit [Remote host closed the connection]
CooloutAC has joined #ruby
ruurd has quit [Quit: ZZZzzz…]
ruurd has joined #ruby
trautwei_ has joined #ruby
hectortrope has joined #ruby
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
chridal has quit [Ping timeout: 240 seconds]
trosborn has quit [Quit: trosborn]
trautwein has quit [Ping timeout: 256 seconds]
khebbie_ has quit [Ping timeout: 240 seconds]
CooloutAC has quit [Ping timeout: 252 seconds]
soc42 has quit [Remote host closed the connection]
ruisantos has joined #ruby
khebbie has quit [Ping timeout: 264 seconds]
nemo__ has joined #ruby
_blizzy_ has joined #ruby
tkuchiki has quit [Remote host closed the connection]
lipoqil has joined #ruby
CooloutAC has joined #ruby
postmodern has quit [Quit: Leaving]
ruisantos has quit [Client Quit]
hanmac has quit [Ping timeout: 246 seconds]
pathrocle has quit [Remote host closed the connection]
pathrocle has joined #ruby
ruisantos has joined #ruby
nemo_ has quit [Ping timeout: 265 seconds]
dhjondoh1 has joined #ruby
decoponio has joined #ruby
dhjondoh has quit [Ping timeout: 250 seconds]
dhjondoh1 is now known as dhjondoh
_blizzy_ has quit [Read error: Connection reset by peer]
skade has joined #ruby
Fredrich_ has joined #ruby
mordocai has joined #ruby
Fredrich_ is now known as Nicola-1980
pathrocle has quit [Ping timeout: 240 seconds]
_blizzy_ has joined #ruby
karapetyan has quit [Ping timeout: 265 seconds]
bryanray has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mordocai has quit [Remote host closed the connection]
vigintas has quit [Ping timeout: 240 seconds]
karapetyan has joined #ruby
baroquebobcat has quit [Read error: Connection reset by peer]
Rollabunna has joined #ruby
ramfjord has joined #ruby
<shevy>
ruby ruby ruby ruby
bryanray has joined #ruby
lee-jon has joined #ruby
baroquebobcat has joined #ruby
vigintas has joined #ruby
hanmac has joined #ruby
sdothum has joined #ruby
ramfjord has quit [Ping timeout: 256 seconds]
Rollabunna has quit [Ping timeout: 260 seconds]
Pupp3tm4st3r has joined #ruby
gustav_ has quit [Remote host closed the connection]
<jhass>
ruby: No such file or directory -- ruby (LoadError)
gustav_ has joined #ruby
bryanray has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
yfeldblum has quit [Ping timeout: 246 seconds]
GriffinHeart has quit [Remote host closed the connection]
joonty has quit [Quit: joonty]
GriffinHeart has joined #ruby
Voker57 has joined #ruby
lee-jon has quit [Quit: lee-jon]
akem has quit [Read error: No route to host]
lee-jon has joined #ruby
akem has joined #ruby
ahmetkapikiran has quit [Quit: ahmetkapikiran]
<certainty>
shevy: what's weired about that?
jgt has joined #ruby
<certainty>
also note that this is probably not the best resource for what clojure is about. Due to the interop with awt. That's why there are so many (doto)
Igorshp has quit [Remote host closed the connection]
RandyT| has joined #ruby
vigintas has joined #ruby
bkxd has joined #ruby
RandyT has joined #ruby
n008f4g_ has quit [Ping timeout: 264 seconds]
RandyT^ has joined #ruby
RandyT_ has quit [Ping timeout: 250 seconds]
Alina-malina has quit [Ping timeout: 255 seconds]
RandyT_ has joined #ruby
RandyT- has quit [Ping timeout: 240 seconds]
RandyT- has joined #ruby
RandyTa has joined #ruby
RandyT| has quit [Ping timeout: 260 seconds]
Pumukel has joined #ruby
RandyT has quit [Ping timeout: 252 seconds]
joonty has joined #ruby
RandyT^ has quit [Ping timeout: 240 seconds]
gregf has quit [Quit: WeeChat 1.3]
RandyT| has joined #ruby
RandyT_ has quit [Ping timeout: 252 seconds]
RandyT has joined #ruby
RandyT- has quit [Ping timeout: 260 seconds]
Icey has joined #ruby
<yorickpeterse>
hi
RandyTa has quit [Ping timeout: 240 seconds]
prestorium has joined #ruby
RandyT_ has joined #ruby
atomical has joined #ruby
_joes__ has joined #ruby
RandyT- has joined #ruby
bkxd has quit [Ping timeout: 260 seconds]
RandyT^ has joined #ruby
Alina-malina has joined #ruby
RandyTa has joined #ruby
RandyT| has quit [Ping timeout: 256 seconds]
RandyT has quit [Ping timeout: 240 seconds]
RandyT has joined #ruby
ahmetkapikiran has joined #ruby
RandyT| has joined #ruby
RandyT_ has quit [Ping timeout: 255 seconds]
[BNC]WizJin has joined #ruby
RandyT_ has joined #ruby
dhjondoh has quit [Quit: dhjondoh]
RandyT- has quit [Ping timeout: 256 seconds]
dhjondoh has joined #ruby
RandyT- has joined #ruby
dhjondoh has quit [Client Quit]
zenguy_pc has quit [Ping timeout: 268 seconds]
dhjondoh has joined #ruby
RandyTb has joined #ruby
idefine has joined #ruby
RandyT^ has quit [Ping timeout: 272 seconds]
RandyTa has quit [Ping timeout: 255 seconds]
RandyT has quit [Ping timeout: 244 seconds]
RandyT^ has joined #ruby
nateberkopec has joined #ruby
RandyT has joined #ruby
RandyT| has quit [Ping timeout: 240 seconds]
RandyT_ has quit [Ping timeout: 256 seconds]
stamina has quit [Ping timeout: 244 seconds]
RandyT_ has joined #ruby
[BNC]WizJin has quit [Excess Flood]
synthroid has joined #ruby
RandyT- has quit [Ping timeout: 260 seconds]
ushbkk has joined #ruby
RandyT| has joined #ruby
RandyT- has joined #ruby
stamina has joined #ruby
kraljev11 has joined #ruby
RandyTb has quit [Ping timeout: 268 seconds]
idefine has quit [Ping timeout: 272 seconds]
RandyT^ has quit [Ping timeout: 250 seconds]
WizJin has joined #ruby
RandyT has quit [Ping timeout: 250 seconds]
nemo__ has quit [Remote host closed the connection]
RandyT has joined #ruby
lee-jon has quit [Quit: lee-jon]
Rollabunna has joined #ruby
RandyT^ has joined #ruby
RandyT_ has quit [Ping timeout: 240 seconds]
diegobiavati has joined #ruby
RandyT- has quit [Ping timeout: 240 seconds]
RandyT| has quit [Ping timeout: 268 seconds]
RandyT_ has joined #ruby
<Icey>
hi
RandyT- has joined #ruby
<jhass>
hi
RandyT| has joined #ruby
RandyT has quit [Ping timeout: 264 seconds]
<ddv>
hi
RandyT has joined #ruby
<Icey>
so welcoming in here today ;-)
RandyTa has joined #ruby
RandyT^ has quit [Ping timeout: 256 seconds]
RandyT^ has joined #ruby
nemo_ has joined #ruby
RandyT- has quit [Ping timeout: 240 seconds]
RandyT_ has quit [Ping timeout: 268 seconds]
darkhex has joined #ruby
RandyT_ has joined #ruby
RandyT| has quit [Ping timeout: 240 seconds]
jenrzzz has joined #ruby
RandyT has quit [Ping timeout: 255 seconds]
zotherst1 has quit [Quit: WeeChat 1.2]
RandyTa has quit [Ping timeout: 240 seconds]
khebbie has joined #ruby
gusTester has joined #ruby
khebbie_ has joined #ruby
dnewkerk has joined #ruby
`tim` has joined #ruby
Igorshp has joined #ruby
RandyT^ has quit [Ping timeout: 264 seconds]
<yorickpeterse>
:P
RandyT has joined #ruby
zotherstupidguy has joined #ruby
lkba has joined #ruby
RandyT_ has quit [Ping timeout: 260 seconds]
RandyT_ has joined #ruby
diegoviola has joined #ruby
jenrzzz has quit [Ping timeout: 260 seconds]
lkba_ has quit [Ping timeout: 240 seconds]
RandyT has quit [Ping timeout: 240 seconds]
diegoviola has quit [Read error: Connection reset by peer]
kraljev11 has quit [Ping timeout: 255 seconds]
gustav_ has quit [Remote host closed the connection]
haylon has joined #ruby
mbeasley has left #ruby ["WeeChat 0.4.2"]
RandyT_ has quit [Ping timeout: 264 seconds]
Ropeney has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
kraljev11 has joined #ruby
matp has quit [Ping timeout: 246 seconds]
khebbie has quit [Ping timeout: 265 seconds]
Ropeney has quit [Client Quit]
khebbie_ has quit [Ping timeout: 264 seconds]
skade has joined #ruby
wpp has quit [Ping timeout: 246 seconds]
gustav_ has joined #ruby
cwong_on_irc has quit [Quit: Leaving.]
gregf has joined #ruby
karapetyan has quit [Remote host closed the connection]
diegoaguilar has joined #ruby
karapetyan has joined #ruby
lolmaus has quit [Quit: Konversation terminated!]
allcentury has quit [Ping timeout: 246 seconds]
aryaching has joined #ruby
Melpaws has quit [Remote host closed the connection]
karapetyan has quit [Remote host closed the connection]
karapetyan has joined #ruby
GriffinHeart has quit [Remote host closed the connection]
dviola has joined #ruby
<norc>
Hi, I want to read from a couple hundred devices simultaneously, while pushing the results (slightly transformed) to our REST API.
matp has joined #ruby
sgambino has joined #ruby
<norc>
For now I use thread pool from the gem 'thread'
<jhass>
"devices"?
<norc>
jhass: Things on our network. Its all behind my libraries.
<norc>
As for my question:
GriffinHeart has joined #ruby
gusTester has left #ruby [#ruby]
<norc>
Given that, I was thinking of maintaining two thread pools, one to aggregate data from those devices, pushing the results into a worker queue
khebbie_ has joined #ruby
<norc>
with a second thread pool continuously clearing that queue into the API
n008f4g_ has joined #ruby
<norc>
(The read speed greatly exceeds the rate at which I can write to my REST API)
<norc>
Is this so far a bad concept?
iceden has quit [Ping timeout: 252 seconds]
<jhass>
so this is all HTTP or ...?
<norc>
Nope.
<norc>
The devices use their own protocol - but I have that implemented already.
<norc>
The REST API is HTTP however.
<jhass>
mmh
pathrocle has joined #ruby
<jhass>
well, you can probably get away with a single consumer that pushes things to a typhoeus hydra
<jhass>
that thing has an astonishing performance
toy_ has joined #ruby
zenguy_pc has joined #ruby
lxsameer has quit [Quit: Leaving]
<norc>
My API might not appreciate being bombarded with HTTP requests. I have already successfully DoS'ed the server (even SSH failed) with HTTP. ;-)
AxonetBE has quit [Quit: AxonetBE]
<jhass>
if you're not on +100% CPU already having a separate queue for each producer and the consumer iterating over these without blocking on them might help (or not and that busy loop makes everything worse actually, that's the thing with concurrency applications, you need to try out a few concepts)
<jhass>
well, you asked about scaling out the consumer side..
toy has quit [Ping timeout: 246 seconds]
<norc>
mm
big|bad|wolf has joined #ruby
rwilcox_ has joined #ruby
gustav_ has quit [Remote host closed the connection]
ahmetkapikiran has quit [Quit: ahmetkapikiran]
tomaz_b has quit [Ping timeout: 244 seconds]
<jhass>
so you're already capable of exhausting the targets resources
<norc>
jhass: Well, actually I already have something implemented, I just struggle with some basic concepts how to resolve exiting everything
<jhass>
what exactly do you seek to improve?
<norc>
jhass: That remark was actually about hydra in particular.
diegoaguilar has quit [Ping timeout: 240 seconds]
<jhass>
I don't follow how it's not relevant in general though
krz has joined #ruby
<norc>
You have a good point.
<norc>
A single consumer would greatly simplify things.
_blizzy_ has quit [Ping timeout: 244 seconds]
demonlove has joined #ruby
mag42c has joined #ruby
Igorshp has quit [Remote host closed the connection]
aganov has quit [Remote host closed the connection]
<apeiros>
microx: #local_variables does not work that way.
joonty has quit [Quit: joonty]
<microx>
apeiros: How does it work then?
Alayde has joined #ruby
<bigmac_>
apeiros: if you had one look all my projects, you could turn 3000 lines into 3...
<apeiros>
microx: it does not make sense to call it on a receiver. no matter on what object you call it, it will always return the same.
<microx>
apeiros: What's the lexical context at the top level? Isn't it the Object class?
joonty has joined #ruby
<apeiros>
microx: you could do `x = "hi"; "whatever".send(:local_variables)`
<apeiros>
as said, the lexical context is relevant, not the receiver.
khebbie has joined #ruby
yashinbasement has quit [Ping timeout: 240 seconds]
<apeiros>
microx: no, lexical context is orthogonal to objects.
khebbie_ has joined #ruby
<apeiros>
or is it? hm…
<apeiros>
microx: anyway, only some things start a new lexical context. examples: `class`, `module`, `def`. to a degree blocks do too. being closures, they're a bit special, though.
Motoservo has quit [Quit: Motoservo]
<apeiros>
so *until* your code reaches one of those keywords, your lexical scope won't change.
<apeiros>
so your lvars are not related to an object, but to a place in the code.
yitsushi has joined #ruby
balazs has quit [Ping timeout: 265 seconds]
null__ has quit [Quit: void]
<apeiros>
caliostro: hi there too :)
karapetyan has joined #ruby
dravine_ has joined #ruby
microx has quit [Ping timeout: 246 seconds]
shmilan has joined #ruby
dravine has quit [Ping timeout: 252 seconds]
dravine_ is now known as dravine
big|bad|wolf has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
roshanav_ has joined #ruby
idefine has quit [Remote host closed the connection]
vkey1 has joined #ruby
roshanavand has quit [Read error: Connection reset by peer]
demonlove has joined #ruby
vkey1 has quit [Client Quit]
bjaX has joined #ruby
DroidBurgundy has joined #ruby
rezas has joined #ruby
<rezas>
hi
<jhass>
hi
<zwdr>
hey
<rezas>
anybody knows a service to analyzie Gemfiles and gives report about Gems compatibility after a ruby or rails update ?
<rezas>
ex. version x of foo gem is not supported in y version of ruby or rails , latest compatible version is m
karapetyan has quit [Remote host closed the connection]
<jhass>
well, that's hard to assess automatically
umgrosscol has joined #ruby
idefine has joined #ruby
<jhass>
if not impossible
doublemalt__ has joined #ruby
mary5030 has joined #ruby
<rezas>
dependency handeling?
mary5030 has quit [Remote host closed the connection]
<apeiros>
as far as it is written in the gemspec itself, bundler will already tell you
gustav_ has quit [Remote host closed the connection]
mary5030 has joined #ruby
<rezas>
hmmm
blackmesa has quit [Ping timeout: 240 seconds]
<rezas>
any ideas about using rubygems.org API for doing this ?
mary5030 has quit [Remote host closed the connection]
mary5030 has joined #ruby
tvon has joined #ruby
teclator has quit [Ping timeout: 260 seconds]
chrissonar has quit [Remote host closed the connection]
Pupp3tm4st3r has quit [Remote host closed the connection]
Cache_Money has quit [Quit: Cache_Money]
tenderlove has quit [Read error: Connection reset by peer]
null__ has joined #ruby
null__ has quit [Changing host]
null__ has joined #ruby
shmilan has joined #ruby
David27 has quit [Remote host closed the connection]
nettoweb has quit [Ping timeout: 256 seconds]
blaxter has joined #ruby
IrishGringo has quit [Remote host closed the connection]
davedev24 has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
Coldblackice has joined #ruby
tjohnson has joined #ruby
teclator has joined #ruby
ramfjord has joined #ruby
ndrei has joined #ruby
axl_ has joined #ruby
tenderlove has joined #ruby
skade has joined #ruby
<akahn>
I want to start a webrick server in a thread and then wait until the server is listening before making requests to it in my main thread. how would I go about doing that?
TomyWork has quit [Remote host closed the connection]
dfinninger has joined #ruby
tenderlove has quit [Ping timeout: 256 seconds]
<agentmeerkat>
Futures looks neat, but it also looks very alpha, not even beta - "Edge features are under active development and may change frequently."
chouhoul_ has quit [Remote host closed the connection]
trautwei_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
chouhoulis has joined #ruby
<havenwood>
agentmeerkat: I just point there since I'm not sure what akahn wants exactly and the new edge futures combines concepts from Promise, IVar, Probe, etc.
shoutsid has quit [Remote host closed the connection]
<havenwood>
micro, left already? Anyways, :is_a != :is_a?
<Ox0dea>
Rennex: Are you sure you need another Enumerator?
Motoservo has joined #ruby
rbowlby has joined #ruby
bruno- has quit [Ping timeout: 252 seconds]
SCHAAP137 has joined #ruby
SCHAAP137 has joined #ruby
Couch has quit [Ping timeout: 252 seconds]
<Rennex>
Ox0dea: yes, unless i change the method that takes an enumerator and processes stuff coming out of it
The_Phoenix1 has joined #ruby
bruno- has joined #ruby
aldodelgado has quit [Quit: aldodelgado]
bruno- is now known as Guest51375
ruurd has quit [Quit: ZZZzzz…]
aryaching has quit [Read error: Connection reset by peer]
The_Phoenix has quit [Ping timeout: 256 seconds]
ferr has joined #ruby
shmilan has joined #ruby
Icey has quit [Ping timeout: 265 seconds]
Pupeno has joined #ruby
mrtomme has quit [Ping timeout: 260 seconds]
iceden has joined #ruby
mrtomme has joined #ruby
joonty has quit [Quit: joonty]
wldcordeiro has joined #ruby
aryaching has joined #ruby
amclain has joined #ruby
purplexed^ has joined #ruby
Guest51375 has quit [Ping timeout: 260 seconds]
axl_ has quit [Quit: axl_]
pdoherty has joined #ruby
tenderlove has quit [Read error: Connection reset by peer]
bruno-_ has joined #ruby
towski_ has joined #ruby
<purplexed^>
hi. I'm having trouble with http://pastebin.com/1Ax2cAPQ ... on line 17 I am setting a variable to a value from a class. But for some reason the program doesn't do anything after that line. If I remove it, it runs normally.. You can see the class at the bottom. Anyone know what I am doing wrong ?
<Rennex>
Ox0dea: well the only reason i wanted map() was to filter incoming values from an enumerator
ndrei has joined #ruby
rcvalle has joined #ruby
Rodya_ has quit [Quit: Leaving...]
<jhass>
purplexed^: ah, I see what's going on. Please add Thread.abort_on_exception = true at the top of your script
tenderlove has quit [Read error: Connection reset by peer]
idefine has joined #ruby
<purplexed^>
hmmm, interesting. Now it kills the connection right away
<Rennex>
Ox0dea: also... my method read_receipts() takes an enumerator (of lines of text) and finds receipts in it. Now, since it takes a parameter, it can't "return enum_for(:read_receipts) unless block_given?" :P
p0wn3d has joined #ruby
<jhass>
purplexed^: read the output of where you run your script
senayar has quit []
tubuliferous_ has joined #ruby
<Rennex>
Ox0dea: so i have to call it with a block, or put the function in class Enumerator so that i can call linesource.read_receipts.whatever
soc42 has quit [Remote host closed the connection]
<Rennex>
it'd be great if a method could return, you know, "itself" as an enum, instead of relying on Kernel.enum_for to call it and thus lose the ability to take arguments
<jason^>
agentmeerkat: graphing library would be good to throw random dates/times and temperatures on a graph
NeverDie has joined #ruby
<purplexed^>
jhass: does it make sense that I should use class level variables, instead of what I am doing ?
linduxed has joined #ruby
mikecmpbll has quit [Quit: i've nodded off.]
hmsimha has quit [Ping timeout: 265 seconds]
<purplexed^>
i mean prefix HELO, and CONSOLE with @@
<jhass>
no
<jhass>
not at all
<purplexed^>
ok
<jhass>
the valid usecases for class variables are very very rare
eminencehc has quit [Remote host closed the connection]
<purplexed^>
so, the class definition looks correct ?
`tim` has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Ebok has joined #ruby
bmurt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bryanray has joined #ruby
ndrei has quit [Ping timeout: 264 seconds]
ferr has quit [Ping timeout: 252 seconds]
<purplexed^>
ohhhh
<purplexed^>
the class isn't defined yet, because it's below the other code
Jardayn has joined #ruby
kalusn has quit [Remote host closed the connection]
britt_ has quit [Quit: Be back later ...]
<purplexed^>
yes, now it works
mistermocha has joined #ruby
<purplexed^>
thanks again
iceden has quit [Ping timeout: 272 seconds]
aRaym has joined #ruby
<purplexed^>
i should go learn how to include other classes now, so it's not just one file
yitsushi has joined #ruby
Hounddog has quit [Read error: Connection reset by peer]
aRaym has left #ruby [#ruby]
aRaym has joined #ruby
Contigi has joined #ruby
spastorino has quit []
spastorino has joined #ruby
Sou|cutter has joined #ruby
mistermocha has quit [Remote host closed the connection]
yitsushi has quit [Read error: Connection reset by peer]
<pipework>
jhass: I haven't seen a really good use of class variables before. I've only seen silly shortcuts taken to not extract an object to share and then you're suddenly using inheritance to use the shortcut.
c0m0 has quit [Ping timeout: 240 seconds]
caliostro has quit [Quit: Exit-Chat]
<pipework>
Do you know of any really good use cases for a class variable? I can't even find one on the internets.
<jhass>
no, but I can't prove non-existence
rodfersou|lunch is now known as rodfersou
vollov_ has quit [Quit: Leaving...]
ruurd has quit [Quit: ZZZzzz…]
<apeiros>
if class variables were only shared across a class and its instances. that'd be jolly nice :-/
synthroid has joined #ruby
<jhass>
apeiros: you mean like it is in Crystal? :P
<Ox0dea>
pipework: "Module variables" do occasionally prove useful, and they're really just class variables, so there's that.
roshanavand has joined #ruby
sarlalian has joined #ruby
<apeiros>
jhass: you could write a generator for that
Pumukel has quit [Ping timeout: 265 seconds]
<pipework>
Ox0dea: I'm looking for a use case that really says that I need a class variable for it.
* apeiros
says something he doesn't like about ruby, generator says "that's been done better in crystal!"
Icey has joined #ruby
mistermocha has joined #ruby
<jhass>
:P
tenderlove has joined #ruby
<pipework>
Maybe tenderlove has had a use case that demanded a class variable and all its behaviour!
<Ox0dea>
gems $ ag @@ | wc -l
<Ox0dea>
821
<Ox0dea>
pipework: ^ Maybe do some exploring of that variety.
<jhass>
apeiros: tbf it doesn't have class level instance vars, so it would really suck if it were otherwise
<pipework>
Ox0dea: Hm, might not be a bad idea there.
Puffball has quit [Remote host closed the connection]
shoutsid has quit [Remote host closed the connection]
<tobiasvl>
ibouvousaime: specifically, Hash.new(0) will use 0 as the default value instead of nil
<ibouvousaime>
Ox0dea, so how could I fix it, Im on my first day on ruby tbh
<ibouvousaime>
?*
<Ox0dea>
ibouvousaime: But you were here yesterday?
<ibouvousaime>
I was about to start
`tim` has joined #ruby
<ibouvousaime>
so I was asking on the IDEs
<tobiasvl>
I gave you the solution above
<ibouvousaime>
before going to bed
<ibouvousaime>
I wrote frequence my mistake instead of numberoftimes, I fixed that but it wasnt the main problem apparently
<ibouvousaime>
tobiasvl,
ruurd has joined #ruby
blueOxigen has joined #ruby
<Ox0dea>
ibouvousaime: `foo += bar` is "syntactic sugar" for `foo = foo + bar`.
Rollabunna has quit [Quit: Leaving...]
danman has quit [Quit: danman]
DroidBur_ has quit []
<Ox0dea>
Keying into a Hash with a nonexistent key returns `nil`, so `foo[bar] += baz` invokes `foo[bar] = foo[bar] + baz`, and since `bar` isn't a valid key into `foo`, that becomes `nil + baz` and you get a NoMethodError.
karapetyan has joined #ruby
<Ox0dea>
>> nil.to_respond_to? :+
<ruboto>
Ox0dea # => undefined method `to_respond_to?' for nil:NilClass (NoMethodError) ...check link for more (https://eval.in/454916)
roshanav_ has quit [Remote host closed the connection]
tenderlove has quit [Client Quit]
jenrzzz has quit [Ping timeout: 252 seconds]
s2013 has joined #ruby
stamina has quit [Quit: WeeChat 1.3]
<dotrb>
for the life of me i cant seem to build a string out of two variables within this loop in irb, lol
Guest95790 is now known as nw1
nw1 is now known as nw2
nw2 is now known as nw3
nw3 is now known as nw4
bMalum has joined #ruby
diego2 has joined #ruby
weaksauce has joined #ruby
diego2 has quit [Changing host]
diego2 has joined #ruby
kirun has joined #ruby
diego2 has quit [Client Quit]
<dotrb>
what did i do wrong in there
m8 has quit [Quit: Sto andando via]
diegoviola has quit [Ping timeout: 250 seconds]
aspiers has joined #ruby
tenderlove has joined #ruby
whippythellama has joined #ruby
diegoviola has joined #ruby
tenderlove has quit [Client Quit]
<dotrb>
whoops.. irl the loop doestnt have a trailing slash within the single quotes
tenderlove has joined #ruby
tenderlove has quit [Changing host]
tenderlove has joined #ruby
tenderlove has quit [Client Quit]
shoutsid has quit [Remote host closed the connection]
tenderlove has joined #ruby
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<jhass>
>> (0..255).each {|i| v = i.to_s(16); print "\\x#{v}" } # probably not the output you're expecting, but...
<ruboto>
jhass # => \x0\x1\x2\x3\x4\x5\x6\x7\x8\x9\xa\xb\xc\xd\xe\xf\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c ...check link for more (https://eval.in/454929)
tenderlove has quit [Client Quit]
shoutsid has joined #ruby
tenderlove has joined #ruby
<dotrb>
jhass: you rock.
<dotrb>
jhass: thank you
<dotrb>
exactly the output i want :)
tenderlove has quit [Client Quit]
tkuchiki has quit [Read error: Connection reset by peer]
<dotrb>
oh, escaping the escape chars, lol
<dotrb>
QE
d5sx43 has quit [Remote host closed the connection]
<jhass>
>> (0..255).each {|i| print "\\x#{i.to_s(16)}" } # could condense it a little
<ruboto>
jhass # => \x0\x1\x2\x3\x4\x5\x6\x7\x8\x9\xa\xb\xc\xd\xe\xf\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c ...check link for more (https://eval.in/454930)
tenderlove has joined #ruby
<adaedra>
mh
<dotrb>
whoah, that was rad
symbol_ has joined #ruby
tenderlove has quit [Client Quit]
<adaedra>
>> (0..255).each do { |i| print("\\x%x" % i) }
<ruboto>
adaedra # => /tmp/execpad-323584f6b23f/source-323584f6b23f:2: syntax error, unexpected '|', expecting '}' ...check link for more (https://eval.in/454931)
<ruboto>
adaedra # => \x0\x1\x2\x3\x4\x5\x6\x7\x8\x9\xa\xb\xc\xd\xe\xf\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c ...check link for more (https://eval.in/454932)
<dotrb>
adaedra: thanks!
<jhass>
>> 255.times {|i| print "\\x%x" % i }
<ruboto>
jhass # => \x0\x1\x2\x3\x4\x5\x6\x7\x8\x9\xa\xb\xc\xd\xe\xf\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c ...check link for more (https://eval.in/454933)
<Ebok>
lol
troulouliou_div2 has quit [Remote host closed the connection]
<dotrb>
i need to find a good ruby text book
symbol has quit [Ping timeout: 260 seconds]
tenderlove has joined #ruby
gustav__ has joined #ruby
hooper has joined #ruby
tenderlove has quit [Changing host]
tenderlove has joined #ruby
hooper has quit [Max SendQ exceeded]
uber has quit [Ping timeout: 240 seconds]
nw4 is now known as nw1
nw1 is now known as nw2
lea has quit [Ping timeout: 268 seconds]
nw2 is now known as nw3
hooper has joined #ruby
hooper has quit [Max SendQ exceeded]
hooper has joined #ruby
hooper has quit [Max SendQ exceeded]
hooper has joined #ruby
hooper has quit [Max SendQ exceeded]
hooper has joined #ruby
wallerdev has quit [Quit: wallerdev]
hooper has quit [Max SendQ exceeded]
bryanray has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
hooper has joined #ruby
hooper has quit [Max SendQ exceeded]
Synthead has quit [Remote host closed the connection]
ledestin has quit [Read error: Connection reset by peer]
diegoaguilar has quit [Ping timeout: 240 seconds]
kalusn has joined #ruby
lsmola_ has quit [Ping timeout: 265 seconds]
idefine has quit [Remote host closed the connection]
jas02 has quit [Quit: jas02]
bluOxigen has joined #ruby
bb010g has joined #ruby
idefine has joined #ruby
<BraddPitt>
dotrb for basics or something specific?
d5sx43 has joined #ruby
tenderlove has quit [Read error: Connection reset by peer]
shoutsid has quit [Remote host closed the connection]
blueOxigen has quit [Ping timeout: 246 seconds]
paulcsmith has joined #ruby
karapetyan has quit [Remote host closed the connection]
<dotrb>
BraddPitt: to take me from basic to advanced, thoroughly in depth coverage of the language
<apeiros>
yes, I'm behind. part of the plan is to get to a system until end of year where more people than just me can deploy. removing me as a bottleneck.
kies^ has quit [Remote host closed the connection]
stannard has quit [Ping timeout: 240 seconds]
<adaedra>
yay, more bottlenecks
idefine has quit [Ping timeout: 255 seconds]
<dotrb>
lol
diegoaguilar has joined #ruby
karapetyan has joined #ruby
tenderlove has quit [Read error: Connection reset by peer]
<adaedra>
apeiros: btw, I've been re-working on `derpy's rubydoc code. Once this will be done, it will be, I think, easier to stuff it into ruboto.
diegoviola has quit [Ping timeout: 260 seconds]
<apeiros>
<Ox0dea>
apeiros: And also increasing the bus factor to >1.
baweaver has joined #ruby
fsociety has joined #ruby
<fsociety>
Is super a language keyword or a method?
<apeiros>
Ox0dea: hm?
yosiat has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
shoutsid has quit [Remote host closed the connection]
nw4 is now known as nw1
nw1 is now known as nw2
nw2 is now known as nw3
nemo_ has quit [Remote host closed the connection]
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
d5sx43 has joined #ruby
d5sx43 has quit [Client Quit]
Taha_The_Hacker has joined #ruby
Taha_The_Hacker has left #ruby [#ruby]
<Ox0dea>
> untrusted pickles can execute arbitrary Python code
Taha_The_Hacker has joined #ruby
choke has joined #ruby
skcin7 has quit [Max SendQ exceeded]
tenderlove has quit [Ping timeout: 268 seconds]
tenderlove has joined #ruby
adac has quit [Ping timeout: 250 seconds]
ruby616 has joined #ruby
skcin7 has joined #ruby
baweaver has joined #ruby
baweaver has quit [Remote host closed the connection]
drocsid has joined #ruby
pdoherty has quit [Remote host closed the connection]
s2013 has joined #ruby
idefine has quit [Remote host closed the connection]
c33s has joined #ruby
nw3 is now known as nw1
nw1 is now known as nw2
pdoherty has joined #ruby
shoutsid has joined #ruby
tenderlove has quit [Read error: Connection reset by peer]
shoutsid has quit [Remote host closed the connection]
<c33s>
hello. is it possible in ruby to simply require/include another ruby file, where the contents of the file will simply be inserted at the include position (same as the php include/require)? i am trying to move the code which i want to reuse out of a Vagrantfile without building modules or overdo things.
Taha_The_Hacker has quit [Quit: I WANNA LEAVE I AM FULLY BORED, LEFT 12 CHANNELS.]
dasher00 has quit [Remote host closed the connection]
<neohunter>
how rails 2.3 used to do model.relationship returns an array of results, and model.relatiopnship.find exists
<neohunter>
inspect, ok lets test with that
<shevy>
rails does a lot of atrocities
Galas has joined #ruby
<c33s>
@Ox0dea i tried around a little, but i don't get it to work. having a Vagrantfile in which i define the variable boxes and then loading my test.rb file results in test.rb:59:in `block in <top (required)>': undefined local variable or method `boxes'
<c33s>
i load the test.rb with: load File.expand_path("../../test.rb", __FILE__)
<Ox0dea>
#instance_variable_get_or_set is the method you want, but it doesn't exist and likely won't.
skade has quit [Quit: Computer has gone to sleep.]
K3VA has quit []
<hadees>
Ox0dea: ugh, yeah I guess that is ugly, i can work around it, thanks
<Ox0dea>
hadees: ||= is a compound assignment, but the semantics are essentially the same as for regular assignment, which can't be emulated by #send in most cases.
<Ox0dea>
Given `foo = 1`, what message could you send to `foo` to turn it into 2, you know?
synthroid has joined #ruby
idefine has quit [Ping timeout: 244 seconds]
ndrei has joined #ruby
skade has joined #ruby
benaiah has joined #ruby
jenrzzz has joined #ruby
tenderlo_ has joined #ruby
tenderlove has quit [Ping timeout: 256 seconds]
idefine has joined #ruby
kraljev11 has joined #ruby
stannard_ has quit [Ping timeout: 265 seconds]
<hadees>
Ox0dea: it makes sense but I still wish there was a nicer way to do what I want.
`tim` has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
anisha has quit [Quit: Leaving]
nw1 is now known as nw
maletor has quit [Quit: Computer has gone to sleep.]
<DairennL>
Cipher cannot be inferred: must specify it as an argument when I use pass = crypted_pass.decrypt using the encrypted_strings gem - I'm not clear on how to include the additional argument here. I believe that argument should be the secret key (I'm using symmetric encryption).
Sam_Gerber has joined #ruby
<Ox0dea>
hadees: You... wish #= were a method?
<Ox0dea>
Even in Lisp, `define` is a special form.
hahuang65 has quit [Quit: WeeChat 1.3]
<Ox0dea>
You're asking for utter madness, and Ruby does you a kindness by not obliging.
Soda has quit [Remote host closed the connection]
kraljev11 has quit [Ping timeout: 244 seconds]
nettoweb has joined #ruby
tenderlo_ has quit [Read error: Connection reset by peer]
minasmazar has joined #ruby
<hadees>
Ox0dea: no i just wish there was a nicer looking way to run ||= on a generated variable name. For example ruby could just know if you do send("foo||=") you really want to use ||= and not that you are looking for a method called ||=
Jackneill has joined #ruby
<Ox0dea>
It couldn't, though.
niftylettuce has joined #ruby
rgb-one has joined #ruby
<Ox0dea>
You've simply rephrased your wish to have assignment be a method.
cdg has joined #ruby
<rgb-one>
Hello
jackjackdripper has joined #ruby
<Ox0dea>
rgb-one: Hiya!
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
bmurt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<rgb-one>
Ox0dea: Hey bro/sis, hows it going :)
<Ox0dea>
Well enough, to be sure. And for yourself?
<rgb-one>
decent
<Ox0dea>
Good, good.
<rgb-one>
Indeed :)
baweaver has quit [Remote host closed the connection]
tenderlove has joined #ruby
<hadees>
Ox0dea: I don't see it that way, maybe send is the wrong method, I guess I could use eval...
<Ox0dea>
hadees: If we could say `foo.send(:||=)`, then we could also say `foo.send(:=)`, which is just bonkers.
idefine has quit [Ping timeout: 268 seconds]
<hadees>
Ox0dea: maybe it shouldn't be send then
cwong_on_irc has quit [Read error: Connection reset by peer]
cwong_on_irc has joined #ruby
<Ox0dea>
What's so bad about `foo = foo.send(bar) unless foo`?
mistermocha has quit [Remote host closed the connection]
<Ox0dea>
Well, #instance_variable_set/get, in your particular case, but the question stands.
<rgb-one>
How do I reference a string entered as a parameter on the command line?
<Ox0dea>
rgb-one: The command-line arguments live in ARGV.
<hadees>
if you have a nicer way to write it let me know
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
ruby616 has quit [Ping timeout: 246 seconds]
Guest18493 is now known as nw1
nw1 is now known as nw2
nw2 is now known as nw3
nw3 is now known as nw4
shoutsid has joined #ruby
<hadees>
i guess I should have really used instance_variable_set
mondayrain has joined #ruby
sdothum has joined #ruby
<Ox0dea>
And #instance_variable_get instead of the first #send.
<rgb-one>
What am I doing wrong here: abort_with_note("#{ARGV[1]} doesn't exist in this directory.")
<jhass>
DairennL: open an issue with the gem's author
tenderlove has quit [Read error: Connection reset by peer]
<Ox0dea>
rgb-one: Looks fine?
idefine has joined #ruby
<hadees>
Ox0dea: anyway thanks for the help, it works so i'm just going to move on
<rgb-one>
Ox0dea: abort_with_note will print to stderr if a note is passed to it as a parameter which it is in this case, however, that part of ARGV[1] part doesnt return anything.
tenderlove has joined #ruby
<Ox0dea>
hadees: Sure thing. I do concede that metaprogramming in Ruby is a little verbose, but it's for the better.
stannard has joined #ruby
shoutsid has quit [Remote host closed the connection]
<Ox0dea>
rgb-one: Ruby's ARGV is not like C's.
mondayrain has joined #ruby
mondayrain has quit [Client Quit]
<Ox0dea>
The program name is in $0, so it doesn't need to be (and isn't) in ARGV.
SegFaultAX has joined #ruby
Drakevr has joined #ruby
<rgb-one>
Ox0dea: Ah so its like bash in that respect.
<Ox0dea>
Just so.
<rgb-one>
so $1 will be the first parameter.
<rgb-one>
argument*
<Ox0dea>
No, ARGV[0] will be.
<minasmazar>
$1 will be used in regular expression
<minasmazar>
as alias for MatchData[1]
<Ox0dea>
rgb-one: $0 is something of an anomaly; as minasmazar points out, all of the other numeric globals contain match captures.
shoutsid has quit [Remote host closed the connection]
tenderlove has joined #ruby
shoutsid has joined #ruby
<minasmazar>
Ox0dea: don't know but $-0 in a pry session is "\n" xD
stannard_ has joined #ruby
DairennL has quit [Remote host closed the connection]
<Ox0dea>
minasmazar: English doesn't alias them. :<
stannard has quit [Read error: Connection reset by peer]
KnownSyntax has quit [Read error: Connection reset by peer]
KnownSyntax has joined #ruby
KnownSyntax has quit [Changing host]
KnownSyntax has joined #ruby
<Ox0dea>
$-0 == $INPUT_RECORD_SEPARATOR
<Ox0dea>
I wonder if $-1 and friends are related to the shell's PS1 and such.
dfockler has quit [Ping timeout: 260 seconds]
eminencehc has joined #ruby
k3asd` has joined #ruby
DairennL has joined #ruby
idefine has joined #ruby
shoutsid has quit [Remote host closed the connection]
tenderlove has quit [Read error: Connection reset by peer]
shoutsid has joined #ruby
<Ebok>
Whats the command the take [[ [1][2] ][3][4][5][ [6] ] ] and output [[1][2][3][4][5][6]] ?
<Ox0dea>
shevy: Are you seeing this?
nw3 is now known as nw1
nw1 is now known as nw2
<Ebok>
I know I've read it before...
<Ox0dea>
Ebok: Are you thinking of #flatten?
<Ebok>
yup
mistermocha has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
<minasmazar>
ahahah Ruby is incredible weird. Love for that
<Ox0dea>
I suspect you have no idea. :P
<minasmazar>
Ebok: .flatten!.map {|i| [i] } maybe
maletor has joined #ruby
<minasmazar>
map!
<Ox0dea>
minasmazar: Nah, Ebok just provided a slightly confusing representation.
<Ebok>
Yeah, sorry.
<Ox0dea>
minasmazar: Did you know that Ruby is Turing-complete even if you're not allowed to use any letters or numbers?
<Ebok>
[1,2,3,4,5,6] works too. I just wanted to level the info
tenderlove has joined #ruby
<slash_quit>
here goes Ox0dea with those crazy cool one liners again
EmeraldExplorer has quit [Quit: Connection closed for inactivity]
<Ox0dea>
The *amount* of code and its arrangement is immaterial; it's just nuts that you could theoretically write any program in Ruby with only symbols.
mbeasley has joined #ruby
<Ox0dea>
Of course, the `mov` assembly instruction is TC, so it's not that bewildering.
karapetyan has quit [Remote host closed the connection]
<Ox0dea>
Since brainfuck is TC, so too must be non-alphanumeric Ruby if it's able to simulate it.
<shevy>
damn... I can't see the euro key on my keyboard anymore :(
<shevy>
ah... ?
baweaver has joined #ruby
<shevy>
I am typing half blind because half of my keys are no longer readable
karapetyan has joined #ruby
tenderlove has quit [Read error: Connection reset by peer]
<adaedra>
You can search for you keyboard layout on google images.
but3k4_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<shevy>
this is so insane
eminencehc has quit [Remote host closed the connection]
momomomomo has quit [Quit: momomomomo]
<adaedra>
Welcome to the 21st century.
nettoweb has quit [Read error: Connection reset by peer]
<slash_quit>
shevy: my top row is poiuytrewq... it's funny to watch people do the reach for my keyboard like "let me just type it --- whoa, whoa, how?" thing
<shevy>
what the ... is poiuytrewq
nw2 is now known as nw1
<slash_quit>
shevy: qwertyuiop, reversed
<adaedra>
I have an US keyboard. It's enough to mess up with people here, slash_quit.
<slash_quit>
i now know who in my office types by sight
<shevy>
I have qwertz
Qantourisc has joined #ruby
tenderlove has joined #ruby
spuk has joined #ruby
<Qantourisc>
"/usr/lib64/ruby/gems/2.0.0/gems/bundler-1.10.6/lib/bundler/spec_set.rb:92:in `block in materialize': Could not find rake-10.1.1 in any of the sources (Bundler::GemNotFound)"
pikajude has joined #ruby
<slash_quit>
shevy: what keyboard do you use?
nettoweb has joined #ruby
<shevy>
slash_quit a german microsoft keyboard!
<pikajude>
hi, is there an equivalent of "scan" that can return positions as well, like match would be able to?
<Qantourisc>
Can't quite find what causes ruby to look for THAT specific version of rake
<shevy>
they can't do software but they have good keyboards
<slash_quit>
ha
<adaedra>
Qantourisc: Gemfile.lock
<slash_quit>
or automobiles? re: VW
beauby has joined #ruby
rgtk has joined #ruby
<Ox0dea>
pikajude: No. :<
Musashi007 has quit [Quit: Musashi007]
<shevy>
I think my fingers must be acidic, the keys that are used the most by the index fingers are those that have decayed the most
<pikajude>
Ox0dea: I've found a "workaround" on stackoverflow, given as "foo".to_enum(:scan, /pat/).map { Regexp.last_match }
<pikajude>
and i'm all like, wtf is that
karapetyan has quit [Ping timeout: 250 seconds]
<Ox0dea>
Well, that's actually kinda neat.
<slash_quit>
shevy: boogers
Voker57 has quit [Read error: Connection reset by peer]
<rgtk>
Is it possible to access constant defined "above" module inside this module if name is the same? For example I want to access Ruby's Set inside Module that have defined Set constant.
<Qantourisc>
adaedra: thanks, but that file lists rake (10.4.2) and rake (>= 0.8.7)
Azure has quit [Ping timeout: 250 seconds]
<Ox0dea>
rgtk: ::Set
<shevy>
slash_quit nah they reside under the table
<slash_quit>
shevy: but how do they get there? index finger.
<shevy>
hmm interesting theory
<rgtk>
Ox0dea: Thank you
<minasmazar>
i prefer !€ :D
<slash_quit>
shevy: my nostrils are larger, so i go with the thumb myself... but the space-bar is already blank, so nothing to rub off... i can't personally test this theory, not without using an undersized finger for my nose picking.
<slash_quit>
and that'd feel wrong.
troulouliou_dev has quit [Quit: Leaving]
* Qantourisc
dislikes ruby for the dependency mess
<havenwood>
Qantourisc: Use fewer dependencies?
tenderlove has quit [Read error: Connection reset by peer]
<Qantourisc>
havenwood: not a developer, system installer
bryanray has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
pikajude has left #ruby ["bye"]
baweaver has quit [Remote host closed the connection]
arthurix has joined #ruby
roshanavand has quit [Ping timeout: 255 seconds]
<Ox0dea>
$-9 to $-1 are only incidentally valid, it seems.
<drbrain>
Ox0dea:
Igorshp has quit [Remote host closed the connection]
<Ox0dea>
They're the same.
atomical has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<mr_am>
I'm reading about "executing loaded code" in the book "The Ruby Programming Language" by the creator of Ruby... can someone explain these two points please? http://ctrlv.it/txt/2695/520925891
<Ox0dea>
But it's true that one or the other is contextually more intention-revealing.
shoutsid has joined #ruby
<shevy>
mr_am you simply need to keep track of the scope
<Ox0dea>
mr_am: Replace `load` with `eval File.read` to see how #load *doesn't* behave.
Asher has quit [Quit: Leaving.]
Musashi007 has joined #ruby
kadoppe has quit [Ping timeout: 264 seconds]
bmurt has joined #ruby
kadoppe has joined #ruby
<mr_am>
Ox0dea: What does this sentence mean in simple terms? "That is, invoking load or require within a method invocation does not propagate the receiver object to the loaded file."
<Ox0dea>
mr_am: It means `self` is always `main` at the start of a load.
Scient has joined #ruby
momomomomo has joined #ruby
yardenbar has joined #ruby
yardenbar has quit [Remote host closed the connection]
skade has quit [Quit: Computer has gone to sleep.]
gustav_ has quit [Ping timeout: 252 seconds]
<mr_am>
Ox0dea: So it basically means loaded files are executed with self as main?
<Ox0dea>
Yes.
Senjai has quit [Changing host]
Senjai has joined #ruby
<Ox0dea>
If you *want* the loaded file to inherit the current `self`, you have to use #eval directly.
paulcsmith has quit [Quit: Be back later ...]
choke has joined #ruby
yardenbar has joined #ruby
<mr_am>
Ox0dea: Loaded files are also executed in a different scope?
tenderlove has quit [Read error: Connection reset by peer]
tenderlove has joined #ruby
skcin7 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Ox0dea>
mr_am: You've only rephrased your previous question.
blackmesa has joined #ruby
balazs has quit [Ping timeout: 265 seconds]
Encapsulation has quit [Read error: Connection reset by peer]
<mr_am>
Ox0dea: Why don't I have access to local variables in the required file?
konrath has joined #ruby
bryanray has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Ox0dea>
Because you don't actually want that.
<mr_am>
Ox0dea: Yeah I know but where does ruby execute loaded files? In what scope?
paulcsmith has joined #ruby
<Ox0dea>
A brand-new one with `self` set to `main`.
<rgb-one>
Alright, say I have an argument --output which outputs content to a file. Using optparse, how would I set the --output function to perform the task of writing to a file? The file could be named anything. Would I use the gets method to read the output filename entered by the user? eg. progname infile.txt -o outfile.txt.
Encapsulation has joined #ruby
Outlastsheep has joined #ruby
<Ox0dea>
mr_am: If loaded files brought their locals, top-level locals would be equivalent to globals, which would be very silly.
<sharkman>
why is i that i started up an instance on amazon of a server and with ubuntu, apt-get install ruby got me ruby1.9. and when it was debian, apt-get install ruby got me ruby2.1?
kalusn has quit [Remote host closed the connection]
<Ox0dea>
Do you perceive a pattern?
<Xeago>
yes
<Ox0dea>
Yay, numbers!
<Ox0dea>
Xeago: How many solutions are there?
<Xeago>
infinite
<Ox0dea>
<3
jobewan has quit [Ping timeout: 244 seconds]
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Xeago>
Ox0dea: given that you had no calculator, or ruby at your hand
<Xeago>
how would you approach this?
sdwrage has quit [Quit: This computer has gone to sleep]
<Ox0dea>
The Ruby was only for demonstration purposes?
<Xeago>
given that I now know the solution, I still feel powerless to explain it to my gf, other than just wing it with a number (which is usually fine for 2 unknown variable computations)
shoutsid has joined #ruby
<Ox0dea>
The number of resources available to you isn't quite so many as the number of solutions to that equation, but it's close.
<Ox0dea>
(I'm not so great at explaining math in ways that'll "stick".)
tenderlo_ has joined #ruby
<Xeago>
try on me - I'm not exalting at math, but better than my gf for sure
tenderlove has quit [Ping timeout: 256 seconds]
<Xeago>
So I got stuck at trying to think of either m or n of being 0
<Xeago>
thinking of them of being 1 a solution is trivial
chouhoul_ has joined #ruby
<Ox0dea>
But 1 is the multiplicative identity, so it's the ideal place to start?
sdwrage has joined #ruby
skade has joined #ruby
<Xeago>
raising it 0 would mean that you nullify the exponentiation
<Xeago>
and perhaps consider it to be a more easy equation - in this case, no
kobain has joined #ruby
sdwrage has quit [Client Quit]
<rgb-one>
atr_accessor = setter right?
<Ox0dea>
rgb-one: Both.
chouhoul_ has quit [Read error: Connection reset by peer]
<Radar>
rgb-one: attr_writer is the setter.
<Radar>
attr_reader is the getter.
chouhoul_ has joined #ruby
<rgb-one>
attr_accessor is the same as attr_setter?
chouhoulis has quit [Ping timeout: 260 seconds]
<rgb-one>
attr_accessor is the same as attr_writer?*
<Radar>
No.
jenrzzz has joined #ruby
<Radar>
You're not paying attention.
<Radar>
attr_accessor is both reader + writer.
but3k4 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<rgb-one>
Radar: I see.
karapetyan has quit []
Rickmasta has joined #ruby
Xeago has quit [Read error: Connection reset by peer]
ss_much has joined #ruby
skcin7 has joined #ruby
jessemcgilallen has joined #ruby
roshanavand has joined #ruby
shoutsid has quit [Remote host closed the connection]
tenderlove has joined #ruby
benjito has joined #ruby
tenderlo_ has quit [Read error: Connection reset by peer]
rcvalle has quit [Quit: rcvalle]
jessemcgilallen has quit [Client Quit]
mistermocha has quit [Remote host closed the connection]
mistermocha has joined #ruby
jessemcgilallen has joined #ruby
e1senhorn has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bryanray has joined #ruby
roshanavand has quit [Ping timeout: 240 seconds]
rcvalle has joined #ruby
rcvalle has quit [Client Quit]
p0wn3d has quit [Ping timeout: 240 seconds]
shoutsid has joined #ruby
rcvalle has joined #ruby
jobewan has joined #ruby
karapetyan has joined #ruby
leslie has quit [Quit: Have you ever tried to eat a clock? It's very time consuming.]
ndrei has quit [Ping timeout: 240 seconds]
tenderlove has quit [Read error: Connection reset by peer]
nateberkopec has quit [Quit: Leaving...]
ericjphillips has quit [Quit: Leaving.]
beauby has quit [Ping timeout: 264 seconds]
tenderlove has joined #ruby
chipotle has joined #ruby
asxbr has joined #ruby
ngscheurich has quit [Ping timeout: 265 seconds]
baweaver has joined #ruby
jenrzzz has quit [Ping timeout: 250 seconds]
yfeldblum has quit [Ping timeout: 246 seconds]
Musashi007 has joined #ruby
Azure has joined #ruby
Musashi007 has quit [Client Quit]
sdwrage has joined #ruby
mag42c_ has joined #ruby
kirun has quit [Quit: Client exiting]
jimmmmy has quit []
Asher has joined #ruby
yfeldblum has joined #ruby
Rickmasta has quit [Read error: Connection reset by peer]
jessemcgilallen has quit [Quit: jessemcgilallen]
Rickmasta has joined #ruby
mag42c has quit [Ping timeout: 265 seconds]
eminencehc has quit [Remote host closed the connection]
baweaver has quit [Ping timeout: 256 seconds]
gustav_ has joined #ruby
shoutsid has quit []
spider-mario has joined #ruby
symbol_ has quit [Ping timeout: 272 seconds]
jessemcgilallen has joined #ruby
d5sx43 has joined #ruby
k3asd` has quit [Ping timeout: 240 seconds]
kies^ has quit [Ping timeout: 240 seconds]
d10n-work has quit [Quit: Connection closed for inactivity]
sankaber has joined #ruby
gustav_ has quit [Ping timeout: 240 seconds]
sankaber has quit [Remote host closed the connection]
<imperator>
Ox0dea, and if I want to forcibly redefine it?
sankaber has joined #ruby
<imperator>
i guess just o.class.send(:undef_method, :tap)
ericjphillips has joined #ruby
d5sx43 has quit [Remote host closed the connection]
Xeago has joined #ruby
<Ox0dea>
There are only two hard things in computer science.
JJM has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jessemcgilallen has quit [Quit: jessemcgilallen]
RegulationD has joined #ruby
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
leafybasil has joined #ruby
<imperator>
caching and bitcoins?
Qantourisc has quit [Ping timeout: 250 seconds]
sepp2k has joined #ruby
ericjphillips has quit [Quit: Leaving.]
beauby has joined #ruby
tenderlove has quit [Read error: Connection reset by peer]
Ropeney has joined #ruby
nateberkopec has joined #ruby
<pipework>
Ox0dea: Other people and people who aren't me?
nertzy has joined #ruby
hadees has quit [Quit: hadees]
<Ox0dea>
Cache invalidation, naming things, off-by-one errors, and cache invalidation.
trosborn has joined #ruby
rcvalle has quit [Quit: rcvalle]
_wldcordeiro has quit [Ping timeout: 240 seconds]
<imperator>
hah
Trynemjoel has quit [Ping timeout: 250 seconds]
imperator has quit [Quit: Leaving]
bmurt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<rgb-one>
With optparse, when i use the opts.version provided it doesn't display in the help message. I use `opts; exit` for the --help message.
Trynemjoel has joined #ruby
adac has quit [Ping timeout: 240 seconds]
<rgb-one>
Is there any way to show the -v, --version message in the help output?
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ajb- is now known as ajb
ericjphillips has joined #ruby
Pupeno has quit [Remote host closed the connection]
macowie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
gabi_300 has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
Galas has quit []
karapetyan has quit [Remote host closed the connection]
eminencehc has joined #ruby
bryanray has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Musashi007 has joined #ruby
<adaedra>
Just call your version method just before calling opts
allcentury has quit [Ping timeout: 252 seconds]
eminencehc has quit [Remote host closed the connection]
gabi_300 has quit []
jpfuentes2 has joined #ruby
ericjphillips has quit [Client Quit]
mordocai has quit [Remote host closed the connection]
bonhoeffer has joined #ruby
jpfuente_ has quit [Ping timeout: 246 seconds]
Pupeno has joined #ruby
Pupeno has joined #ruby
trosborn has quit [Quit: trosborn]
baweaver has joined #ruby
bonhoeffer has quit [Client Quit]
<Xeago>
Ox0dea: got a moment for another question? Given a square ABCD, there is an equal-sided triangle inside ABE. What's the angle of E in the triangle CED?
alienaut has quit [Remote host closed the connection]
Qantourisc has joined #ruby
aryaching_ has quit []
<Xeago>
I can go elsewhere if I am disturbing the fine folks of #ruby - these are just the nicest people I know :>
trosborn has joined #ruby
<pipework>
Xeago: There are math channels on IRC that aren't too bad.
<pipework>
Err, freenode.
willharrison has quit [Quit: My Mac has gone to sleep. ZZZzzz…]