<havenwood>
fedora_newb: It seems yajl does have a number of Windows issues with open pull requests. redis-dump has been alpha for an awfully long time, I'm not sure it'll ever be revived?
awerush has joined #ruby
Xiti has quit [Ping timeout: 245 seconds]
Sawbones has joined #ruby
iMe has quit [Ping timeout: 250 seconds]
<TheNet>
say I have an array that stores references to objects. then I clone that array. does the new array reference the original objects or cloned objects?
TgMts_ has joined #ruby
CpuID2 has joined #ruby
CpuID2 has joined #ruby
CpuID2 is now known as CpuID
iMe has joined #ruby
TgMts has quit [Ping timeout: 250 seconds]
charliesome has joined #ruby
FrancisClampazzo has joined #ruby
apeiros_ has quit [Ping timeout: 255 seconds]
<fedora_newb>
Error installing redis-dump:
<fedora_newb>
ERROR: Failed to build gem native extension. Rolled back to ruby 1.9 and getting this now
livingstn has joined #ruby
FrancisClampazzo has left #ruby [#ruby]
jimms has quit [Remote host closed the connection]
Sawbones has quit [Ping timeout: 252 seconds]
Fire-Dragon-DoL has quit []
<meatchicken>
fedora_newb: do you have build tools installed for your platform?
flaccid_ has joined #ruby
<fedora_newb>
meatchicken, not sure?
<fedora_newb>
new to ruby
atomical has joined #ruby
<havenwood>
fedora_newb: If only you were on Fedora... :)
<fedora_newb>
lol
<fedora_newb>
old nick from back in the day ;)
<havenwood>
fedora_newb: They have a great, up-to-date package.
<fedora_newb>
Well, I am trying to install this redis-dump but keeps on failing
<fedora_newb>
:(
craigp has quit [Remote host closed the connection]
<havenwood>
fedora_newb: Looks like they have a number of pull requests pending that fix Windows Ruby issues. You might be able to use those patches, but it looks like a pain to sort out for Win with that Gem.
<havenwood>
fedora_newb: Not all gem authors with native extensions play nice with Win.
<meatchicken>
I didn't even know he was on windows
<meatchicken>
did he state that?
tvw has quit []
JoshGlzBrk has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<havenwood>
meatchicken: The pastebin revealed so.
<meatchicken>
ah
<meatchicken>
fedora: there is a ruby-devkit package that usually solves gem building errors
josephndenton has quit [Ping timeout: 244 seconds]
tokik has joined #ruby
<dopie>
an array
Channel6 has joined #ruby
zachrab has joined #ruby
<sevenseacat>
and how do you only select the first three elements of an array?
<dopie>
.take(2)
<dopie>
.take(3)
<dopie>
?
skj3gg has joined #ruby
<sevenseacat>
try it?
<dopie>
sevenseacat, meh
<dopie>
:)
ixti has quit [Ping timeout: 264 seconds]
<dopie>
i was doing limit instead of take
<dopie>
:)
jlast has joined #ruby
Megtastique has joined #ruby
Megtastique has quit [Max SendQ exceeded]
zcreative has quit [Quit: (null)]
Megtastique has joined #ruby
blackmesa has quit [Quit: WeeChat 1.1.1]
baroquebobcat has joined #ruby
tokik has quit [Client Quit]
sudog has joined #ruby
joufflu has joined #ruby
zachrab has quit [Ping timeout: 264 seconds]
rubytor has quit [Ping timeout: 244 seconds]
flaccid_ has joined #ruby
jlast has quit [Ping timeout: 265 seconds]
tokik has joined #ruby
nii236 has quit [Ping timeout: 246 seconds]
jlast has joined #ruby
Sawbones has quit [Remote host closed the connection]
quazimodo has joined #ruby
rubytor has joined #ruby
vt102 has quit [Ping timeout: 250 seconds]
nii236 has joined #ruby
skj3gg has quit [Quit: ZZZzzz…]
iMe has quit [Ping timeout: 264 seconds]
mloveless has quit [Remote host closed the connection]
oo_ has quit [Remote host closed the connection]
pierre1_ has quit [Quit: Leaving]
oleo is now known as Guest61683
longfeet has quit [Ping timeout: 252 seconds]
oleo__ has joined #ruby
jaequery has joined #ruby
Sawbones has joined #ruby
jlast has quit [Ping timeout: 265 seconds]
BlakeRG has joined #ruby
iMe has joined #ruby
karmatr0n has joined #ruby
dualbus is now known as nausicaa
jherbst has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Guest61683 has quit [Ping timeout: 264 seconds]
jaredrhine has joined #ruby
jaequery has quit [Client Quit]
<TheNet>
shadoi: I'm sure this isn't the answer you were looking for but I'm working on a better prompt for my app
<TheNet>
shadoi: one that does get overridden by puts statements and that has a functioning history
bwilson has joined #ruby
bwilson has quit [Client Quit]
psy__ has quit [Quit: Leaving]
<shadoi>
I see
marr has quit [Read error: Connection reset by peer]
tkuchiki has joined #ruby
centrx has quit [Quit: Shutting down, Please wait...]
joast has joined #ruby
Hobogrammer has joined #ruby
<shadoi>
If you're still looking for a short way to dup all strings in an array use: arr.map(&:dup)
nilobject has quit [Quit: nilobject]
joast has quit [Remote host closed the connection]
<TheNet>
shadoi: yep that's what I'm doing :D
baroquebobcat has quit [Quit: baroquebobcat]
Jetchisel has quit [Quit: "Unfortunately time is always against us" -- *Morpheus*]
AlienPickle has joined #ruby
joast has joined #ruby
rbennacer has quit [Remote host closed the connection]
oo_ has joined #ruby
<AlienPickle>
I have a ridiculous question, and I think this is the place to ask it. I've been talking to some VC people about an idea I have for a site - and the closest comperable sort of thing (altho this has NOTHING to do with dating) is an eHarmony or similar type site, where you're matching users by interests. They asked me to get 3x estimates of what that would cost in coder time to put together. I have no clue how to figure that out.
<sevenseacat>
AlienPickle: so who's going to code this site
<AlienPickle>
So, not beautification but just to put the structure of it in place. Database, sign up and profile creating areas, etc
Lemur has joined #ruby
<sevenseacat>
you need to sit down with them and put together a quote
<AlienPickle>
well, that's the thing... we'd be hiring it out. But it won't even get that far without having a ballpark of time / cost to begin with
<sevenseacat>
and "beautification" is part of the site design
<AlienPickle>
well, I mean photoshop time beautification
<AlienPickle>
What concerns me is getting the database and the means to get things in and out of it running
<sevenseacat>
thats trivial
<sevenseacat>
what would concern me is that youve described very vague pieces of functionality, like 'profile creating areas, etc.'
<AlienPickle>
I haven't done any rails at all, but I worked at a place that did cloud application metering on a site coded in Ruby. So I've seen a site built but it was a team of like 10 guys banging at it for a year
<sevenseacat>
you need to actually expand on what the site needs t odo
<sevenseacat>
in detail
<shadoi>
AlienPickle: look at the sloccount tool, it has a formula you can tweak for cost of code
<sevenseacat>
then sit with a developer and get them to estimate the time for each task
<shadoi>
it's mostly bullshit, but .. it's something :)
<AlienPickle>
Shadoi, that's interesting. Never heard of it but it might be enough for a start
startupality has quit [Quit: startupality]
<sevenseacat>
its not mostly bullshit, its totally bullshit
<AlienPickle>
Ok, so essentially the site would allow people who are hunting for news stories to sign up and say "I want to write about products in genre X, Y, Z" and then on the other side the creators of those things sign up and say "My product is in genre X, and here's the full profile about it"
<AlienPickle>
matchmaking press to creators who need exposure
<sevenseacat>
i didnt say expand on it here
<sevenseacat>
i'm telling you what you need to do to put an estimate together
TheNet has quit [Remote host closed the connection]
<AlienPickle>
well, that's the gist of it... and my intention is to sketch out exactly what data I need to collect and what we'll do with it. Then I'm going to need a couple people to actually knock it together for us if it goes that far.
Rollabunna has quit [Ping timeout: 245 seconds]
<sevenseacat>
sounds like you have a plan.
<AlienPickle>
Since I've seen Ruby/rails used before to put sites together fairly rapidly it seemed like the better option if we're going to scratch build something
<AlienPickle>
I've been through rubymonk a couple times, so I know enough to be dangerous, but not enough to say "yeah, I can build that"
ghr has joined #ruby
iMe has quit [Ping timeout: 246 seconds]
<AlienPickle>
so, as I build this profile of an idea, what's important information to have handy? What's actually a factor in code time in a site like that?
ismaelga has quit [Remote host closed the connection]
Rollabunna has joined #ruby
<AlienPickle>
To me it's all web forms that get injected into a database, and then we figure out some algorithm for handing back search results that the user would want to see. I can write all that on paper or pseudo-code. So, what is actually the time consuming part after that?
iMe has joined #ruby
dorei has quit []
ghr has quit [Ping timeout: 250 seconds]
<AlienPickle>
I have a perhaps false assumption that behind the magic curtain are gotchas that I'm totally unaware of, like optimizing it for running under load, or something
iamjarvo has joined #ruby
iamjarvo has quit [Max SendQ exceeded]
meatchicken has quit [Quit: Page closed]
iamjarvo has joined #ruby
baroquebobcat has joined #ruby
robustus has quit [Ping timeout: 255 seconds]
freerobby has quit [Quit: Leaving.]
arescorpio has joined #ruby
freerobby has joined #ruby
robustus|Off has joined #ruby
Lemur has quit [Remote host closed the connection]
robustus|Off is now known as robustus
<quazimodo>
i'm on ruby 2.2.0p0 (2014-12-25 revision 49005) [i686-linux]
<quazimodo>
getting /home/quazimodo/.rubies/ruby-2.2.0/bin/ruby: warning: RUBY_HEAP_MIN_SLOTS is obsolete. Use RUBY_GC_HEAP_INIT_SLOTS instead.
<quazimodo>
to be expected?
Lemur has joined #ruby
<sevenseacat>
if you're using RUBY_HEAP_MIN_SLOTS, then probably.
havenwood has quit []
<michael_imac>
morning guys
michael_imac is now known as michael_mbp
<michael_mbp>
QQ.. how can I monkey-patch a method defined in `Module` itself?
mkaesz has joined #ruby
flaccid_ has quit [Quit: flaccid_]
mostlybadfly has joined #ruby
deric_skibotn has joined #ruby
Lemur has quit [Ping timeout: 244 seconds]
baroquebobcat has quit [Quit: baroquebobcat]
<quazimodo>
sevenseacat: no idea where I am :/
<sevenseacat>
probably in some special GC fix you added somewhere
<sevenseacat>
or whatever you're using to install ruby, added somewhere
Deele has quit [Ping timeout: 245 seconds]
banister has joined #ruby
mkaesz has quit [Ping timeout: 256 seconds]
TgMts has quit [Ping timeout: 246 seconds]
zacts has joined #ruby
Sawbones has quit [Remote host closed the connection]
TgMts has joined #ruby
awerush has quit [Ping timeout: 246 seconds]
lys has joined #ruby
it0a has quit [Quit: WeeChat 1.1.1]
zyxelthrone has joined #ruby
razieliyo has quit [Ping timeout: 255 seconds]
zacts has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
djbkd has joined #ruby
mloveless has joined #ruby
nobitanobi has quit [Remote host closed the connection]
<eam>
michael_mbp: like this
jlast has joined #ruby
<eam>
>> Module.class_eval { def Module.class_eval; "here's what I do now"; end }; Module.class_eval
zacts has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
sargas has quit [Quit: This computer has gone to sleep]
<shadoi>
as a client you can only ask the server to do what is defined in the API, if the API allows you to make a request elsewhere then tell the API to do that.
<Wolfram74>
I understand that the API limits what can be asked from server B
<Wolfram74>
I'm wondering how to make server A make the request on behalf of the client
<shadoi>
If you have some way to do RPC to the server then you could do what you want with RPC calls
<Wolfram74>
googling RPC
Limix has joined #ruby
goodenough has joined #ruby
<shadoi>
What you're asking for is basically a way to make a server do anything you ask it to. Which is usually not something that would be publicly accessible, since you could abuse other systems with it.
jlast has quit [Ping timeout: 250 seconds]
it0a has quit [Ping timeout: 265 seconds]
ghostpl_ has quit [Ping timeout: 246 seconds]
<Wolfram74>
client is using HTTPS, server B is using HTTP, client can not use the API directly, so I make an inbetween so that client asks server A to make the specified API call for it
<Wolfram74>
this is not "anything you ask it to"
<shadoi>
an SSL proxy?
arescorpio has quit [Excess Flood]
<shadoi>
look at tinyproxy (simple) or haproxy (more powerful but complex)
n008f4g_ has quit [Ping timeout: 264 seconds]
amystephen has quit [Quit: amystephen]
sargas has joined #ruby
markfletcher has left #ruby [#ruby]
ebbflowgo has joined #ruby
iMe has quit [Ping timeout: 252 seconds]
Takle has joined #ruby
Aswebb_ has joined #ruby
lightstalker has joined #ruby
iMe has joined #ruby
psyprus has joined #ruby
Soda has quit [Remote host closed the connection]
shadoi has quit [Quit: Leaving.]
zachrab has joined #ruby
Takle has quit [Ping timeout: 255 seconds]
rubytor has quit [Remote host closed the connection]
jhankins has quit [Ping timeout: 246 seconds]
ismaelga has joined #ruby
oo_ has quit [Remote host closed the connection]
it0a has joined #ruby
zachrab has quit [Ping timeout: 252 seconds]
nobitanobi has quit [Remote host closed the connection]
rbennacer has quit [Remote host closed the connection]
ismaelga has quit [Ping timeout: 252 seconds]
rbennacer has joined #ruby
<Wolfram74>
somebody in the bathroom suggested looking at httparty
rbennacer has quit [Ping timeout: 250 seconds]
oo_ has joined #ruby
Pharaoh2 has joined #ruby
iMe has quit [Ping timeout: 245 seconds]
Pharaoh2 has quit [Max SendQ exceeded]
Pharaoh2 has joined #ruby
ponga has joined #ruby
iMe has joined #ruby
swgillespie has joined #ruby
jaequery has joined #ruby
Mia has quit [Read error: Connection reset by peer]
Deele has joined #ruby
shum has quit [Quit: WeeChat 1.1.1]
cobragoat has joined #ruby
krz has quit [Ping timeout: 252 seconds]
werelivinginthef has joined #ruby
werelivinginthef has quit [Remote host closed the connection]
dfinninger has joined #ruby
Aswebb_ has quit [Remote host closed the connection]
psy_ has quit [Ping timeout: 265 seconds]
iMe has quit [Ping timeout: 246 seconds]
iamninja has quit [Ping timeout: 245 seconds]
amclain has quit [Quit: Leaving]
zyxelthrone has quit [Ping timeout: 250 seconds]
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
iMe has joined #ruby
kyote has quit [Quit: Updating details, brb]
FooMunki_ has quit [Quit: FooMunki_]
jlast has joined #ruby
psy_ has joined #ruby
FooMunki has joined #ruby
psy_ has quit [Max SendQ exceeded]
psy_ has joined #ruby
djellemah has joined #ruby
Aswebb_ has joined #ruby
jlast has quit [Ping timeout: 250 seconds]
Aswebb_ has quit [Read error: Connection reset by peer]
Aswebb_ has joined #ruby
mistermocha has quit [Remote host closed the connection]
krz has joined #ruby
zyxelthrone has joined #ruby
St1gma has joined #ruby
Aswebb_ has quit [Ping timeout: 252 seconds]
Wolfram74 has quit [Remote host closed the connection]
geefolk has quit [Read error: Connection reset by peer]
mkaesz has quit [Read error: Connection reset by peer]
charliesome has joined #ruby
piotrj_ has quit [Read error: Connection reset by peer]
jlast has joined #ruby
mkaesz has joined #ruby
mostlybadfly has quit [Quit: Connection closed for inactivity]
agrinb has quit [Ping timeout: 250 seconds]
Deithrian has quit [Read error: Connection reset by peer]
FooMunki has joined #ruby
Deithrian has joined #ruby
piotrj has joined #ruby
aswen has joined #ruby
starfox_sf has quit [Ping timeout: 255 seconds]
bayarja has joined #ruby
jlast has quit [Ping timeout: 265 seconds]
piotrj has quit [Read error: Connection reset by peer]
GoT has joined #ruby
<bayarja>
hello guys
<bayarja>
i'm using ruby-2.1.2
<bayarja>
with grape api
piotrj has joined #ruby
<bayarja>
and how to upload multiple images through grape api
<bayarja>
?
<Devoth>
Hey guys. is it possible to strip all line breaks from inside a HTML paragraph in ruby? I'm trying to do it with a regex, but it kinda breaks… /(?<=<p>)((\n[\t ]*)*([^\n])*)+(?=<\/p>)/
<apeiros_>
Devoth: you should not use regex to process html
<wasamasa>
^
<apeiros_>
use e.g. nokogiri
<DonM>
^
<wasamasa>
use nokogiri to get the textual content of a paragraph node, then use regex on it to strip line breaks
lepht has quit [Quit: Connection closed for inactivity]
<apeiros_>
wasamasa: could also use nokogiri to remove <br> nodes
<Devoth>
apeiros_: thanks - will check it out
<wasamasa>
apeiros_: oh, right
<apeiros_>
IMO the better way, since p tags may contain other tags which would get stripped
<wasamasa>
apeiros_: well, I thought of CRLF
Takle has joined #ruby
krz has quit [Ping timeout: 255 seconds]
tokik has quit [Ping timeout: 245 seconds]
nfk has joined #ruby
tkuchiki has joined #ruby
sieve has quit [Quit: Leaving.]
leafybasil has joined #ruby
sieve has joined #ruby
sameerynho has joined #ruby
lxsameer has quit [Ping timeout: 240 seconds]
<bayarja>
guys how to upload multi images using grape api
lolmaus has quit [Remote host closed the connection]
<apeiros_>
bayarja: loop over your images and upload one by one?
<Devoth>
apeiros_: One more question if I may - is nokogiri also the preferred way to deal with HTML that comes from exporting docx files as html (I use command line `textutil`)? I'm asking as these HTML files are pure junk. :)
nii236|irssi has quit [Quit: leaving]
<apeiros_>
Devoth: pure junk as in invalid syntax, or pure junk as in semantical nonsense?
lolmaus has joined #ruby
<Devoth>
apeiros_: semantical nonsense (i use tidy just after textutil)
<apeiros_>
then nokogiri, yes
<Devoth>
ok, thank you :)
<Devoth>
will continue reading :)
piotrj has quit [Remote host closed the connection]
<apeiros_>
nokogiri is only not advised when the html is not valid. nokogiri will sanitize it. so depending on whether you can live with its sanitation it's good or bad to use it.
ponga has quit [Quit: Leaving...]
jgt has joined #ruby
<Devoth>
got it
fantazo has quit [Quit: Verlassend]
wallerdev has quit [Quit: wallerdev]
ponga has joined #ruby
AlienPickle has joined #ruby
<Macaveli>
How to split a string?
<apeiros_>
Macaveli: use String#split
<Macaveli>
the split string is "_splithere_"
mkaesz has quit [Read error: Connection reset by peer]
<Macaveli>
I was looking at wrong split: Splits a BigDecimal number into four parts, returned as an array of values.
<bayarja>
apeiros_:it with post if post submit failed then it's temp file created unused images
<apeiros_>
bayarja: I don't understand
rdark has joined #ruby
<bayarja>
sorry my poor english
<Devoth>
Macaveli: I'm just starting to learn ruby and had the same thing - seeing people use sub() for replacing strings, whereas in the manual it said it's for substracting numbers ^^
<bayarja>
submit form inlcude text information and multiple images
ismaelga has joined #ruby
sent1nel has joined #ruby
livathinos has quit []
livathinos has joined #ruby
ismaelga has quit [Ping timeout: 255 seconds]
sent1nel has quit [Ping timeout: 250 seconds]
reinaldob has joined #ruby
mathie has joined #ruby
amacou has joined #ruby
jgt has quit [Ping timeout: 256 seconds]
psyprus has quit [Ping timeout: 245 seconds]
paolooo has quit [Ping timeout: 246 seconds]
Morkel has quit [Quit: Morkel]
avril14th has joined #ruby
reinaldob has quit [Ping timeout: 252 seconds]
mfoo has quit [Quit: Leaving]
chrishough has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<arup_r>
My question is can I improve this code in OOP sense?
tunaCanBruh has joined #ruby
iMe has quit [Ping timeout: 250 seconds]
mkaesz has quit [Read error: Connection reset by peer]
livathinos has quit [Remote host closed the connection]
The_Phoenix has joined #ruby
livathinos has joined #ruby
livathinos has quit [Client Quit]
mkaesz has joined #ruby
iMe has joined #ruby
livathinos has joined #ruby
jlast has joined #ruby
psyprus has quit [Remote host closed the connection]
geefolk has joined #ruby
psyprus has joined #ruby
timonv has joined #ruby
tunaCanBruh has quit [Ping timeout: 264 seconds]
amacou has quit [Remote host closed the connection]
joonty has joined #ruby
amacou has joined #ruby
jlast has quit [Ping timeout: 265 seconds]
lampd1 has quit [Read error: Connection reset by peer]
lampd1 has joined #ruby
jlast has joined #ruby
<avril14th>
morning
<arup_r>
avril14th: moin
<avril14th>
yo arup_r
<arup_r>
yo
amacou has quit [Remote host closed the connection]
lioninawhat has quit [Remote host closed the connection]
Guest76 has joined #ruby
Guest76 has quit [Client Quit]
jlast has quit [Ping timeout: 265 seconds]
rshetty has joined #ruby
arup_r has quit [Remote host closed the connection]
loveablelobster has joined #ruby
loveablelobster has quit [Client Quit]
olivier_bK has quit [Ping timeout: 264 seconds]
lkba has joined #ruby
loveablelobster has joined #ruby
<avril14th>
arup_r what's wrong with your code?
<ddv>
is it possible for a http request to succeed initially, but still calling rescue eventually?
<avril14th>
ddv: never managed to get that working
<ddv>
I mean the http request succeeded but sometimes it still hits the rescue block
siso has quit [Quit: siso]
<avril14th>
I don't get it then :)
jheg has joined #ruby
craigp has quit [Read error: Connection reset by peer]
lxsameer_ has joined #ruby
craigp has joined #ruby
dANO has joined #ruby
qba73 has quit []
jgt has joined #ruby
sinkensa_ has quit [Read error: Connection reset by peer]
sameerynho has quit [Ping timeout: 264 seconds]
sinkensabe has joined #ruby
systemd0wn has joined #ruby
jonr22 has joined #ruby
jheg has quit [Quit: jheg]
craigp has quit [Ping timeout: 256 seconds]
siso has joined #ruby
iwishiwerearobot has joined #ruby
systemd0wn_ has quit [Ping timeout: 245 seconds]
jenrzzz has quit [Ping timeout: 252 seconds]
mkaesz has quit [Read error: Connection reset by peer]
serivich has joined #ruby
sieve has quit [Quit: Leaving.]
mkaesz has joined #ruby
startupality has joined #ruby
jonr22 has quit [Ping timeout: 245 seconds]
iwishiwerearobot has quit [Ping timeout: 255 seconds]
craigp has joined #ruby
psy_ has quit [Remote host closed the connection]
AlienPickle has quit [Ping timeout: 250 seconds]
Pharaoh2_ has joined #ruby
psy_ has joined #ruby
psy_ has quit [Max SendQ exceeded]
fabrice31 has quit [Remote host closed the connection]
Pharaoh2 has quit [Ping timeout: 245 seconds]
psy_ has joined #ruby
startupality has quit [Quit: startupality]
Troy^ has joined #ruby
sent1nel has joined #ruby
ismaelga has joined #ruby
<Troy^>
Hi guys I'm using rbenv the global version is set to 2.2.0. But when I use ruby from cli it uses version 2.0.0. This is on osx. How do i force the version to be 2.2.0
Deele has quit [Ping timeout: 245 seconds]
<oddmunds>
you can run rbenv local 2.2.0 in your project root
awerush has joined #ruby
Pharaoh2_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<oddmunds>
and it'll make a .ruby-version file that sets 2.2.0
craigp_ has joined #ruby
<oddmunds>
sorry, i think rbenv global 2.2.0 is what you're looking for
Mon_Ouie has joined #ruby
<Troy^>
i used both and still no luck everytime i type ruby --version i get 2.0.0
sent1nel has quit [Ping timeout: 245 seconds]
<Troy^>
.ruby-version shows 2.2.0 when opened in a text editor but that's it.
craigp has quit [Read error: Connection reset by peer]
ismaelga has quit [Ping timeout: 250 seconds]
aryaching has joined #ruby
piotrj has quit [Remote host closed the connection]
<Troy^>
it's installed /Users/TroyIrvine/.rbenv/versions/2.2.0/bin/ruby is where it's installed
greenbagels has quit [Read error: Connection reset by peer]
rshetty has quit [Remote host closed the connection]
<Troy^>
i guess i could source the directory?
zachrab has joined #ruby
iMe has quit [Quit: Bye Bye]
Troy^ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Deele has joined #ruby
Darryl___ has quit [Quit: Connection closed for inactivity]
rsavage has joined #ruby
bayarja has quit [Quit: Leaving]
zachrab has quit [Ping timeout: 250 seconds]
gmcintire has quit [Quit: Connection closed for inactivity]
rshetty has joined #ruby
Vivex has joined #ruby
starfox_sf has joined #ruby
aryaching has quit []
dualbus has quit [Quit: WeeChat 1.1]
bruno- has joined #ruby
ismaelga has joined #ruby
jonr22 has joined #ruby
r08o has quit [Quit: Leaving]
craigp has joined #ruby
arup_r has joined #ruby
ajaiswal has quit [Remote host closed the connection]
jonr22 has quit [Remote host closed the connection]
vtunka has joined #ruby
fabrice31_ has joined #ruby
starfox_sf has quit [Ping timeout: 250 seconds]
mmochan_ has quit [Quit: Connection closed for inactivity]
bruno- has quit [Ping timeout: 265 seconds]
jlast has joined #ruby
bruno- has joined #ruby
craigp_ has quit [Ping timeout: 245 seconds]
startupality has joined #ruby
Allaman has quit [Ping timeout: 250 seconds]
Allamann has joined #ruby
Takle has quit [Remote host closed the connection]
ismaelga has quit [Remote host closed the connection]
bruno- has quit [Ping timeout: 250 seconds]
jlast has quit [Ping timeout: 250 seconds]
eshy has joined #ruby
g-nom3 has quit [Ping timeout: 250 seconds]
_Andres has joined #ruby
bruno- has joined #ruby
jlast has joined #ruby
rshetty has quit [Remote host closed the connection]
bruno- has quit [Ping timeout: 255 seconds]
jlast has quit [Ping timeout: 245 seconds]
yellowgh0st has joined #ruby
blackmesa has joined #ruby
ixti has joined #ruby
jheg has joined #ruby
rshetty has joined #ruby
shum has joined #ruby
yellowgh0st has quit [Client Quit]
krz has joined #ruby
Nahra has quit [Remote host closed the connection]
kapil___ has quit [Quit: Connection closed for inactivity]
Morkel has joined #ruby
Nahra has joined #ruby
aryaching has joined #ruby
g-nom3 has joined #ruby
g-nom3 has quit [Max SendQ exceeded]
arup_r_ has joined #ruby
g-nom3 has joined #ruby
g-nom3 has quit [Max SendQ exceeded]
bruno- has joined #ruby
MasterPiece has quit [Quit: Leaving]
Nahra has quit [Remote host closed the connection]
blizzy has joined #ruby
g-nom3 has joined #ruby
claptor has quit [Quit: this channel is bakas]
g-nom3 has quit [Max SendQ exceeded]
arup_r has quit [Ping timeout: 245 seconds]
g-nom3 has joined #ruby
postmodern has quit [Quit: Leaving]
g-nom3 has quit [Max SendQ exceeded]
g-nom3 has joined #ruby
DadoCe has joined #ruby
bruno- has quit [Ping timeout: 255 seconds]
_ixti_ has joined #ruby
joshbamboo1 has joined #ruby
yellowgh0st has joined #ruby
gfawcettpq has joined #ruby
ixti has quit [Ping timeout: 253 seconds]
speakingcode has quit [Ping timeout: 250 seconds]
sieve has joined #ruby
phutchins has joined #ruby
speakingcode has joined #ruby
piotrj has joined #ruby
WildBamboo-Josh has quit [Ping timeout: 246 seconds]
sankaber has joined #ruby
joonty has quit [Quit: joonty]
jgt has quit [Ping timeout: 246 seconds]
mathie has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bruno- has joined #ruby
paolooo has joined #ruby
cajone has quit [Remote host closed the connection]
rhg135|zzz is now known as rhg135
Mia has joined #ruby
Mia has quit [Changing host]
Mia has joined #ruby
rshetty has quit [Remote host closed the connection]
davedev24_ has joined #ruby
rshetty has joined #ruby
mathie has joined #ruby
yfeldblum has quit [Remote host closed the connection]
rshetty has quit [Remote host closed the connection]
TgMts has quit [Ping timeout: 252 seconds]
Troy^ has joined #ruby
ARaza has quit [Remote host closed the connection]
allenn has quit [Remote host closed the connection]
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dfinninger has joined #ruby
cmdr_Red has joined #ruby
sent1nel has joined #ruby
grn has joined #ruby
matled has quit [Remote host closed the connection]
<cmdr_Red>
Hello, I'm trying to build Ruby 2.2.0 from source on Linux Mint 17.1 using rbenv ruby-build plugin and I get a build error that Mint is using another build (1.9.1) how can I install the new version?
matled has joined #ruby
jespada has quit [Ping timeout: 246 seconds]
m8 has quit [Quit: Sto andando via]
tunaCanBruh has joined #ruby
agrinb has joined #ruby
matled has quit [Remote host closed the connection]
jespada has joined #ruby
sent1nel has quit [Ping timeout: 265 seconds]
bruno- has joined #ruby
matled has joined #ruby
kapil___ has joined #ruby
Musashi007 has quit [Quit: Musashi007]
alfakini has joined #ruby
agrinb has quit [Ping timeout: 265 seconds]
tunaCanBruh has quit [Ping timeout: 264 seconds]
Troy^ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mostlybadfly has joined #ruby
bruno- has quit [Ping timeout: 246 seconds]
spyderman4g63 has joined #ruby
gfawcettpq has quit [Remote host closed the connection]
quazimodo has joined #ruby
sameerynho has joined #ruby
mathie has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
roolo has joined #ruby
roolo has quit [Remote host closed the connection]
dANO has quit [Read error: Connection reset by peer]
<avril14th>
to pass jobs around
<arup_r_>
let me see
jlast has quit [Ping timeout: 250 seconds]
<jheg>
but it would mean that all my urls had a number appended on the end and wouldnt look quite as nice
wpp has joined #ruby
yellowgh0st has joined #ruby
dANO has joined #ruby
wpp has quit [Client Quit]
DadoCe has quit [Remote host closed the connection]
DadoCe has joined #ruby
iwishiwerearobot has joined #ruby
bruno- has joined #ruby
yellowgh0st has quit [Client Quit]
yellowgh0st has joined #ruby
tmtwd has joined #ruby
<apeiros>
*sob*, some stuff at the beginning is hard. like: what out of those 100 things I still have to do should I do first?
<jheg>
also apeiros the url could have a number in it
<avril14th>
arup_r_: I would write the behavior of chain in a module and then have a class tree for the 'usage' of the chain. where you could reduce code by a ton (all redundant code between managers).
AlexRussia has quit [Ping timeout: 255 seconds]
lioninawhat has joined #ruby
yellowgh0st has quit [Client Quit]
yellowgh0st has joined #ruby
<avril14th>
then just one class on the side for creating the process and you should be perfect
yellowgh0st has quit [Client Quit]
<arup_r_>
You mean mixing ?
<apeiros>
jheg: if it always has the id at the end, that doesn't matter
yellowgh0st has joined #ruby
fabrice31_ has quit [Remote host closed the connection]
iwishiwerearobot has quit [Ping timeout: 250 seconds]
<jheg>
true
<apeiros>
it only matters in your "sometimes there's a number in it"
jimms has joined #ruby
fabrice31 has joined #ruby
<avril14th>
arup_r_: yes
<arup_r_>
ok
bruno- has quit [Ping timeout: 246 seconds]
<avril14th>
and you don't even need to store the list of approvers once the thing is built
<avril14th>
so your chain is self contained
yellowgh0st has quit [Client Quit]
mathie has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<keksike>
what is the "!" after method names used for, like def approve!
<avril14th>
keksike: methods that change the state of the object its called on
<apeiros>
keksike: it's not after the name. it's part of the name
<keksike>
avril14th thanks
<avril14th>
and yes its part of the name
<keksike>
apeiros yeah thats what I meant
TgMts has joined #ruby
siso has quit [Quit: siso]
<avril14th>
keksike: it's just a naming convention though
<apeiros>
and as per matz himself, ! just means "be careful".
<keksike>
yeah
<apeiros>
not all mutating methods are named with a !
<keksike>
I see
<keksike>
thank you
<apeiros>
but so far all occasions of a method existing with and without ! means no-! = return new, modified object, while with-! means mutate the object in place.
<jhass>
for Ruby core that is
<apeiros>
stdlib too, no?
<keksike>
should with-! also return the mutated object, or a boolean if the mutation succeeded or not?
<jhass>
mh, yeah
<apeiros>
keksike: many core methods return nil if there's no change
<keksike>
ok
<jhass>
but I've seen plenty of gems where it doesn't hold
<apeiros>
see String#gsub!, #tr!, #delete! etc.
bjornar has quit [Remote host closed the connection]
<apeiros>
sadly there's no consistency. even in ruby core iirc.
<avril14th>
true
<avril14th>
some array bang methods always return to chain them
<avril14th>
some don't
<avril14th>
it's a pain
<keksike>
so return modified object if success, return nil of no success, this is the "correct" way?
<apeiros>
keksike: general rule of thumb: don't chain on bang methods.
<keksike>
if no success*
psy_ has quit [Remote host closed the connection]
<apeiros>
it's not so much success/no success, but change occurred/no change occurred
<keksike>
right
<avril14th>
keksike: most common is return nil if state didn't change, otherwise return self
<keksike>
allright, thanks :)
<apeiros>
yw
JDiPierro has joined #ruby
soulcake has quit [Quit: Quack.]
<apeiros>
btw., anybody interested in building a website for this channel?
<apeiros>
I'd provide a server
soulcake has joined #ruby
jgt has joined #ruby
<apeiros>
or help building
<avril14th>
what would that bring? :)
lxsameer_ has joined #ruby
<apeiros>
add things like FAQ, public log (if whitequark lets me embedd his log :D), links to resources
centrx has quit [Remote host closed the connection]
centrx has joined #ruby
doodlehaus has joined #ruby
centrx has quit [Client Quit]
hs366 has quit [Quit: Leaving]
aclearman037 has quit [Ping timeout: 246 seconds]
skj3gg has joined #ruby
agrinb has joined #ruby
ArchRogem has joined #ruby
sankaber has joined #ruby
bruno- has joined #ruby
mkaesz has quit [Read error: No route to host]
livingstn has quit [Ping timeout: 255 seconds]
aryaching has joined #ruby
bruno- has quit [Read error: Connection reset by peer]
mkaesz has joined #ruby
rbennacer has joined #ruby
devdazed has quit [Quit: Bye]
livingstn has joined #ruby
sambao21 has joined #ruby
last_staff has quit [Remote host closed the connection]
lolmaus has quit [Quit: Konversation terminated!]
mathie has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
agrinb has quit [Ping timeout: 265 seconds]
lolmaus has joined #ruby
aclearma_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
toretore has joined #ruby
mary5030 has joined #ruby
mathie has joined #ruby
jmignault has quit [Quit: jmignault]
akkmaxon has joined #ruby
aclearman037 has joined #ruby
jmignault has joined #ruby
tunaCanBruh has joined #ruby
iamjarvo has joined #ruby
iamjarvo has quit [Max SendQ exceeded]
snath has joined #ruby
iamjarvo has joined #ruby
jgt has joined #ruby
sent1nel has joined #ruby
werelivinginthef has joined #ruby
yellowgh0st has joined #ruby
DonOtreply has quit [Quit: DonOtreply]
lxsameer_ has quit [Quit: Leaving]
FooMunki has quit [Quit: FooMunki]
TgMts has quit [Remote host closed the connection]
sent1nel has quit [Ping timeout: 250 seconds]
FooMunki has joined #ruby
tier_ has joined #ruby
mleung has joined #ruby
yxejamir has joined #ruby
gr33n7007h has quit [Remote host closed the connection]
mwlang has joined #ruby
blizzy has quit [Ping timeout: 264 seconds]
jgt has quit [Ping timeout: 246 seconds]
Soda has joined #ruby
zenith_ has joined #ruby
<mwlang>
So I am reverse-engineering an existing application which I’ve written some rspec specs independent of the existing app (characterization tests). That app talks to a 3rd party server via SOAP, so I also implemented a mock SOAP server to return the expected response with Sinatra. What I’d like to do is automatically launch the existing app and the sinatra server prior to running the rspec suite. Is Foreman the best way to go about this or
<mwlang>
there newer/simpler options nowadays?
tier has quit [Ping timeout: 245 seconds]
ghostpl_ has quit [Remote host closed the connection]
woodyb23 has joined #ruby
djcp has joined #ruby
lampd1 has quit []
nateberkopec has joined #ruby
<jhass>
I'd just spawn it in a rake task, store the pid (or use systemd-run if systemd only systems is an option) and take it down with an at_exit hook I guess
<jhass>
foreman seems like "I want to run the same stuff as in production" to me
<jhass>
then make the spec task depend on said rake task
zenith_ has quit [Read error: Connection reset by peer]
piotrj has quit [Remote host closed the connection]
akkmaxon has quit [Ping timeout: 240 seconds]
banister is now known as banisterfiend
jespada has joined #ruby
krz has quit [Quit: WeeChat 1.0.1]
iamninja has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
spider-mario has joined #ruby
tagster has joined #ruby
apurcell has joined #ruby
lmickh has joined #ruby
rippa has joined #ruby
agrinb has joined #ruby
anarang has joined #ruby
Dopagod has quit [Ping timeout: 252 seconds]
<mwlang>
jhass: I think you may be right about foreman. I also can’t seem to run the servers with specific ruby versions when launched via foreman. What is the at_exit hook?
joonty_ has joined #ruby
dANO__ has joined #ruby
joonty has quit [Ping timeout: 244 seconds]
joonty_ is now known as joonty
rubytor has joined #ruby
SOLDIERz has joined #ruby
apurcell has quit [Ping timeout: 245 seconds]
centrx has joined #ruby
agrinb has quit [Read error: No route to host]
athan has joined #ruby
starfox_sf has joined #ruby
<mwlang>
jhass: nvm — that one was easily googleable.
gr33n7007h has quit [Remote host closed the connection]
<toretore>
there's no \r in the file you gisted, unless github is doing something with it
<toretore>
anyway, doesn't your bank let you download other formats?
<bonhoeffer>
not far back
<toretore>
ok
Takle has joined #ruby
<bonhoeffer>
just 90 days — and there are 10 different bank i’m trying to automate this for . . . plus i’m trying to learn as well how to do text processing
<bonhoeffer>
learning a good bit already — very appreciative
gattie has joined #ruby
mistermocha has joined #ruby
<toretore>
irb(main):005:0> File.read('txt').each_line.each_with_object([]){|l,a| a << l.chomp if l =~ /^\d/ }
<toretore>
=> ["01/21 AUTOMATIC PAYMENT - THANK YOU -57.34 ", "01/12 NETFLIX.COM NETFLIX.COM CA 7.99 "]
cpt_yossarian has quit [Remote host closed the connection]
<toretore>
i can go and manually run extconf.rb and it works
DrShoggoth has joined #ruby
gsd has joined #ruby
psy_ has joined #ruby
cpt_yossarian has joined #ruby
psy_ has quit [Max SendQ exceeded]
<jhass>
toretore: btw 1.9.3 has less than a week till EOL ;)
psy_ has joined #ruby
<toretore>
i know, don't care ;)
<havenwood>
toretore: Your Ruby will turn into a zombie, hide the brains!
<toretore>
bonhoeffer: so why is this file different from the last one?
<jhass>
mmh, should've guessed from not even running the latest patchlevel
<bonhoeffer>
that is what i’m trying to figure out
woodyb23 has quit [Ping timeout: 252 seconds]
<toretore>
well, to begin with, it's obviously not the same file. so where did this one come from?
<toretore>
and where did the previous one come from?
<toretore>
they have different histories
balazs has joined #ruby
R1chK has joined #ruby
paolooo_ has quit [Quit: Page closed]
<bonhoeffer>
yep — the first comes from saving from acrobat — the other is a copy of those contents from sublime and paste into sublime
DivineEntity has joined #ruby
giuseppesolinas has joined #ruby
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Hobogrammer has joined #ruby
<toretore>
so then you know..
<toretore>
and there is no more problem
cajone has quit [Remote host closed the connection]
<bonhoeffer>
yes — so i can copy/paste the file — but it would be great to know why — i’ll keep poking around and share if i find anything interesting
danman has joined #ruby
Bounga has quit [Quit: Bounga]
<toretore>
the why is hidden inside acrobat reader, the pdf spec and the way it interacts with your os' copy/paste mechanism
Freelusion has joined #ruby
zenith_ has quit [Read error: Connection reset by peer]
<toretore>
meaning, don't waste time on it
<toretore>
use the export function
gfawcettpq has quit [Ping timeout: 264 seconds]
skj3gg has quit [Quit: ZZZzzz…]
<bonhoeffer>
fair enough
<bonhoeffer>
thanks for the help
<toretore>
np
mikecmpbll has joined #ruby
<toretore>
now someone help me or i'll call the police
Tuxero has joined #ruby
<shevy>
lol
tunaCanBruh has quit [Ping timeout: 244 seconds]
mikecmpb_ has quit [Ping timeout: 245 seconds]
Lemur has joined #ruby
<jhass>
please call the police and record the reaction for our entertainment
<shevy>
toretore I've had these errors sometimes when I ran something indirectly, like bundler or so. when I was in the same directory, and run extconf.rb directly, I (almost) always know which error there is
<toretore>
but when i run it directly it doesn't fail
<toretore>
it's as if it doesn't even try
DrShoggoth has quit [Quit: Leaving]
<shevy>
toretore sometimes an error can be "masked" when something higher on the chain fails; I had such failures with GNU autoconfigure + libtool, sometimes not even config.log showed the real error
<toretore>
shit
<shevy>
yeah, it's weird that running things directly often works better
<toretore>
just what i need
<ponga>
shevy:
<ponga>
have you heard of openworm project
bonhoeffer has quit [Quit: bonhoeffer]
<shevy>
I know what an earthworm is but I don't know of openworm
<shevy>
ponga to be honest, I mostly only know a bit about ruby these days, I have forgotten most everything else :)
cajone has joined #ruby
banister has joined #ruby
pengin has joined #ruby
<ponga>
shevy: no its not about ruby
<ponga>
its a project where they claim they created a fully functioning creature thingi
mxrguspxrt has quit [Remote host closed the connection]
<ponga>
toretore: it seems to claim to go beyond that :p
<ponga>
i wonder if its a scam, it raised $120K in kickstarter
<Pawky|2>
I am trying to convert ruby code to perl, having no clue about ruby, could any of you help me out a bit? :-) http://pastebin.com/h4kmCqcJ
<shevy>
ponga ah ok. Well I am biased... I think to build real intelligence you need to model things just as they are in real life, and you can't do that with the hardware of today really
<toretore>
Pawky|2: first step, stop using pastebin
<ponga>
shevy: exactly same as my opinion
<Pawky|2>
toretore: ehh thats a worlds first...
shredding has quit [Quit: shredding]
<ponga>
you know im on NLP side of ai, and i believe we need correct hardware
<Pawky|2>
everywhere else if not using it people go nuts, now using it you go nuts... has the world come to an end?
zenith_ has joined #ruby
<toretore>
Pawky|2: 2nd step: don't try to convert, just rewrite the thing in perl
<ponga>
Pawky|2: people who are in IT are nuts
giuseppesolinas is now known as Peppuz
<ponga>
this is the answer
<toretore>
Pawky|2: what i'm saying is use gist.github.com or pastie.org instead
<Pawky|2>
toretore: thanks for that suggestion, but as the API I am trying to use has no example code whatsoever, this is my only option
<toretore>
pastebin sucks horse cock
CustosL1men has quit [Ping timeout: 246 seconds]
DivineEntity has quit [Ping timeout: 264 seconds]
msgodf has quit [Ping timeout: 240 seconds]
strixd has quit [Quit: 500]
<Pawky|2>
toretore: well, I respect your oppinion, but I think it will work for now, don't you think.. I mean its already pasted..
spyderma_ has quit [Ping timeout: 252 seconds]
<shevy>
ponga that worm, C. elgans, is kinda cool though. it always has a fixed amount of cells. 131 cells die through apoptosis (=self-programmed cell death) in the course of its development
<toretore>
so what you want is to understand what the ruby code does?
<ponga>
ah yeah, shevy you learnt some chemistry right?
<ponga>
bio thingi
<shevy>
I think 959 for hermaphrodites, and 1031 for female XX worms survive
Takle has quit [Remote host closed the connection]
<shevy>
ponga yeah
<ponga>
shevy: so what they claim is they coded the full map of C.elgans neuron map, implemented it into a physics engine that provides liquid for the worm to move on top
alex88_ has quit []
<shevy>
they drew the whole fate map of it (e. g., what happens when you start from 1 cell, to all the other cells in the C. elegans adult body -> http://staffweb.hkbu.edu.hk/zyzhao/images/briggsae.jpg the thing on top is the "founder" cell
<ponga>
and saying that just by providing the code of neuron map, it acts just like real life C.elgans
sieve has joined #ruby
iwishiwerearobot has joined #ruby
<Pawky|2>
The complexity of the original API is that I do not understand how to create the correct HTML requests, the API here is one written to work with the API against the server, thus I am trying to figure out what it does.
<ponga>
i mean, can you 'code' C.elgans in programming language?
<ponga>
*neuron
<shevy>
ponga well
<ponga>
can you code neuron
<ponga>
in lang
<shevy>
ponga the problem is... neurons can change
<Pawky|2>
I have figured out how to make the encrypted connection, but beyond that I haven't been able to figure out the other reqests..
<Pawky|2>
take the touch method by example..
<shevy>
sometimes neurons die, sometimes they can make new connections or intensify existing connections
<shevy>
I guess in theory you can simulate it all
maximski has joined #ruby
<Pawky|2>
there is some code that goes "res = perform! do |conn| "
<shevy>
but I dunno :\
nobitanobi has quit [Remote host closed the connection]
mistermo_ has quit [Ping timeout: 255 seconds]
cajone has quit [Remote host closed the connection]
<Pawky|2>
I am very unsure what the |conn| does, I cannot see conn being defined or anyting..
<ponga>
shevy: my question is more like, i know there is whole map and all of it, but can you convert that into a program code
<ponga>
they claim they did it
maximski has quit [Client Quit]
<jhass>
Pawky|2: do end is like an anonymous function, it's called a block, the generic term is closure. The |conn| defines a parameter it takes
balazs has quit [Ping timeout: 252 seconds]
<Pawky|2>
more or less any help on figuring out what the requests will be for touch and logout, will give me a head start on how to communicate with the server
sargas has joined #ruby
Lemur has quit [Remote host closed the connection]
<shevy>
yeah in theory I suppose... it's a finite problem so it could be solved... but I really don't know. there is the whole field of modeling all cells, such as system biology... but how old is that field, 20 years; artifical intelligence as a whole is how old... 60 years or less?
<toretore>
Pawky|2: conn is whatever is returned by the `connection` method
<shevy>
I am a notorious sceptic!
<Pawky|2>
ok.. :-)
<ponga>
shevy: and they say its open source
<ponga>
hm
<ponga>
they even got github
sent1nel has quit [Remote host closed the connection]
Lemur has joined #ruby
<toretore>
shevy: but, but, but... singularity
<Pawky|2>
let me think a bit.. :-)
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
thumpba has joined #ruby
craigp has joined #ruby
<ponga>
toretore: are we getting in the quantum level here
Lildirt has quit [Read error: Connection reset by peer]
DrShoggoth has quit [Remote host closed the connection]
<ponga>
but anyway, they seemed to by providing only python api
<ponga>
:(
iwishiwerearobot has quit [Ping timeout: 245 seconds]
<ponga>
provide ruby too!
pkrzywicki__ has quit [Ping timeout: 246 seconds]
craigp_ has joined #ruby
adriancb has quit [Remote host closed the connection]
tjbiddle has quit [Quit: tjbiddle]
<Pawky|2>
ok, so so "|conn|" is a block defined when calling "perform!" (where ! means it will modify the block), correct?
bonhoeffer has joined #ruby
<Pawky|2>
huh.. that sounded a bit weird..
<jhass>
no, the ! is just part of the methods name
nolic has quit [Remote host closed the connection]
<jhass>
do |conn| .. end is the block
adriancb has joined #ruby
<jhass>
|conn| is the part that defines its parameter
adriancb has quit [Remote host closed the connection]
adriancb has joined #ruby
Spooner has joined #ruby
Lildirt has joined #ruby
<jhass>
yield(connection) is where it's called
mistermocha has joined #ruby
centrx has quit [Quit: Shutting down, Please wait...]
bricker has joined #ruby
Lemur has quit [Ping timeout: 250 seconds]
<Pawky|2>
jhass: can you see what HTTP request will be created in the end when using these functions?... because thats what I am after in the end :-)
joonty has quit [Quit: joonty]
zenith_ has quit [Ping timeout: 250 seconds]
<jhass>
conn.put touch_path
davidhq has joined #ruby
zachrab has joined #ruby
skj3gg has joined #ruby
<jhass>
which of the HTTP verbs could that be.. ;)
craigp has quit [Ping timeout: 256 seconds]
<Pawky|2>
jhass: "login/#{session}" :-)
jmignault has quit [Quit: jmignault]
<jhass>
session is @session (defined through the attr_reader at the top)
<Pawky|2>
welll.. i meant put.. as a verb of course
<jhass>
exactly ;)
tunaCanBruh has joined #ruby
<toretore>
session is a string
<toretore>
session key
<toretore>
set by login
<Pawky|2>
jhass: ok... does the "#{ }" mean anything specific for ruby?
OrbitalKitten has joined #ruby
tesuji has quit [Ping timeout: 250 seconds]
<Pawky|2>
toretore: that i got :-)
jmignault has joined #ruby
Freelusion has quit [Quit: leaving]
DivineEntity has joined #ruby
<jhass>
it's efficient and short for "foo " + bar.to_s + " baz"
ghostlines has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Pawky|2>
(written from memory
<Pawky|2>
)
tjbiddle has joined #ruby
Takle has joined #ruby
deol has joined #ruby
<Pawky|2>
toretore: to me, the logout states, just put the session key in the end an it should logout... but no no, no can do :'(
<Pawky|2>
so after a long search, the only code found was ruby code.. thats why I am trying to understand it :-)
<jhass>
you're probably not using the right HTTP verb
dmbennet_ has quit []
n008f4g_ has joined #ruby
<Pawky|2>
et states DELETE for logout..
balazs has joined #ruby
<jhass>
yeah
<Pawky|2>
PUT for doing a touch..
<jhass>
yes
<toretore>
who has a session for api users
<Pawky|2>
I believe there might be some headers needed
timonv has quit [Ping timeout: 256 seconds]
<Pawky|2>
toretore: it that a question?
<toretore>
rhetorical
<toretore>
it's stupid
dmbennett has joined #ruby
hiyosi has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
maximski has joined #ruby
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<jhass>
Pawky|2: looks like the ruby script sets HTTP Basic Auth headers
Takle has quit [Remote host closed the connection]
<Pawky|2>
toretore: well.. you could always tell that to nordnet.. ;-)
bootstrappm has joined #ruby
<Pawky|2>
I just want to use it..
<jhass>
with the session key as both user and password
<jhass>
it also sets the content type
<jhass>
but that you figured I guess
<toretore>
which is exactly what the docs say
<Pawky|2>
jhass: hmm.. yeah, i thought that was to be done, but their TEST server still screams not authenticated, when using their session-key given in the call before...
dmbennet_ has joined #ruby
cajone has joined #ruby
<Pawky|2>
toretore: and its exactly what I am doing, but their #%!! server tells me its wrong :-(
Takle has joined #ruby
Takle has quit [Remote host closed the connection]
<Pawky|2>
it is due to their very limited docs and examples making me turn to you guys, you are my obi one kenobies... ;-) (or how its spelled)
<Pawky|2>
"my only hope"... B-)
<jhass>
Pawky|2: maybe just get wireshark and compare the dumps of the working script vs your script ;)
<Pawky|2>
jhass: wont see much will I, its encrypted..
DadoCe has joined #ruby
ismaelga has quit [Remote host closed the connection]
<toretore>
login problems are likely because you're not base64-ing and encrypting properly
<jhass>
mmh
<jhass>
let me try to remember that https proxy name
phutchins has joined #ruby
serivich has quit [Ping timeout: 244 seconds]
<Pawky|2>
toretore: hmm.. well.. I am doing it all correctly when authenticating, ass I do get the session-key and the time limit of 300 secs etc..
<Pawky|2>
its this session key I am unsure what to do with, any tests gives a negative result.. :-(
<Pawky|2>
toretore: yeah.. I had that coming hadn't i?....
<toretore>
i don't know why you still have \r in your file
<shevy>
ack
<shevy>
eam look what they do!
<toretore>
Pawky|2: that wasn't your code it was bonhoeffer's
Kricir has joined #ruby
<Pawky|2>
toretore: lol... I realised it :-)
<Pawky|2>
thanks so far, will hack some more :-)
AlienPickle has joined #ruby
<bonhoeffer>
toretore: yeah — looking for a better option . . . but that works on adobe saveas
<bonhoeffer>
text (accessible) or (plain) not sure what the difference is
maximski has quit []
<bonhoeffer>
would be great to have a pure ruby solution though
<toretore>
but those didn't have \r
cajone has quit [Remote host closed the connection]
<bonhoeffer>
\r === ^M as far as i can tell
<bonhoeffer>
have to run for a minute
reinaldo_ is now known as reinaldob
<Pawky|2>
toretore: just one question, when you did look upon the Nordnet API, did you interpret the logout to be anythinge more than just the api.test.nordnet.se/NEXTAPI/1/ someblahahsessionkeygiven ?
<eam>
toretore: why not just ruby -p -e'$_.gsub! /\r/, "\n"'
centrx has joined #ruby
riotjone_ has quit [Remote host closed the connection]
<jhass>
Pawky|2: uh, do you actually put a space in front there?
checkit has joined #ruby
<toretore>
but.. it may require that request to be authenticated
mikecmpbll has quit [Ping timeout: 240 seconds]
<Pawky|2>
jhass: no space, i write from my memory i dont have the exact syntax infront of me...
<jhass>
why not?
<jhass>
your browser has no tabbing support?
<toretore>
lol
<checkit>
Hey guys... I'm a rails newb but I'm not new to development. I'm trying to figure out how to use Active record to select 'col_name' instead of select *... Any thoughts here?
<jhass>
I'd say try the proxy and verify the requests actually look right
<Pawky|2>
toretore: aha.. this sounds interesting, I am believeing that is the case as well.. the request to be authenticated
<toretore>
checkit: #rubyonrails
<jhass>
no offense, but your "from memory" is not very good
<Pawky|2>
jhass: Well.. I am trying to steal as little time from you guys as possible... so I skip switching...
<jhass>
so there's a good chance your script is just not generating the request you think it does generate
<toretore>
Pawky|2: you need to get your shit together, sit down and read the api, start experimenting and understanding exactly how it works
<toretore>
instead of just trying random shit
JDiPierro has quit [Remote host closed the connection]
<Pawky|2>
toretore: duh.. its exactly what I am doing..
triple_b has joined #ruby
kalusn has quit [Remote host closed the connection]
<toretore>
no
<toretore>
"from memory" is not how that's done
<Pawky|2>
toretore: Iam not trying random stuff, but my interpretation seems to be wrong, and I have no one to ask...
<toretore>
ok fair
sevvie has quit [Ping timeout: 265 seconds]
paulfm_ has joined #ruby
jonr22 has joined #ruby
sevvie has joined #ruby
<jhass>
Pawky|2: then don't worry about stealing time or shit like that, ask proper questions that show you actually understood the API
starfox_sf has quit [Ping timeout: 250 seconds]
ghostpl_ has quit [Remote host closed the connection]
Macaveli has joined #ruby
<toretore>
but there's nothing more useful than just getting a big cup of coffee, sitting down and just getting into the bowels of the thing
<Pawky|2>
toretore: well.. I just meant, I maybe I didnt write exactly correct, like api.test.nordnet instead of test.api.nordnet... which was secondary to the question..
<jhass>
so far your "from memory" it should look like where all either too inprecise or just incorrect
<Pawky|2>
jhass: I get it I get it... i will hack some more with a proxy and get back with more "precise" requests. :-)
wottam has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<arup_r>
Ohh! I see
<arup_r>
that way
kaspertidemann has joined #ruby
vyorkin has quit [Quit: WeeChat 1.0.1]
<arup_r>
toretore: thanks
aclearman037 has quit [Ping timeout: 252 seconds]
rbennacer has quit [Ping timeout: 252 seconds]
kaspertidemann has left #ruby [#ruby]
sieve has quit [Quit: Leaving.]
My_Hearing has joined #ruby
My_Hearing has joined #ruby
My_Hearing has quit [Changing host]
Mon_Ouie has quit [Ping timeout: 250 seconds]
apurcell has joined #ruby
<jhass>
arup_r: also Hash special cases strings, they're copied and frozen when used as keys and not frozen already
Jackneill has joined #ruby
cajone has joined #ruby
<arup_r>
means ?
Spami has quit [Quit: This computer has gone to sleep]
Spami has joined #ruby
cobragoat has quit [Remote host closed the connection]
Eiam has joined #ruby
krz has quit [Quit: WeeChat 1.0.1]
<toretore>
Pawky|2: here's what the ruby code does: 1) all requests encode their parameters in the query string 2) this also applies to the login, where the (pre-formatted) credentials are given in the form of ?service=s&auth=creds 3) all subsequent requests take the session key from the login response and put it into the http auth headers
<toretore>
and that's basically it
ghr has quit [Ping timeout: 245 seconds]
<jhass>
>> a = ""; k = {a => nil}.keys.first; [a.frozen?, k.frozen?, a.equal?(k)]
mathie has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rbennacer has joined #ruby
<toretore>
all the paths are /next/1/<endpoint name>
<Pawky|2>
toretore: thats exactly how I have interpret it as well :-) but it doesnt work against their demo machine, atleast not for logout and touch... :-/
<toretore>
hostname doesn't show
Cyberheb has joined #ruby
JDiPierro has joined #ruby
<toretore>
does it work for other endpoints?
<Pawky|2>
toretore: I have only succeeded to login and get the session-key
rdark has quit [Quit: leaving]
<toretore>
meaning?
<toretore>
did you try any other endpoints?
<Pawky|2>
... only touch and logout...as they are the simplest.... :-/
TgMts has quit [Remote host closed the connection]
<toretore>
well try it dummy
rbennacer has quit [Remote host closed the connection]
<Pawky|2>
to prove wether I got the syntax right..
<toretore>
to prove whether your http auth is working
<Pawky|2>
toretore: but they are even more complex..
<toretore>
oh no
djbkd has joined #ruby
<toretore>
there's tons of simple gets in there
<Pawky|2>
give me one to try :-)
<Pawky|2>
and Ill implement it... :-)
gsd has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<ponga>
toretore: can i have a minute
<toretore>
GET /next/1/accounts
<ponga>
excuse me
<Pawky|2>
toretore: will do
nahtnam has quit [Quit: Connection closed for inactivity]
jenrzzz has joined #ruby
Allamann has quit [Remote host closed the connection]
psy_ has joined #ruby
dANO__ has quit []
mkaesz has quit [Read error: Connection reset by peer]
shadoi has joined #ruby
djbkd has quit [Client Quit]
blizzy has joined #ruby
mitchellhenke has joined #ruby
ismaelga has joined #ruby
Kricir has quit [Remote host closed the connection]
chthon has quit [Ping timeout: 252 seconds]
rbennacer has joined #ruby
shadoi has quit [Client Quit]
mleung has joined #ruby
mxrguspxrt has joined #ruby
Hobogrammer has quit [Ping timeout: 244 seconds]
terlar has quit [Ping timeout: 255 seconds]
mitchellhenke has quit [Read error: Connection reset by peer]
terlar has joined #ruby
mathie has joined #ruby
blizzy has quit [Ping timeout: 250 seconds]
banister has joined #ruby
blizzy has joined #ruby
josephndenton has joined #ruby
djbkd has joined #ruby
wallerdev has joined #ruby
jgt has joined #ruby
shadoi has joined #ruby
djcp has quit [Ping timeout: 244 seconds]
blueOxigen has joined #ruby
hesco has quit [Ping timeout: 245 seconds]
andikr has quit [Remote host closed the connection]
bluOxigen has quit [Ping timeout: 240 seconds]
spyderman4g63 has joined #ruby
bigkevmcd has quit [Remote host closed the connection]
<waxjar>
Approvers is such a thin wrapper it might as well be an Array
<toretore>
just cgecki
<toretore>
checking
<arup_r>
waxjar: Let me first apply what jhass said
<arup_r>
then i'll come back
<jhass>
if !foo.nil? -> if foo IMO
<waxjar>
sure :)
geefolk has quit [Ping timeout: 252 seconds]
<waxjar>
btw, arup_r, you might like codereview.stackexchange.com. specifically for questions like this and the feedback is often very good :)
<jhass>
arup_r: another small one maybe: prefixing a variable with _ is used to denote that you're not interested in actually using it
<waxjar>
especially mine >.>
terlar has quit [Ping timeout: 264 seconds]
<arup_r>
Then the site will be flooded.... waxjar :
<arup_r>
:)
uptownhr has quit [Quit: uptownhr]
spyderman4g63 has quit [Remote host closed the connection]
<Pawky|2>
toretore: do you really mean I never had set those headers in that earlier pastebin?
<arup_r>
jhass: that's for `next`
<arup_r>
I wanted to avoid it...
<arup_r>
but you are right
<jhass>
arup_r: no issue in getting verbose: next_approver
spyderman4g63 has joined #ruby
<arup_r>
yes.. :)
jgt has quit [Ping timeout: 252 seconds]
<hollywood>
hey guise, do you know how to select the part of a string that contains regex and everything that comes after it?
bonhoeffer has quit [Quit: bonhoeffer]
<jhass>
hollywood: provide sample input and desired output and what you tried so far, if it's > 3 lines use gist.github.com
yeticry has quit [Ping timeout: 250 seconds]
<hollywood>
sure
<hollywood>
I have this: "TOLBUTAMIDUM O 1-D 0,5 G"
<toretore>
Pawky|2: i'm not familiar enough with the http library you use to say
yeticry has joined #ruby
<hollywood>
the 0 1-D can be expressed as regex since the numbers and letters change
longfeet has quit [Ping timeout: 246 seconds]
Tuxero has quit [Ping timeout: 252 seconds]
<hollywood>
but I want to select whatever comes after O 1-D
<Pawky|2>
toretore: ok... thanks, thats valuable info as well :-)
<hollywood>
and remove it from the string
aapole has joined #ruby
<toretore>
don't say remove if you mean extract
<bricker>
I'm cross-posting from #rubyonrails because I meant to post it here: is it realistic to be concerned about SecureRandom.uuid's (lack of) uniqueness when generating maybe 100 per day?
<shadoi>
hollywood: rubular.com
<toretore>
you'll get wrong answers
<hollywood>
yep, already opened.
kalusn has joined #ruby
<shadoi>
try: /\w\d-\w(.*)/
riotjones has joined #ruby
<toretore>
bricker: use the uuid gem
<shadoi>
$1 will contain what's in ()
yfeldblum has joined #ruby
<toretore>
chances of collisions with uuid are miniscule
<pipework>
bricker: What do you mean lack of uniqueness?
<hollywood>
Hmm
<shadoi>
\w\s\d\w rather
<shadoi>
since there's a space
<pipework>
It pulls from the cprng's that come with your OS.
ponga has quit [Remote host closed the connection]
Channel6 has quit [Quit: Leaving]
mitchellhenke has joined #ruby
<jhass>
hollywood: you yet have to clarify what part you're interested in, do you want to continue to work with "TOLBUTAMIDUM " or "0,5 G"
<pipework>
If you want to enforce uniqueness in the event of a collision (wat), store them and enforce a uniqueness constraint.
<hollywood>
Okay, thanks. I might be able to solve this
adamjleonard has joined #ruby
m8 has joined #ruby
<pipework>
bricker: At work we generate a metric crapton of uuids without collision.
<hollywood>
Just remove the part that matches the regex and everything after
<jhass>
okay, sounds like you don't want to answer
<toretore>
bricker: actually, SR.uuid should work just fine
<pipework>
^
<jhass>
uuid gem helps of you want to guarantee uniqueness across machines that don't share a common database
ellisTAA has quit [Read error: Connection reset by peer]
<bricker>
yeah I guess it's pretty unlikely
jespada has quit [Quit: Leaving]
<jhass>
since afaik SecureRandom doesn't have the MAC address incorporating version
riotjones has quit [Ping timeout: 246 seconds]
<bricker>
jhass: I could design it to check uniqueness and keep trying until it's unique, but I wonder if that overhead is worth it when the probabily of collisions is like .0000000000002
yfeldblum has quit [Ping timeout: 255 seconds]
r0bby_ has joined #ruby
<bricker>
2.710498492319857e-12 according to one SO post
Macaveli has joined #ruby
jenrzzz has quit [Ping timeout: 265 seconds]
<jhass>
the question how much tolerance for failures you have ;)
robbyoconnor has quit [Ping timeout: 255 seconds]
<jhass>
it may be unlikely, yes, the question is whether you need an absolute guarantee
crueber has quit [Quit: Leaving.]
<toretore>
the more you generate, the greater the chances of collission and the more of a pita to enforce uniqueness :P
<hollywood>
Ok, (.*) did the job
<bricker>
jhass: Good point!
<hollywood>
Thanks
djbkd has quit [Remote host closed the connection]
ellisTAA has joined #ruby
<arup_r>
jhass: if I make as you said `module`, then after mixing `::base` is not being avaiable to the mixed in classed.. and I am getting no method error
<jhass>
arup_r: uh, yeah, I wondered why that's not a constant anyhow
<arup_r>
Umm.. I never thought about it too..
* arup_r
wondering why the module indeed needed.. as it doesn't contain anything now
baweaver has joined #ruby
<jhass>
maybe to hold the constant? :P
towski_ has quit [Quit: Leaving...]
Macaveli has quit [Ping timeout: 250 seconds]
ismaelga has quit [Remote host closed the connection]
Macaveli has joined #ruby
<arup_r>
pointless.. I modifed a Java code to write it in Ruby... And all code got vanished in Ruby platform
<arup_r>
:)
havenwood has quit [Remote host closed the connection]
<shevy>
arup_r you write java?
<arup_r>
NO :-( Wikipedia does
<pipework>
I thought they wrote PHP.
mikecmpbll has joined #ruby
kirun has joined #ruby
<shadoi>
hollywood: remember that basically that's a vulnerability to garbage injection. you probably want to make use of \A and \z
mxrguspxrt has quit [Remote host closed the connection]
jkyle1 has quit [Ping timeout: 264 seconds]
Freelusion has joined #ruby
mxrguspxrt has joined #ruby
dfinninger has joined #ruby
iamjarvo has joined #ruby
kalusn has quit [Read error: Connection reset by peer]
<apeiros>
Scriptonaut: uh, you should tell that you cross-post.
jheg has joined #ruby
<Scriptonaut>
cross-post?
mxrguspxrt has joined #ruby
svoop has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
cajone has quit [Ping timeout: 246 seconds]
leat has quit [Ping timeout: 250 seconds]
spyderma_ has joined #ruby
Yonose2000 has quit [Client Quit]
sent1nel has joined #ruby
mjuszczak has quit [Client Quit]
PaulCapestany has quit []
markfletcher has left #ruby [#ruby]
spyderman4g63 has quit [Ping timeout: 265 seconds]
spyderman4g63 has joined #ruby
djcp has joined #ruby
Musashi007 has joined #ruby
beneggett has joined #ruby
PaulCapestany has joined #ruby
Troy^ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
spyderma_ has quit [Ping timeout: 250 seconds]
Troy^ has joined #ruby
Troy^ has quit [Client Quit]
aryaching_ has quit []
Goodbeard has joined #ruby
cr3 has joined #ruby
<cr3>
is there a way to get an object from somewhere up the caller stack? caller() only returns string descriptions of the stack, so how can I get objects?
SOLDIERz has quit [Quit: Be back later ...]
<waxjar>
why would you need them cr3?
camilasan has quit [Ping timeout: 252 seconds]
deric_skibotn has joined #ruby
<cr3>
waxjar: I suspect tests aren't doing what they should, so I'm logging stuff from a hook and I'd like the test name from one of the callers
<cr3>
waxjar: so, this is not for production code but mostly to validate that stuff is getting done and I don't want to have to modify hundreds of tests
jonr22 has joined #ruby
<waxjar>
i see. i don't think it's possible, easily
<cr3>
waxjar: if, by your question, you're implying that since there should be no reason to go up the stack then there should be no way, that's cool too :)
sambao21 has quit [Quit: Computer has gone to sleep.]
crdpink2 has joined #ruby
<apeiros>
just let `hash` be the last statement in your inject block
<apeiros>
but seriously, use each_with_object.
tier has quit [Ping timeout: 250 seconds]
codeurge has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Takumo has joined #ruby
Takumo has quit [Changing host]
Takumo has joined #ruby
crdpink has quit [Ping timeout: 265 seconds]
<uptownhr>
but why doesn’t inject work?
sevvie has quit [Ping timeout: 252 seconds]
<uptownhr>
i’m just trying to learn and understand
checkit has quit [Ping timeout: 244 seconds]
AlienPickle has quit [Ping timeout: 246 seconds]
snath has quit [Ping timeout: 264 seconds]
_br_ has joined #ruby
<apeiros>
sure, I can tell you the same a third time…
adriancb has quit [Remote host closed the connection]
<apeiros>
because you don't return the correct value for your accumulator in your inject block
jm0 has quit [Ping timeout: 245 seconds]
bricker has quit [Ping timeout: 245 seconds]
adriancb has joined #ruby
<uptownhr>
ah ic
<uptownhr>
then what is the difference between inject and with_each_object?
skj3gg_ has joined #ruby
freerobby has quit [Quit: Leaving.]
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<apeiros>
each_with_object doesn't care about the block's return value
fabrice31 has quit [Ping timeout: 264 seconds]
alexherbo2 has quit [Read error: Connection reset by peer]
wallerdev has joined #ruby
<uptownhr>
got it
<uptownhr>
so why this over inject in my case?'
mloveless has joined #ruby
<apeiros>
get both to work and check the difference.
<uptownhr>
i have
tier_ has quit [Ping timeout: 246 seconds]
skj3gg_ has quit [Client Quit]
<apeiros>
you have working code with both? update your gist then with both versions.
<pragmatism>
> accumulator in your inject block
<pragmatism>
that's the different.
<pragmatism>
difference*
<uptownhr>
yea i know
<uptownhr>
i’m just asking why one over the other
davidhq has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dangerousbeans has joined #ruby
beneggett has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
skj3gg has quit [Quit: welp, see you later.]
beneggett has joined #ruby
adriancb has quit [Ping timeout: 240 seconds]
olivier_bK has joined #ruby
sevvie has joined #ruby
_Mon_Ouie_ has joined #ruby
sambao21 has joined #ruby
_br_ has quit [Ping timeout: 265 seconds]
hcnewsom has joined #ruby
Guest79923 has joined #ruby
snath has joined #ruby
m10n has quit [Quit: Lost terminal]
Renich has quit [Quit: leaving]
aclearman037 has quit [Quit: I'm out!]
ghostpl_ has joined #ruby
<waxjar>
uptownhr: inject/reduce takes the return value of the block and uses that as the accumulator for the next iteration
JDiPierro has quit [Remote host closed the connection]
psyprus has joined #ruby
<waxjar>
each_with_object always uses the initial object as the "accumulator"
highbass has joined #ruby
<softinio>
on a vps can you have web apps using different versions of Ruby. I come from a python background and we have virtualenv there to do this
<softinio>
I know locally I can using things like rvm or chruby
<waxjar>
(and returns it too)
paulfm_ has quit [Quit: Zzzzz...]
ellisTAA has quit [Ping timeout: 256 seconds]
AlienPickle has joined #ruby
serivich has joined #ruby
jerius has quit []
werelivinginthef has quit [Remote host closed the connection]
ghostpl_ has quit [Ping timeout: 256 seconds]
jobewan has quit [Read error: Connection reset by peer]
nuck has joined #ruby
lioninawhat has joined #ruby
<highbass>
hey guys.. i am a complete newb to ruby and just trying to make a simple change.. trying to pass a argument through commandline and trying to get it assigned to a variable...
SOLDIERz has joined #ruby
dojobo has joined #ruby
<highbass>
used to shell scripting
<dojobo>
hi guys
<highbass>
can somone tell me whats wrong with the following command.
<highbass>
sorry code&**
balazs has quit [Ping timeout: 252 seconds]
<dojobo>
anyone know if i can use file test operators via ftp?
<dojobo>
i want to get a list of files, but only if their ctime is a certain date
deryl has joined #ruby
<dangerousbeans>
highbass: ‘puts’ is your friend
<dangerousbeans>
puts everything
djbkd has quit [Remote host closed the connection]
<highbass>
so replace $instance_port with puts instance_port
wallerdev has quit [Quit: wallerdev]
<dangerousbeans>
yeah just for debugging, then see if it writes it out
<highbass>
ok
psyprus has quit [Ping timeout: 245 seconds]
startupality has quit [Quit: startupality]
<dangerousbeans>
or, incase it’s just empty string, do somthing like: puts “OUTPUT COMING OMG: #{instance_port}”
<dangerousbeans>
so you know that if you see just: “OUTPUT COMING OMG: “
<dangerousbeans>
something is wrong :3
gr33n7007h has joined #ruby
<dojobo>
oh wait, i think i just found the answer to my question
<waxjar>
softinio: you can use those on a server too :)
<dojobo>
had to figure out the right way to google it to get the right stackoverflow page :P
skj3gg has joined #ruby
<dangerousbeans>
highbase: from reading the code, it looks like a problem with string stuff, like to put a variable into a string, you need to do something like: “String I want to add #{stuff_variable} to”
Lexun has joined #ruby
Lexun has quit [Client Quit]
nateberkopec has quit [Quit: Leaving...]
<dangerousbeans>
#{} is magical ‘put ruby code here inside a string’ magic
djbkd has joined #ruby
Troy^ has joined #ruby
Jetchisel has quit [Ping timeout: 245 seconds]
ych4k3r has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<dangerousbeans>
no worries everyone was new once :]
<dangerousbeans>
this is a pretty good pathway to ruby enlightenment, if you’re keen to learn more: http://rubykoans.com/
<deryl>
love that site
hesco has joined #ruby
ghr has quit [Ping timeout: 264 seconds]
<highbass>
dangerousbeans: great thank you very much!! will def check that out
Ankhers has quit [Ping timeout: 245 seconds]
<dangerousbeans>
no worries :>
<dangerousbeans>
that is the wrong smiley >:[
<dangerousbeans>
urgh emoticions why do you exist
sevvie has quit [Ping timeout: 244 seconds]
jheg has quit [Quit: jheg]
baweaver has quit [Remote host closed the connection]
rbennacer has joined #ruby
<havenwood>
highbass: Atom is another text editor option that is based on Sublime but open source and free: https://atom.io
thebastl has quit [Quit: Leaving...]
<dangerousbeans>
<happyface>
ccooke has joined #ruby
<dangerousbeans>
oh cool, not tried Atom
* dangerousbeans
tries.
wallerdev has joined #ruby
mxrguspxrt has joined #ruby
<deryl>
also check out Bracket
sent1nel has quit [Remote host closed the connection]
<weaksauce>
is there any difference between require and load other than the duplicate import detection that require has?
iwishiwerearobot has joined #ruby
wallerdev has quit [Client Quit]
iceden has quit [Ping timeout: 250 seconds]
balazs has joined #ruby
versatiletech has quit [Quit: versatiletech]
last_staff has joined #ruby
wottam has joined #ruby
<jhass>
not that I'm aware of
<deryl>
weaksauce, require searches the entire library path for your requirement. load does not. Which is why you have to provide the full pathname to load (or use require_relative)
<jhass>
I yet have to see a usecase for load beyond code reloading anyway
OrbitalKitten has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<weaksauce>
thanks deryl
wallerdev has joined #ruby
highbass has quit []
brb3 has quit [Quit: <.<]
<deryl>
weaksauce, no problem
doodlehaus has quit [Remote host closed the connection]
OrbitalKitten has joined #ruby
wottam has quit [Client Quit]
rbennacer has quit [Ping timeout: 255 seconds]
wallerdev has quit [Client Quit]
skj3gg has joined #ruby
mxrguspxrt has quit [Ping timeout: 244 seconds]
<weaksauce>
jhass yeah useful for reloading code from within irb
baweaver has joined #ruby
_br_ has joined #ruby
iwishiwerearobot has quit [Ping timeout: 264 seconds]
kalusn has quit [Remote host closed the connection]
skj3gg has quit [Client Quit]
_ixti_ is now known as ixti
sevvie has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
diegoviola has joined #ruby
hcnewsom has quit [Quit: hcnewsom]
adriancb has joined #ruby
<deryl>
weaksauce, hehe *I* learned something new (autoload())
<weaksauce>
yeah that was interesting
ponga has joined #ruby
spyderman4g63 has quit [Ping timeout: 252 seconds]
Scriptonaut has left #ruby [#ruby]
codeurge has joined #ruby
wallerdev has joined #ruby
crdpink2 has quit [Quit: q term]
Troy^ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
chipotle has joined #ruby
dstarh has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ponga has quit [Ping timeout: 250 seconds]
DrShoggoth has quit [Quit: Leaving]
amdbcg has quit [Ping timeout: 256 seconds]
iceden has joined #ruby
<maletor_>
is there any better way to write this? (tries -= 1).zero?
crdpink has joined #ruby
jgt has quit [Read error: Connection reset by peer]
manshu has quit [Quit: manshu]
jgt has joined #ruby
<waxjar>
you could use tries.pred.zero?
m8 has quit [Quit: Sto andando via]
<waxjar>
or just tries == 1 :)
leafybasil has quit [Remote host closed the connection]
baroquebobcat has quit [Quit: baroquebobcat]
crdpink has quit [Client Quit]
leafybasil has joined #ruby
quazimodo has quit [Ping timeout: 255 seconds]
OrbitalKitten has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Prometheian has quit [Remote host closed the connection]
psyprus has joined #ruby
skj3gg has joined #ruby
skj3gg has quit [Client Quit]
_br_ has quit [Ping timeout: 246 seconds]
dmbennett has quit [Remote host closed the connection]
alyosha has joined #ruby
nosleep77 has joined #ruby
OrbitalKitten has joined #ruby
<nosleep77>
hi guys how do i check if my ruby install has yaml support
matrixfox has joined #ruby
<jhass>
just try to load a yaml file
sent1nel has joined #ruby
<weaksauce>
require 'yaml'
<shevy>
require 'ur_mom'
josephndenton has quit [Ping timeout: 264 seconds]
dangerousbeans has quit [Quit: dangerousbeans]
<shevy>
ruby -e "require 'yaml'; puts 'hi'"
Soda has joined #ruby
<jhass>
ruby -ryaml -e ''
<dojobo>
net/ftp's list and nlst are really annoying
icarus has joined #ruby
sinkensabe has quit [Remote host closed the connection]
jkyle1 has joined #ruby
<jhass>
that's because ftp is really annoying
<nosleep77>
thanks..
DEA7TH has quit [Ping timeout: 252 seconds]
beneggett has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
livingstn has quit []
<dojobo>
when i call list with a param, it just returns an empty array
pdoherty has joined #ruby
jgt has quit [Ping timeout: 250 seconds]
pietr0 has joined #ruby
Hijiri has joined #ruby
uptownhr has quit [Quit: uptownhr]
toretore has quit [Quit: Leaving]
dmbennett has joined #ruby
ghostpl_ has joined #ruby
Troy^ has joined #ruby
deryl is now known as ddd
hakunin has quit []
<shevy>
dojobo hehe
<shevy>
ftp is so old
Azure has quit [Quit: My MBP went to sleep.]
<jhass>
isn't IRC older actually?
<nosleep77>
this ruby script I am trying to use to send data from puppet to zabbix using zabbix_sender is reporting an error that it failed in puppet log. is there any way I can see more into where exactly is it failing?
<shevy>
dojobo I wrote a crappy wrapper over ftp so that I don't have to use ftp directly
<dojobo>
i don't know enough about sftp or the daemon in question to know whether it's supported
<shevy>
"Over the past decade IRC usage has been declining: since 2003 it has lost 60% of its users (from 1 million to about 400,000 in 2014) and half of its channels (from half a million in 2003)."
<shevy>
guys
<shevy>
we are declining
<shevy>
:(
<jhass>
oldest ftp rfc is 80
<jhass>
so about the same age
zachrab has joined #ruby
nateberkopec has joined #ruby
<dojobo>
irc could make a comeback though
ebbflowgo has joined #ruby
<dojobo>
not as a very mainstream tech
<lampd1>
just add a cloud in there somewhere, people will love it