drbrain_ changed the topic of #ruby-lang to: Ruby 1.9.3-p385: http://ruby-lang.org (ruby-2.0.0-rc2) || Paste >3 lines of text on http://gist.github.com
dyln has joined #ruby-lang
justinram has quit [Remote host closed the connection]
scottschecter has joined #ruby-lang
Mizpah has joined #ruby-lang
dyln has quit [Remote host closed the connection]
znz_jp has quit [Quit: kill -QUIT $$]
ottbot has joined #ruby-lang
znz_jp has joined #ruby-lang
intellitech has joined #ruby-lang
soypirate has quit [Ping timeout: 272 seconds]
jonahR has quit [Quit: jonahR]
dyln has joined #ruby-lang
ottbot has quit [Ping timeout: 245 seconds]
tdy_ has quit [Quit: WeeChat 0.4.0]
tdy_ has joined #ruby-lang
dyln has quit [Remote host closed the connection]
orluke has quit [Quit: orluke]
dustint has quit [Quit: Leaving]
dyln has joined #ruby-lang
geopet has quit [Quit: geopet]
sn0wb1rd_ has joined #ruby-lang
Graham_K has joined #ruby-lang
nXqd has quit [Ping timeout: 248 seconds]
kvs has quit [Read error: Connection reset by peer]
sn0wb1rd has quit [Ping timeout: 260 seconds]
sn0wb1rd_ is now known as sn0wb1rd
znz_v has quit [Quit: kill -QUIT $$]
znz_v has joined #ruby-lang
kvs has joined #ruby-lang
dyln has quit [Remote host closed the connection]
dyln has joined #ruby-lang
Averna has joined #ruby-lang
sn0wb1rd has quit [Remote host closed the connection]
cirenyc has quit [Quit: Leaving...]
sn0wb1rd has joined #ruby-lang
geopet has joined #ruby-lang
mistym has quit [Remote host closed the connection]
jtoy has quit [Quit: jtoy]
BigFatFatty has left #ruby-lang [#ruby-lang]
gregmore_ has quit []
kvs has quit [Read error: Connection reset by peer]
jtoy has joined #ruby-lang
benanne has quit [Quit: kbai]
gregmoreno has joined #ruby-lang
QaDeS has quit [Quit: Ex-Chat]
faustroll has joined #ruby-lang
kvs has joined #ruby-lang
stringly_typed has joined #ruby-lang
dyln has quit [Remote host closed the connection]
nobody__ has quit [Read error: Connection reset by peer]
srbaker has quit [Quit: Computer has gone to sleep.]
bluepojo has quit [Remote host closed the connection]
bluepojo has joined #ruby-lang
marr has quit [Ping timeout: 252 seconds]
beho has quit [Remote host closed the connection]
Averna has quit [Quit: Leaving.]
jtoy has quit [Quit: jtoy]
bluepojo has quit [Ping timeout: 264 seconds]
<gillies> i have two arrays and i want to see if any value in arry2 is in arry1, like ["foo","bar"].has_any? ["foo", "baz"]
<gillies> any ideas?
<lianj> !(["foo","bar"] & ["foo", "baz"]).empty?
soypirate has joined #ruby-lang
<gillies> lianj: ah & thnx
bluepojo has joined #ruby-lang
beawesomeinstead has quit [Ping timeout: 252 seconds]
lcdhoffman has quit [Quit: lcdhoffman]
L0rdShrek____ has quit [Ping timeout: 252 seconds]
__butch__ has quit [Quit: Leaving.]
joren_ has quit [Ping timeout: 260 seconds]
joren has joined #ruby-lang
<crudson> enum_1.any? { |e| enum_2.include? e } may read more naturally for what you are trying to do, and will terminate as soon as a match is found
Demux_ has joined #ruby-lang
sailias has joined #ruby-lang
retro|cz has quit [Ping timeout: 260 seconds]
apeiros_ has joined #ruby-lang
rsl has quit [Ping timeout: 248 seconds]
bluepojo_ has joined #ruby-lang
kvs has quit [Read error: Connection reset by peer]
Graham_K has quit [Quit: Graham_K]
rsl has joined #ruby-lang
davidbalbert is now known as davidbalber|away
stringly_typed has quit []
apeiros_ has quit [Ping timeout: 244 seconds]
lcdhoffman has joined #ruby-lang
mistym has joined #ruby-lang
mistym has quit [Changing host]
mistym has joined #ruby-lang
lcdhoffman has quit [Client Quit]
kogent_ has quit [Quit: kogent_]
bluepojo has quit [Ping timeout: 252 seconds]
kvs has joined #ruby-lang
havenwood has quit [Remote host closed the connection]
agile has quit [Ping timeout: 264 seconds]
pkrnj has quit [Quit: Textual IRC Client: www.textualapp.com]
nXqd has joined #ruby-lang
<dankest> +1 for inckude?
rsl has quit [Quit: Computer has gone to sleep.]
nXqd has quit [Ping timeout: 252 seconds]
klebervi_ has joined #ruby-lang
Sinestro has joined #ruby-lang
jonahR has joined #ruby-lang
thone has quit [Read error: Operation timed out]
thone has joined #ruby-lang
kvs has quit [Read error: Connection reset by peer]
toretore has quit [Quit: Leaving]
Brainix has joined #ruby-lang
faustroll has quit [Remote host closed the connection]
kvs has joined #ruby-lang
sn0wb1rd has quit [Quit: sn0wb1rd]
arubin has joined #ruby-lang
brianpWins has quit [Quit: brianpWins]
geopet has quit [Quit: geopet]
jonahR has quit [Quit: jonahR]
ryanv-raptor has joined #ruby-lang
swav has joined #ruby-lang
sailias has quit [Quit: Leaving.]
bluepojo_ has quit [Ping timeout: 252 seconds]
carsonm has joined #ruby-lang
carsonm has left #ruby-lang [#ruby-lang]
sn0wb1rd has joined #ruby-lang
unix has joined #ruby-lang
sn0wb1rd has quit [Remote host closed the connection]
kvs has quit [Read error: Connection reset by peer]
adgar has quit [Ping timeout: 276 seconds]
kvs has joined #ruby-lang
Qwak has joined #ruby-lang
gregmoreno has quit [Remote host closed the connection]
nXqd has joined #ruby-lang
<freedrull> assuming im using hoe, how should a rubygem with a binary in bin/ require its code in lib? require 'lib/mygem'? and have that file in lib/mygem.rb require everything else?
<drbrain> freedrull: require 'mygem' then have lib/mygem.rb require other stuff as needed
<drbrain> freedrull: test with: ruby -Ilib bin/mygem ...
Brainix has quit [Quit: Brainix]
Graham_K has joined #ruby-lang
nXqd has quit [Ping timeout: 264 seconds]
sduckett has joined #ruby-lang
agile has joined #ruby-lang
Graham_K has quit [Client Quit]
jbsan has quit [Read error: Connection reset by peer]
jbsan has joined #ruby-lang
mistym has quit [Remote host closed the connection]
Qfwfq has joined #ruby-lang
cirenyc has joined #ruby-lang
<freedrull> ah ok
<freedrull> so just pass -Ilib when testing
<freedrull> didnt wanna get into the mess of modifying the load path in the code :)
<drbrain> freedrull: usually my files in bin are three lines long so I can test the functionality from regular tests
glebm has quit [Quit: Computer has gone to sleep.]
<drbrain> the shebang, require 'mylib' and MyLib.run ARGV
<freedrull> ah cool
kvs has quit [Read error: Connection reset by peer]
kvs has joined #ruby-lang
sduckett has quit [Ping timeout: 245 seconds]
amerine has quit [Quit: Computer has gone to sleep.]
kiwnix has quit [Quit: Leaving]
amerine has joined #ruby-lang
dankest has quit [Ping timeout: 255 seconds]
S2kx has joined #ruby-lang
lcdhoffman has joined #ruby-lang
tylersmith has quit [Quit: tylersmith]
lcdhoffman has quit [Client Quit]
kvs has quit [Read error: Connection reset by peer]
io_syl has quit [Ping timeout: 255 seconds]
sailias has joined #ruby-lang
S1kx has quit [Ping timeout: 255 seconds]
sailias has quit [Client Quit]
blowmage has quit [Ping timeout: 252 seconds]
blowmage has joined #ruby-lang
baba has joined #ruby-lang
unix has quit [Ping timeout: 256 seconds]
kvs has joined #ruby-lang
pr0ton has quit [Quit: pr0ton]
yfeldblum has quit [Quit: Leaving]
yfeldblum has joined #ruby-lang
L0rdShrek____ has joined #ruby-lang
kvs has quit [Read error: Connection reset by peer]
beawesomeinstead has joined #ruby-lang
havenwood has joined #ruby-lang
kvs has joined #ruby-lang
amerine has quit [Quit: Computer has gone to sleep.]
slaytanic has quit [Read error: Connection reset by peer]
Demux_ has quit [Ping timeout: 256 seconds]
slaytanic has joined #ruby-lang
Weems has joined #ruby-lang
apeiros_ has joined #ruby-lang
ryanv-raptor has quit [Quit: Leaving.]
datanoise has quit [Ping timeout: 276 seconds]
apeiros_ has quit [Ping timeout: 255 seconds]
sush24 has joined #ruby-lang
seoaqua has joined #ruby-lang
arubin has quit [Quit: Computer has gone to sleep.]
ryanv-raptor has joined #ruby-lang
ryanv-raptor has quit [Client Quit]
Qwak has quit [Ping timeout: 255 seconds]
kvs has quit [Read error: Connection reset by peer]
kvs has joined #ruby-lang
slaytani1 has joined #ruby-lang
slaytanic has quit [Ping timeout: 255 seconds]
slaytani1 is now known as slaytanic
lsegal has joined #ruby-lang
JohnBat26 has joined #ruby-lang
datanoise has joined #ruby-lang
geopet has joined #ruby-lang
slyphon has quit [Quit: slyphon]
soypirate has quit [Ping timeout: 255 seconds]
wmoxam has joined #ruby-lang
banisterfiend has quit [Remote host closed the connection]
pr0ton has joined #ruby-lang
pr0ton has quit [Client Quit]
klebervi_ has quit [Remote host closed the connection]
klebervirgilio has joined #ruby-lang
r0bby has joined #ruby-lang
klebervirgilio has quit [Ping timeout: 245 seconds]
Qfwfq has quit [Ping timeout: 255 seconds]
thufir_ has joined #ruby-lang
kogent has joined #ruby-lang
kogent has quit [Client Quit]
Qfwfq has joined #ruby-lang
geopet has quit [Quit: geopet]
sush24 has quit [Quit: This computer has gone to sleep]
bluepojo has joined #ruby-lang
jbsan has quit [Read error: Connection reset by peer]
jbsan has joined #ruby-lang
macmartine has joined #ruby-lang
swav has quit [Remote host closed the connection]
swav has joined #ruby-lang
tomzx_mac has quit [Ping timeout: 255 seconds]
swav has quit [Ping timeout: 248 seconds]
Bosox20051 has quit [Quit: Leaving]
rc- has joined #ruby-lang
<yfeldblum> how are times in different timezones compares, e.g., `[time1, time2, time3].max` ?
<drbrain> yfeldblum: they're compared via UTC: t = Time.now; p t < t.utc
<yfeldblum> drbrain, so in my example it's effectively doing `[time1, time2, time3].map(&:getutc).max`?
<drbrain> yeah
<yfeldblum> drbrain, thanks
kvs has quit [Read error: Connection reset by peer]
segfault has joined #ruby-lang
segfault is now known as Guest10079
kvs has joined #ruby-lang
seoaqua has quit [Quit: 离开]
sush24 has joined #ruby-lang
mistym has joined #ruby-lang
mistym has quit [Changing host]
mistym has joined #ruby-lang
gregmoreno has joined #ruby-lang
wmoxam has quit [Ping timeout: 256 seconds]
thufir_ has quit [Quit: Leaving.]
rc- has quit []
io_syl has joined #ruby-lang
Nisstyre-laptop has joined #ruby-lang
Mawk has quit [Quit: Mawk]
gregmoreno has quit [Remote host closed the connection]
Qfwfq has quit [Remote host closed the connection]
Qfwfq has joined #ruby-lang
bluepojo has quit [Ping timeout: 252 seconds]
r0bby is now known as robbyoconnor
noop has joined #ruby-lang
krz has joined #ruby-lang
kvs has quit [Read error: Connection reset by peer]
mistym has quit [Remote host closed the connection]
kvs has joined #ruby-lang
brianpWins has joined #ruby-lang
stonerfish has joined #ruby-lang
Qfwfq has quit [Ping timeout: 255 seconds]
Sonarcade has joined #ruby-lang
rippa has joined #ruby-lang
brianpWins has quit [Quit: brianpWins]
geopet has joined #ruby-lang
dyln has joined #ruby-lang
kvs has quit [Read error: Connection reset by peer]
Mon_Ouie has joined #ruby-lang
kvs has joined #ruby-lang
KM has joined #ruby-lang
KM is now known as Guest14150
wardrop has quit [Quit: wardrop]
vlad_starkov has quit [Remote host closed the connection]
Graham_K has joined #ruby-lang
iamjarvo has quit [Quit: Leaving.]
skade has joined #ruby-lang
macmartine has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
schroedinbug has joined #ruby-lang
Graham_K has quit [Quit: Graham_K]
geopet has quit [Quit: geopet]
dyln has quit [Remote host closed the connection]
kvs has quit [Read error: Connection reset by peer]
apeiros has joined #ruby-lang
kvs has joined #ruby-lang
apeiros has quit [Remote host closed the connection]
Sonarcade has quit [Ping timeout: 256 seconds]
apeiros_ has joined #ruby-lang
wmoxam has joined #ruby-lang
skade has quit [Quit: Textual IRC Client: www.textualapp.com]
delqn is now known as bedouin_
bedouin_ has quit [Quit: leaving]
apeiros_ has quit [Remote host closed the connection]
sepp2k has joined #ruby-lang
baba has quit [Read error: Connection reset by peer]
wmoxam has quit [Ping timeout: 260 seconds]
<freedrull> has anyone tested s3 uploads with vcr? i cant think of a way to do it without giving away my creds in the code...
techlife has quit [Ping timeout: 256 seconds]
<freedrull> i checked out how paperclip does it, seems like they just have a test called s3_live_test that isnt normally run im guessing, it gets the s3 creds from env vars
techlife has joined #ruby-lang
bedouin has joined #ruby-lang
dedis has quit [Ping timeout: 260 seconds]
snk has quit [Ping timeout: 260 seconds]
brianpWins has joined #ruby-lang
amerine has joined #ruby-lang
snk has joined #ruby-lang
Mon_Ouie has quit [Ping timeout: 255 seconds]
bedouin has quit [Client Quit]
<lsegal> freedrull yes, you put your creds in the environment or load them from a file
<freedrull> but then if you distribute this in a gem, dont the creds have to be loaded for the vcr test to playback properly
bedouin has joined #ruby-lang
bedouin has quit [Client Quit]
<freedrull> or would they already be recorded
<lsegal> no, you're not actually sending the request the second time if you're packaging up the vcr data in your gem
unix has joined #ruby-lang
<lsegal> but, you should expect your users have their credentials setup anyway, if they plan on using something that communicates with s3
bedouin has joined #ruby-lang
<freedrull> right
<havenwood> y
<freedrull> it would be nice if the tests could pass on say, travis or whatever if i release this
bedouin has quit [Client Quit]
delqn has joined #ruby-lang
delqn has quit [Client Quit]
kvs has quit [Read error: Connection reset by peer]
delqn has joined #ruby-lang
delqn has quit [Client Quit]
sn0wb1rd has joined #ruby-lang
delqn has joined #ruby-lang
workmad3 has joined #ruby-lang
delqn has quit [Client Quit]
<freedrull> what i tried was setting the credentials in env vars, recording the request, it passed. then i tried running the test without the env vars set, and i get this error https://gist.github.com/anonymous/5011429
<lsegal> ah
<lsegal> you'll want to set some default creds in the tests if no env is set
kvs has joined #ruby-lang
torrieri has joined #ruby-lang
<lsegal> the sdk is trying to check if you're on an ec2 instance and grab credentials from the instance metadata
delqn has joined #ruby-lang
francisfish has joined #ruby-lang
delqn has quit [Client Quit]
delqn has joined #ruby-lang
<lsegal> (because nothing was set)
delqn has joined #ruby-lang
<freedrull> ah ok, so it will raise an error if there are no credentials, even if its not technically going to use them since im using this vcr playback
delqn has quit [Client Quit]
<lsegal> right
delqn has joined #ruby-lang
delqn has quit [Client Quit]
<freedrull> awesome, this works great now as long as i have the key id and secret token set
<freedrull> and the same bucket that i used in the vcr cassette
<lsegal> yep, just make sure they are bogus
<freedrull> aws_options = {:access_key_id => 'notimportant',
<freedrull> :secret_access_key => 'whatever'}
francisfish has quit [Remote host closed the connection]
<freedrull> thanks so much for your help
<lsegal> np
spuk has quit [Quit: Human beings were created by water to transport it uphill.]
delqn has joined #ruby-lang
countdigi has quit [Ping timeout: 260 seconds]
vlad_starkov has joined #ruby-lang
dr_bob has joined #ruby-lang
vlad_sta_ has joined #ruby-lang
vlad_starkov has quit [Read error: Connection reset by peer]
schaerli has joined #ruby-lang
torrieri has quit [Quit: Leaving...]
chekcmate has joined #ruby-lang
kvs has quit [Read error: Connection reset by peer]
unix has quit [Remote host closed the connection]
unix has joined #ruby-lang
sepp2k has quit [Remote host closed the connection]
kvs has joined #ruby-lang
vlad_sta_ has quit [Remote host closed the connection]
skade has joined #ruby-lang
dc5ala has joined #ruby-lang
countdigi has joined #ruby-lang
unix has quit [Quit: WeeChat 0.4.0]
unix has joined #ruby-lang
gnufied has joined #ruby-lang
srbaker has joined #ruby-lang
havenwood has quit [Remote host closed the connection]
Myk267 has joined #ruby-lang
Myk267 has left #ruby-lang [#ruby-lang]
workmad3 has quit [Ping timeout: 260 seconds]
kvs has quit [Read error: Connection reset by peer]
torrieri has joined #ruby-lang
gnufied has quit [Quit: Leaving.]
Qfwfq has joined #ruby-lang
Sinestro has quit [Ping timeout: 255 seconds]
tbuehlmann has joined #ruby-lang
kvs has joined #ruby-lang
sush24 has quit [Quit: This computer has gone to sleep]
jbsan has quit [Read error: Connection reset by peer]
havenn has joined #ruby-lang
jbsan has joined #ruby-lang
ruurd has joined #ruby-lang
gnufied has joined #ruby-lang
marr has joined #ruby-lang
gnufied has quit [Client Quit]
gnufied has joined #ruby-lang
<chekcmate> system(*some command*); p $?.success? <= is this reliable?
<havenn> yes, it does what it purports to reliably
dabradley has quit [Ping timeout: 264 seconds]
<chekcmate> havenn: is it also good practice or would you rather say "don't led others see that"?
<chekcmate> *let
dabradley has joined #ruby-lang
<havenn> chekcmate: As best I know, checking exit status with $?.success? is good practice.
<chekcmate> thank you :)
srbaker has quit [Ping timeout: 264 seconds]
solars has joined #ruby-lang
unix has quit [Quit: WeeChat 0.4.0]
QaDeS has joined #ruby-lang
QaDeS has quit [Client Quit]
unix has joined #ruby-lang
torrieri has quit [Ping timeout: 252 seconds]
wallerdev has quit [Quit: wallerdev]
sush24 has joined #ruby-lang
Nisstyre-laptop has quit [Quit: Leaving]
maxmanders has joined #ruby-lang
vlad_starkov has joined #ruby-lang
kvs has quit [Read error: Connection reset by peer]
vlad_starkov has quit [Remote host closed the connection]
vlad_starkov has joined #ruby-lang
kvs has joined #ruby-lang
dhruvasagar has joined #ruby-lang
vlad_starkov has quit [Remote host closed the connection]
ryanf has quit [Quit: leaving]
ottbot has joined #ruby-lang
voker57 has quit [Read error: Connection reset by peer]
<andrewvos> Ahh did not know about success?
<andrewvos> .
torrieri has joined #ruby-lang
schaerli has quit [Remote host closed the connection]
francisfish has joined #ruby-lang
probst has joined #ruby-lang
brianpWins has quit [Quit: brianpWins]
<manveru> hm
<manveru> so what would EXIT_SUCCESS be on plan9?
kevinfagan has joined #ruby-lang
Criztian has joined #ruby-lang
lsegal has quit [Quit: Quit: Quit: Quit: Stack Overflow.]
beho has joined #ruby-lang
mercwithamouth has quit [Ping timeout: 248 seconds]
kvs has quit [Read error: Connection reset by peer]
torrieri has quit [Ping timeout: 264 seconds]
probst has quit [Quit: probst]
kvs has joined #ruby-lang
* yorickpeterse wrote a very, very basic VM in the train
<yorickpeterse> I feel like I need to do some proper reading first though
nXqd has joined #ruby-lang
swav has joined #ruby-lang
Qwak has joined #ruby-lang
probst has joined #ruby-lang
probst has quit [Client Quit]
ryez has joined #ruby-lang
vlad_starkov has joined #ruby-lang
probst has joined #ruby-lang
<whitequark> yorickpeterse: you simply don't need a stack or register machine there
probst has quit [Quit: probst]
vlad_starkov has quit [Remote host closed the connection]
banisterfiend has joined #ruby-lang
<banisterfiend> <@KSIOlajidebt> yoloͦͦͦͦͦͦͦͦͦͦͦͦͦͦͦͦͦͦͦͦͦͦͦͦͦͦͦͦͦͦͦͦͦͦͦͦͦͦͦͦͦͦͦͦͦͦͦͦͦͦͦͦͦͦͦͦͦͦͦͦͦͦͦͦͦͦͦͦͦͦͦͦͦͦͦͦͦͦͦͦͦͦͦͦͦͦͦͦͦͦͦͦͦͦͦͦͦͦͦͦͦͦͦͦͦͦͦͦͦͦͦͦͦͦͦͦͦͦͦͦͦ
<yorickpeterse> How so>
<yorickpeterse> * ?
havenn has quit [Remote host closed the connection]
<yorickpeterse> I have to store data at some point, either in a register or a stack (in my current implementation of the linter it's using a stack based approach)
probst has joined #ruby-lang
GarethAdams has joined #ruby-lang
amerine has quit [Quit: Computer has gone to sleep.]
<whitequark> yorickpeterse: um, both of these machines are as unsuited for transformations as it is possible
<yorickpeterse> eh?
torrieri has joined #ruby-lang
gregmoreno has joined #ruby-lang
kvs has quit [Read error: Connection reset by peer]
workmad3 has joined #ruby-lang
<yorickpeterse> If I'm not supposed to use a register or stack, how the fuck do I store data then?
<yorickpeterse> inb4 /dev/null
gregmoreno has quit [Ping timeout: 260 seconds]
<whitequark> yorickpeterse: mm
kvs has joined #ruby-lang
<yorickpeterse> the fuck is this
Mawk has joined #ruby-lang
sush24 has quit [Ping timeout: 255 seconds]
<yorickpeterse> to clarify: I *have* to store data somewhere for a certain period of time for proper analysis
<yorickpeterse> so unless I'm an idiot I have to use a register, stack or the likes
<yorickpeterse> And I'm not going to pass it around as arguments
probst has quit [Quit: probst]
torrieri has quit [Ping timeout: 276 seconds]
sush24 has joined #ruby-lang
havenwood has joined #ruby-lang
Qfwfq has quit [Ping timeout: 255 seconds]
blacktulip has joined #ruby-lang
<soahccc> Is there any standalone autoloader for ruby? I do not mean the lazy sort of autoload function but more the behaviour of Rails. But I wasn't able to find the technique behind it and I'm afraid I can't lightweight use it in my non rails stuff, can I?
elico has joined #ruby-lang
kvs has quit [Read error: Connection reset by peer]
glebm has joined #ruby-lang
Qwak has quit [Ping timeout: 255 seconds]
kvs has joined #ruby-lang
injekt has joined #ruby-lang
babinho has joined #ruby-lang
<yorickpeterse> There's Kernel.autoload but it will be removed in the future
<whitequark> yorickpeterse: read that PDF.
<whitequark> SCCP is what you're going to implement for analysis.
<whitequark> basically you have a map of SSA instructions to their values.
torrieri has joined #ruby-lang
tdy_ has quit [Ping timeout: 276 seconds]
<yorickpeterse> This makes no sense, I'd rather see some actual code
<yorickpeterse> this is probably the part where people come in and yell "YOU DIRTY DROPOUT!!!!"
* whitequark shrugs
toretore has joined #ruby-lang
<whitequark> I'm a dropout as well, for that matter. And I wasn't even in anything CS-related.
<whitequark> This is one of those cases when you could either learn the damn thing, or spend half a year writing a slow and buggy reimplementation of it.
<soahccc> yorickpeterse: Yeah this is what I meant with "lazy". It has no real sense except saving memory. I want a AUTOloader
<whitequark> soahccc: Rails-style autoloader involves some really evil hacks
<whitequark> well, Rails generally features this kind of stuff more often than a lot of us would wish...
glebm has quit [Ping timeout: 264 seconds]
zmack has joined #ruby-lang
<soahccc> I don't care if I'm honest. It works at least, my approach struggles with ruby's constant lookup.
zmack has quit [Remote host closed the connection]
<whitequark> soahccc: you can reuse that component of ActiveSupport.
<yorickpeterse> whitequark: the fact that the whole paper uses all kinds of terms and characters I'm not familiar with don't exactly make it easier
<soahccc> alternatively if this is "cleaner" I would be satisfied as well but I guess not: Just require the whole everything :)
unix has quit [Quit: WeeChat 0.4.0]
unix has joined #ruby-lang
<yorickpeterse> It's not a matter of not wanting to learn, it's just that it doesn't make any sense
schaerli has joined #ruby-lang
<whitequark> yorickpeterse: google for "sparse conditional constant propagation"
<whitequark> there are all sorts of explanations
<whitequark> yorickpeterse: I've also PM'ed you the code from Foundry.
<yorickpeterse> I saw that
<whitequark> "top" value means that we have to visit this SSA insn yet; "bottom" one means that it varies at runtime.
<whitequark> you probably know what "reachable in CFG" and "worklist" mean.
torrieri has quit [Ping timeout: 256 seconds]
ebouchut has quit [Remote host closed the connection]
kvs has quit [Read error: Connection reset by peer]
<yorickpeterse> I think that the first step for me is to translate my AST into a set of (easier) instructions
<yorickpeterse> Without deciding yet what storage mechanism I'll use, for as much as that's possible
glebm has joined #ruby-lang
<whitequark> yea
kvs has joined #ruby-lang
cirenyc has quit [Quit: Leaving...]
<yorickpeterse> Out of curiosity, how does one store nested data in a register where childs/parents refer to data in other registers?
<yorickpeterse> Should you in that case just store the register IDs?
<yorickpeterse> (think of a parent and child class for example)
<yorickpeterse> With stacks this is relatively easy, you just create a new one and embed it in the parent
<whitequark> yorickpeterse: what?
vlad_starkov has joined #ruby-lang
<whitequark> you don't.
<yorickpeterse> Well say you have two classes: A and B which extends A
<whitequark> register and stack machines are similar in that they only keep pointers to data in the slots
<yorickpeterse> Ah, so you'd keep the register ID
<whitequark> no.
<whitequark> you have a heap.
<whitequark> you create objects on heap, but manipulate them through registers or stack slots.
<yorickpeterse> So the registers contain mere references to data in the heap?
<whitequark> if this doesn't quite make sense to you, then it's because you don't really need either a register or a stack machine; you don't need to lower your instructions to anything (like machine code)
<lupine> given the size of registers, that's kind of essential
<whitequark> yorickpeterse: yes, exactly
<yorickpeterse> hmm
beho has quit [Remote host closed the connection]
<yorickpeterse> heh, then I think I more or less already implemented this without explicitly knowing it in my current implementation
<whitequark> lupine: not exactly size. amount, mainly
<whitequark> lupine: and the fact that data structures can be self-referential
<whitequark> lupine: and the fact that register machines lower well to both direct hardware register access and access to spill slots on stack
<whitequark> unlike stack machines, which require somewhat more preprocessing
gnufied1 has joined #ruby-lang
gnufied has quit [Ping timeout: 264 seconds]
banisterfiend has quit [Remote host closed the connection]
gustavnils has joined #ruby-lang
Stilo has joined #ruby-lang
beho has joined #ruby-lang
torrieri has joined #ruby-lang
vlad_starkov has quit [Ping timeout: 264 seconds]
tbuehlmann has quit [Quit: Yaaic - Yet another Android IRC client - http://www.yaaic.org]
tbuehlmann has joined #ruby-lang
kvs has quit [Read error: Connection reset by peer]
kvs has joined #ruby-lang
cultureulterior_ has joined #ruby-lang
cirenyc has joined #ruby-lang
unix has quit [Read error: Connection reset by peer]
jbsan has quit [Quit: jbsan]
torrieri has quit [Ping timeout: 252 seconds]
Qfwfq has joined #ruby-lang
gnufied1 has quit [Quit: Leaving.]
glebm has quit [Quit: Computer has gone to sleep.]
unix has joined #ruby-lang
<yorickpeterse> So what type of data structure would you use for a heap? A Hash?
<yorickpeterse> The latter makes me feel like it's already both: a heap and a register
adambeynon has joined #ruby-lang
cirenyc has quit [Quit: Leaving...]
Qfwfq has quit [Ping timeout: 255 seconds]
<whitequark> yorickpeterse: oh, very simple
<whitequark> the ruby heap.
vlad_starkov has joined #ruby-lang
<whitequark> you don't need that additional layer of indirection.
<yorickpeterse> eh? I need to store it somewhere so I can access it again
<yorickpeterse> e.g. storing a class definition has to be done in some class so that it can be accessed later on
<whitequark> I just have a class VM::Class which has a `constants' Hash
<whitequark> and there's VM::Object = VM::Class.new
<whitequark> you get the idea.
<whitequark> shape your data structures after your semantics.
adambeynon has quit [Ping timeout: 264 seconds]
gnufied has joined #ruby-lang
<whitequark> (the name collisions might be funny, though.)
glebm has joined #ruby-lang
<yorickpeterse> Well yeah that's what I meant
<yorickpeterse> So the register would basically be something like { :r1 => 'String' } where :r1 is the register index and "String" the key of said "constants" Hash?
<whitequark> yorickpeterse: no.
adambeynon has joined #ruby-lang
klebervi_ has joined #ruby-lang
<whitequark> each embedded-Ruby object is represented by a hosted-Ruby object.
<whitequark> a hypothetical register hash would look like { 1 => #<VM::String "String"> }.
klebervi_ has quit [Read error: Connection reset by peer]
<yorickpeterse> And the value is just a reference to whatever is in the heap?
klebervi_ has joined #ruby-lang
<whitequark> the value is just the value
<whitequark> you do not need any additional layers of indirection
<yorickpeterse> eh? Then what use is having both a heap and register if you're going to store values in the register anyway?
kvs has quit [Read error: Connection reset by peer]
<whitequark> you're not storing values "in" the register, you are storing references to values in the register.
<whitequark> the heap itself is implicit here, as you do not need to make it explicit
vlad_starkov has quit [Read error: Connection reset by peer]
<whitequark> if you did, you would need, for example, to care about garbage collection
vlad_starkov has joined #ruby-lang
<yorickpeterse> That's exactly what I meant with "the value is just a reference..."
<whitequark> apart from obvious and significant performance hit
<whitequark> yorickpeterse: it wasn't clear for me if you've expected another layer of indirection there or not.
<whitequark> yeah, that is correct.
rippa has quit [Ping timeout: 240 seconds]
<yorickpeterse> basically what I meant was this:
<yorickpeterse> heap = {'String' => #<Something::String ...>}; register = { 1 => head['String'] }
<yorickpeterse> errr, heap['String']
<whitequark> what is the meaning of keys in the `heap' Hash?
ddd_ has joined #ruby-lang
klebervi_ has quit [Ping timeout: 255 seconds]
<yorickpeterse> what data structure would you use otherwise?
<whitequark> you only have two 'true' roots in Ruby, that is, `Object' (which can be accessed from anywhere with ::Foo and also implicitly) and $globals
klebervi_ has joined #ruby-lang
<whitequark> so, you need to store a reference to your `class Object' somewhere, and a hash of globals.
kvs has joined #ruby-lang
unix has quit [Quit: WeeChat 0.4.0]
ddd has quit [Ping timeout: 245 seconds]
<yorickpeterse> also brb, lunch
torrieri has joined #ruby-lang
<whitequark> yeah and I need to go to the office
maxmanders has quit [Ping timeout: 264 seconds]
ruurd has quit [Quit: Leaving...]
adambeynon has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
unix has joined #ruby-lang
glebm has quit [Quit: Computer has gone to sleep.]
maxmande_ has joined #ruby-lang
torrieri has quit [Ping timeout: 246 seconds]
beho has quit [Remote host closed the connection]
zmack has joined #ruby-lang
glebm has joined #ruby-lang
Criztian has quit []
ruurd has joined #ruby-lang
maxmande_ has quit [Ping timeout: 264 seconds]
maxmanders has joined #ruby-lang
cored has quit [Ping timeout: 260 seconds]
kvs has quit [Read error: Connection reset by peer]
skade has quit [Ping timeout: 264 seconds]
cored has joined #ruby-lang
kvs has joined #ruby-lang
kvs has quit [Client Quit]
vlad_starkov has quit [Remote host closed the connection]
kvs has joined #ruby-lang
vlad_starkov has joined #ruby-lang
maxmanders has quit [Ping timeout: 264 seconds]
vlad_starkov has quit [Remote host closed the connection]
maxmanders has joined #ruby-lang
xcombelle has joined #ruby-lang
melter has quit [Ping timeout: 276 seconds]
jxie has quit [Quit: leaving]
torrieri has joined #ruby-lang
Qfwfq has joined #ruby-lang
banisterfiend has joined #ruby-lang
nkr has joined #ruby-lang
wmoxam has joined #ruby-lang
perry has joined #ruby-lang
melter has joined #ruby-lang
tdy_ has joined #ruby-lang
torrieri has quit [Ping timeout: 255 seconds]
<perry> hi tdy_
glebm has quit [Quit: Computer has gone to sleep.]
robbyoconnor has quit [Ping timeout: 255 seconds]
beho has joined #ruby-lang
gnufied1 has joined #ruby-lang
gnufied has quit [Ping timeout: 264 seconds]
wmoxam has quit [Ping timeout: 264 seconds]
maxmanders has quit [Ping timeout: 264 seconds]
elico has quit [Quit: Elico]
glebm has joined #ruby-lang
dhruvasagar has quit [Quit: Lost terminal]
unix has quit [Quit: WeeChat 0.4.0]
<MrWGW-> hey there
<MrWGW-> is there a simple library I can use to check that a user-input IP address is valid?
<MrWGW-> i.e. that its a valid IP address
<MrWGW-> IPv4
maxmanders has joined #ruby-lang
neocoin has joined #ruby-lang
glebm has quit [Quit: Computer has gone to sleep.]
<GarethAdams> MrWGW-: yes, in the standard library: http://www.ruby-doc.org/stdlib-1.9.3/libdoc/ipaddr/rdoc/IPAddr.html
DEac- has quit [Read error: No route to host]
DEac-_ has joined #ruby-lang
maxmanders has quit [Ping timeout: 264 seconds]
ryez_ has joined #ruby-lang
maxmanders has joined #ruby-lang
torrieri has joined #ruby-lang
zmack has quit [Remote host closed the connection]
noop has quit [Remote host closed the connection]
Stilo has quit [Quit: Textual IRC Client: www.textualapp.com]
<MrWGW-> GarethAdams: thanks
<MrWGW-> GarethAdams: your name seems familiar btw, did you publish a book on Ruby?
carloslopes has joined #ruby-lang
Eising has joined #ruby-lang
torrieri has quit [Ping timeout: 255 seconds]
<GarethAdams> not that I know of
<Eising> hey there. I have created a monster. I'm parsing lots of configuration, and my script has reached an astounding 800 lines of mostly if res = line.match(/regex/); end statements. It works, and it works well, but it is a monster. In an idea world, how should I have done it if I should have made it more elegant?
<MrWGW-> Eising: well, I myself have also written adhoc parsers and they do tend t be monstrous
<MrWGW-> the right way is to write a proper tokenizer/parser with a formal grammar
<MrWGW-> but I haven't attempted to do it yet in that manner
<MrWGW-> there are also a lot of good books on how to use Ruby to implement a DSL
<MrWGW-> and you should check those out, that will definitely point you in the direction you want to go
<Eising> MrWGW-: yeah, my computer science friend suggested that I write it in yacc...
tomzx_mac has joined #ruby-lang
<MrWGW-> indeed yacc and lex are the traditional tools for that
<MrWGW-> but if you're working in Ruby, there are many books that detail Ruby-specific DSL implementation
<MrWGW-> Puppet and Chef are examples of programs that implement a DSL in Ruby
neocoin has left #ruby-lang [#ruby-lang]
<Eising> I can't help but think that it is very cumbersome. It's mostly IOS configuration, which I know you're familiar with, so that language isn't exactly well-structured.
ryez_ has quit [Quit: Page closed]
beho has quit [Remote host closed the connection]
<MrWGW-> I'm having a strange problem in this script I'm writing where the command line argument is winding up as standard input
<MrWGW-> I don't see anything unusual about my script that could be causing it
<MrWGW-> when I attempt to get user input in the normal way via gets.chomp its instead printing the argument and a no file or directory error, ENOENT
pnr has joined #ruby-lang
judofyr has joined #ruby-lang
unix has joined #ruby-lang
schaerli has quit [Remote host closed the connection]
chekcmate has quit [Quit: Page closed]
<injekt> MrWGW-: want to show us some code?
dblack_ has joined #ruby-lang
gouthamvel has joined #ruby-lang
torrieri has joined #ruby-lang
<MrWGW-> injekt: I got it fixed, I did not realize that gets would read arguments if they weren't shifted
<MrWGW-> as opposed to $stdin.gets.chomp
<MrWGW-> so I just modified my argument handler
adambeynon has joined #ruby-lang
torrieri has quit [Ping timeout: 260 seconds]
ruurd has quit [Quit: Leaving...]
yfeldblum has quit [Ping timeout: 264 seconds]
kurko__ has joined #ruby-lang
krz has quit [Quit: krz]
skade has joined #ruby-lang
drbrain has quit [Ping timeout: 248 seconds]
mistym has joined #ruby-lang
mistym has quit [Changing host]
mistym has joined #ruby-lang
drbrain has joined #ruby-lang
mistym has quit [Remote host closed the connection]
tomzx_mac has quit [Ping timeout: 260 seconds]
sailias has joined #ruby-lang
mr_white_ has joined #ruby-lang
rsl has joined #ruby-lang
agib has left #ruby-lang [#ruby-lang]
wmoxam has joined #ruby-lang
gouthamvel has quit [Remote host closed the connection]
sailias has quit [Ping timeout: 264 seconds]
torrieri has joined #ruby-lang
slyphon has joined #ruby-lang
slyphon has quit [Client Quit]
maxmande_ has joined #ruby-lang
jbsan has joined #ruby-lang
maxmanders has quit [Ping timeout: 264 seconds]
maxmanders has joined #ruby-lang
mistym has joined #ruby-lang
mistym has quit [Changing host]
mistym has joined #ruby-lang
<cored> hello
<cored> I'm getting an undefied error of an step_id field https://gist.github.com/cored/e8cbdc15230b86381100
<cored> with this code testing with this spec
maxmande_ has quit [Ping timeout: 264 seconds]
<cored> but I'm stubbing the step_id in the stub that I'm passing to my spec
<cored> don't know why I'm getting the error, any thought
kgrz has joined #ruby-lang
torrieri has quit [Ping timeout: 252 seconds]
sailias has joined #ruby-lang
Qfwfq has quit [Read error: Connection reset by peer]
maxmanders has quit [Ping timeout: 256 seconds]
yfeldblum has joined #ruby-lang
maxmanders has joined #ruby-lang
slyphon has joined #ruby-lang
dustint has joined #ruby-lang
melter has quit [Remote host closed the connection]
Qfwfq has joined #ruby-lang
outoftime has joined #ruby-lang
melter has joined #ruby-lang
havenwood has quit [Remote host closed the connection]
anjen has joined #ruby-lang
Qfwfq has quit [Remote host closed the connection]
killfoo has quit [Ping timeout: 248 seconds]
jonahR has joined #ruby-lang
skade has quit [Quit: Computer has gone to sleep.]
anonymuse has joined #ruby-lang
anjen has quit [Client Quit]
marr has quit [Read error: Connection reset by peer]
killfoo has joined #ruby-lang
slyphon has quit [Ping timeout: 245 seconds]
iamjarvo has joined #ruby-lang
Qfwfq has joined #ruby-lang
JohnBat26 has quit [Read error: Operation timed out]
torrieri has joined #ruby-lang
<cored> I don't get the behaviour of Enumerator#find parting from the API documentation
<cored> if I do something like [1,2,3,4].find(4)
<cored> I get an enumerator with the entire array
<cored> shouldn't be the number that I set ?
unix has quit [Quit: WeeChat 0.4.0]
<lianj> [1,2,3,4].find{|i| i == 4 }
unix has joined #ruby-lang
<GarethAdams> cored: do you mean Enumerable#find ?
maxmande_ has joined #ruby-lang
<GarethAdams> cored: if so, it seems exactly like the API documentation describes: http://www.ruby-doc.org/core-1.9.3/Enumerable.html#method-i-find
<GarethAdams> "If no block is given, an enumerator is returned instead."
maxmanders has quit [Ping timeout: 257 seconds]
ruurd has joined #ruby-lang
<cored> lianj: yes, I fixed that out
<cored> lianj: I'm trying to refactor some code and now I notice that the code did not work in the first place
<lianj> :P
<cored> GarethAdams: yes, I notice that out now, the problem was the code that I'm looking the way the other developer wrote it
<cored> thanks
<GarethAdams> do the tests pass? ;)
<lianj> GarethAdams: test? oO wat
torrieri has quit [Ping timeout: 276 seconds]
<cored> GarethAdams: almost
kgrz has quit [Read error: Connection reset by peer]
enebo has joined #ruby-lang
dblack_ has left #ruby-lang [#ruby-lang]
dblack_ has joined #ruby-lang
dblack_ has left #ruby-lang [#ruby-lang]
rippa has joined #ruby-lang
dblack_ has joined #ruby-lang
MaddinXx has joined #ruby-lang
dblack_ has left #ruby-lang [#ruby-lang]
dzhulk has joined #ruby-lang
ruurd has quit [Read error: Connection reset by peer]
ruurd_ has joined #ruby-lang
mistym has quit [Remote host closed the connection]
ruurd_ has quit [Quit: Leaving...]
dablack has joined #ruby-lang
marr has joined #ruby-lang
jtoy has joined #ruby-lang
orluke has joined #ruby-lang
arubin has joined #ruby-lang
torrieri has joined #ruby-lang
jbsan has quit [Read error: Connection reset by peer]
mistym has joined #ruby-lang
mistym has quit [Changing host]
mistym has joined #ruby-lang
cirenyc has joined #ruby-lang
jbsan has joined #ruby-lang
gnufied1 has quit [Quit: Leaving.]
srbaker has joined #ruby-lang
geopet has joined #ruby-lang
srbaker has quit [Ping timeout: 256 seconds]
wallerdev has joined #ruby-lang
torrieri has quit [Ping timeout: 264 seconds]
srbaker has joined #ruby-lang
slyphon has joined #ruby-lang
rwilcox has joined #ruby-lang
kurko__ has quit [Quit: Computer has gone to sleep.]
banisterfiend has quit [Remote host closed the connection]
geopet has quit [Quit: geopet]
tdy_ has quit [Read error: Operation timed out]
<cored> I think now I see what was the problem
<cored> I'm not using Ruby enumerator
schaerli has joined #ruby-lang
<GarethAdams> cored: Enumerator doesn't define a #find method - http://www.ruby-doc.org/core-1.9.3/Enumerator.html
torrieri has joined #ruby-lang
gregmoreno has joined #ruby-lang
geopet has joined #ruby-lang
gregmoreno has quit [Ping timeout: 244 seconds]
torrieri has quit [Ping timeout: 246 seconds]
maxmande_ has left #ruby-lang [#ruby-lang]
sepp2k has joined #ruby-lang
maxmanders has joined #ruby-lang
xcombelle has quit [Read error: Connection reset by peer]
postmodern has quit [Quit: Leaving]
engel_ has joined #ruby-lang
__BigO__ has joined #ruby-lang
tbuehlmann has quit [Remote host closed the connection]
nmeum has quit [Ping timeout: 252 seconds]
beiter has quit [Quit: beiter]
Qwak has joined #ruby-lang
havenwood has joined #ruby-lang
Qwak has quit [Ping timeout: 244 seconds]
kogent has joined #ruby-lang
<eam> In perl, I have a block of code that uses multiple sort conditions, like so: sort { $a->[1] <=> $b->[1] || $a->[2] <=> $b->[2] }
<eam> In ruby, <=> still returns 1 / 0 / -1, but I can no longer use logical or to act on its return value (because 0 is true)
<eam> what's the ruby way to do this?
x0F has quit [Disconnected by services]
x0F_ has joined #ruby-lang
x0F_ is now known as x0F
<mistym> eam: <=> is used as the basis for the Comparable mixin, which will provide methods such as <, >,
apeiros_ has joined #ruby-lang
torrieri has joined #ruby-lang
schaerli has quit [Remote host closed the connection]
kogent has quit [Quit: kogent]
slyphon has quit [Quit: slyphon]
lele|w has quit [Read error: Connection reset by peer]
lele|w has joined #ruby-lang
sduckett has joined #ruby-lang
maxmanders has quit [Ping timeout: 264 seconds]
dyln has joined #ruby-lang
tdy has joined #ruby-lang
<eam> mistym: hm, how does that help me write this expression?
maxmanders has joined #ruby-lang
solars has quit [Ping timeout: 264 seconds]
<apeiros_> eam: sort_by { |x| [x[1], x[2]] }
kogent has joined #ruby-lang
<apeiros_> and I think what mistym meant was - define <=> on your array's element's class and just use sort without a block
countdigi has quit [Quit: Lost terminal]
<apeiros_> i.e., def <=>(other); [self[1], self[2]] <=> [other[1], other[2]]; end
maxmanders has quit [Ping timeout: 255 seconds]
forrest has joined #ruby-lang
apeiros_ has quit [Remote host closed the connection]
sduckett has quit [Ping timeout: 264 seconds]
spuk has joined #ruby-lang
maxmanders has joined #ruby-lang
methods has joined #ruby-lang
pasties has quit [Quit: Gone]
Graham_K has joined #ruby-lang
methods has left #ruby-lang [#ruby-lang]
pasties has joined #ruby-lang
slyphon has joined #ruby-lang
carloslopes has quit [Remote host closed the connection]
sush24 has quit [Quit: This computer has gone to sleep]
torrieri has quit [Quit: Leaving...]
dzhulk has quit [Quit: Leaving.]
glebm has joined #ruby-lang
Mon_Ouie has joined #ruby-lang
dustint_ has joined #ruby-lang
<eam> hm, but my elements are just Fixnum and String
vlad_starkov has joined #ruby-lang
<eam> twiddling <=> on those sounds like a bad idea
dustint has quit [Read error: Operation timed out]
<eam> sort_by looks like it might work, though that's not really a general solution to the comparison issue
srbaker has quit [Quit: Computer has gone to sleep.]
torrieri has joined #ruby-lang
torrieri has quit [Changing host]
torrieri has joined #ruby-lang
sduckett has joined #ruby-lang
<eam> although - sort_by wraps up this entire decorate sort undecorate pattern I have
<eam> yeah this is nice :)
dablack has quit [Quit: dablack]
dyln has quit [Remote host closed the connection]
ruurd has joined #ruby-lang
Qwak has joined #ruby-lang
<whitequark> eam: that's called "schwartzian transform" :D
<eam> yeah
<eam> :D
judofyr has quit [Remote host closed the connection]
banister_ has joined #ruby-lang
apeiros_ has joined #ruby-lang
<apeiros_> whitequark: oh, that even got a name?
<apeiros_> whitequark: btw., your log++
sduckett has quit [Ping timeout: 255 seconds]
wyhaines has joined #ruby-lang
Graham_K has left #ruby-lang [#ruby-lang]
<whitequark> thanks :)
<eam> here's what I'm adapting, I just dropped in sort_by and it appears to work - looks like I can remove the decorating maps now? https://gist.github.com/eam/5014944
* apeiros_ was just born too late…
<apeiros_> I did that without knowing it existed
<whitequark> apeiros_: well, it's not like you will never able to invent merge sort by yourself. or, I dunno, SCCP
<whitequark> it's just a convenient way to name the concept.
<apeiros_> :)
<apeiros_> sure
<apeiros_> but if I had been earlier, it might be named after me ;-D
<eam> randal didn't invent it though
<eam> you could re-popularize it!
<havenwood> apeiros_: p392 is out, so many patches! :O
glebm has quit [Ping timeout: 276 seconds]
havenwood has quit [Remote host closed the connection]
<apeiros_> eam: in case you need reverse the order of just certain elements, you might be interested in https://gist.github.com/apeiros/898050
<apeiros_> d'oh, wanted to thank havenwood
apeiros_ changed the topic of #ruby-lang to: Ruby 1.9.3-p392: http://ruby-lang.org (ruby-2.0.0-rc2) || Paste >3 lines of text on http://gist.github.com
<zzak> apeiros_: can you change the chanserv message too?
<apeiros_> sadly no
<apeiros_> at least last time I checked I didn't have that priv
glebm has joined #ruby-lang
<zzak> :(
<apeiros_> zenspider might
<apeiros_> and drbrain probably too
slyphon_ has joined #ruby-lang
Qwakeree has joined #ruby-lang
slyphon has quit [Read error: Connection reset by peer]
slyphon_ is now known as slyphon
* apeiros_ gemifies that gist
<zzak> oh
Qwak has quit [Ping timeout: 252 seconds]
<apeiros_> 'sorting' should be a good name, no?
skade has joined #ruby-lang
<apeiros_> got another gist which I'll combine with that one…
kurko__ has joined #ruby-lang
skade has quit [Read error: Connection reset by peer]
carloslopes has joined #ruby-lang
<eam> apeiros_: sweet
gregmoreno has joined #ruby-lang
Kuukunen has quit [Ping timeout: 245 seconds]
<andrewvos> sortify
<andrewvos> slort
<apeiros_> sortify is so 2012
<apeiros_> ;-)
<apeiros_> j/k
<andrewvos> srot
<andrewvos> good one ^
<andrewvos> get it?
<andrewvos> it's funny cause it is in the wrong order
kurko__ has quit [Client Quit]
afred has joined #ruby-lang
srbaker has joined #ruby-lang
havenwood has joined #ruby-lang
afred has left #ruby-lang [#ruby-lang]
sn0wb1rd has quit [Quit: sn0wb1rd]
skade has joined #ruby-lang
sush24 has joined #ruby-lang
<apeiros_> :)
<apeiros_> I didn't get it without the explanation
anonymuse has quit [Quit: Leaving...]
davidbalber|away is now known as davidbalbert
<andrewvos> thought so
ruurd has quit [Quit: Leaving...]
jbsan has quit [Quit: jbsan]
carloslopes has quit [Ping timeout: 256 seconds]
torrieri has quit [Quit: Leaving...]
jxie has joined #ruby-lang
torrieri has joined #ruby-lang
sush24 has quit [Ping timeout: 246 seconds]
engel_ has quit [Quit: Leaving]
Kuukunen has joined #ruby-lang
francisfish has quit [Remote host closed the connection]
amerine has joined #ruby-lang
sush24 has joined #ruby-lang
GarethAdams has quit [Quit: Leaving...]
skade has quit [Ping timeout: 252 seconds]
amerine has quit [Client Quit]
sn0wb1rd has joined #ruby-lang
imperator has joined #ruby-lang
jbsan has joined #ruby-lang
amerine has joined #ruby-lang
<apeiros_> wouldn't it be nice if the changelog contained release-separators?
<apeiros_> so you know which changes made it into what patchlevel?
Kuukunen has quit [Ping timeout: 260 seconds]
<andrewvos> look in git?
<apeiros_> andrewvos: translation: pay more effort
<apeiros_> I don't want to have to do more :)
<apeiros_> I'm lazy. that's why I'm a coder.
<andrewvos> not all coders are lazy, have you seen java?
<andrewvos> anyway, it is a simple bash one liner I'm sure
<apeiros_> yeah, they're too fucking lazy to learn a new language :o)
unix has quit [Quit: WeeChat 0.4.0]
<apeiros_> also see php
<apeiros_> and vb
<apeiros_> and anything else than ruby
<andrewvos> hah
<andrewvos> git log v1.1..v1.2 or skmething like that?
Kuukunen has joined #ruby-lang
soypirate has joined #ruby-lang
nmeum has joined #ruby-lang
MaddinXx has quit [Remote host closed the connection]
tylersmith has joined #ruby-lang
Mon_Ouie has quit [Ping timeout: 276 seconds]
dr_bob has left #ruby-lang [#ruby-lang]
soypirate has quit [Quit: Leaving]
ryanv-raptor has joined #ruby-lang
wmoxam has quit [Ping timeout: 264 seconds]
MaddinXx_ has joined #ruby-lang
MaddinXx_ has quit [Remote host closed the connection]
ivanoats has joined #ruby-lang
Qwakeree has quit [Ping timeout: 248 seconds]
carloslopes has joined #ruby-lang
skade has joined #ruby-lang
skade has quit [Read error: Connection reset by peer]
skade has joined #ruby-lang
dc5ala has quit [Quit: Ex-Chat]
skade has quit [Client Quit]
spuk has quit [Ping timeout: 252 seconds]
skade has joined #ruby-lang
slyphon_ has joined #ruby-lang
skade has quit [Read error: Connection reset by peer]
banister_ has quit [Remote host closed the connection]
Br4nd0n has joined #ruby-lang
nmeum has quit [Read error: Operation timed out]
vlad_starkov has quit [Read error: Connection timed out]
sn0wb1rd has quit [Quit: sn0wb1rd]
slyphon has quit [Ping timeout: 252 seconds]
slyphon_ is now known as slyphon
dyln has joined #ruby-lang
jbsan has quit [Read error: Connection reset by peer]
jbsan has joined #ruby-lang
skade has joined #ruby-lang
beho has joined #ruby-lang
kevinfagan has quit [Quit: Leaving...]
skade has quit [Client Quit]
<outoftime> apeiros_, andrewvos: basically this http://pastie.org/6317810
Br4nd0n has left #ruby-lang [#ruby-lang]
Br4nd0n has joined #ruby-lang
Br4nd0n has quit [Client Quit]
<andrewvos> could just type git log
tdy has quit [Quit: WeeChat 0.4.0]
Guest10079 has quit [Ping timeout: 246 seconds]
outoftime has quit [Ping timeout: 255 seconds]
Brandon has joined #ruby-lang
Brandon is now known as Guest19374
tdy has joined #ruby-lang
outoftime has joined #ruby-lang
marr has quit []
sush24 has quit [Quit: This computer has gone to sleep]
workmad3 has quit [Ping timeout: 260 seconds]
nmeum has joined #ruby-lang
wmoxam has joined #ruby-lang
ryanv-raptor has quit [Quit: Leaving.]
marr has joined #ruby-lang
kurko__ has joined #ruby-lang
wmoxam has quit [Ping timeout: 260 seconds]
sn0wb1rd has joined #ruby-lang
brianpWins has joined #ruby-lang
<apeiros_> I gemified Sorting - I'd be glad for feedback on it: https://github.com/apeiros/sorting
<apeiros_> eam: ^
<outoftime> andrewvos: I meant if the maintainers wanted to easily keep a coherent changelog
<apeiros_> (haven't published it as a gem yet)
cultureulterior_ has quit [Quit: cultureulterior_]
<apeiros_> (asking for feedback in #ruby too)
<outoftime> apeiros_: does that define Kernel#asc / Kernel#desc methods?
wmoxam has joined #ruby-lang
havenwood has quit [Remote host closed the connection]
<apeiros_> outoftime: only if you explicitly require 'sorting/convenience'
<apeiros_> else you have to use Sorting.asc and .desc
<outoftime> apeiros_: I see
* apeiros_ thinks it's good to only monkey-patch when asked to and provide other means otherwise
* outoftime agrees
<outoftime> and you can include Sorting::Helpers if you just want the convenience in a particular place?
ivanoats has quit [Remote host closed the connection]
vlad_starkov has joined #ruby-lang
<outoftime> right, obviously yes.
<apeiros_> correct
<apeiros_> ah, I should mention the require stuff in the README
spuk has joined #ruby-lang
pr0ton has joined #ruby-lang
adambeynon has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
ivanoats has joined #ruby-lang
bluepojo has joined #ruby-lang
ryanv-raptor has joined #ruby-lang
Guest19374 has left #ruby-lang [#ruby-lang]
Brandon has joined #ruby-lang
Brandon is now known as Guest89602
Guest89602 has left #ruby-lang [#ruby-lang]
mercwithamouth has joined #ruby-lang
Br4nd0n has joined #ruby-lang
MSU has joined #ruby-lang
<Br4nd0n> Hi
klebervi_ has quit [Remote host closed the connection]
dzhulk has joined #ruby-lang
klebervirgilio has joined #ruby-lang
<Br4nd0n> I am not sure if this is the right place to get help. But I would really like to figure out why Ruby isn't working on my OSX - and why paths seems to be so inconsistent. Any pointers?
<apeiros_> with that little information - I wouldn't know how
<Br4nd0n> I know…
<Br4nd0n> I think I am having a problem with paths
<Br4nd0n> I am not a coder… I just want to be able to take advantage of ruby scripts to do simple automation with Hazel, or be able to use apps like Alfred to execute scripts.
<Br4nd0n> Simple scripts that seem to work for other users fail on my machine
<outoftime> RVM is probably simple enough for non-coders, right?
<soahccc> Br4nd0n: What is the exact problem? You might use the kinda outdated system ruby
klebervirgilio has quit [Ping timeout: 260 seconds]
Graham_K has joined #ruby-lang
<Br4nd0n> Well, just trying to execute this shell script fails: ~/bin/cloudapp_upload "{query}"
<soahccc> "fails" isn't an exact description :)
<Br4nd0n> :)
<Br4nd0n> My terminal window opens and says: /Users/Brandon/bin/cloudapp_upload: No such file or directory
sn0wb1rd_ has joined #ruby-lang
vlad_starkov has quit [Read error: Connection timed out]
<soahccc> Do you have a link to the script?
<Br4nd0n> Just following this tutorial (script included): http://awhitebox.com/uploading_files_to_cloudapp_from_alfred/
sn0wb1rd has quit [Ping timeout: 264 seconds]
sn0wb1rd_ is now known as sn0wb1rd
thillux has joined #ruby-lang
<soahccc> Br4nd0n: Can you change the first line starting with #! to this?: #!/usr/bin/env ruby
<Br4nd0n> sure, let me try
davidbalbert is now known as davidbalber|away
Mon_Ouie has joined #ruby-lang
bzalasky has joined #ruby-lang
maxmanders has quit [Ping timeout: 264 seconds]
vlad_starkov has joined #ruby-lang
<soahccc> Br4nd0n: Then the file is just not there I suppose
<soahccc> try the command file /Users/Brandon/bin/cloudapp_upload
<Br4nd0n> (No such file or directory)
<soahccc> Well then you placed the file somewhere else
havenwood has joined #ruby-lang
<soahccc> Also I'm not sure if the tutorial misses the step of making the file executable (might be not needed when calling it through Alfred)
<Br4nd0n> I just did a: sudo find / -name *cloudapp_upload*
<Br4nd0n> result: /bin/cloudapp_upload
<soahccc> Then you have to call it with /bin in alfred not ~/bin
<Br4nd0n> and /usr/bin/cloudapp_upload
<soahccc> The tilde refers to your home directory which is /Users/Brandon
mrsolo has joined #ruby-lang
<Br4nd0n> ok, so I removed the tilde
<soahccc> And to call it directly in the Terminal you might need to do this chmod u+x /whereverthefileis/cloudapp_upload
<Br4nd0n> now we are making progress :) while failing: http://cl.ly/image/3X1A2x0q0C3K
<soahccc> Did you installed the gems mentioned at the top of the tutorial?
<Br4nd0n> I think my machine confuses Bins
dblack__ has joined #ruby-lang
<Br4nd0n> sure did
dblack__ has quit [Client Quit]
JohnBat26 has joined #ruby-lang
<Br4nd0n> See, take a look: http://cl.ly/image/2W410k0Y002J
<havenwood> Br4nd0n: I'd recommend pasting text to gist.github.com rather than screenshots, nicer in a couple respects.
<Br4nd0n> OK, will do haven wood - just trying to be helpful as possible when asking others for help
<zzak> it needs to be in your PATH
<Br4nd0n> zzak - can you tell me what needs to be my PATH?
dzhulk has quit [Quit: Leaving.]
<havenwood> Br4nd0n: A nice option for getting your PATH and other environment variables set correctly is chruby: https://github.com/postmodern/chruby
lele|w has quit [Read error: Connection reset by peer]
<Br4nd0n> so sudo install chruby?
<havenwood> Br4nd0n: OS/distro?
lele|w has joined #ruby-lang
<havenwood> Br4nd0n: I'm on OS X, so for me it is: brew install chruby
<havenwood> ahh, from your screenshots looks like you are OS X as well, so: brew install chruby
<soahccc> what? why don't just echo your path?
ruurd has joined #ruby-lang
<Br4nd0n> I am on OSX too, let me try that
lele|w has quit [Read error: No route to host]
<soahccc> havenwood: Assuming installed brew
<havenwood> soahccc: <3 brew
ruurd has quit [Client Quit]
beho has quit [Remote host closed the connection]
<soahccc> me too :)
cirenyc has quit [Quit: Leaving...]
lele|w has joined #ruby-lang
benanne has joined #ruby-lang
vlad_starkov has quit [Remote host closed the connection]
lele|w has quit [Read error: No route to host]
<havenwood> Br4nd0n: On the chance you don't have Homebrew installed, you should! :) http://mxcl.github.com/homebrew/
<soahccc> Br4nd0n: Did you installed a new ruby and yes how? (means via what)
banisterfiend has joined #ruby-lang
<soahccc> Then your env probably points to this version and sudo gem install installs it to the old one
lele|w has joined #ruby-lang
<havenwood> Interesting, I didn't know that Homebrew was doing a KickStarter for a brew test-bot...: http://www.kickstarter.com/projects/homebrew/brew-test-bot?ref=card
<havenwood> 621% funded, 12 days to go
<mistym> I was blown away by how fast it got funded!
<soahccc> havenwood: Hmm am I right that chruby is kinda rbenv but without those bloody shims?
dzhulk has joined #ruby-lang
<havenwood> soahccc: yeah, basically
<Br4nd0n> sorry guys, had to take a phone fall. I don't believe I have install the new ruby
<Br4nd0n> and I do not have bee installed
<havenwood> soahccc: uber-minimalist, no shims, works :D
<soahccc> Br4nd0n: You have, via rvm
MaddinXx_ has joined #ruby-lang
<Br4nd0n> ok
<soahccc> havenwood: have it something to build? I like rbenv except the shims
<havenwood> soahccc: It has a side script (setup.sh) that automates building latest Ruby, JRuby and RBX. Postmodern has said he's gunna break it out into its own gem but it works great.
<havenwood> soahccc: Also you can build ruby with anything and then point chruby at it.
<havenwood> soahccc: I usually use the build scripts on the chruby wiki.
<havenwood> soahccc: e.g., here is JRuby install wiki: https://github.com/postmodern/chruby/wiki/JRuby
<soahccc> Hmm I'll keep that in mind and see how it evolves
beho has joined #ruby-lang
<soahccc> Currently I'm already served with rebundling every app due to a new ruby... I'm too impatient :)
<havenwood> soahccc: With 0.4.0 i think chruby will be the only ruby version manager with a man page! :O
davidbalber|away is now known as davidbalbert
beho has quit [Remote host closed the connection]
Graham_K has quit [Quit: Graham_K]
<havenwood> I thought the `man ruby` was an interesting read. I was kinda surprised that the first paragraph of Description didn't mention Smalltalk.
<soahccc> Br4nd0n: I'm not that familiar with rvm but if "/usr/bin/env ruby -v" shows your 1.9.* installation you just have to install the gems without the "sudo" and it should work
<havenwood> **second paragraph rather
<havenwood> Br4nd0n: If you go with rvm, make sure to occasionally update it with: rvm get stable
<havenwood> Br4nd0n: Also good to check that you have installed all the requirements: brew requirements
kurko__ has quit [Ping timeout: 264 seconds]
<Br4nd0n> havenwood: I don't have brew installed
<soahccc> havenwood: The script runs but it doesn't find the gems so I guess new ruby and gems got installed in old
<havenwood> Br4nd0n: To install Homebrew, run: ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"
mistym is now known as mistym_lunch
<Br4nd0n> OK, so according to JewerlyBox I have 1.92 AND 1.93 installed
dyln has quit [Remote host closed the connection]
<havenwood> Br4nd0n: I highly recommend installing Homebrew, it is an OS X package manager written in Ruby. Very nice for easily installing dependencies.
<Br4nd0n> Havenwood: will brew clean up my existing ruby set up?
<havenwood> Br4nd0n: I don't know if you are missing dependencies. It is work having brew just for convenience. You'll need packages sooner or later. :)
<havenwood> Br4nd0n: For that matter, you can: brew install ruby
Graham_K has joined #ruby-lang
<soahccc> So I gonna go... check what I said, install the gems without sudo... cya
<Br4nd0n> thanks saohcc!
klebervirgilio has joined #ruby-lang
<Br4nd0n> So for what it worth, I can't install Gems without Sudo
<darix> gem install --user-install
<Br4nd0n> "You don't have write permissions into the /Library/Ruby/Gems/1.8 directory."
<darix> also /Library/Ruby/Gems/1.8 would that be system ruby and now the homebrew version?
<havenwood> Br4nd0n: You have to use `sudo` with system Ruby on OS X.
<Br4nd0n> darix: --user-install worked
<Br4nd0n> darix: I don't have brew installed
<darix> ah
<darix> just saw it mentioned earlier
<havenwood> Br4nd0n: Open Terminal and run the Brew install script. :P
<Br4nd0n> ok, ok, I will havenwood
<Br4nd0n> As Sudo or not"?
<havenwood> not
hahuang65 has joined #ruby-lang
<Br4nd0n> ==> Downloading and Installing Homebrew...
slyphon has quit [Quit: slyphon]
Graham_K has left #ruby-lang [#ruby-lang]
Graham_K has joined #ruby-lang
slyphon has joined #ruby-lang
<Br4nd0n> Ha, that was funny… at the beginning of the install is stated: ==> Downloading and Installing Homebrew... And then: ==> havenwood Loves Homebrew
mistym has joined #ruby-lang
cirenyc has joined #ruby-lang
mistym has quit [Changing host]
mistym has joined #ruby-lang
<Br4nd0n> OK, home-brew installed! No what?
<havenwood> Br4nd0n: Run: brew doctor
__butch__ has joined #ruby-lang
<Br4nd0n> havenwood: Just did… bunch of warnings
<havenwood> Br4nd0n: Good idea to go ahead and fix the path warnings, delete the cruft it asks you to.
jonahR_ has joined #ruby-lang
<apeiros_> zzak: ping
<apeiros_> zzak: Object#<=> could use a generic documentation (i.e., how to implement when creating a class) along with a reference to Comparable
<havenwood> Br4nd0n: Kinda a pain, but worth getting the brew doctor stuff out of the way for proper brewing.
davidbalbert is now known as davidbalber|away
davidbalber|away is now known as davidbalbert
<havenwood> Br4nd0n: (Add the PATHS under `brew doctor` to your `/etc/paths` file in the order it asks.)
<zzak> apeiros_: thanks!
jonahR has quit [Ping timeout: 260 seconds]
jonahR_ is now known as jonahR
<apeiros_> zzak: thanks to you! :)
<Br4nd0n> havenwood: are all of these worth trying to fix? https://gist.github.com/anonymous/a75e683e4d33250803c3
thufir_ has joined #ruby-lang
banisterfiend has quit [Read error: Connection reset by peer]
<zzak> apeiros_: ill see what i can do
<havenwood> Br4nd0n: Pretty important to have working compilers, so I'd get the newest Xcode with command-line-tools. Do also add '/usr/local/sbin' to your `/etc/paths` file as well.
dhruvasagar has joined #ruby-lang
dhruvasagar has quit [Client Quit]
<havenwood> Br4nd0n: The orphaned dylibs and static libraries aren't as likely to cause problems, but I'd prolly nuke em anyways: cd /usr/local/Library && git stash && git clean -f
<havenwood> Br4nd0n: Then... :P rerun: brew doctor
<havenwood> Br4nd0n: Just have to do this once, but yeah it can be a pain. Worth doing.
ryanf has joined #ruby-lang
<Br4nd0n> Wow. LAtest Xcode 1.5 GB
dhruvasagar has joined #ruby-lang
<havenwood> >.>
dhruvasagar has quit [Client Quit]
<apeiros_> zzak: see e.g. Fixnum#<=>
<Br4nd0n> havenwood: how do I amend my PATH variable?
<apeiros_> zzak: should mention in which case nil should be returned (namely if self can't be compared with other)
<havenwood> Br4nd0n: Open `/etc/paths` file in a text editor.
<havenwood> Br4nd0n: e.g., I use TextMate 2, so: mate /etc/paths
<apeiros_> zzak: I'm currently busy with writing docs & tests for https://github.com/apeiros/sorting - but after that I can write a draft if you like
<Br4nd0n> havenwood: I have text mate too, but hat doesn;t work
<havenwood> Br4nd0n: Open TextMate and under the TextMate menubar item, select Preferences, then the Terminal tab.
marcostoledo has joined #ruby-lang
<havenwood> Br4nd0n: And click the install button to add shell support for `mate`.
<zzak> apeiros_: that would be great, there's no rush either
<Br4nd0n> havenwood: shell support already installed
<zzak> apeiros_: if you want to work on it, go for it
<havenwood> Br4nd0n: I guess click uninstall then install again?
<Br4nd0n> havenwood: location ~/bin/mate
<havenwood> Br4nd0n: I have mine at /usr/local/bin/mate but either should be find.
<havenwood> fine**
<Br4nd0n> Havenwood: I am telling you… anytime I see *bin* I am looking at a probelm
<Br4nd0n> havenwood: unistalled, reinstalled using the pull down location, and selected your path - works now
<Br4nd0n> havenwood: added /usr/local/sbin to PATH
banister_ has joined #ruby-lang
<havenwood> Br4nd0n: Recheck brew doctor, to make sure it doesn't complain about the order of PATHS now.
kevinfagan has joined #ruby-lang
<Br4nd0n> havenwood: It is still compalining
<zzak> apeiros_: i'll ping you if i get to it first haha
<havenwood> Br4nd0n: Restart Terminal.
<apeiros_> zzak: :) ok
srbaker has quit [Quit: Computer has gone to sleep.]
<Br4nd0n> havenwood: still complaining, and I double checked the paths files
<havenwood> Br4nd0n: Saved the changes to paths?
<Br4nd0n> havenwood: indeed
thillux has quit [Remote host closed the connection]
<havenwood> Br4nd0n: Is the complaint still about it being missing, or now about the order its in?
<Br4nd0n> havenwood: same warning: "Consider amending your PATH variable so it contains:"
<havenwood> Br4nd0n: Even after restarting Terminal.app? Hrmmm...
<havenwood> Br4nd0n: Hmm, it is the last on the list not loading, makes me wonder if it need a hard-return after the last item. Does it work if you put /usr/local/sbin higher on the list?
<havenwood> Br4nd0n: The are other ways to modify your path, but /etc/paths is preferred. If adding a return or changing order don't work, you could add the following to your .bashrc: export PATH="/usr/local/sbin:$PATH"
<havenwood> s/don't/doesn't
breakingthings has joined #ruby-lang
workmad3 has joined #ruby-lang
<Br4nd0n> havenwood: moved it up to the third line. Home Brew stopped whinning
Squarepy has joined #ruby-lang
<havenwood> Br4nd0n: Good deal. One down!
<Br4nd0n> havenwood: 1 min left in Xcode d/l
maxmanders has joined #ruby-lang
Squarepy has quit [Changing host]
Squarepy has joined #ruby-lang
<havenwood> Br4nd0n: Did you already do?: cd /usr/local/Library && git stash && git clean -f
eklarkri has joined #ruby-lang
<Br4nd0n> havenwood: tried to
<Br4nd0n> havenwood: No local changes to save
<Br4nd0n> Not removing Contributions/cmds/
<Br4nd0n> Not removing Homebrew/vendor/multi_json/engines/
<havenwood> Br4nd0n: Try fetching an updated list of brews, and installing chruby?: brew update && brew install chruby
thufir_ has quit [Quit: Leaving.]
<havenwood> Br4nd0n: And install the Ruby dependency brews: brew install openssl readline libyaml gdbm libffi
thufir_ has joined #ruby-lang
vlad_starkov has joined #ruby-lang
thufir_ has quit [Client Quit]
<Br4nd0n> havenwood: I will do as soon as Xcode is done
workmad3 has quit [Ping timeout: 248 seconds]
eklarkri has quit [Quit: leaving]
<havenwood> Br4nd0n: Yeah, that is prolly best. Also remember to open Xcode, and under Preferences > Downloads, install command-line-tools.
eklarskov has joined #ruby-lang
<Br4nd0n> havenwood: good point
<havenwood> Br4nd0n: Might also want to `brew cleanup` to get rid of any cruft.
eklarskov has quit [Client Quit]
ruurd has joined #ruby-lang
eklarskov has joined #ruby-lang
nkr has quit [Quit: Linkinus - http://linkinus.com]
totallymike has quit [Ping timeout: 256 seconds]
carloslopes has quit [Remote host closed the connection]
dhruvasagar has joined #ruby-lang
mistym has quit [Remote host closed the connection]
eklarskov has quit [Client Quit]
eklarskov has joined #ruby-lang
<jtoy> what is the simplest library i can add to give web CRUD to a postgresql database? I don't want to write a rails app or any web app if possible, but i would like to be able to modify it if need be, it doesn't have to be in ruby if there is something easier
<havenwood> jtoy: I really like Sinatra with Sequel. If you don't want to use a web server, you could make a straight-up Rack app.
<havenwood> jtoy: sinatra and sequel gems**
Graham_K has quit [Quit: Graham_K]
<darix> jtoy: if i recall correctly django has builtin forms for crud
<darix> jtoy: also there are a few plugins like activeadmin for rails
solars has joined #ruby-lang
<jtoy> darix: cool, i might try django
eklarskov has quit [Client Quit]
<havenwood> jtoy: There's also: http://www.padrinorb.com
workmad3 has joined #ruby-lang
eklarskov has joined #ruby-lang
<Br4nd0n> havenwood: is Sinatra a web server or sorts?
__butch__ has quit [Quit: Leaving.]
<jtoy> darix: even without the onslaught on rails lately, i really feel like it solo heavy, every single time i change something in my rails app something always braks
<havenwood> Br4nd0n: Sinatra is a Rack web framework. Rack webservers include Unicorn, Rainbows!, Thin, Webrick, etc.
<jtoy> havenwood: id have to code that up i think, the forms to data insert i mean
totallymike has joined #ruby-lang
<darix> jtoy: http://activeadmin.info/ - there is also a railscast for a it
<jtoy> cool, i head about padrino before but never used it
<havenwood> jtoy: Sinatra is quite nice, very light to work with: http://www.sinatrarb.com
<havenwood> jtoy: Yeah, Padrino adds Django-like admin to Sinatra.
<darix> havenwood: you dont get it. he wants ready scaffolds things
<jtoy> darix: I've used all the scaffolds, they always seem to break on random things or upgrades
<havenwood> darix: gotcha
<darix> jtoy: god forbid you actually have to do a little work yourself.
<havenwood> Espresso framework looks interesting, but I've never tried it: http://espresso.github.com
<jtoy> darix: haha, i hate repeating code work
<jtoy> plus i have a million other things to code up
g0bl1n has joined #ruby-lang
pr0ton has quit [Ping timeout: 276 seconds]
<darix> jtoy: so use phppgadmin and be done?
dhruvasagar has quit [Quit: Lost terminal]
<jtoy> darix: yeah, forgot about that, i haven't touched php in years
MaddinXx_ has quit [Remote host closed the connection]
carloslopes has joined #ruby-lang
kain has quit [Ping timeout: 240 seconds]
<havenwood> Br4nd0n: cool, so since you said you built Rubies with JewelryBox, add the following line to your .bashrc: RUBIES=(~/.rvm/rubies/*)
<Br4nd0n> havenwood: :) How?
<havenwood> or .bash_profile i mean
<havenwood> Br4nd0n: mate ~/.bash_profile
<havenwood> Br4nd0n: And past this in as well: source /usr/local/opt/chruby/share/chruby/chruby.sh
justinram has joined #ruby-lang
<havenwood> Br4nd0n: and, I'd also do: source /usr/local/opt/chruby/share/chruby/auto.sh
ivanoats has quit [Remote host closed the connection]
__BigO__ has quit [Remote host closed the connection]
<havenwood> (For auto-switching Rubies based upon .ruby-version file when you enter a directory.)
nazty has quit [Read error: No route to host]
__BigO__ has joined #ruby-lang
<havenwood> Br4nd0n: But yeah, you can add any Ruby on your system to chruby by opening .bash_profile and putting the Ruby dir location into the $RUBIES env var.
<havenwood> Br4nd0n: Then restart Terminal or `source ~/.bash_profile` to see them when you type: chruby
<Br4nd0n> havenwood: I just want one Ruby… that works!
<Br4nd0n> havenwood: so bash_profile??? https://gist.github.com/markerx/792961856d64a01262d0
mistym_lunch is now known as mistym
<havenwood> Br4nd0n: And then comment-out the RVM stuff (highlight it and Command-/).
<havenwood> Br4nd0n: Save and reload terminal or source your ,bash_profile
<havenwood> s/,/.
<Br4nd0n> havenwood: comment out lines 2,3?
<havenwood> Br4nd0n: yup
<havenwood> Br4nd0n: You can switch back to RVM by commenting out 5 and 6 and uncommenting RVM stuff.
<Br4nd0n> havenwood: saved, restarted terminal
<havenwood> Br4nd0n: Cool, have you installed Ruby dependencies?
kuja has quit [Ping timeout: 248 seconds]
<havenwood> Br4nd0n: brew install openssl readline libyaml gdbm libffi
<apeiros_> ok, completed docs - I'd be glad about feedback on library & docs, thanks! (posted in #ruby too)
<havenwood> apeiros_: Cool, gem pushed yet?
<Br4nd0n> havenwood: installing now
<apeiros_> havenwood: writing tests first, then gem
<havenwood> apeiros_: nice
carloslopes has quit [Remote host closed the connection]
kuja has joined #ruby-lang
<havenwood> Br4nd0n: You said you just want one Ruby, so I'd go with 1.9.3-p392. Here is install script to build it and put it where chruby expects by default: https://gist.github.com/havenwood/5016450
<Br4nd0n> havenwood: still making perl
<havenwood> Br4nd0n: Assuming you want 1.9.3 by default, create a ~/.ruby-version file and put just one line in it: 1.9.3
<havenwood> Br4nd0n: mate ~/.ruby-version
<havenwood> Br4nd0n: chruby does fuzzy matching by ruby name, so if you decide you want to install jruby or whatev, you can switch between them by doing `chruby 1.9` or `chruby jruby`, etc.
ottbot has quit [Ping timeout: 252 seconds]
workmad3 has quit [Ping timeout: 245 seconds]
<havenwood> Br4nd0n: But if you want just 1.9, put 1.9 in your .ruby-version file and it will always be default.
gnufied has joined #ruby-lang
gnufied has quit [Client Quit]
melter has quit [Remote host closed the connection]
pr0ton has joined #ruby-lang
eklarskov has quit [Quit: leaving]
eklarskov has joined #ruby-lang
ivanoats has joined #ruby-lang
ivanoats has quit [Changing host]
ivanoats has joined #ruby-lang
wardrop has joined #ruby-lang
<Br4nd0n> havenwood: dependancies finally installed. One warning: chruby: unknown Ruby: 1.9.3
<Br4nd0n> which might have been from the version file?
<havenwood> Br4nd0n: kk, so ready to install Ruby: https://gist.github.com/havenwood/5016450
<havenwood> Br4nd0n: Yes, it is trying to find a 1.9 in /opt/rubies or ~/.rubies but you haven't installed one there yet.
<havenwood> Br4nd0n: You can build your Ruby however you'd like, but quite simple to build it yourself.
<Br4nd0n> havenwood: so download the file, or just follow along line by line?
<havenwood> just paste it to Terminal
<havenwood> Br4nd0n: It downloads, 1.9.3-p392, untars it, builds it and puts it in ~/.rubies so you don't have to sudo
<havenwood> Br4nd0n: Then if you `source ~/.bash_profile` or restart Terminal you'll be on the latest 1.9.3.
<Br4nd0n> I don't have wget?
<havenwood> Br4nd0n: brew install wget
MaddinXx has joined #ruby-lang
vlad_starkov has quit [Remote host closed the connection]
sduckett has joined #ruby-lang
<Br4nd0n> havenwood: do I need to sudo wget? I am getting permission denied
<havenwood> Br4nd0n: Make sure you're in your User dir: cd
<havenwood> Br4nd0n: but yeah, if you'd like to install it in a folder you don't have permissions for `sudo`.
<havenwood> Br4nd0n: It is just a temporary file, once you build Ruby you can delete it.
lectrick has joined #ruby-lang
g0bl1n has quit [Quit: g0bl1n]
eklarskov has quit [Ping timeout: 264 seconds]
lcdhoffman has joined #ruby-lang
agarie has joined #ruby-lang
sn0wb1rd has quit [Quit: sn0wb1rd]
kain has joined #ruby-lang
brianpWins has quit [Quit: brianpWins]
sn0wb1rd has joined #ruby-lang
eklarskov has joined #ruby-lang
kurko__ has joined #ruby-lang
Mizpah has quit [Ping timeout: 245 seconds]
sduckett has quit [Ping timeout: 264 seconds]
<Br4nd0n> havenwood: phew - I am done
<Br4nd0n> havenwood: chruby: unknown Ruby: 1.9.3
ruurd has quit [Quit: Leaving...]
<havenwood> Br4nd0n: What do you get (after restarting Terminal) from just: chruby
<Br4nd0n> havenwood: chruby: unknown Ruby: 1.9.3
JohnBat26 has quit [Remote host closed the connection]
<UziMonkey> what? Ruby?
<UziMonkey> oh.. what? Why does IRCCloud keep putting me in #ruby-lang?
<UziMonkey> not that I'm complaining... :P
<havenwood> Br4nd0n: back in a min, not sure what problem is?? hrmm..
havenwood has quit [Remote host closed the connection]
srbaker has joined #ruby-lang
<Br4nd0n> havenwood: ya! * 1.9.3-p392
ivanoats has quit [Remote host closed the connection]
zorbyte has joined #ruby-lang
vlad_starkov has joined #ruby-lang
<Br4nd0n> havenwood: Doesn't look like I have solved my Ruby issue yet. But it at least feels like I have gotten closer to solving my problem. As much as I would love to stay and take advantage of your generosity and knowledge - I have to go get my kid from school. I hope we can catch each other here another time to continue. THANKS SO MUCH for all your help!
marcostoledo has quit [Quit: Leaving...]
havenwood has joined #ruby-lang
<havenwood> Br4nd0n: Did 1.9.3 compile and get to ~/.rubies okay?
vlad_starkov has quit [Read error: Connection reset by peer]
vlad_sta_ has joined #ruby-lang
<havenwood> Br4nd0n: Might want to double check the script, I made a typo in the original one and fixed it - testing it (works on my machine >.>): https://gist.github.com/havenwood/5016450
drueck has joined #ruby-lang
RickHull has joined #ruby-lang
<RickHull> I found a weird issue with Timeout. Timeout.timeout can throw a weird exception:
<RickHull> Exception < Timeout::ExitException < #<Class:0xb74702f4>
<RickHull> the string value of the exception is "execution expired". the class apparently has no string value / name
<drbrain> it's an anonymous class
<RickHull> that makes a certain amount of sense ;)
<RickHull> what's the deal?
<RickHull> typically Timeout.timeout throws a Timeout::Error
<RickHull> i wasn't ready to handle something not in that hierarchy
eklarskov has quit [Quit: leaving]
<drbrain> I think you shouldn't see that exception being raised
<RickHull> i'm doing a SIGINT while the timeout block is running
ruurd has joined #ruby-lang
<RickHull> with a SIGINT trap that returns from the method calling timeout
sailias has quit [Ping timeout: 264 seconds]
<drbrain> can you show an example?
<RickHull> one sec
<RickHull> 1.8.7 (I know, i know)
klebervi_ has joined #ruby-lang
klebervirgilio has quit [Ping timeout: 264 seconds]
<RickHull> it's a dumb little port monitor
MaddinXx has quit [Remote host closed the connection]
afred has joined #ruby-lang
<drbrain> I imagine the return in SIGINT does not return from where you expect it does
<drbrain> I don't have a port to check, though
<RickHull> yeah i'm pretty fuzzy on signal handling
<RickHull> i originally had: exit 0 instead of return
<RickHull> but that was actually not exiting sometimes
<RickHull> ah i know why, rescue Exception
<drbrain> yes
<RickHull> catching SystemExit
<drbrain> you may want to delete the trap and use rescue Interrupt
<drbrain> then you've scoped your interrupt handling to up?
slyphon has quit [Ping timeout: 252 seconds]
<RickHull> it would be "nice" to interrupt the sleep too
<RickHull> it's clearly not worth fussing over, but i am curious about the "right" way to do it
<drbrain> the ^C will interrupt that sleep too, but you may not get a friendly exit message
<RickHull> ok right. still would be nice to get the friendly exit
<drbrain> you can rescue Interrupt again :D
Graham_K has joined #ruby-lang
<RickHull> ah instead of trap?
<drbrain> yes
<RickHull> so maybe just one rescue in #run then
lcdhoffman has quit [Quit: lcdhoffman]
<drbrain> for #up?, rescue Interrupt; return false; for #run, rescue Interrupt; exit 0
davidbalbert is now known as davidbalber|away
<drbrain> if you do ↑ then you may need to ^C twice
<drbrain> so I guess in #run is better, like you said
<RickHull> DRY too
<RickHull> i'll should probably drop rescue Exception
afred has quit [Remote host closed the connection]
<RickHull> i know it's bad practice generally
segfault has joined #ruby-lang
segfault is now known as Guest45763
orluke has quit [Quit: orluke]
jocellyn has joined #ruby-lang
jocellyn has left #ruby-lang [#ruby-lang]
<apeiros_> zzak: Well! gem released. I'll get to a text for Object#<=>
ruurd has quit [Quit: Leaving...]
wmoxam has quit [Ping timeout: 255 seconds]
<RickHull> drbrain: worth pushing the behavior i exposed as a bug / test case?
<RickHull> in timeout.rb i mean
<drbrain> RickHull: if you can reproduce it on 1.9, yes
<drbrain> 1.8.7 is closed for bug fixes
<RickHull> sure
<zzak> apeiros_: nice!
wizonesolutions has quit [Quit: No Ping reply in 180 seconds.]
__butch__ has joined #ruby-lang
wizonesolutions has joined #ruby-lang
wizonesolutions has quit [Changing host]
wizonesolutions has joined #ruby-lang
tylersmith has quit [Quit: tylersmith]
<apeiros_> also various <=> docs should add documentation for when nil is returned (when the two values could not be compared)
tylersmith has joined #ruby-lang
ruurd has joined #ruby-lang
sduckett has joined #ruby-lang
kleberv__ has joined #ruby-lang
anonymuse has joined #ruby-lang
Graham_K has quit [Quit: Graham_K]
ottbot has joined #ruby-lang
klebervi_ has quit [Ping timeout: 248 seconds]
brianpWins has joined #ruby-lang
wmoxam has joined #ruby-lang
sduckett has quit [Ping timeout: 256 seconds]
wmoxam has quit [Ping timeout: 252 seconds]
<zzak> nil just means that they are incomparable, right?
<zzak> apeiros_: ^
<drbrain> zzak: yes
<zzak> okey
pr0ton has quit [Ping timeout: 252 seconds]
Graham_K has joined #ruby-lang
sepp2k1 has joined #ruby-lang
snk has quit [Quit: rebooot]
<zzak> so many patches to write this evening! :D
banister_ has quit [Remote host closed the connection]
Graham_K has left #ruby-lang [#ruby-lang]
sepp2k has quit [Ping timeout: 252 seconds]
workmad3 has joined #ruby-lang
snk has joined #ruby-lang
yfeldblum has quit [Ping timeout: 264 seconds]
kleberv__ has quit [Ping timeout: 248 seconds]
<apeiros_> zzak: yes
<apeiros_> ah, drbrain already replied (I thought I had said that)
klebervi_ has joined #ruby-lang
<drbrain> it was in your paste, yes
ruurd has quit [Ping timeout: 260 seconds]
drueck has left #ruby-lang [#ruby-lang]
dzhulk has quit [Quit: Leaving.]
pr0ton has joined #ruby-lang
workmad3 has quit [Ping timeout: 260 seconds]
workmad3 has joined #ruby-lang
kurko__ has quit [Quit: Computer has gone to sleep.]
forrest has quit [Quit: Leaving]
__BigO__ has quit [Remote host closed the connection]
thufir_ has joined #ruby-lang
breakingthings has quit []
brianpWins has quit [Quit: brianpWins]
ryanv-raptor has quit [Quit: Leaving.]
vlad_sta_ has quit [Remote host closed the connection]
jtoy has quit [Quit: jtoy]
pkrnj has joined #ruby-lang
methods has joined #ruby-lang
__butch__ has quit [Quit: Leaving.]
methods is now known as Guest69906
brianpWins has joined #ruby-lang
Guest69906 has quit [Ping timeout: 252 seconds]
Squarepy has quit [Remote host closed the connection]
xalei has joined #ruby-lang
gustavnils has quit [Quit: Textual IRC Client: www.textualapp.com]
davidbalber|away is now known as davidbalbert
mistym has quit [Remote host closed the connection]
workmad3 has quit [Ping timeout: 260 seconds]
davidbalbert is now known as davidbalber|away
thufir_ has quit [Quit: Leaving.]
outoftime has quit [Ping timeout: 264 seconds]
solars has quit [Ping timeout: 252 seconds]
glebm has quit [Quit: Computer has gone to sleep.]
blacktulip has quit [Remote host closed the connection]
enebo has quit [Quit: enebo]
mistym has joined #ruby-lang
mistym has quit [Changing host]
mistym has joined #ruby-lang
glebm has joined #ruby-lang
slyphon has joined #ruby-lang
geopet has quit [Quit: geopet]
tylersmith has quit [Ping timeout: 244 seconds]
jonahR has quit [Quit: jonahR]
Qwak has joined #ruby-lang
davidbalber|away is now known as davidbalbert
pkrnj has quit [Quit: Computer has gone to sleep.]
klebervi_ has quit [Remote host closed the connection]
klebervirgilio has joined #ruby-lang
davidbalbert is now known as davidbalber|away
Qwak has quit [Ping timeout: 260 seconds]
wyhaines has quit [Remote host closed the connection]
wyhaines has joined #ruby-lang
klebervirgilio has quit [Ping timeout: 248 seconds]
wyhaines has quit [Ping timeout: 244 seconds]