<fowlduck>
the docs say "Adds the default certificates to the certificate store. These certificates are loaded from the default configuration directory which can usually be determined by:"
frem has quit [Quit: Connection closed for inactivity]
patrick2 has joined #ruby
benlovell has quit [Ping timeout: 276 seconds]
<myztic>
Ox0dea: thanks
casadei has quit [Remote host closed the connection]
scripore has quit [Quit: This computer has gone to sleep]
<Ox0dea>
myztic: Sure thing.
<myztic>
how important is it to have documentation for the current version? can I use something that was written fro version 1.8.2-15 or will the difference to now be massive?
Guest89699 has quit [Ping timeout: 265 seconds]
<myztic>
s/fro/for
build22_ has quit [Remote host closed the connection]
sanjayu has quit [Ping timeout: 246 seconds]
<Ox0dea>
Quite a bit has changed since 1.8.2.
<Ox0dea>
Are you... running 1.8.2?
<woebtz>
Hi, is anyone using ruby/gems in their Jenkins build pipeline? I'm having difficulty figuring out how to setup my builds to execute shell w/ different versions of ruby (?) [e.g. Compass CLI gem installed with 1.9.x and Compass CLI gem (a newer version) installed with 2.2.x]
baweaver has quit [Remote host closed the connection]
tkuchiki has quit [Remote host closed the connection]
<myztic>
Ox0dea: no :D
<myztic>
I currently have ruby 2.1.7p400 installed
tkuchiki has joined #ruby
kies has joined #ruby
blueOxigen has joined #ruby
<Ox0dea>
myztic: Do you know about `ri`?
shadoi has quit [Quit: Leaving.]
<Ox0dea>
The documentation therein is virtually guaranteed to be applicable to your Ruby version.
<myztic>
Ox0dea: I do now
<Ox0dea>
Yay!
<myztic>
;)
<Ox0dea>
It's pretty nifty.
<myztic>
awesome, thanks :)
TomPeed has joined #ruby
<myztic>
Ox0dea: So I will use Learn to Program, Pine; Will use ri tool, and the maybe some other stuff from the interwebs
bluOxigen has quit [Ping timeout: 260 seconds]
<myztic>
but that's the plan :)
demonlove has quit [Quit: Leaving]
<myztic>
s/the/then
<Ox0dea>
Sounds good. I'd also recommend the Koans, though.
podman has quit [Quit: Connection closed for inactivity]
<Ox0dea>
With luck, you'll become addicted to red-green development.
<myztic>
Ox0dea: noticed, bookmarked :)
<Ox0dea>
<3
Linell has joined #ruby
benlieb has joined #ruby
baweaver has joined #ruby
nettoweb has joined #ruby
EllisTAA has quit [Quit: EllisTAA]
tkuchiki has quit [Ping timeout: 250 seconds]
_blizzy_ has joined #ruby
iamvery has quit [Quit: ZNC - 1.6.0 - http://znc.in]
_blizzy_ has quit [Max SendQ exceeded]
bluOxigen has joined #ruby
_blizzy_ has joined #ruby
_blizzy_ has quit [Max SendQ exceeded]
_blizzy_ has joined #ruby
_blizzy_ has quit [Max SendQ exceeded]
blueOxigen has quit [Ping timeout: 276 seconds]
_blizzy_ has joined #ruby
_blizzy_ has quit [Max SendQ exceeded]
_blizzy_ has joined #ruby
<Linell>
Is there are reason why sending a request locally with `X_AUTH_TOKEN` as a header is picked up by request.env but sending it to a server running the same code doesn't have that header set?
<Linell>
Locally that puts has HTTP_X_AUTH_TOKEN, on the server it don't
bruno- has quit [Ping timeout: 250 seconds]
<Linell>
*doesn't
benlovell has joined #ruby
<Radar>
Hm, I am not sure how that's happening then
rbowlby has quit [Remote host closed the connection]
banister has joined #ruby
Guest33405 has quit [Quit: This computer has gone to sleep]
axsuul has joined #ruby
benlovell has quit [Ping timeout: 250 seconds]
<Linell>
It's super weird
<Ox0dea>
rubie: Any progress?
howdoicomputer has quit [Ping timeout: 240 seconds]
<rubie>
ox0dea: been on it all day, lol so not really
kies has quit [Ping timeout: 272 seconds]
<Ox0dea>
rubie: Easiest would be to generate all the substrings, select the ones with no repeats, map those to their lengths, and grab the maximum thereof.
<Ox0dea>
It's hardly the most efficient approach, of course, but it's arguably the simplest.
<rubie>
ox0dea: ya i've gotten that solution, looking to do it o(n)
<Ox0dea>
rubie: You should've said as much. :P
<rubie>
using a hash
mistermocha has quit [Remote host closed the connection]
<Ox0dea>
I vaguely recall there being some very clever XOR trick or something to do it without maintaining so much state.
diegoaguilar has quit [Remote host closed the connection]
riotjones has joined #ruby
benlieb has quit [Quit: benlieb]
<diegoviola>
is there a channel for ruby documentation?
<Ox0dea>
diegoviola: It's not entirely clear what you're asking.
ixti has quit [Ping timeout: 260 seconds]
<diegoviola>
"If you want a language for easy object-oriented programming, or you don't like the Perl ugliness, or you do like the concept of LISP, but don't like too many parentheses, Ruby might be your language of choice."
bruno- has joined #ruby
<diegoviola>
I was surprised to read this is in the ruby man page
<mg^>
One reason I moved away from Perl is the total lack of consistency in interfacing with third party code. Sometimes object oriented, often times not.
<mg^>
So I'd end up with this... well, ugly... mixed code
ixti has joined #ruby
roxtrongo has quit [Ping timeout: 272 seconds]
<diegoviola>
baweaver: it's not a big deal, it just seems unprofessional/informal, that's all
benlovell has quit [Ping timeout: 255 seconds]
Rollabunna has quit [Remote host closed the connection]
Rollabunna has joined #ruby
newdan has joined #ruby
<baweaver>
you have a very strange view of professionalism and marketing then
<baweaver>
because pot shots at competitors are pretty common
Rollabunna has quit [Ping timeout: 276 seconds]
jamto11 has joined #ruby
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<havenwood>
knight_: This is the #ruby channel. Did you mean to ask in #elixir-lang?
griffindy has joined #ruby
<knight_>
Haha, yep, I totally did that by accident :)
casadei has joined #ruby
<diegoviola>
baweaver: that stuff belongs in IRC conversations, not in man pages
* havenwood
transcribes irc conversations to manpages
<baweaver>
then bring it up with them
komanda3 has joined #ruby
komanda3 is now known as Komanda
<baweaver>
lamenting the fact with us does you no good
<Ox0dea>
havenwood: Aye, it's very pretty, but rubie was after an O(n) solution.
<Ox0dea>
diegoviola: Perl doesn't need your services, soldier.
<havenwood>
Ox0dea: ayup
sepp2k has quit [Read error: Connection reset by peer]
<Komanda>
this ruby url rewrite code works fine for me for .html, but i would also like to use it for .php, what changes should i make to make this happen?
<Ox0dea>
diegoviola: What stands to be gained in changing that particular wording?
<Ox0dea>
Will Perl be the better for it? Will Ruby?
EllisTAA has quit [Quit: EllisTAA]
<diegoviola>
you are missing the point
<Komanda>
Rewrite Rules look to me like someone bashed their head through their keyboard
weemsledeux has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
CloCkWeRX1 has joined #ruby
CloCkWeRX has quit [Read error: No route to host]
icey has quit [Remote host closed the connection]
<Ox0dea>
diegoviola: Which is what?
icey has joined #ruby
<diegoviola>
Ox0dea: when you do `man bash` do you expect to see some shitty comments about how the Windows shell is a POS? Perl ugliness has nothing to do with Ruby
<baweaver>
was bash based on windows?
juddey has joined #ruby
<baweaver>
was ruby based on perl?
<baweaver>
look at ack, ag, sift, and other search utils
<grill>
question: is it better to open a file and then run an each loop (e.g. to run through an array), or to run through an array and do a file.open() each time?
DarkBushido has quit [Ping timeout: 240 seconds]
tater has quit [Remote host closed the connection]
<Komanda>
but if the file is large, you might want to use your second method
<Komanda>
it's faster to code, but slower to execute
<jhass>
grill: what motivates the question, what's making opening and closing the file all the time possibly preferable in your mind?
<jhass>
note that a File.open does not yet read the file into memory
malconis has joined #ruby
weemsledeux has joined #ruby
craysiii has quit [Quit: Leaving.]
sross07 has joined #ruby
peteyg_ has joined #ruby
<grill>
I have a method that will either output something to stdout or output to stdout and write to a file depending on the value of a param. I'd write less code if I could do the second way
jessemcgilallen has joined #ruby
<jhass>
Komanda: ah derp, I see the issue, I'm not using the argument to Enumerable#find often enough :P
aibot has quit [Remote host closed the connection]
jpfuentes2 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tubuliferous_ has quit [Ping timeout: 260 seconds]
icey has joined #ruby
Cache_Money has quit [Quit: Cache_Money]
jamto11 has quit [Ping timeout: 272 seconds]
blubjr` has quit [Remote host closed the connection]
blubjr` has joined #ruby
Mia has quit [Read error: Connection reset by peer]
icey_ has joined #ruby
Cache_Money has joined #ruby
yqt has quit [Ping timeout: 250 seconds]
Musashi007 has joined #ruby
icey_ has quit [Client Quit]
icey has quit [Remote host closed the connection]
icey has joined #ruby
icey has quit [Remote host closed the connection]
framling has quit [Read error: Connection reset by peer]
icey has joined #ruby
icey has quit [Remote host closed the connection]
idefine has joined #ruby
nisstyre has quit [Changing host]
nisstyre has joined #ruby
mistermo_ has quit [Remote host closed the connection]
tmtwd has joined #ruby
icey has joined #ruby
mistermocha has joined #ruby
idefine has quit [Ping timeout: 264 seconds]
mistermo_ has joined #ruby
mistermocha has quit [Remote host closed the connection]
benlieb has joined #ruby
mistermo_ has quit [Remote host closed the connection]
<droptone>
Question: I have an array of hashes, example = [ {"Name" => "Bob", "Title" => "Boss"}, {"Name" => "Steve", "Title" => "Underling}]. What would the syntax be for the most efficient way to search the array to see if any values match, for example, "Name" => "Bob" and "Title" => "Boss"?
<chimpout>
i want to help out the black community by creating a programming language
<chimpout>
who wants to help out the black community?
Melpaws has quit [Quit: Leaving.]
<chimpout>
let's create the ebonics scripting language
<chimpout>
all reserved words will be derivatives of ebonics
CodingWolf has quit [Ping timeout: 246 seconds]
lkba has quit [Ping timeout: 240 seconds]
idefine has joined #ruby
Bellthoven has quit []
sye has quit [Ping timeout: 252 seconds]
riotjones has joined #ruby
mistermocha has joined #ruby
gambl0re has joined #ruby
saddad has quit [Ping timeout: 276 seconds]
B1n4r10 has quit [Ping timeout: 276 seconds]
idefine has quit [Ping timeout: 252 seconds]
mistermocha has quit [Read error: Connection reset by peer]
mistermo_ has joined #ruby
chimpout has quit [Quit: Page closed]
myztic has quit [Ping timeout: 255 seconds]
bubbys has quit [Ping timeout: 252 seconds]
riotjones has quit [Ping timeout: 252 seconds]
mistermocha has joined #ruby
mistermocha has quit [Remote host closed the connection]
misterm__ has joined #ruby
icey has quit [Remote host closed the connection]
icey has joined #ruby
scripore has quit [Quit: This computer has gone to sleep]
mistermo_ has quit [Read error: Connection reset by peer]
Rollabunna has joined #ruby
misterm__ has quit [Remote host closed the connection]
mistermocha has joined #ruby
moeabdol has quit [Ping timeout: 255 seconds]
mistermocha has quit [Remote host closed the connection]
EllisTAA has quit [Quit: EllisTAA]
cmoneylulz has joined #ruby
bubbys has joined #ruby
cmoneylulz has quit [Remote host closed the connection]
mistermocha has joined #ruby
mistermocha has quit [Read error: Connection reset by peer]
mistermocha has joined #ruby
baweaver has joined #ruby
mistermo_ has joined #ruby
mistermocha has quit [Ping timeout: 246 seconds]
Cache_Money has quit [Quit: Cache_Money]
djbkd has quit [Remote host closed the connection]
<havenwood>
droptone: In Ruby 2.3 you'll be able to: [{"Name" => "Bob", "Title" => "Boss", aim: true}, {"Name" => "Steve", "Title" => "Underling"}].any? { |h| h >= {"Name" => "Bob", "Title" => "Boss"} }
mesamoo has quit [Ping timeout: 255 seconds]
mistermo_ has quit [Ping timeout: 260 seconds]
<havenwood>
#=> true
<droptone>
Nice, thank you. What I ended up doing is example.find { |e| e["Name"] == "Bob" && e["Title"] == "Boss" }.nil?
<droptone>
Is that acceptable?
<droptone>
I should say, is that fast? I know certain methods are faster than others
<droptone>
It seems to be returning the proper result. This project is on 2.2.1
TomPeed has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<diegoviola>
havenwood: I see, thanks
<havenwood>
diegoviola: np
casadei has quit [Ping timeout: 260 seconds]
fifi-v has quit [Remote host closed the connection]
armyriad has quit [Ping timeout: 240 seconds]
mistermo_ has quit [Remote host closed the connection]
mistermocha has joined #ruby
djbkd has joined #ruby
armyriad has joined #ruby
<havenwood>
diegoviola: (Tests pass on this particular Rails 4.2 app on my machine with Ruby 2.3-preview1 for what it's worth. And they pass on Travis.
<havenwood>
)
EllisTAA has quit [Ping timeout: 276 seconds]
jessemcgilallen has quit [Quit: jessemcgilallen]
eminencehc has joined #ruby
jamto11 has joined #ruby
<baweaver>
>> module Enumerable; def select_h(**kws) select { |h| h >= kws } end end; [{a:1,b:2},{a:3,c:3},{c:3,p:0}].select_h a: 1
<ruboto>
baweaver # => undefined method `>=' for {:a=>1, :b=>2}:Hash (NoMethodError) ...check link for more (https://eval.in/471469)
<baweaver>
worth a shot
<baweaver>
guess it's not building with that yet
Cache_Money has joined #ruby
solocshaw has quit [Ping timeout: 264 seconds]
<baweaver>
Treat a hash as a subset, and objects as a send(k) == v
<baweaver>
granted this was a while back and I didn't know about certain parts of ruby yet
casadei has joined #ruby
mistermocha has quit [Remote host closed the connection]
benlovell has joined #ruby
mistermocha has joined #ruby
Musashi007 has quit [Quit: Musashi007]
braincrash has quit [Quit: bye bye]
casadei has quit [Ping timeout: 244 seconds]
radgeRayden has quit [Ping timeout: 265 seconds]
chouhoulis has joined #ruby
mistermocha has quit [Remote host closed the connection]
benlovell has quit [Ping timeout: 246 seconds]
eminencehc has quit [Remote host closed the connection]
mistermocha has joined #ruby
juddey has quit [Ping timeout: 276 seconds]
eminencehc has joined #ruby
radgeRayden has joined #ruby
braincrash has joined #ruby
mistermocha has quit [Remote host closed the connection]
braincrash is now known as braincras
mistermocha has joined #ruby
rbowlby has joined #ruby
mistermocha has quit [Remote host closed the connection]
axsuul has joined #ruby
arescorpio has joined #ruby
mistermocha has joined #ruby
riotjones has joined #ruby
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Guest33405 has joined #ruby
mistermocha has quit [Ping timeout: 244 seconds]
braincrash has joined #ruby
riotjones has quit [Ping timeout: 276 seconds]
myztic has joined #ruby
benlovell has joined #ruby
Respek has quit [Quit: gone to sleep. ZZZzzz…]
camilasann has quit [Ping timeout: 250 seconds]
braincras has quit [Ping timeout: 265 seconds]
duncannz has joined #ruby
duncannz has quit [Max SendQ exceeded]
ibouvousaime has joined #ruby
duncannz has joined #ruby
camilasan has joined #ruby
roxtrongo has joined #ruby
benlovell has quit [Ping timeout: 240 seconds]
duncannz has quit [Remote host closed the connection]
triangles2 has quit [Ping timeout: 276 seconds]
roxtrongo has quit [Ping timeout: 265 seconds]
framling has joined #ruby
yfeldblum has quit [Remote host closed the connection]
bruno- has joined #ruby
pkrnj has joined #ruby
duncannz has joined #ruby
pkrnj has quit [Remote host closed the connection]
duncannz has quit [Max SendQ exceeded]
cwong_on_irc has joined #ruby
krz has joined #ruby
duncannz has joined #ruby
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
fedexo has joined #ruby
duncan_ has joined #ruby
shinenelson has joined #ruby
duncan_ has quit [Max SendQ exceeded]
duncannz has quit [Read error: Connection reset by peer]
duncan_ has joined #ruby
bruno- has quit [Ping timeout: 244 seconds]
krz has quit [Ping timeout: 250 seconds]
mary5030 has joined #ruby
benlovell has joined #ruby
Cache_Money has quit [Quit: Cache_Money]
freerobby has quit [Quit: Leaving.]
VeryBewitching has quit [Quit: Konversation terminated!]
woodruffw has quit [Quit: And then he took off.]
darkf has joined #ruby
quazimodo has quit [Ping timeout: 276 seconds]
benlovell has quit [Ping timeout: 240 seconds]
varunwachaspati_ has joined #ruby
diegoaguilar has joined #ruby
woodruffw has joined #ruby
maletor has joined #ruby
build22_ has joined #ruby
gix has quit [Ping timeout: 255 seconds]
ESpiney has quit [Read error: Connection reset by peer]
yfeldblum has joined #ruby
smallpen has quit [Ping timeout: 246 seconds]
jamto11 has joined #ruby
build22_ has quit [Ping timeout: 240 seconds]
gix has joined #ruby
chouhoulis has quit [Remote host closed the connection]
jamto11 has quit [Ping timeout: 276 seconds]
B1n4r10 has joined #ruby
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
cmoneylulz has joined #ruby
cpup has quit [Ping timeout: 272 seconds]
_blizzy_ has quit [Quit: Leaving]
VioletFace has joined #ruby
<VioletFace>
helo
kobain has quit [Ping timeout: 264 seconds]
B1n4r10 has quit [Ping timeout: 246 seconds]
pdoherty has quit [Quit: Leaving]
tubuliferous_ has quit [Ping timeout: 252 seconds]
maletor has quit [Ping timeout: 260 seconds]
fowlduck has quit [Remote host closed the connection]
quazimodo has joined #ruby
dnewkerk has quit [Quit: dnewkerk]
yes`r has joined #ruby
cpup has joined #ruby
malconis has joined #ruby
cmoneylulz has quit []
tubuliferous_ has joined #ruby
VioletFace has left #ruby [#ruby]
ur5us has quit [Remote host closed the connection]
aswin has joined #ruby
aswin has left #ruby [#ruby]
mary5030 has quit [Remote host closed the connection]
dikaio has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dikaio has joined #ruby
ur5us has joined #ruby
chouhoulis has joined #ruby
trosborn has joined #ruby
riotjones has joined #ruby
juddey has joined #ruby
Melpaws has joined #ruby
djbkd has quit [Remote host closed the connection]
djbkd has joined #ruby
benlovell has joined #ruby
krz has joined #ruby
Melpaws1 has joined #ruby
ur5us has quit [Ping timeout: 272 seconds]
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Melpaws has quit [Ping timeout: 240 seconds]
riotjones has quit [Ping timeout: 260 seconds]
johnny56 has joined #ruby
benlovell has quit [Ping timeout: 252 seconds]
bronson_ has quit []
trosborn has quit [Quit: trosborn]
roxtrongo has joined #ruby
favadi has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
diesel has quit [Ping timeout: 264 seconds]
roxtrongo has quit [Ping timeout: 246 seconds]
slash_nick is now known as slash_quit
diesel has joined #ruby
mistermocha has joined #ruby
bruno- has joined #ruby
grill has quit [Ping timeout: 244 seconds]
Kabaka has quit [Quit: WeeChat 1.3]
Kabaka has joined #ruby
mistermocha has quit [Ping timeout: 260 seconds]
chouhoulis has quit [Remote host closed the connection]
bruno- has quit [Ping timeout: 272 seconds]
Helheim has joined #ruby
red_horned_rihno has quit [Ping timeout: 240 seconds]
yfeldblum has quit [Ping timeout: 240 seconds]
diegoviola is now known as dviola
RegulationD has joined #ruby
newdan has quit [Quit: leaving]
tubuliferous_ has quit [Ping timeout: 250 seconds]
howdoicomputer has joined #ruby
arooni has quit [Ping timeout: 246 seconds]
diegoaguilar has quit [Quit: Leaving]
dionysus69 has joined #ruby
RegulationD has quit [Ping timeout: 246 seconds]
griffindy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tildes has joined #ruby
howdoicomputer has quit [Ping timeout: 240 seconds]
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
juddey has quit [Ping timeout: 240 seconds]
build22_ has joined #ruby
grill has joined #ruby
mclee has quit [Ping timeout: 260 seconds]
jamto11 has joined #ruby
quazimodo has quit [Read error: No route to host]
favadi has joined #ruby
mclee has joined #ruby
build22_ has quit [Ping timeout: 276 seconds]
rubie has quit [Remote host closed the connection]
ur5us has joined #ruby
jamto11 has quit [Ping timeout: 264 seconds]
djbkd has quit [Remote host closed the connection]
mallu has joined #ruby
ur5us has quit [Remote host closed the connection]
arescorpio has quit [Quit: Leaving.]
slash_quit is now known as slash_nick
<mallu>
I have a method called test(date). I am calling it by test(Time.utc(2015, 11, 19, 0, 0, 0)). It seems like inside test method date is string. How can I convert it to time
quazimodo has joined #ruby
<mallu>
anyone?
<shevy>
try either of DateTime.parse Time.parse DateTime.strptime or one of Time.str*
skade has joined #ruby
<mallu>
shevy: so inside my method I say t = DateTime.parse(date)?
<droptone>
Man, I am having a very strange issue where an XMLRPC DateTime value is passing a !nil? test but when I call .to_time on it it's saying "not available for nil"
bMalum has joined #ruby
<droptone>
I'm not going to begin to explain it, I"m just going to moan for a second. I'm done.
benlovell has joined #ruby
<droptone>
This is odd as fuck.
chrissonar has joined #ruby
NeverTired has quit [Quit: Connection closed for inactivity]
Guest33405 has quit [Quit: Leaving]
dopie has joined #ruby
duncan_ has quit [Quit: Leaving]
duncannz has joined #ruby
duncannz has quit [Max SendQ exceeded]
Fire-Dragon-DoL has quit [Quit: Quit]
asianMike has joined #ruby
maxz has quit [Quit: My Mac Pro has gone to sleep. ZZZzzz…]
duncannz has joined #ruby
Fire-Dragon-DoL has joined #ruby
dhjondoh has joined #ruby
ibouvousaime has quit [Ping timeout: 240 seconds]
duncannz has quit [Max SendQ exceeded]
<mallu>
shevy: I don't want to parse anything.. I just want to get the method argument as time
aeontech has joined #ruby
riotjones has joined #ruby
subscope has joined #ruby
<shevy>
yes you want some time object
benlovell has quit [Ping timeout: 252 seconds]
<shevy>
and you said you have a string
<shevy>
so there you go
asianMike has quit [Client Quit]
<mallu>
def test(date) Time.at(date) do something end ... calling method test(Time.utc(2015, 11, 19, 0, 0, 0)). I 'm getting TypeError: no implicit conversion of Time into String
riotjones has quit [Read error: Connection reset by peer]
riotjones has joined #ruby
dravine_ has joined #ruby
benlovell has joined #ruby
yoongkang has joined #ruby
helpa has quit [Remote host closed the connection]
helpa has joined #ruby
adac has joined #ruby
DoubleMalt has joined #ruby
sross_work|2 has joined #ruby
nettoweb has quit [Client Quit]
Eiam has quit [Ping timeout: 246 seconds]
yeshacker has joined #ruby
dravine has quit [Read error: Connection reset by peer]
monsieur1 is now known as monsieurp
monsieurp has quit [Changing host]
monsieurp has joined #ruby
sross07 has quit [Read error: Connection reset by peer]
yes`r has quit [Read error: Connection reset by peer]
shortdudey123 has quit [Excess Flood]
deg__ has quit [Ping timeout: 276 seconds]
dravine_ is now known as dravine
shortdudey123_ has joined #ruby
shortdudey123_ is now known as shortdudey123
deg_ has joined #ruby
yoongkang has quit [Ping timeout: 240 seconds]
ss_much has joined #ruby
jimbeaudoin has quit [Quit: Connection closed for inactivity]
<KrzaQ>
Is here anyone knowledgeable in ruby-graphviz? I'm trying to force position of nodes, but I have no idea how to achieve it, and the docs are less than useful, and so is the code.
<KrzaQ>
Alternatively, I could use an another gem that could create images out of graphs
marr has joined #ruby
vdamewood has joined #ruby
B1n4r10 has joined #ruby
karapetyan has joined #ruby
roxtrongo has joined #ruby
B1n4r10 has quit [Ping timeout: 255 seconds]
karapetyan has quit [Ping timeout: 250 seconds]
chrissonar has quit [Quit: Verlassend]
nofxx_ has joined #ruby
roxtrongo has quit [Ping timeout: 244 seconds]
howdoicomputer has joined #ruby
nofxx has quit [Ping timeout: 265 seconds]
Hounddog has joined #ruby
<ruurd>
Have a look at graphviz first.
<ruurd>
You can generate pictures from it with dot IIRC
Lildirt|SomeoneT has quit [Read error: No route to host]
SCHAAP137 has joined #ruby
howdoicomputer has quit [Ping timeout: 264 seconds]
<jsageryd>
KrzaQ: a point of using graphviz is that you don't need to bother with positioning
<cyb3rspy>
wanttobeabetterp: it has a methodology to learning any language which I find works really well for me.
nertzy2 has joined #ruby
haxrbyte has quit [Ping timeout: 250 seconds]
<adaedra>
maasha: should be possible through a template. I don't know if there is a mardown template already existing, though.
last_staff has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
<maasha>
adaedra: indeed it should be possible, I was just looking to see if anyone knew before jumping though hoops
<maasha>
*through
skade has joined #ruby
krzkrz has joined #ruby
Musashi007 has quit [Quit: Musashi007]
blueOxigen has joined #ruby
krz has quit [Read error: Connection reset by peer]
aspiers has joined #ruby
bluOxigen has quit [Ping timeout: 240 seconds]
Peg-leg has joined #ruby
senayar has joined #ruby
casadei has quit [Remote host closed the connection]
casadei has joined #ruby
ruurd has quit [Quit: ZZZzzz…]
ElSif has quit [Ping timeout: 240 seconds]
casadei has quit [Ping timeout: 260 seconds]
CloCkWeRX has joined #ruby
CloCkWeRX has left #ruby [#ruby]
bruno- has joined #ruby
DoubleMalt has quit [Remote host closed the connection]
emilkarl has quit [Quit: emilkarl]
Kelzier has joined #ruby
vdamewood has quit [Quit: Life beckons.]
tesuji has joined #ruby
maasha has quit [Ping timeout: 246 seconds]
bruno- has quit [Ping timeout: 260 seconds]
ruurd has joined #ruby
RegulationD has joined #ruby
bayed has joined #ruby
bb010g has quit [Quit: Connection closed for inactivity]
nertzy2 has quit [Quit: This computer has gone to sleep]
howdoicomputer has joined #ruby
RegulationD has quit [Ping timeout: 244 seconds]
build22_ has joined #ruby
djbkd has quit [Remote host closed the connection]
skade has quit [Quit: Computer has gone to sleep.]
howdoicomputer has quit [Ping timeout: 272 seconds]
emilkarl has joined #ruby
blueOxigen has quit [Ping timeout: 240 seconds]
jamto11 has joined #ruby
rodfersou has joined #ruby
build22_ has quit []
baweaver has joined #ruby
shredding has joined #ruby
rdark has joined #ruby
rdark has joined #ruby
skade has joined #ruby
jimms has left #ruby [#ruby]
rdark has quit [Client Quit]
karapetyan has joined #ruby
rdark has joined #ruby
jamto11 has quit [Ping timeout: 252 seconds]
lulzmachine has quit [Quit: Connection closed for inactivity]
bMalum has quit [Quit: bMalum]
nirix has joined #ruby
subscope has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
subscope has joined #ruby
subscope has quit [Client Quit]
baweaver has quit [Ping timeout: 264 seconds]
karapetyan has quit [Ping timeout: 250 seconds]
bMalum has joined #ruby
colli5ion has joined #ruby
DoubleMalt has joined #ruby
roxtrongo has joined #ruby
codecop has quit [Remote host closed the connection]
huddy has joined #ruby
<UniFreak>
when tring to install hitimes in cygwin(although I don't know what's hitimes, but to run jekyll, I run `bundle install`, and bundle is tring to install hitimes), the error output is like this: http://paste.ubuntu.com/13343697/
ibouvousaime has joined #ruby
roxtrongo has quit [Ping timeout: 260 seconds]
moeabdol has joined #ruby
<norc>
UniFreak: Brave thing to use cygwin.
platzhirsch has joined #ruby
<UniFreak>
any idea why? how could I fix this?
<UniFreak>
I'm just trying to get jekyll run in cygwin
<emilkarl>
I’d love some feedback on this. How could I improve this apply_filter method? http://pastie.org/10565322
<UniFreak>
been stucked over here and there for days....
<norc>
emilkarl: use a scope :)
arup_r has joined #ruby
<emilkarl>
hmm k but apply in the example is just one…but the filter could be something other the event_date range. I just added that for the sake of it
arup_r is now known as Guest75266
braincrash has quit [Ping timeout: 272 seconds]
subscope has joined #ruby
<norc>
emilkarl: Still. Use scopes in your model.
tubuliferous_ has joined #ruby
<emilkarl>
how could it imrpove apply_filters method?
ledestin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
go|dfish has quit [Ping timeout: 264 seconds]
<norc>
KrzaQ: errr no. map.with_index
<norc>
Probably easiest. :)
TPBallbag has joined #ruby
krzkrz has quit [Quit: WeeChat 1.2]
<norc>
Or each_with_index.map - either way
<KrzaQ>
oh, right
emrox_ has joined #ruby
<KrzaQ>
thanks, norc
braincrash has joined #ruby
vdamewood has joined #ruby
emrox has quit [Ping timeout: 240 seconds]
yoongkang has joined #ruby
<KrzaQ>
ah
<KrzaQ>
it's map.with_index
<KrzaQ>
Well, it works. Thanks again
rdark has quit [Quit: leaving]
joonty has joined #ruby
ldnunes has joined #ruby
bkxd has joined #ruby
yoongkang has quit [Ping timeout: 240 seconds]
lubekpl has joined #ruby
banister has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tubuliferous_ has quit [Ping timeout: 250 seconds]
yoongkang has joined #ruby
rdark has joined #ruby
go|dfish has joined #ruby
dramagods has joined #ruby
<KrzaQ>
Can I use % formatting with heredocs?
tvw has joined #ruby
dlitvak has joined #ruby
FernandoBasso has joined #ruby
montagne_goat has quit []
UniFreak has quit [Ping timeout: 252 seconds]
dlitvak_ has joined #ruby
emilkarl has quit [Quit: emilkarl]
moeabdol has quit [Read error: Connection reset by peer]
moeabdol has joined #ruby
howdoicomputer has joined #ruby
<Bish>
hi, is there some way i can provide a ftp server, which is safe?, all the ftp daemons in ruby tell me they're for testing purpose not for real use
dlitvak has quit [Ping timeout: 250 seconds]
ibouvousaime has quit [Ping timeout: 276 seconds]
UtkarshRay has joined #ruby
ibouvousaime has joined #ruby
howdoicomputer has quit [Ping timeout: 246 seconds]
helpa-bot has joined #ruby
<ddv>
Bish: use sftp
favadi has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Bish>
ddv, so there is a sftp server, but no ftp server?
LoganG_ has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
AccordsLTN has joined #ruby
<Bish>
or do you want to tell me, because of encryption it's safe
Downtime has joined #ruby
AccordLTN has quit [Write error: Broken pipe]
Antiarc has quit [Write error: Broken pipe]
helpa has quit [Write error: Broken pipe]
Puffball has quit [Write error: Broken pipe]
kalleth has quit [Write error: Broken pipe]
Meeh has quit [Write error: Broken pipe]
contradictioned_ has quit [Write error: Broken pipe]
mhenrixon_ has quit [Excess Flood]
kitallisii has quit [Excess Flood]
matp has quit [Excess Flood]
prasselpikachu has quit [Excess Flood]
havenwood has quit [Excess Flood]
Zarthus has quit [Quit: I can't go to hell. I'm all out of vacation days.]
LoganG has quit [Quit: robots are cool]
LoganG_ is now known as LoganG
Uptime has quit [Quit: :}]
heftig has quit [Quit: No Ping reply in 180 seconds.]
Prira has quit [Quit: No Ping reply in 180 seconds.]
mhenrixon has joined #ruby
prasselpikachu has joined #ruby
havenn has joined #ruby
havenn has joined #ruby
Zarthus has joined #ruby
kitallis has joined #ruby
jamto11 has joined #ruby
kalleth has joined #ruby
Antiarc has joined #ruby
Meeh has joined #ruby
Puffball has joined #ruby
heftig has joined #ruby
havenn is now known as havenwood
rodferso1 has joined #ruby
contradictioned has joined #ruby
rodferso1 has quit [Client Quit]
helpa-bot has quit [Remote host closed the connection]
helpa has joined #ruby
rodferso1 has joined #ruby
rodferso1 has quit [Client Quit]
Prira has joined #ruby
akem has quit [Quit: Bye]
<norc>
Bish: If safety is a concern, then you should look at a mature solution.
ruid has joined #ruby
baweaver has joined #ruby
<norc>
I am not aware of any mature ftpd implementation in Ruby.
karapetyan has joined #ruby
jamto11 has quit [Ping timeout: 240 seconds]
quazimodo has joined #ruby
akem has joined #ruby
roxtrongo has joined #ruby
UniFreak has joined #ruby
dlitvak has joined #ruby
yardenbar has quit [Ping timeout: 250 seconds]
<Bish>
norc, one of our clients wantttts a ftp upload it has to be ftp ( it's a web application )
The_Phoenix has joined #ruby
<norc>
Bish: So? Set up a vsftpd, pureftpd or proftpd on your server.
<norc>
Or any other ftpd you like.
<Bish>
yes, then i will have them f*ing with my filesystem
dhjondoh has quit [Ping timeout: 276 seconds]
<Bish>
and i will have to create a ftp server for every client, or leave this feature to this only client
moeabdol has quit [Read error: Connection reset by peer]
karapetyan has quit [Ping timeout: 250 seconds]
<Bish>
im new to business :D no clue how i handle that
baweaver has quit [Ping timeout: 240 seconds]
The_Phoenix has quit [Client Quit]
<norc>
Bish: So what you want is either an orchestration solution in some VM environment like ansible, or use docker.
dlitvak_ has quit [Ping timeout: 240 seconds]
<ddv>
Bish: you can chroot vsftpd
<ddv>
Bish: this is pretty easy to do
<norc>
Bish: And if you only need to provide FTP space to each client, just use docker.
<norc>
If you insist on giving each his own ftpd.
moeabdol has joined #ruby
matp has joined #ruby
<ddv>
'just use docker lol'
<ddv>
there is no reason to give each user its own ftpd daemon
<ddv>
docker will overcomplicate this
dhjondoh has joined #ruby
<Bish>
the software gets hosted on the clients server, each time, i already thought about using docker, right now i wanted to create a chroot for every client
<Bish>
(i am still in developement)
<ddv>
this is just a default feature of vsftpd
<Bish>
you mean chrooting the ftpd?
<ddv>
yes it will chroot each user
karapetyan has joined #ruby
<Bish>
yeah i know vsftpd, used it several times, but i actually hate the fact that i would've to configure it for every client
solocshaw has joined #ruby
karapetyan has quit [Client Quit]
codecop has joined #ruby
<ddv>
i would not use ftp anyways, it's not secure and ftps is very tricking with certain firewalls so just use sftp
<ddv>
tricky*
<Bish>
i wouldn't even use sftp, but this one client WANTS it, for stupid reasons
<Bish>
what can i do
Rickmasta has joined #ruby
<ddv>
Bish: educate them
<ddv>
show them the risks
<Bish>
tried, failed
rgtk has quit [Remote host closed the connection]
<Bish>
as i said im new :3
<Bish>
"ftp is faster"
htmldrum has quit [Ping timeout: 265 seconds]
<Bish>
yeah rightl.
jokester has quit [Ping timeout: 240 seconds]
bruno- has joined #ruby
symm- has quit [Ping timeout: 250 seconds]
<ddv>
try harder
Darkchaos has joined #ruby
karapetyan has joined #ruby
dotix has joined #ruby
karapetyan has quit [Remote host closed the connection]
Ox0dea has joined #ruby
<Darkchaos>
Hey Guys. I am looking for a good way to spawn a new process and capture it's IO. I came across open3#popen3, my problem is, that I can't use Marshal.dump for the IO objects (STDIN, STDERR). Can i somehow serialize the PID and then open the Streams on Demand?
<Darkchaos>
And/Or is there something returning a "Process" Object, where I can see if the process is still alive and open said streams?
bruno- has quit [Ping timeout: 250 seconds]
<Ox0dea>
Darkchaos: Not Windows, presumably?
<Darkchaos>
Currently only Debian, but platform independant would be nice aswell
pard has joined #ruby
yoongkang has quit [Remote host closed the connection]
<Ox0dea>
Darkchaos: Well, there's procfs on Linux, so you could just read and write to the file descriptors in /proc/PID/fd.
<Bish>
Ox0dea, o/
<Ox0dea>
Bish?
Hounddog has quit [Read error: Connection reset by peer]
<Bish>
hello!
<Ox0dea>
\o, in any case. :P
<Ox0dea>
Sorry, my name memory is shit. :<
yoongkang has joined #ruby
roxtrongo has quit [Ping timeout: 252 seconds]
<Bish>
somehow my it reminds me of nazi germany
<Bish>
if you do it that way around, even if mine should be
<Bish>
Ox0dea, im also arne or arne_ you helped me alot last weeks
<platzhirsch>
in-flight WiFi, my first git push at 100,000 meters height. So exciting..
purplexed- has quit [Ping timeout: 244 seconds]
Hounddog has joined #ruby
<pard>
salutes
<Bish>
platzhirsch, cool!
<Bish>
my 12h flight didn't have wifi :( atleast afaik.
<pard>
is ~@ any diff from ~
solocshaw has quit [Ping timeout: 246 seconds]
<Darkchaos>
0x0dea: Ah good to know :) And then Process#spawn and Process#detach I guess?
<platzhirsch>
better spend some time reading : D
<Ox0dea>
pard: No, and neither `!@` from `!`..
shlomo has joined #ruby
<pard>
thanks
<Ox0dea>
We need more unary operators.
<pard>
:)
roxtrongo has joined #ruby
<Ox0dea>
`*` and `**` technically count, but the context in which they're valid as such is quite limited.
Hounddog has quit [Ping timeout: 240 seconds]
<pard>
i couldn't help asking why !@ when ! already takes just one op
rodfersou is now known as rodfersou|tea
Hounddog has joined #ruby
<Ox0dea>
pard: Whale, it's consistent with `+@` and `-@`, and that's worth something.
<pard>
:)
<pard>
eating shark fin is cruel :\
<Ox0dea>
Darkchaos: Sorry, I missed your mis-ping, but yeah, something like that would do fine.
elaptics is now known as elaptics`away
elaptics`away is now known as elaptics
<Ox0dea>
Be advised that normal processes aren't allowed to read arbitrarily from procfs.
aryaching has joined #ruby
<pard>
why isn't there any decent manual on Ripper?
platzhirsch has left #ruby [#ruby]
<Ox0dea>
pard: You're not supposed to use it.
stamina has joined #ruby
<pard>
thanks
terabytes has quit []
Guest75266 is now known as arup_r
<Darkchaos>
Ox0dea: Oh it's an O instead of an 0 in the beginning :D
dlitvak_ has joined #ruby
platzhirsch has joined #ruby
dlitvak has quit [Ping timeout: 264 seconds]
Hounddog has quit [Ping timeout: 246 seconds]
<Darkchaos>
Ox0dea: But when I call Process#spawn they should be my child-process and as such I should have the permission?
<Darkchaos>
Or is it the usual "root only" thing?
subscope has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
pard has quit [Quit: Leaving]
<Ox0dea>
Darkchaos: No, that'll be fine; I didn't realize you were in control of these processes you meant to attach to.
subscope has joined #ruby
<Ox0dea>
You need many of them at once, then?
subscope has quit [Client Quit]
<Darkchaos>
Ox0dea: Yes. Infact I created something like a scheduler, which will start those processes, restart them if they crash/exit, and such. And I thought it would be nice to have the Output being read out aswell
Amnez777_ has joined #ruby
Amnez777_ has quit [Max SendQ exceeded]
zvive has quit [Ping timeout: 244 seconds]
platzhirsch has left #ruby [#ruby]
Amnez777 has quit [Ping timeout: 272 seconds]
Amnez777_ has joined #ruby
tesuji has quit [Ping timeout: 265 seconds]
Hounddog has joined #ruby
<Ox0dea>
Darkchaos: That sounds pretty nifty; are you sure #popen3 was insufficient?
solars has quit [Quit: WeeChat 0.4.2]
<Ox0dea>
(Worst semicolon ever.)
Amnez777_ has quit [Changing host]
Amnez777_ has joined #ruby
Amnez777_ has quit [Max SendQ exceeded]
Downtime is now known as Uptime
<Darkchaos>
Ox0dea: Well it uses a web-frontend and as such I need something to serialize to my DB. Unfortunately IO's are not serializable (Marshal.dump can't)
<Ox0dea>
Darkchaos: Gotcha.
<Darkchaos>
And as such I'd only need the PID and open the Stream only when someone wants to see what that particular process has done in the past
<Ox0dea>
Darkchaos: Dead processes disappear from procfs, mind.
Hounddog has quit [Ping timeout: 240 seconds]
bruno- has joined #ruby
<Darkchaos>
so having a short back-log would be nice, mh. on the other hand it's just to have a glimpse on what the process currently does. In case of error the process is restarted five times and then it's listed as errorneous
solars has joined #ruby
jokester has joined #ruby
Amnez777 has joined #ruby
bMalum has quit [Quit: bMalum]
lubarch has joined #ruby
Amnez777_ has joined #ruby
rob_ has left #ruby [#ruby]
skade has joined #ruby
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Fredrich_ has quit [Remote host closed the connection]
iateadonut has joined #ruby
iateadonut has quit [Client Quit]
Hounddog has joined #ruby
rodfersou|tea is now known as rodfersou
Amnez777 has quit [Ping timeout: 260 seconds]
howdoicomputer has joined #ruby
moeabdol has quit [Read error: Connection reset by peer]
zvive has joined #ruby
Amnez777_ has quit [Changing host]
Amnez777_ has joined #ruby
Amnez777_ is now known as Amnez777
spiman has joined #ruby
Hounddog has quit [Ping timeout: 246 seconds]
Hounddog has joined #ruby
scripore has joined #ruby
<Darkchaos>
Ox0dea: When a gem calls itself thread-safe I don't have to worry about anything, right? Just use it as I would without Threads?
howdoicomputer has quit [Ping timeout: 260 seconds]
Zarthus_ has joined #ruby
Hounddog has quit [Excess Flood]
Amnez777 has quit [Excess Flood]
Zarthus has quit [Quit: I can't go to hell. I'm all out of vacation days.]
krz has joined #ruby
bMalum has joined #ruby
Amnez777 has joined #ruby
moeabdol has joined #ruby
<Ox0dea>
Darkchaos: I am not omniscient. :P
Amnez777 has quit [Max SendQ exceeded]
jamto11 has joined #ruby
Amnez777 has joined #ruby
vondruch has quit [Ping timeout: 255 seconds]
yashinbasement has quit [Ping timeout: 244 seconds]
<Darkchaos>
Ox0dea: Okay :P Maybe someone else knows. But basically that should be what thread safe means I guess :D
circ-user-hgOzR has joined #ruby
rubie has joined #ruby
circ-user-hgOzR has left #ruby [#ruby]
jamto11 has quit [Ping timeout: 255 seconds]
Rickmasta has joined #ruby
Hounddog has joined #ruby
rubie has quit [Ping timeout: 265 seconds]
ibouvousaime_ has joined #ruby
ibouvousaime has quit [Read error: Connection reset by peer]
diego2 has joined #ruby
shredding has quit [Ping timeout: 240 seconds]
AlexRussia has joined #ruby
Amnez777 has quit [Changing host]
Amnez777 has joined #ruby
dviola has quit [Ping timeout: 250 seconds]
Hounddog has quit [Ping timeout: 246 seconds]
diego3 has joined #ruby
diego3 has quit [Changing host]
diego3 has joined #ruby
diego2 has quit [Ping timeout: 255 seconds]
tinyhippo has left #ruby [#ruby]
Hounddog has joined #ruby
memph1s has joined #ruby
diego3 is now known as dviola
Amnez777 has quit [Ping timeout: 252 seconds]
memph1s has quit [Client Quit]
dikaio has quit [Quit: ........]
vondruch has joined #ruby
Hounddog has quit [Excess Flood]
andikr has quit [Ping timeout: 276 seconds]
B1n4r10 has joined #ruby
Hounddog has joined #ruby
SCHAAP137 has quit [Remote host closed the connection]
cbetta has joined #ruby
ruurd has quit [Quit: ZZZzzz…]
Mon_Ouie has joined #ruby
zvive has quit [Ping timeout: 260 seconds]
omz has joined #ruby
<adaedra>
Ox0dea: you lie
favadi has joined #ruby
* Ox0dea
hides crystal ball.
scripore has quit [Quit: This computer has gone to sleep]
yoongkang has quit [Remote host closed the connection]
tulak has joined #ruby
B1n4r10 has quit [Ping timeout: 260 seconds]
lxsameer has quit [Quit: Leaving]
omz has quit []
emilkarl has joined #ruby
<bob_f>
Darkchaos: When a gem calls itself thread-safe it probably means it's not thread safe.
yardenbar has joined #ruby
benlovell has quit [Ping timeout: 250 seconds]
UtkarshRay has quit [Remote host closed the connection]
<apeiros>
Darkchaos: thread-safe does not mean "no worries". it means that concurrent access should not corrupt data. that's about all.
<bob_f>
And that "should" is really important.
jas02 has joined #ruby
<apeiros>
and as for bob_f's comment - that's just a variation of "everything is buggy"
<bob_f>
Eh.
<apeiros>
i.e., if it fails to do so - file a bug.
<bob_f>
People don't write "bug free" in their readmes.
<bob_f>
They do write "thread safe".
<apeiros>
well, actually…
yoongkang has joined #ruby
<apeiros>
yes. which is part of the description of the functionality.
vondruch has quit [Quit: Ex-Chat]
<apeiros>
perfectly sane. even if a bug means it isn't fully thread-safe.
<apeiros>
it'd rather be insane to do the opposite.
roxtrongo has quit [Remote host closed the connection]
<apeiros>
or would you prefer software had completely empty descriptions because a bug might mean some of it doesn't do as it should?
SCHAAP137 has joined #ruby
<bob_f>
What I'm saying is that people explicitly write "thread safe" and people who don't know a great deal about threaded software might easily think "oh cool, i don't have to think about threads then".
<bob_f>
No need to be so obtuse here.
<apeiros>
!kick bob_f no insults
bob_f was kicked from #ruby by ruboto [no insults]
bob_f has joined #ruby
<apeiros>
it's not the duty of the software developer to ensure that established language is understood by everybody.
<bob_f>
I am insulted that you do not know what obtuse means.
<apeiros>
bob_f: I can make that kick a ban too.
<apeiros>
better you drop it and fix your attitude for the future.
<bob_f>
Nah, you're representing the channel well; go ahead.
shlomo has quit [Quit: WeeChat 1.3]
<bob_f>
Nope ?
<bob_f>
Boring.
bob_f has left #ruby [#ruby]
neanderslob has quit [Read error: Connection reset by peer]
skade has quit [Quit: Computer has gone to sleep.]
tubuliferous_ has joined #ruby
<Ox0dea>
How do I update a local gem?
UniFreak1 has joined #ruby
skade has joined #ruby
<suchness>
Ox0dea: Can't you just gem checkout over the top of it?
<Ox0dea>
suchness: I specifically want to invoke RubyGems' update process.
<suchness>
Ox0dea: Ah, I am not sure you can, I think you need to update the installed version and then checkout over the top. I could be wrong though.
<Ox0dea>
I'm doing something unorthodox upon installation and can't immediately tell whether it'll execute on update or not.
<suchness>
Come to think of it I hope I am
<Ox0dea>
Right?
<suchness>
Seems like you should be able to do it...
<Ox0dea>
It should arguably be as simple as `gem up -l`, and then it'd look for a new version in the same directory as the original.
UniFreak has quit [Ping timeout: 264 seconds]
<Ox0dea>
`gem up -l` sounds like "je m'appelle".
<Ox0dea>
adaedra: ^
<apeiros>
Ox0dea: what do you mean, update a local gem? gem install path/to.gem
<Ox0dea>
apeiros: That invokes installation.
<Ox0dea>
I'm trying to determine exactly how install and update differ, because surely they must?
prestorium has joined #ruby
<apeiros>
I don't think I've ever used `gem update` and was just wondering the same.
UniFreak1 has quit [Ping timeout: 246 seconds]
pawnbox has joined #ruby
sdothum has joined #ruby
<apeiros>
oh, well, I used gem update --system. but that's the only one.
kobain has joined #ruby
<apeiros>
I think the point of `gem update` is to use it to update all gems
lkba has quit [Ping timeout: 250 seconds]
<adaedra>
Ox0dea: after some drinks, yes
<Ox0dea>
Sure, but my one will be involved in that process.
<apeiros>
`gem install` requires you to tell it which one to install (and hence update)
postmodern has quit [Quit: Leaving]
daivyk has joined #ruby
<apeiros>
Ox0dea: then that'll probably result in "gem not found". and I don't think we can add local paths as source.
banister has joined #ruby
<apeiros>
but maybe I'm wrong :)
<apeiros>
hey banister
<Ox0dea>
apeiros: I think you've just misunderstood.
<banister>
apeiros hoi meneer, hoe gaat het?
<apeiros>
banister: I don't speak dutch (that was dutch, right?)
<shevy>
long live ruby!
<Ox0dea>
I'm convincing `gem` to execute code post-installation, and I need to determine whether that same code will be executed post-update.
<shevy>
are you trying to break something again Ox0dea
<Ox0dea>
shevy: Always.
<shevy>
you have my blessings then
<Ox0dea>
(But not actually this time.)
<Ox0dea>
<3
<banister>
apeiros oh, i thought all non-native english europeans spoke the same language, i wasn't sure what it was called, i just know that it's quaint
<Ox0dea>
Yuropese.
<apeiros>
Ox0dea: and `gem update path/to.gem` didn't work?
<apeiros>
hm, ok. with different versions, I'd have expected that to work.
<apeiros>
though, I am pretty sure that update will invoke installation
<apeiros>
drbrain: ping - insights in Ox0dea's problem?
slackbotgz has joined #ruby
<Ox0dea>
drbrain: I've added "Rakefile" as an extension to have my default task invoked post-installation; will that task be executed during an update?
benlovell has joined #ruby
<apeiros>
mhm, I see the same here. `gem update -l path/to.gem` with a gem which has a newer version number "fails" with "nothing to update"
<Ox0dea>
As it should, I would think.
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<apeiros>
and when I do `gem update gemname` it works (the newer version was pushed, i.e. is on the gem servers)
<apeiros>
Ox0dea: hm? I'd expect it to update the gem.
<Ox0dea>
apeiros: `gem update` takes the gem to update, not the gem to update to.
xet7 has joined #ruby
<apeiros>
what's the purpose of -l then?
<Ox0dea>
Local overrides, I guess.
roxtrongo has joined #ruby
<apeiros>
or rather -r, because you can't update a remote gem…
varunwachaspati_ has quit [Quit: Connection closed for inactivity]
<Ox0dea>
Not with that attitude.
tubuliferous_ has quit [Ping timeout: 264 seconds]
emrox_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
howdoicomputer has joined #ruby
<apeiros>
I mean, the part "takes the gem to update, not the gem to update to" makes sense. but I don't see how that should work together with -l/-r
emilkarl has quit [Quit: emilkarl]
<Ox0dea>
We need a doctor.
Melpaws has joined #ruby
<apeiros>
indeed. curious to read what drbrain has to say to this :)
<apeiros>
`gem help update`leaves me none the wiser
<Ox0dea>
Aye, same boat.
casadei has joined #ruby
subscope has joined #ruby
<apeiros>
but given what I saw in my gem update, it does execute an installation. mine had a post-install message and that was shown.
<apeiros>
i.e. I expect gem update to do something akin "find all gems which match REGEX, get current versions for them, install those"
<Ox0dea>
Yeah, that sounds spot-on, but I'd like to become aware of any subtle differences.
<apeiros>
until then - you could run a geminabox server
howdoicomputer has quit [Ping timeout: 240 seconds]
<apeiros>
and use that as your only source, or as an added source
doddok has joined #ruby
ibouvousaime_ has quit [Ping timeout: 272 seconds]
<Ox0dea>
Somebody recently tried to use geminabox and found it to be broken; Radar pointed them toward gemstash.
emrox has joined #ruby
<Ox0dea>
I suppose I'll do that if the neurologist hasn't yet woken when I return.
daivyk has quit [Ping timeout: 255 seconds]
ruid has quit [Ping timeout: 276 seconds]
jamto11 has joined #ruby
saab900 has joined #ruby
saab900_ has joined #ruby
pawnbox has quit [Remote host closed the connection]
k3asd` has joined #ruby
ruid has joined #ruby
PaulCape_ has quit [Quit: .]
riotjones has quit [Quit: Leaving...]
baweaver has joined #ruby
PaulCapestany has joined #ruby
jamto11 has quit [Ping timeout: 250 seconds]
Melpaws has quit [Quit: Leaving.]
roxtrong_ has joined #ruby
icey has left #ruby ["undefined"]
icey has joined #ruby
atomical has joined #ruby
synthroid has joined #ruby
roxtrongo has quit [Ping timeout: 264 seconds]
Coldblackice has quit [Ping timeout: 260 seconds]
baweaver has quit [Ping timeout: 246 seconds]
moeabdol has quit [Ping timeout: 260 seconds]
quazimodo has quit [Ping timeout: 260 seconds]
sgambino has joined #ruby
joonty has quit [Quit: joonty]
norc has quit [Ping timeout: 246 seconds]
emilkarl has joined #ruby
codecop has quit [Read error: Connection reset by peer]
mooe has quit [Quit: Connection closed for inactivity]
roxtrong_ has quit [Remote host closed the connection]
ruid has quit [Ping timeout: 250 seconds]
yfeldblum has quit [Ping timeout: 246 seconds]
tesuji has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
pawnbox has joined #ruby
Ilyes512 has joined #ruby
donske has joined #ruby
howdoicomputer has joined #ruby
rgtk has joined #ruby
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
exadeci has quit [Quit: Connection closed for inactivity]
dviola has quit [Ping timeout: 265 seconds]
kobain has quit [Read error: Connection timed out]
slackbotgz has quit [Remote host closed the connection]
kobain has joined #ruby
slackbotgz has joined #ruby
vondruch has joined #ruby
jsageryd has quit [Quit: o/]
rgtk has quit [Ping timeout: 260 seconds]
j416 has joined #ruby
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
_stu_ has joined #ruby
diego2 has joined #ruby
icey has quit [Remote host closed the connection]
diego2 has quit [Changing host]
diego2 has joined #ruby
icey has joined #ruby
diego2 is now known as diegoviola
diegoviola is now known as dviola
liuchun has joined #ruby
liuchun has quit [Client Quit]
shredding has joined #ruby
<brainfire>
is there an easy predefined method to sort an array of arrays of two strings by one of the strings...?
<shevy>
hmmm
<shevy>
why do we not have a method called .prepend for array?
howdoicomputer has quit [Ping timeout: 260 seconds]
linuxboytoo has quit [Remote host closed the connection]
<shevy>
Ox0dea yeah for strings... was weird because [0,0]= works both on strings and arrays, but for putting stuff before anything, we have .prepend on String and .unshift for Arrays although both strike me as synonymous when we also have [0,0]=
vondruch has joined #ruby
<Ox0dea>
shevy: You'd want String#push, then?
GrammarFegelein has joined #ruby
j416 has quit [Changing host]
j416 has joined #ruby
linuxboytoo has joined #ruby
<shevy>
lol
akem has quit [Ping timeout: 276 seconds]
<Ox0dea>
Ruby doesn't take the notion that a string is a collection of characters as far as some might prefer.
<brainfire>
I have an array that looks like [[string1,string2],....] where string 1 may repeat for different string2s. I'm looking for some way to group all the string1s together
<Ox0dea>
brainfire: foo.group_by(&:first)
jschoolcraft has joined #ruby
<brainfire>
Ox0dea: group_by returns a hash, I'd like to keep it an array
<Ox0dea>
brainfire: Are you sure?
Amnez777 has joined #ruby
<brainfire>
Ox0dea: I've already written other code that assumes it's an array >.<
<Ox0dea>
Well, that was dumb. :<
<Ox0dea>
Seems like you just need to sort the thing?
Edward_ has joined #ruby
wprice has joined #ruby
emrox has quit [Read error: Connection reset by peer]
<brainfire>
gee thanks
<Ox0dea>
I'm having trouble taking your meaning.
<Ox0dea>
Unless I've misunderstood, literally just calling #sort on an Array like that will get you the results you think you want.
emrox has joined #ruby
<brainfire>
.sort! was the first thing I tried it doesn't work.
dlitvak has joined #ruby
<Ox0dea>
> doesn't work
dlitvak_ has quit [Ping timeout: 250 seconds]
banzaikitten has left #ruby [#ruby]
howdoicomputer has joined #ruby
umgrosscol has joined #ruby
curses has quit []
meatchicken has quit [Ping timeout: 255 seconds]
zotherstupidguy has quit [Quit: WeeChat 1.3]
<DefV>
ww/10
yoongkang has quit [Remote host closed the connection]
duoi has joined #ruby
chipotle has quit [Quit: cheerio]
malconis has joined #ruby
davedev24 has joined #ruby
adac has joined #ruby
l4cr0ss has joined #ruby
kenpoint has joined #ruby
<l4cr0ss>
Documentation states that recvfrom "Receives up to maxlen bytes from udpsocket using recvfrom(2)". What are the circumstances that lead to recvfrom returning fewer than the maxlen number of bytes?
icey has quit [Remote host closed the connection]
malconis has quit [Remote host closed the connection]
icey has joined #ruby
dramagods has quit [Remote host closed the connection]
slackbotgz has quit [Remote host closed the connection]
saab900 has quit [Quit: Leaving]
saab900_ has quit [Quit: Leaving]
codecop has joined #ruby
FernandoBasso has quit [Quit: Leaving]
adac has quit [Ping timeout: 264 seconds]
<l4cr0ss>
Just whatever is available at the time the read is made?
UtkarshRay has joined #ruby
mistermocha has joined #ruby
<jhass>
l4cr0ss: for example if the other side closed the connection
icey has quit [Remote host closed the connection]
howdoicomputer has quit [Ping timeout: 240 seconds]
dramagods has joined #ruby
<brainfire>
oops it does work. I was using the wrong fields
malconis has joined #ruby
icey has joined #ruby
djbkd has joined #ruby
sanjayu has quit [Ping timeout: 250 seconds]
mistermocha has quit [Ping timeout: 246 seconds]
zotherstupidguy has joined #ruby
zotherstupidguy has quit [Changing host]
zotherstupidguy has joined #ruby
jamto11 has joined #ruby
umgrosscol has quit [Ping timeout: 272 seconds]
dramagods has quit [Ping timeout: 260 seconds]
Ox0dea has quit [Quit: WeeChat 1.4-dev]
Mia has joined #ruby
Mia has quit [Changing host]
Mia has joined #ruby
B1n4r10 has joined #ruby
ESpiney has joined #ruby
baweaver has joined #ruby
jamto11 has quit [Ping timeout: 264 seconds]
Ox0dea has joined #ruby
skade has joined #ruby
baweaver has quit [Ping timeout: 240 seconds]
s2013 has joined #ruby
B1n4r10 has quit [Ping timeout: 265 seconds]
stamina has quit [Quit: WeeChat 1.3]
sankaber has joined #ruby
ss_much has quit [Quit: Connection closed for inactivity]
vbatts|work is now known as vbatts
htmldrum has joined #ruby
icey has quit [Remote host closed the connection]
grill has joined #ruby
icey has joined #ruby
nofxx has quit [Remote host closed the connection]
nofxx has joined #ruby
sankaber has quit [Remote host closed the connection]
sankaber has joined #ruby
cdg has joined #ruby
pandaant has joined #ruby
umgrosscol has joined #ruby
freerobby has joined #ruby
freerobby has quit [Read error: Connection reset by peer]
freerobby has joined #ruby
mary5030 has joined #ruby
mistermocha has joined #ruby
htmldrum has quit [Ping timeout: 255 seconds]
yeshacker has quit [Ping timeout: 260 seconds]
pawnbox_ has joined #ruby
gambl0re has quit [Ping timeout: 240 seconds]
roxtrongo has joined #ruby
vdamewood has quit [Quit: Life beckons.]
mistermocha has quit [Ping timeout: 260 seconds]
pawnbox has quit [Ping timeout: 272 seconds]
spiman has quit [Remote host closed the connection]
vbatts has left #ruby ["found the other side of the rainbow"]
melter has quit [Remote host closed the connection]
monthy has quit [Killed (Sigyn (Spam is off topic on freenode.))]
varunwachaspati_ has joined #ruby
idefine_ has quit [Read error: Connection reset by peer]
mjuszczak has quit []
idefine has joined #ruby
mjuszczak has joined #ruby
tsunamie has quit [Ping timeout: 246 seconds]
tubulife- has quit [Read error: Connection reset by peer]
ruurd has joined #ruby
ruby-lang277 has quit [Quit: Page closed]
tubuliferous_ has joined #ruby
axl_ has joined #ruby
howdoicomputer has quit [Ping timeout: 244 seconds]
Ox0dea has quit [Ping timeout: 246 seconds]
leslie has joined #ruby
leslie has quit [Changing host]
leslie has joined #ruby
tsunamie has joined #ruby
dramagods has quit [Remote host closed the connection]
Jardayn has joined #ruby
YankNYC has joined #ruby
idefine has quit [Read error: Connection reset by peer]
idefine has joined #ruby
tsunamie has quit [Ping timeout: 246 seconds]
djbkd has joined #ruby
psy_ has joined #ruby
tsunamie has joined #ruby
psy_ has quit [Max SendQ exceeded]
idefine has quit [Read error: Connection reset by peer]
psy_ has joined #ruby
idefine has joined #ruby
RegulationD has joined #ruby
Regulati_ has joined #ruby
idefine has quit [Read error: Connection reset by peer]
idefine has joined #ruby
dramagods has joined #ruby
mjuszczak has quit []
grill has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
RegulationD has quit [Remote host closed the connection]
CodingWolf has quit [Quit: Leaving]
rubie has joined #ruby
matp has quit [Ping timeout: 240 seconds]
ruurd has quit [Read error: Connection reset by peer]
CodingWolf has joined #ruby
diegoaguilar has joined #ruby
kirun has joined #ruby
ruurd has joined #ruby
greenbig- is now known as greenbigfrog
arup_r has joined #ruby
arup_r is now known as Guest95752
AustinMatherne has quit [Remote host closed the connection]
AustinMatherne has joined #ruby
tomphp has quit [Remote host closed the connection]
baweaver has joined #ruby
bayed has quit [Quit: Connection closed for inactivity]
dotix has quit [Ping timeout: 272 seconds]
arthurix_ has joined #ruby
tomphp has joined #ruby
dramagods has quit [Remote host closed the connection]
maikowblue has joined #ruby
roxtrong_ has quit [Remote host closed the connection]
sankaber has quit [Remote host closed the connection]
ruurd has quit [Read error: Connection reset by peer]
momomomomo has quit [Ping timeout: 252 seconds]
sankaber has joined #ruby
AustinMatherne has quit [Remote host closed the connection]
Kabaka has quit [Changing host]
Kabaka has joined #ruby
AustinMatherne has joined #ruby
arthurix has quit [Ping timeout: 260 seconds]
baweaver has quit [Ping timeout: 240 seconds]
momomomomo has joined #ruby
banister has joined #ruby
matp has joined #ruby
rubie has quit [Remote host closed the connection]
SCHAAP137 has quit [Remote host closed the connection]
Alayde has joined #ruby
<Alayde>
.close
<Alayde>
woops
Alayde has left #ruby [#ruby]
nofxx has quit [Remote host closed the connection]
jackjackdripper has joined #ruby
nofxx has joined #ruby
ruurd has joined #ruby
nofxx has quit [Changing host]
nofxx has joined #ruby
sinkensabe has quit [Read error: Connection reset by peer]
dramagods has joined #ruby
Peg-leg has quit [Quit: Leaving.]
sepp2k has joined #ruby
I has joined #ruby
I is now known as Guest21385
baweaver has joined #ruby
aufi has quit [Ping timeout: 244 seconds]
mjuszczak has joined #ruby
tomphp has quit [Read error: Connection reset by peer]
tomphp has joined #ruby
simplyianm has joined #ruby
skade has joined #ruby
uri has joined #ruby
howdoicomputer has joined #ruby
ruurd has quit [Quit: ZZZzzz…]
subscope has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
big|bad|wolf has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
subscope has joined #ruby
tomphp_ has joined #ruby
subscope has quit [Client Quit]
mdih has quit [Ping timeout: 240 seconds]
baweaver has quit [Remote host closed the connection]
tomphp has quit [Ping timeout: 240 seconds]
mistermocha has joined #ruby
joonty has quit [Quit: joonty]
spaceghost|work has quit [Quit: pipeworkin' it]
big|bad|wolf has joined #ruby
pipework has joined #ruby
crazydiamond has joined #ruby
emilkarl has quit [Quit: emilkarl]
pipework has quit [Client Quit]
synthroid has quit [Remote host closed the connection]
big|bad|wolf has quit [Client Quit]
pipework has joined #ruby
nofxx has quit [Remote host closed the connection]
<gregf_>
brainfire: did you manage to figure out that group_by?
TomyWork has quit [Ping timeout: 260 seconds]
<gregf_>
oops, been a while :|
nofxx has joined #ruby
idefine_ has joined #ruby
<brainfire>
gregf_: I did, turned out I screwed up myself and .sort! actually worked how I wanted it to be. Just passed the wrong fields
idefine has quit [Read error: Connection reset by peer]
arthurix has joined #ruby
k3asd` has quit [Ping timeout: 260 seconds]
Macaveli has joined #ruby
idefine has joined #ruby
allcentury has joined #ruby
idefine_ has quit [Read error: Connection reset by peer]
subscope has joined #ruby
arthurix_ has quit [Ping timeout: 250 seconds]
idefine has quit [Remote host closed the connection]
idefine has joined #ruby
freerobby has joined #ruby
cwong_on_irc has joined #ruby
idefine has quit [Remote host closed the connection]
nofxx has quit [Remote host closed the connection]
skade has quit [Quit: Computer has gone to sleep.]
nofxx has joined #ruby
sucks has quit [Ping timeout: 260 seconds]
idefine has joined #ruby
Cache_Money has joined #ruby
rodfersou|lunch is now known as rodfersou
<gregf_>
brainfire: ok, so you mean you used sort to group by the first element from an array of the form: [[string1, string2], [string1, string100], [string2, string5]]?
<brainfire>
gregf_: yeah
<brainfire>
gregf_: sorted it alphabetically by the first element is prob more precise
rbowlby has joined #ruby
<gregf_>
brainfire: ok, whatever you wanted , if it worked then good ;). but did you want that to be [[string1, [string2, string100]], [string2, string5]]?
<brainfire>
gregf_: no, I just wanted it sorted :)
<gregf_>
ah - ok
<gregf_>
>> [%w|string1 string2|, %w|string1 string100|, %w|string2 string5|].group_by(&:first).map { |k, v| [k, v.map(&:last)] } # like this
<frozenfoxx>
Need some advice on using a websocket to connect a Ruby app to a Rails app, anyone here familiar with that stuff or could point me in the right direction?
rubie has joined #ruby
<frozenfoxx>
I've got a command-line Ruby app that sends some output, expects some input in real-time. I need to have a Rails app send the input to this program over a websocket, then change values and/or force a refresh in the rails app via the output of this program over teh websocket.
banister has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
benlovell has quit [Ping timeout: 272 seconds]
<frozenfoxx>
Anyone have an example I could look off of for this sort of thing?
idefine_ has quit [Read error: Connection reset by peer]
yoongkang has joined #ruby
idefine has joined #ruby
Ilyes512 has joined #ruby
<gregf_>
eventmachine i guess
<Ray`>
the last time I did something like that I used Faye::WebSocket
<Ray`>
it seemed to be the library that was most up to date
<frozenfoxx>
Ray`: gotcha. For the program itself I was going to wrap it up with websocketd, but was having trouble finding examples of how to handle it on the Rails app side.
tulak has quit [Remote host closed the connection]
<momomomomo>
frozenfoxx: don't spam your question on multiple ruby channels
<frozenfoxx>
momomomomo: Sorry, not looking to spam it but since I'm not sure of if it's a Rails appropriate or Ruby appropriate I figured I'd ask in both
<frozenfoxx>
momomomomo: most of the examples of anything even approaching it only discuss one side or the other, not both
Musashi007 has joined #ruby
<momomomomo>
frozenfoxx: The issue then is that neither side is coordinating to answer your question
synthroid has joined #ruby
<momomomomo>
there's a bot command for this, but I can't remember it atm
Macaveli has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
strgbrew has joined #ruby
zenguy_pc has joined #ruby
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<havenwood>
?crosspost
<ruboto>
Please do not crosspost without at least telling so and mentioning provided suggestions and their outcome in all channels. Experience shows that people don't do either, and not doing so is considered rude.
<havenwood>
momomomomo: ^ I think that's the one you were thinking of?
<momomomomo>
yea
<momomomomo>
thank you havenwood
<frozenfoxx>
So it's not don't post a question to multiple channels, but don't leave them hanging about your question?
[Butch] has joined #ruby
sabram_ has quit [Quit: Leaving]
SCHAAP137 has joined #ruby
evandrojr has joined #ruby
yoongkang has quit [Ping timeout: 272 seconds]
Pumukel has quit [Ping timeout: 240 seconds]
Regulati_ has quit [Remote host closed the connection]
<jhass>
frozenfoxx: ensure that nobody wastes time by repeating something that was already told elsewhere and by having all sides on the same information level
<apeiros>
aka: even if people offer their help for free, their time is valuable. don't waste it.
<frozenfoxx>
If that's the case I'm not seeing what I did wrong considering I hadn't gotten a response yet?
<Papierkorb>
Has someone in here experience with building applications with ejabberd?
roxtrongo has joined #ruby
moted has joined #ruby
<jhass>
only a bit prosody
<frozenfoxx>
Ray`: I'm having a look over teh Faye::Websocket stuff. I think this might be what I need.
<Papierkorb>
jhass: XMPP pubsub?
<jhass>
nope
<Papierkorb>
jhass: thanks anyway. hard issues are hard to solve it seems :P
ponga has quit [Quit: Connection closed for inactivity]
<apeiros>
frozenfoxx: a) "I haven't gotten a response yet" != "nobody has thought about your question"., b) we do not see whether you have gotten an answer elsewhere yet. we do not know whether you're wasting our time.
towski_ has joined #ruby
shredding has joined #ruby
tmtwd has quit [Ping timeout: 255 seconds]
<apeiros>
by announcing that you crosspost, you tell people that you care about their time. by not announcing it you tell me that you don't and subsequently lose me as somebody who even looks at your question (of course, only if I notice by myself that you crossposted)
<Ray`>
that's a good ettiquette point
<Ray`>
I'll have to keep that in mind myself actually
<frozenfoxx>
apeiros: okay, I think I understand.
dotix has joined #ruby
<guardian>
what's the EOL of Ruby 2.1?
<frozenfoxx>
apeiros: thank you.
<apeiros>
yw
<apeiros>
and thanks for caring ;-)
rubie has quit [Remote host closed the connection]
<Ray`>
frozenfoxx: Faye::Websocket worked for what I used it for, which was essentially a makeshift in-browser terminal that sent data from a page (via JS websockets) to a ruby server, I tried a few other libraries before that but ran into some problems and they seemed to be because the libraries were no longer maintained
doddok has quit [Ping timeout: 265 seconds]
amclain has joined #ruby
lurch_ has quit [Quit: lurch_]
Ankhers has quit [Ping timeout: 264 seconds]
aryaching has joined #ruby
<Papierkorb>
Okay, data structure problem: I've got subscriptions. It's a hash mapping from a channel name (String) to an array of users ("subscribers"). So, when I want to send something to subscribers, I something like: subscription_hash[channel_name].each{|user| send_to user}. Now, a user closes the TCP connection. In this case, I want to remove the user from all arrays in the subscription_hash, which with many channels and users, is costly. Has anyone an
<Papierkorb>
idea if there is a better data structure for this, letting me quickly add/remove users?
<headius>
yorickpeterse: I was checking on your Socket progress and saw in rbx gitter you seemed confused about EAGAINWaitReadable and friends
aryaching_ has quit [Ping timeout: 264 seconds]
dotix has quit [Ping timeout: 255 seconds]
<headius>
I can explain why they exist
purplexed- has joined #ruby
jschmid has quit [Ping timeout: 240 seconds]
dotix has joined #ruby
norc has joined #ruby
momomomomo_ has joined #ruby
jschmid has joined #ruby
<havenwood>
guardian: I don't think the date has been announced but Feb 24, 2017 seems likely.
Ankhers has joined #ruby
Guest22559 has quit [Quit: Leaving]
eminencehc has joined #ruby
moted has quit []
<norc>
Hi. I am looking for a way to ship a self containing executable for a Ruby application for Windows 7, 8 and 10. Any recommendations based on experience?
senayar has quit []
moted has joined #ruby
axsuul has joined #ruby
<havenwood>
guardian: Ruby 2.0 is already in maintenance mode and will be EoL on Feb 24, 2016.
<havenwood>
norc: Last response on a Win issue from a maintainer was this week.
<headius>
perhaps not confused but maybe you don't understand why they exist
Kelzier has quit []
<yorickpeterse>
Ah, I think I was just surprised about the name
doddok has joined #ruby
<frozenfoxx>
Ray`: that actually sounds almost exactly like what I need to do
s2013 has joined #ruby
<norc>
havenwood: "The Windows support so far is kind of a minimum viable product. [...] so for the time being I do not have any time for maintaining Traveling Ruby."
<norc>
Sounds very reassuring. ;-)
s2013 has quit [Max SendQ exceeded]
<yorickpeterse>
I still have to add it to rbx though, we have some crazy logic that figures out the Errno classes based on the system call errors
<havenwood>
norc: Windows!
<yorickpeterse>
hidden somewhere in the depths of C++
<headius>
yorickpeterse: the original logic in MRI included WaitReadable et all on *every raise of EAGAIN*
<headius>
EAGAINWaitReadable etc were my addition to avoid that
<yorickpeterse>
headius: not sure if I'm following, what do you mean with they were included?
<norc>
headius: Last commit was over a year ago on that project.
<frozenfoxx>
Ray`: I won't stump for my project 'cause that's kinda rude, but basically things happen in an external program in realtime, that then needs to send commands to the web app to alter its behavior (present or remove links basically), then receive commands from the webserver based on what the users of said app click on
<yorickpeterse>
You mean in the ancestor chain?
<norc>
errr havenwood I mean
rubie has joined #ruby
<headius>
yorickpeterse I mean exception.extend(WaitReadable) every time
<headius>
because EAGAIN is produced for both WaitReadable and WaitWritable cases
<norc>
havenwood: I mean I can try out the projects myself and dig deeper. Was just hoping someone here had experience with various solutions. :)
<headius>
the name is admittedly cumbersome but it's normally not seen...you either rescue EAGAIN or you rescue WaitReadable
<yorickpeterse>
headius: aah
<headius>
obviously the extend every time was terrible
<headius>
you can certainly just keep doing that if you like, but I'd recommend my approach :-)
<yorickpeterse>
In that case I can probably just do something like EAGAINWatReadable.new(original_exception) or w/e
<yorickpeterse>
Not there yet though, currently trying to get recvmsg/sendmsg to work
<yorickpeterse>
which is like 80% done
<yorickpeterse>
In fact, all that remains is figuring out how to read ancillary data since that relies on C macros (at least per the manuals)
<headius>
why bother?
rgtk has joined #ruby
haylon has joined #ruby
simplyianm has quit [Ping timeout: 264 seconds]
<headius>
what is it used for?
<jhass>
Papierkorb: replacing your arrays with sets might help some
karapetyan has joined #ruby
<yorickpeterse>
headius: it's used to pass PIDs and other shit in particular when using Unix sockets
<yorickpeterse>
searching github sadly revealed code using it
<headius>
huh...we've generally not bothered to implement these weird edges until someone comes to us with a bug
<headius>
it's not worth it
<yorickpeterse>
I looked at the macros and what they do shouldn't be too hard to replicate
<headius>
and it consumes a lot of time for 0.001% use cases
<yorickpeterse>
and yeah, there are a few parts where I already decided "fukit"
<yorickpeterse>
e.g. MRI stuffs char pointers of structs in a few places, then converts those back to structs
<yorickpeterse>
that data is exposed to Ruby because it's all stuffed in 1 spot
<yorickpeterse>
I decided not to support that since we can't really do that (since we don't use said structs
<headius>
also, a bit of explanation about things we're missing... we generally don't use native sockets or any native calls for socket data, so we have emulated most of these structures atop JDK equivalents
<headius>
that's why there's pieces missing...JDK doesn't present many of those edges, options, etc
baweaver has joined #ruby
<headius>
we didn't consciously decide not to do them or omit them out of laziness...we're just trying to avoid using native calls if they're not necessary
<headius>
so far they have not been necessary and those edges and options have not been reported to us
Jackneill has joined #ruby
<yorickpeterse>
Oh yeah I figured as much
ruurd has joined #ruby
<headius>
as you know, once you go native you have all sorts of fun platform issues to figure out :-)
<headius>
anyway, good on you for working through this stuff...the specs will be useful to us at the very least, and parts of the impl may be too
rgtk has quit [Ping timeout: 260 seconds]
fedexo has joined #ruby
<yorickpeterse>
I'm aiming for at least making all lib/socket/* code independent of rbx
<norc>
headius: I'm guessing you are a Rubinius contributor?
<headius>
out of curiousity, why work on this right now? Did you have some need to inflict this pain on yourself?
<yorickpeterse>
lib/rubysl/socket/* still uses rbx APIs for now, but those can be abstracted out
<headius>
norc: no, but yorickpeterse is
<norc>
Ah.
<headius>
I'm a jruby person
<yorickpeterse>
headius: I started in March because we had a bunch of people reporting Socket methods missing
_stu_ has quit [Quit: _stu_]
<yorickpeterse>
and once you start it you kinda have to finish it
<norc>
headius: Was getting confused about the talk between Rubinius and JDK stuff you kept bringing up.
<yorickpeterse>
Also our Socket code is mostly from 1.8, so we _have_ to update it sooner or later
<headius>
yorickpeterse: that could be very interesting as an independent library then...for folks that want more raw socket support, they might in theory be able to just load it into JRuby
<yorickpeterse>
plus the code was just...really fucking stupid in many places
<headius>
yorickpeterse: ugh...that's a big gap to fill
ahmetkapikiran has joined #ruby
<yorickpeterse>
eventually any implementation that has a compatible FFI API should be able to run this
<headius>
what I did on this stuff I did because it was *necessary* to pull in 2.2 stdlib
<yorickpeterse>
heck, you can probably use the ffi Gem at some point
<headius>
net/protocol et al using Addrinfo and stuff :-(
trekr5_ has joined #ruby
<trekr5_>
hi
<headius>
that was a fun week
<yorickpeterse>
it started because somebody wanted to use Socket.ip_address_list
<yorickpeterse>
which uses Addrinfo
<yorickpeterse>
which then started all this :P
<headius>
ahh yep, similar here
velkoff has left #ruby [#ruby]
<trekr5_>
has anyone sent raw sql queries to a sql server db?
<headius>
for us it was simply to get stdlib working without regressing on any tests
<headius>
so I did minimum effort at the time :-)
<headius>
net/http kinda needs to work for a release
<trekr5_>
i'm using activerecord and tinytds gems
dotix has quit [Ping timeout: 255 seconds]
<yorickpeterse>
Addrinfo wasn't too bad, except for the crazy logic regarding socket levels vs types and what to set to what and when
<norc>
Ruby question: Is the op === used by rescue as per specification?
<headius>
yeah, I know I have that wrong but it was super confusing
<jhass>
?anyone trekr5_
<ruboto>
trekr5_, Just ask your question, if anyone has or can, they will respond.
<headius>
I saw your comment about type and family being used interchangably sometimes
baweaver has quit [Ping timeout: 272 seconds]
<norc>
Or is there a way to force rescue use other operators than === ?
<headius>
there may be things we can clean up in MRI too after your specs are written...things that look obviously wrong we should fix the specs and MRI
B1n4r10 has quit [Ping timeout: 244 seconds]
eminencehc has quit [Remote host closed the connection]
jackjackdripper has joined #ruby
<yorickpeterse>
headius: so my mistake was that the values for the types and families are the same
mjuszczak has quit []
atus_root_ has joined #ruby
<yorickpeterse>
That is, Socket::AF_INET and Socket::PF_INET both have the same numeric value
<headius>
right
<headius>
is that on all platforms you've seen?
<headius>
I was confused why they're even defined separately because of that
<atus_root_>
hi need help to fix a code
<yorickpeterse>
headius: only on Linux
<headius>
ah
benlieb has joined #ruby
<yorickpeterse>
I think it's mostly a coincidence of how enums are typically defined in C
dotix has joined #ruby
<headius>
that makes sense
<headius>
they just happen to have same elements in same order on some platforms
<atus_root_>
can someone help me sort this out class Person
<headius>
I believe we are generating our copies of those constants across platforms
<jhass>
trekr5_: also change that password now everywhere you use it
fedexo has quit [Ping timeout: 246 seconds]
<yorickpeterse>
then you get into all these fun things such as "oh platform X defines this struct in header A, platform Y has it in a #ifdef __USE_GNU guard"
moeSeth has quit [Quit: Connection closed for inactivity]
<trekr5_>
hi jhass
<atus_root_>
so jhass how can i write, am a novice
atmosx has joined #ruby
<jhass>
atus_root_: I don't have the feeling you're trying much
<jhass>
atus_root_: read the error message, character by character
<trekr5_>
it should return the value of @FundraisingId which is 250942
<norc>
Also a somewhat related question, inspecting some more bytecode, it seems that ruby exceptions are just syntactic sugar around catch/throw logic - is this correct?
<jhass>
trekr5_: you're sidestepping my question
<trekr5_>
i've run the same query using tiny_tds and it returns the value of @fundraisingid
stan has quit [Ping timeout: 240 seconds]
<atus_root_>
jhas i did all posible way i know but to no avail
thezanke has joined #ruby
<norc>
I mean adding a rescue block suddenly adds "rescue" and "retry" entries to the catch tables under ruby 2.2
<trekr5_>
hi jhass not sidestepping the question
<norc>
Which makes me wonder whether I can somehow throw directly into those blocks.
brainfire has quit [Quit: Konversation terminated!]
<norc>
(via throw, rather than raise/retry)
<jhass>
trekr5_: what exactly does return mean in this case?
dramagods has joined #ruby
ibouvousaime has quit [Ping timeout: 240 seconds]
<guardian>
havenwood: thanks
<atus_root_>
jhass could you help?
<jhass>
atus_root_: I'm not sure, I already pointed out where the error is. How long have you been looking at this problem? Be honest
dmolina has quit [Ping timeout: 240 seconds]
<atus_root_>
for 30 minutes jhass
<trekr5_>
jhass what line number are you looking at?
tomphp has joined #ruby
<jhass>
atus_root_: and you still didn't notice the difference between j and J ?
lxsameer has joined #ruby
zeroDivisible has joined #ruby
<jhass>
trekr5_: you said it works when using tiny_tds directly. How did your testcase and its result look like exactly?
banister has joined #ruby
radgeRayden_ has joined #ruby
ascarter has joined #ruby
ascarter has quit [Read error: Connection reset by peer]
<atus_root_>
one is in cap and the other in small
radgeRayden has quit [Ping timeout: 265 seconds]
dramagods has quit [Ping timeout: 255 seconds]
<jhass>
atus_root_: so. Look at the error message _and_ your code again
<jhass>
with that difference in mind
<norc>
jhass: I feel bad for you. :(
jwaldrip has joined #ruby
<jhass>
norc: you're allowed to help too :P
tomphp_ has quit [Ping timeout: 240 seconds]
<norc>
jhass: I dont know, I'm actually digging into Ruby source code myself because my question did not get answered. I kind of expect other people to have the same energy or drive... :/
Melpaws has joined #ruby
ibouvousaime has joined #ruby
nixmaniack has joined #ruby
<atus_root_>
thank you jhas
<Papierkorb>
jhass: good call
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ixti has joined #ruby
Melpaws1 has joined #ruby
<jhass>
atus_root_: paying attention to such detail is an important skill for a programmer, train it. For example notice how you wrote my nick wrong in every single instance
<atus_root_>
right thumbs up jhass
<Papierkorb>
Huh, why isn't Set#classify in Array or Enumerable? #partition doesn't always cut it, and that's exactly what I would've needed multiple times now
trosborn has joined #ruby
chouhoulis has quit [Remote host closed the connection]
<yxhuvud>
Papierkorb: group_by
Melpaws has quit [Read error: No route to host]
<jhass>
beat me to it
<jhass>
that's group_by
chouhoulis has joined #ruby
Musashi007 has quit [Quit: Musashi007]
dramagods has joined #ruby
axsuul has quit [Ping timeout: 240 seconds]
Melpaws has joined #ruby
aeontech has quit [Quit: aeontech]
luksaur has joined #ruby
<yxhuvud>
it seems both exist on sets, but that classify create subsets, while group_by creates arrays.
Melpaws1 has quit [Ping timeout: 255 seconds]
gusTester has joined #ruby
radgeRayden__ has joined #ruby
<trekr5_>
jhass, looking at my config for the activerecord connection does that look correct?
atus_root_ has quit [Quit: atus_root_]
dramagods has quit [Remote host closed the connection]
dramagods has joined #ruby
Musashi007 has joined #ruby
radgeRayden_ has quit [Read error: Connection reset by peer]
gusTester has left #ruby [#ruby]
baweaver has joined #ruby
<trekr5_>
jhass, i'm connecting using an sqladapter
Couch has quit [Ping timeout: 264 seconds]
rbowlby has quit [Remote host closed the connection]
baweaver has quit [Remote host closed the connection]
<jhass>
trekr5_: I doubt it's a configuration issue, you would get an exception while connecting otherwise, no?
braderhart has quit [Ping timeout: 252 seconds]
RegulationD has joined #ruby
aphprentice has quit [Ping timeout: 240 seconds]
varunwachaspati_ has quit [Ping timeout: 240 seconds]
<trekr5_>
when i run my activerecord::base.establish_connection(...) i get an object returned with all of the config values i put int to establish the connection to the db
rakm has joined #ruby
Guest97_ has quit [Client Quit]
Guest97_ has joined #ruby
<Papierkorb>
interesting though that MRI outperforms Jruby in this disclipine
<jhass>
Papierkorb: how do you know it's not #clone that's much slower?
<nofxx>
trekr5_: yup. postgresql.
moloch is now known as zly
zly has quit [Changing host]
zly has joined #ruby
<trekr5_>
hi nofxx, unfortunately i don't have that option! it's a db that i have no control over
ruurd has joined #ruby
<nofxx>
trekr5_: great opportunity to do more than you've been asked. Dump the csv, load on PG and show em increase in performance, security, whatnot
<nofxx>
and charge a lil more =D
momomomomo has quit [Quit: momomomomo]
<trekr5_>
hi nofxx can we have a chat off this bulletinboard?
bjmllr has joined #ruby
<headius>
Papierkorb: I don't see MRI outperforming JRuby there
<Papierkorb>
jhass: interesting. updated the gist. set *is* faster
trosborn has quit [Quit: trosborn]
lubarch has quit [Ping timeout: 252 seconds]
<jhass>
Papierkorb: doesn't surprise me much. I vaguely remember MRI does some CoW magic on Array#dup/clone ?
andrey has joined #ruby
karapetyan has quit [Remote host closed the connection]
<jhass>
anyway, copying a continious chunk of memory is always faster
<Papierkorb>
jhass: well, a set could also be continous in memory
trosborn has joined #ruby
<Papierkorb>
sure adding/removing would be slow, but looking at Array, actually not that bad
<andrey>
Is there some way in which you can specify your own name while installing a local gem?
sucks has joined #ruby
<Papierkorb>
andrey: why do you want to do that?
<jhass>
Papierkorb: well, the point of using a Set in most cases is less it's deduplication efforts, but O(1) CRUD operations
sucks_ has joined #ruby
nixmaniack has quit [Remote host closed the connection]
<Papierkorb>
jhass: is it really O(1) amortized?
NeverDie has joined #ruby
sucks has quit [Read error: Connection reset by peer]
sucks_ has quit [Read error: Connection reset by peer]
<jhass>
Set is basically an interface over a Hash with nil values
<andrey>
Papierkorb: I have a gem with that name already installed - I'd like to differentiate it from my local dev gem
jwaldrip has quit [Quit: Be back later ...]
<trekr5_>
hi jhass, just did a simple select all from db using the activerecord connection and it executes correctly
<jhass>
andrey: you don't need to install a gem to test it, just use ruby -Ipath/to/your/gem/lib, bundler's path or local git override option or patch up $LOAD_PATH
rbowlby has joined #ruby
<jhass>
trekr5_: I'm not surprised
B1n4r10 has quit [Ping timeout: 264 seconds]
predator217 has joined #ruby
jwaldrip has joined #ruby
<trekr5_>
jhass, so the problem is the query. i'll look at it again. thanks!
<jhass>
trekr5_: that's what I tried to point out by asking your whether you're 100% sure PRINT returns a query result
<nofxx>
trekr5_: feel free to pm, but I pop in and out here all day. Not sure Ill answer right along
<andrey>
jhass: Thanks; I didn't know about -I option
<headius>
jhass, Papierkorb: both JRuby and MRI use COW for Array duplication and slicing
<headius>
the cost you see is the eventual need to un-share the backing store
kadoppe has quit [Ping timeout: 260 seconds]
<headius>
whereas Set (actually Hash) has to duplicate everything right away
lemur has joined #ruby
<Papierkorb>
headius: interesting. apart from the 5.times, you didn't change anything, right?
<jhass>
headius: yup that's what I thought, thanks for confirming
skade has quit [Quit: Computer has gone to sleep.]
spider-mario has joined #ruby
<headius>
Papierkorb: nothing... JRuby consistently outperforms MRI here
ruurd has joined #ruby
<headius>
Array#dup cost should be nearly the same since we both COW
kadoppe has joined #ruby
<headius>
it's just cost of the wrapper object in both cases
Guest1815 has joined #ruby
atmosx has quit [Quit: parting / quiting]
B1n4r10 has joined #ruby
<Papierkorb>
headius: currently trying to come up with a reasonable benchmark for a system with quite some load. jruby is twice as fast for the first test (by the "real" time)
err_ok has joined #ruby
bMalum has quit [Quit: bMalum]
<headius>
Papierkorb: well that's a whole other challenge :-)
jottr has joined #ruby
banister has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
andrey has quit [Quit: Page closed]
blueOxigen has joined #ruby
lemur has quit [Ping timeout: 240 seconds]
sdwrage has joined #ruby
blue_deref has joined #ruby
avahey has quit [Quit: Connection closed for inactivity]
Gnut has joined #ruby
Gnut has quit [Quit: leaving]
bluOxigen has quit [Ping timeout: 240 seconds]
symm- has quit [Ping timeout: 265 seconds]
Guest1815 has quit [Read error: Connection reset by peer]
Gnut has joined #ruby
poguez_ has joined #ruby
tildes has joined #ruby
prestorium has quit [Quit: Leaving]
idefine has quit [Read error: Connection reset by peer]
idefine has joined #ruby
<Gnut>
What's the preferred safe method for string interpolation?
<jhass>
Gnut: safe in what manner?
<Papierkorb>
Gnut: 'safe' method?
Hounddog has quit [Remote host closed the connection]
idefine has quit [Read error: Connection reset by peer]
Guest95752 has quit []
jpfuentes2 has joined #ruby
prestorium has joined #ruby
<Gnut>
I know python recommends the .format method to strictly enforce variables used to construct a string
<pwnd_nsfw>
JUST DO IT
idefine has joined #ruby
aphprentice has joined #ruby
<pwnd_nsfw>
"#{just.do.it}"
ur5us has joined #ruby
braderhart has joined #ruby
<Papierkorb>
Gnut: aha. "just do #{'it'}"
<Gnut>
And i see the sprintf function
<pwnd_nsfw>
yours actually runs
<Papierkorb>
Gnut: no one really uses sprintf
_blizzy_ has quit [Quit: Leaving]
<jhass>
I use String#% sometimes
<shevy>
so safe and secure
<pwnd_nsfw>
string interpolate inject
<jhass>
but "foo #{bar}" is the go to tool unless you need special features of something else
skade has joined #ruby
dramagods has quit [Remote host closed the connection]
idefine_ has joined #ruby
idefine has quit [Read error: Connection reset by peer]
idefine_ has quit [Remote host closed the connection]
n00p has quit [Ping timeout: 240 seconds]
dotix has quit [Ping timeout: 272 seconds]
amirpro has joined #ruby
grill has joined #ruby
momomomomo has quit [Quit: momomomomo]
angiebadillo has joined #ruby
Sembei has joined #ruby
xet7 has quit [Quit: Leaving]
jetpackjoe has joined #ruby
jetpackjoe has quit [Max SendQ exceeded]
idefine has joined #ruby
jetpackjoe has joined #ruby
jetpackjoe has quit [Max SendQ exceeded]
postmodern has joined #ruby
jwaldrip has joined #ruby
jwaldrip has quit [Remote host closed the connection]
rubie has quit [Remote host closed the connection]
ruurd has quit [Read error: Connection reset by peer]
axsuul has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
eminencehc has joined #ruby
yashinbasement has joined #ruby
nofxx has quit [Remote host closed the connection]
YankNYC has quit [Quit: Connection closed for inactivity]
momomomomo has joined #ruby
idefine has quit [Remote host closed the connection]
f3ttX] has joined #ruby
skade has joined #ruby
idefine has joined #ruby
baweaver has quit [Remote host closed the connection]
yoongkang has quit [Ping timeout: 246 seconds]
<grill>
yo are there any methods have a built in recursive/non-recursive switch for directory searching?
<apeiros>
grill: Dir.glob with ** can recursively search
ruurd has joined #ruby
<grill>
so. so i'd need to roll my own flag then
<grill>
wonderbar
rubie has quit [Remote host closed the connection]
nofxx has quit [Remote host closed the connection]
nofxx has joined #ruby
bubbys has quit [Ping timeout: 250 seconds]
NeverDie has joined #ruby
treehug88 has joined #ruby
mdih has quit [Read error: Connection reset by peer]
ibouvousaime_ has joined #ruby
ibouvousaime has quit [Ping timeout: 240 seconds]
dmcp_ has joined #ruby
dmcp_ is now known as dmcp
idefine has quit [Remote host closed the connection]
Eiam has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
mdih has joined #ruby
<tildes>
I'd like to create a message, say msg = 'My message is #{var}', so that I can create the "message templates" in one corner of the program, and evaluate them later, when the variables are actually set. How to achieve this, or something similar?
idefine has joined #ruby
banister has joined #ruby
trekr5_ has quit [Ping timeout: 246 seconds]
allcentury has quit [Ping timeout: 246 seconds]
momomomomo has quit [Quit: momomomomo]
yeticry has quit [Read error: Connection reset by peer]
zenguy_pc has quit [Ping timeout: 240 seconds]
haylon has quit [Quit: Leaving]
alem0lars has quit [Ping timeout: 240 seconds]
tulak has quit [Remote host closed the connection]
yeticry has joined #ruby
TPBallbag has quit [Quit: don't try and hack my account Ballkenende]
karapetyan has quit [Remote host closed the connection]
ibouvousaime_ has quit [Ping timeout: 260 seconds]
alem0lars has joined #ruby
ruurd has quit [Read error: Connection reset by peer]
zenguy_pc has joined #ruby
<grill>
what's glob's return type? the docs say "matches" but i have nfi what that is
greedo has quit [Ping timeout: 260 seconds]
<slash_nick>
probably means MatchData
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bkxd has joined #ruby
greedo has joined #ruby
<slash_nick>
grill: it's just an Array
vlunkr has joined #ruby
<grill>
:(
<vlunkr>
Is there a shorthand way to do this? testing_accounts.map { |a| a[:category] }
EllisTAA has joined #ruby
tomphp has joined #ruby
Mon_Ouie has joined #ruby
idefine has quit [Read error: Connection reset by peer]
econerd4ever has joined #ruby
<vlunkr>
like some_list.map &:some_prop
tomphp has quit [Client Quit]
idefine has joined #ruby
ruurd has joined #ruby
casadei has joined #ruby
tulak has joined #ruby
karapetyan has joined #ruby
tulak has quit [Remote host closed the connection]
<grill>
so, what's the best way to do a python-esque initialization? How can I use a module's methods in other code, but also run the module as a standalone program? in python, you'd use the __main__ method.
rubie has joined #ruby
mjuszczak has quit []
tulak has joined #ruby
xcesariox has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tulak has quit [Remote host closed the connection]
bubbys has joined #ruby
rubie has quit [Remote host closed the connection]
<Papierkorb>
grill: 2) just use the module. has to be required before like any other file. 3) if $0 == __FILE__ ... end
<jhass>
tildes: use %s and String#% / Kernel#sprintf
<jhass>
vlunkr: no
<Papierkorb>
grill: also make sure that rubys definition of a Module and yours (influenced by python?) match up. I don't know Py.
econerd4ever has quit []
<vlunkr>
dang, I thought I had seen that done before. thanks!
<jhass>
grill: that's rarely done in Ruby though, most just have the module in lib/foo.rb and then bin/foo that just loads and runs it, often with just something like Foo::Cli.new(ARGV)
djbkd has quit [Remote host closed the connection]
<jhass>
vlunkr: you could short testing_accounts.map {|a| a.category } to testing_accounts.map(&:category)
radgeRayden_ has joined #ruby
moeabdol has joined #ruby
simplyianm has quit [Remote host closed the connection]
tulak has quit [Ping timeout: 250 seconds]
rgtk has joined #ruby
<vlunkr>
jhass: right, but I'm working with a hash in this case
skade has joined #ruby
shinnya has joined #ruby
mjuszczak has joined #ruby
radgeRayden__ has quit [Ping timeout: 265 seconds]
<jhass>
vlunkr: sure, just expanding on where you might have seen it ;)
momomomomo has joined #ruby
elaptics is now known as elaptics`away
ruurd has quit [Quit: ZZZzzz…]
<tildes>
jhass: thanks, sprintf works for me
moeabdol has quit [Client Quit]
mdih has quit [Ping timeout: 265 seconds]
<grill>
ok
darkf has quit [Quit: Leaving]
<grill>
here's a good one. wtf is up with this? undefined method `MissingArgument' for OptionParser:Class
FernandoBasso has quit [Quit: Leaving]
<grill>
this doesn't really make sense, do it?
idefine has quit [Remote host closed the connection]
mdih has joined #ruby
<jhass>
depends, how to reproduce?
rgtk has quit [Ping timeout: 260 seconds]
moeabdol has joined #ruby
<grill>
i'll post my code in a sec. could it be because my requires are outside of the module closure?
<grill>
ok. anything obviously wrong with that code? ignore the method after parse_args in initialize
<jhass>
grill: you're missing , on the raise calls
<jhass>
so they become method calls
<grill>
omg
<grill>
can I put the params in ()?
<jhass>
just add , or .new
casadei has quit [Remote host closed the connection]
VESTINST_ has joined #ruby
<grill>
ok. that worked
<grill>
thanks
mjuszczak has quit []
futilegames has joined #ruby
groundnuty has joined #ruby
VESTINST has quit [Ping timeout: 250 seconds]
VESTINST_ is now known as VESTINST
<groundnuty>
hey, I'm in the need to write a technical and user documentation for my project
B1n4r10 has joined #ruby
<groundnuty>
anyone here uses sone nice tools for that?
mjuszczak has joined #ruby
cdg has quit [Remote host closed the connection]
jwaldrip has joined #ruby
dfinninger has joined #ruby
arup_r has joined #ruby
eminencehc has quit [Remote host closed the connection]
sunya7a has quit [Quit: leaving]
arup_r is now known as Guest87132
craysiii has joined #ruby
<shevy>
people usually hate to write documentation
<Freijo>
Who needs documentation?
<Freijo>
Or commenting for that matter
<shevy>
I still have not found a good way to document things properly either; I think for lack of better alternatives, markdown is quite ok for most end users as an initial start; working examples are also useful
<Freijo>
The code speaks for itself
<dfinninger>
hello, I'm looking to ensure that a second process is running along with the code I am writing. I'd like to shut down my process if the dependency dies. I can start this program myself and I was thinking about something along the lines of "fork { system('blah') }"
momomomomo has quit [Quit: momomomomo]
wilsonc91 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dotix has joined #ruby
<dfinninger>
anyone have experience with this?
allcentury has joined #ruby
eminencehc has joined #ruby
bkxd has quit [Ping timeout: 265 seconds]
sunya7a__ has quit [Quit: leaving]
B1n4r10 has quit [Ping timeout: 260 seconds]
sunya7a has joined #ruby
techietrash has joined #ruby
B1n4r10 has joined #ruby
unreal_ has quit [Ping timeout: 255 seconds]
karapetyan has quit [Remote host closed the connection]
rakm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
DoubleMalt has quit [Remote host closed the connection]
dotix has quit [Ping timeout: 252 seconds]
ruurd has quit [Read error: Connection reset by peer]
_stu_ has joined #ruby
banister has quit [Read error: Connection reset by peer]
ahmetkapikiran has quit [Quit: ahmetkapikiran]
atmosx has joined #ruby
VeryBewitching has joined #ruby
benhuda has joined #ruby
chipotle has joined #ruby
<VeryBewitching>
G'day folks.
uri has quit [Ping timeout: 240 seconds]
Musashi007 has quit [Read error: Connection reset by peer]
uri has joined #ruby
bMalum has joined #ruby
zotherstupidguy has quit [Quit: WeeChat 1.3]
<norc>
dfinninger: How does your process "die" or "end" ?
colli5ion has quit []
mjuszczak has quit []
<dfinninger>
Mine? On error, or if autoscaling kills the machine. The one I am watching? Error.
<norc>
dfinninger: Is the one you are watching under your control?
<jhass>
dfinninger: use Kernel#spawn, Process#waitpid in a Thread#new and Kernel#abort/Kernel#exit there
chipotle has quit [Client Quit]
gustav_ has joined #ruby
ruurd has joined #ruby
<jhass>
well, I guess you can also Kernel#system directly in new thread
maxz has joined #ruby
gusTester has joined #ruby
<dfinninger>
norc: yep
<norc>
jhass: Wouldn't it better if the "watched" process just signalled a SIGTERM to the master if it dies?
jackjackdripper has quit [Quit: Leaving.]
<norc>
Or much simpler anyway.
<jhass>
but not necessarily possible
jackjackdripper has joined #ruby
<jhass>
I guess you can also trap SIGCHILD
aeontech has joined #ruby
jackjackdripper has quit [Client Quit]
<dfinninger>
I have a document converter running, and some ruby feeding it and dealing with the output
karapetyan has joined #ruby
prestorium_ has joined #ruby
xblade has joined #ruby
<dfinninger>
jhass: thanks, I'll look into it
gusTester has left #ruby [#ruby]
axsuul has quit [Ping timeout: 250 seconds]
juddey has joined #ruby
Freijo has quit [Ping timeout: 240 seconds]
dfinning_ has joined #ruby
prestorium has quit [Ping timeout: 257 seconds]
baweaver has joined #ruby
baweaver has quit [Remote host closed the connection]
baweaver has joined #ruby
dfinninger has quit [Ping timeout: 252 seconds]
atmosx has quit [Quit: Lost in trance]
ruurd has quit [Read error: Connection reset by peer]
_blizzy_ has joined #ruby
benlieb has quit [Quit: benlieb]
diegoaguilar has quit [Ping timeout: 272 seconds]
benlieb has joined #ruby
ruurd has joined #ruby
techietrash has quit [Quit: Bye! <(^_^<)]
Guest87132 is now known as arup_r
nertzy2 has joined #ruby
ghoti has joined #ruby
yardenbar has joined #ruby
ibouvousaime_ has joined #ruby
shinnya has quit [Ping timeout: 255 seconds]
mjuszczak has joined #ruby
pwnd_nsfw has quit [Ping timeout: 246 seconds]
psy_ has joined #ruby
psy_ has quit [Max SendQ exceeded]
ldnunes has quit [Quit: Leaving]
simplyia_ has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
prestorium_ is now known as prestorium
psy_ has joined #ruby
skweek has quit [Ping timeout: 260 seconds]
psy_ has quit [Max SendQ exceeded]
rdark has quit [Quit: leaving]
psy_ has joined #ruby
jamto11_ has quit [Remote host closed the connection]
<norc>
Okay... so evidently compiling with -CPDEBUG=10 takes a while..... :/
SCHAAP137 has quit [Quit: Leaving]
Spami has quit [Quit: This computer has gone to sleep]
jamto11_ has joined #ruby
SCHAAP137 has joined #ruby
<norc>
10 minutes and counting :<
BSaboia has joined #ruby
axl_ has quit [Quit: axl_]
dfinning_ has quit [Remote host closed the connection]
diegoaguilar has joined #ruby
pawnbox_ has quit [Remote host closed the connection]
Encapsulation has quit [Ping timeout: 244 seconds]
<norc>
err correction, just static/dynamic in both debug/release,
<norc>
But still.
<shevy>
norc!
yoongkang has joined #ruby
<shevy>
you reside in germany?
<norc>
There may or may not be any truth to that rumor.
<shevy>
:)
tulak has joined #ruby
<dtordable>
norc: hello
haxrbyte has joined #ruby
freerobby has quit [Read error: Connection reset by peer]
freerobby1 has joined #ruby
<norc>
I just always remember 9 build targets for Qt because that is what we had in our large project. :)
<norc>
dtordable: Hiyqa.
ruurd has joined #ruby
<nofxx>
norc: nah, it doesnt take that long with multiple cores
<Phage>
What would be the best/easiest way to swap two elements of an array?
nertzy2 has quit [Quit: This computer has gone to sleep]
tulak has quit [Remote host closed the connection]
<dtordable>
are you the guy that a day told me to learn python?
nertzy2 has joined #ruby
<nofxx>
Phage: of a 2 obj array?
haxrbyte has quit [Client Quit]
<jhass>
Phage: a[i], a[j] = a[j], a[i]
rakm has joined #ruby
<Phage>
jhass: Ah, thought so too. Just wanted to know, if there were some built-in function or something like that.
rbowlby has quit [Remote host closed the connection]
eminencehc has joined #ruby
<dtordable>
norc: ?
chipotle has joined #ruby
imperator has left #ruby ["Leaving"]
blue_deref has quit [Quit: bbn]
roxtrongo has quit [Remote host closed the connection]
baweaver has joined #ruby
dfinninger has joined #ruby
r0x0rZ has quit []
bkxd has joined #ruby
xblade has joined #ruby
<norc>
dtordable: I cannot recall any such recommendation.
kobain has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
<norc>
nofxx: It just did, but almost all that time was spent in the debugging functions, probably because of my terminal emulator
<norc>
So it really was just miniruby. :)
VESTINST has quit [Read error: Connection reset by peer]
quazimodo has joined #ruby
<dtordable>
aha
rgtk has joined #ruby
yashinbasement has quit [Quit: Leaving]
<rakm>
is there a way to use the csv lib and specify the number of rows/lines that are headers? my CSV file has 7 rows of meta data that I want to exclude from some row operations
idefine has joined #ruby
<rakm>
looks like there are some header options available for CSV.new
<nofxx>
dtordable: python sux, it's boring, ugly and it's fallacy to call it OO. It's not.
<norc>
nofxx: It does have nice looking decorators though.
TTilus has quit [Ping timeout: 272 seconds]
<nofxx>
rakm: it's just an array, you can use a range. Or next if something =~ // inside works too
<rakm>
i could just skip over the first 7 rows and pretend there's no header rows, but wondering if this is built in
beast_ has joined #ruby
idefine has quit [Remote host closed the connection]
<rakm>
nofxx yeah that makes sense, that was my fallback. was wondering how sophisticated header parsing is in the lib
bkxd has quit [Ping timeout: 244 seconds]
beast has quit [Ping timeout: 272 seconds]
<nofxx>
rakm: use that a lot, didn't even knew that option hehe.. gonna read more later
symm- has joined #ruby
dstarh has joined #ruby
<nofxx>
norc: and worst... its a snake, even indiana jones hate snakes.
kies has joined #ruby
rubie has joined #ruby
jamto11_ has quit [Remote host closed the connection]
ruurd has quit [Read error: Connection reset by peer]
tvw has quit [Remote host closed the connection]
DoubleMalt has joined #ruby
rbowlby has joined #ruby
<rakm>
eh, CSV.foreach does give you an index of the row? i have a large csv file and don't want to read it all into memory before operating on each row
<norc>
>> class Exception; def ===(arg); return false; end; end; begin; raise Exception; rescue Exception; end
NIckGreGER has quit [Remote host closed the connection]
<CustosLimen>
adaedra, I dont know what to try: http://www.rubydoc.info/github/rack/rack/Rack/Logger - I'm looking at that and I can initialize it to get a new object and then it has method call - and I'm not sure what either of those really help - I'm expecting something like #info( level, msg )
<adaedra>
It's a Rack middleware
<adaedra>
You don't just instantiate an instance and use it
mjuszczak has joined #ruby
<adaedra>
I'm not sure this is what you're really looking for, I'm afraid
diegoaguilar has quit [Remote host closed the connection]
<jhass>
if you want a plain logger use the stdlib Logger
whiteline has joined #ruby
rubie has quit [Remote host closed the connection]
sinkensabe has quit [Remote host closed the connection]
<TeresaP>
Hey guys. Noob garbage collection question. If I create a thread, in an initialize method, what's the best practice for cleaning it up? I realize threadname.exit will clean up, but I'm wondering if I should just have a destructor or manually call a cleanup method to kill it or what
<leitz>
Hmm...I may be on a false trail.
gambl0re has quit [Read error: Connection reset by peer]
<jhass>
TeresaP: if the code it runs is through it'll be cleaned automatically, don't worry about it
<TeresaP>
We don't have to do Thread.exit?
gambl0re has joined #ruby
<TeresaP>
jhass If we hit an exception it's cleaned automatically too, then?
DoubleMalt has quit [Remote host closed the connection]
n_blownapart has joined #ruby
<jhass>
TeresaP: yes
<niCKgREgGer>
hello everyone
banister has quit [Read error: Connection reset by peer]
<jhass>
TeresaP: only slightly related, you might want to set Thread.abort_on_exceptions = true
axl_ has left #ruby [#ruby]
<jhass>
!kick niCKgREgGer bye troll
niCKgREgGer was kicked from #ruby by ruboto [bye troll]
niCKgREgGer has joined #ruby
maddmaxx has quit [Read error: Connection reset by peer]
<shevy>
:)
<niCKgREgGer>
:(
<niCKgREgGer>
:*(
<jhass>
!ban niCKgREgGer !T 1w troll
niCKgREgGer was kicked from #ruby by ChanServ [Banned: troll]
<TeresaP>
Thanks a lot jhass. Feels weird not cleaning up
lxsameer has quit [Quit: Leaving]
ruurd has joined #ruby
alt__ has quit [Remote host closed the connection]
bluOxigen has quit [Ping timeout: 250 seconds]
tenderlo_ is now known as tenderlove
bluOxigen has joined #ruby
weemsledeux has quit [Ping timeout: 250 seconds]
ESpiney has quit [Read error: Connection reset by peer]
<TeresaP>
shevy that seemed harsh, haha
quazimodo has quit [Ping timeout: 241 seconds]
pglombardo has joined #ruby
<leitz>
Okay, size doesn't matter. It was another issue altogether.
Kreas has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
yoongkang has quit [Ping timeout: 240 seconds]
ruurd has joined #ruby
babblebre has quit [Quit: Connection closed for inactivity]
iamvery has quit [Read error: Connection reset by peer]
_blizzy_ has joined #ruby
atomical has joined #ruby
axl_ has joined #ruby
iamvery has joined #ruby
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
skade has quit [Quit: Computer has gone to sleep.]
nofxx has quit [Remote host closed the connection]
cornerma1 has joined #ruby
trosborn has quit [Quit: trosborn]
GarethAdams has joined #ruby
<TeresaP>
Another noob threading question if you don't mind. I am kicking off a thread with Thread.new { self.remove_old_screenshots}. If I have a "loop" (infinite loop) going inside that that checks for conditions before executing, what would prevent that loop from being executed more than once
GarethAdams has quit [Changing host]
GarethAdams has joined #ruby
<TeresaP>
Besides those conditions not being met
<jhass>
nothing
allcentury has joined #ruby
<Radar>
steps to reproduce the issue please
<mozzarella>
blocking operation?
<jhass>
Also set Thread.abort_on_exception = true
cornerman has quit [Ping timeout: 265 seconds]
<mozzarella>
>> sleep Float::INFINITY
<ruboto>
mozzarella # => Inf out of Time range (RangeError) ...check link for more (https://eval.in/472285)
<TeresaP>
I'm handling some exceptions that are due to an error in the parent test framework, so I'm not sure that's a good idea is it?
cornerma1 is now known as cornerman
<TeresaP>
jhass ^
<jhass>
it is
<TeresaP>
Do I need to create a new thread if I'm not "raising" after hitting the exception?