<Fetch>
I can use attr_accessor to give access to a classvar hash, and assignments work as expected. If I try to write my own accessor (def foo=(val)) then it isn't being called for hash assignments (Bar.foo['baz']='blam')
<Fetch>
Is there something I'm missing for creating my own accessor that can handle hash/array-like access?
harfangk has joined #ruby
zukin has joined #ruby
blackmesa has quit [Ping timeout: 240 seconds]
nettoweb1 has joined #ruby
<Fetch>
Everything on the internet says "attr_accessor just creates public foo and foo= methods", but I checked out the ruby C source code, and I'm not sure that's accurate
nettoweb has quit [Ping timeout: 268 seconds]
twalla has joined #ruby
nettoweb has joined #ruby
twalla has quit [Ping timeout: 260 seconds]
KnownSyntax has joined #ruby
KnownSyntax has quit [Changing host]
KnownSyntax has joined #ruby
Iacobus has quit [Ping timeout: 240 seconds]
_djbkd has joined #ruby
nettoweb1 has quit [Ping timeout: 265 seconds]
alem0lars has quit [Ping timeout: 240 seconds]
M-mistake has quit [Ping timeout: 240 seconds]
Iacobus has joined #ruby
anaiden has joined #ruby
vitd has joined #ruby
fladson[m] has quit [Ping timeout: 240 seconds]
alem0lars has joined #ruby
<havenwood>
>> class Fetch; attr_reader :example; def initialize; @example = {} end end; fetch = Fetch.new; fetch.example[:aim] = true; fetch.example
<Fetch>
havenwood: great. Now, write your own setter (def bar= )
<Fetch>
it doesn't work
gix has quit [Ping timeout: 250 seconds]
<Fetch>
according to Foo.methods, there's nothing different between what attr_writer is setting and def bar= , but bar= isn't called for Foo.bar['a']='b'
symm- has quit [Quit: Leaving...]
bascht has joined #ruby
xall has joined #ruby
redpants has joined #ruby
gix has joined #ruby
nadir has quit [Quit: Connection closed for inactivity]
_djbkd has quit [Remote host closed the connection]
xall has quit [Ping timeout: 240 seconds]
_djbkd has joined #ruby
tcrypt has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
<helpa>
Pastebin is not good because it loads slowly for most, has ads which are distracting and has terrible formatting. Please use Gist (http://gist.github.com) or Pastie (http://pastie.org) instead. Thanks!
<ruby[bot]>
Fetch: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
<helpa>
Hi Fetch. We in #ruby would really appreciate it if you did not use pastebin during your time with us.
<Fetch>
havenwood: http://pastebin.com/n4Wg8FHA illustrates it best. In that case, the hash assignment occurs but the setter never (apparently) gets directly invoked
<llua>
raid10 highlights
jaykill33 has joined #ruby
<llua>
s/10//
_djbkd has quit [Ping timeout: 260 seconds]
jaykill has quit [Ping timeout: 250 seconds]
jaguarmagenta has joined #ruby
wldcordeiro has quit [Quit: WeeChat 1.4]
wldcordeiro has joined #ruby
brendan- has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
Felipe__ has quit [Quit: Leaving]
<Fetch>
oh I think I get it, the reader is returning the hash object by reference which is then directly set by the assignment
fnord____ has quit [Read error: Connection reset by peer]
brianpWins_ is now known as brianpWins
epochwolf has quit [Ping timeout: 240 seconds]
watersoul has joined #ruby
mim1k|wo1k has joined #ruby
jcao219 has quit [Ping timeout: 250 seconds]
sjums has joined #ruby
SpX has joined #ruby
epochwolf has joined #ruby
edwinvdgraaf has quit [Ping timeout: 260 seconds]
nonnatus has joined #ruby
f0rpaxe has quit [Quit: Connection closed for inactivity]
svankmajer has quit [Ping timeout: 260 seconds]
fnord____ has joined #ruby
rsampaio_ has quit [Ping timeout: 240 seconds]
elhu has joined #ruby
axscode_ has joined #ruby
djellemah has joined #ruby
<axscode_>
Hi guys if i have x = [{type=>'note', body=>'msg here'}] <-- how to access type? x['type'] seems not working.
<dminuoso_>
aspiers: The outer shell is an array. How do you access elements of an array?
elenatanasoiu1 has joined #ruby
ctp__ has joined #ruby
pawnbox has joined #ruby
<axscode_>
dminuoso_: is that for me?
<dminuoso_>
axscode_: Yes.
<dminuoso_>
Somethings screwed up in my irssis tab completion, I should pay more attention to it in the future.
bocaneri has joined #ruby
elhu_ has joined #ruby
<axscode_>
type = "#{push['data']['item']['conversation_parts']['conversation_parts']['type']}" the rest is array, but on the type part it has curly inside {}
aeterne has quit [Read error: Connection reset by peer]
<dminuoso_>
>> x = [{type=>'note', body=>'msg here'}]; puts x.class
<ruby[bot]>
dminuoso_: # => undefined local variable or method `type' for main:Object (NameError) ...check link for more (https://eval.in/658990)
<Radar>
axscode_: It's an array. How do you get an element out of an array?
<axscode_>
[0].type ?
<Radar>
axscode_: [{type: "foo"},{type: "bar"}]
<Radar>
axscode_: how do I get the first element out of that array?
<dminuoso_>
axscode_: Yes, for example!
<dminuoso_>
axscode_: Now for the first element, it's often more elegant to use #first instead.
<Radar>
axscode_: good
<axscode_>
ah
<Radar>
axscode_: [0][:type]
elhu has quit [Ping timeout: 250 seconds]
<axscode_>
[#first][:type] ?
<axscode_>
checking
<Radar>
.first[:type"]
<Radar>
Without the "
elenatanasoiu1 has quit [Ping timeout: 260 seconds]
raeoks has quit [Client Quit]
<dminuoso_>
axscode_: Class#method is just a conventional way of writing that method is an instance method of Class. I just left the Class "Array" away. :)
<axscode_>
sorry just learning ruby :D forgive my super noob presence
<Radar>
np
<Radar>
we encourage all learners
kspencer has quit [Quit: be back tomorrow]
<dminuoso_>
axscode_: That's fine. We don't expect you to rewrite Rake for another week at least.
raeoks has joined #ruby
jaequery has joined #ruby
raeoks has quit [Client Quit]
ctp__ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
blackmesa has joined #ruby
xall has joined #ruby
aufi has joined #ruby
<axscode_>
this work -> type = "#{push['data']['item']['conversation_parts']['conversation_parts'].first['part_type']}"
<axscode_>
thank you guys.
jaykill33 has quit [Remote host closed the connection]
last_staff has joined #ruby
<dminuoso_>
axscode_: Now before you get used to such ugliness
TomyLobo has quit [Ping timeout: 250 seconds]
<dminuoso_>
axscode_: get that "part_type" outside and put it into a variable
blackmesa has quit [Ping timeout: 250 seconds]
<axscode_>
sorry, more english please.
etehtsea has joined #ruby
<dminuoso_>
axscode_: "#{something}" is called string interpolation. Using complex expressions in there is very dirty and unreadable.
JesseH has quit [Ping timeout: 240 seconds]
fladson[m] has quit [Ping timeout: 240 seconds]
bascht has quit [Ping timeout: 240 seconds]
bascht has joined #ruby
<axscode_>
type = push['data']['item']['conversation_parts']['conversation_parts'].first['part_type'] ?
<dminuoso_>
axscode_: right
<axscode_>
perfect :D i love you already
<dminuoso_>
axscode_: And if your goal is just to convert it into a string, use the #to_s method
crdpink has joined #ruby
<dminuoso_>
but check whether its not a string already
<axscode_>
type.to_s ?
raeoks has joined #ruby
<dminuoso_>
axscode_: what's type's class?
<dminuoso_>
Is it a string? A symbol? A fixnum?
<axscode_>
given if its a number
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<axscode_>
type = 1234567890 then type.to_s or to_s(type) ?
<axscode_>
sorry haha just guessing
<dminuoso_>
axscode_: then just use something.first['part_type'].to_s :)
etehtsea has quit [Ping timeout: 268 seconds]
tcrypt has joined #ruby
raeoks has quit [Client Quit]
<axscode_>
ahhhhhhhhhhhhhh
<axscode_>
sorry, guys, i learn fast by example :( is that a bad habit?
jaykilleen has joined #ruby
raeoks has joined #ruby
fladson[m] has joined #ruby
<axscode_>
is there a switch in ruby
<dminuoso_>
axscode_: Yes. The book you are reading (you are reading a good book, right?) will cover it later on for sure.
<axscode_>
how do you usually do, if substring found in string then do this. but string should be like in a switch so if substring1 found, then do this, if substring2 found then do this.
<baweaver>
which I normally recommend to people that already know programming
firstdayonthejob has joined #ruby
<axscode_>
thank you baweaver i'll look for that
<dminuoso_>
^- has got to be the most recommended book in here.
<baweaver>
The Pickaxe book is better for straight newbies
<baweaver>
Practical Object Oriented Development in Ruby is great for people who don't know OO very well yet.
<baweaver>
The Ruby Way is a massive legendary tome of information
Chagel has quit [Ping timeout: 260 seconds]
Chagel has joined #ruby
jaequery has joined #ruby
<axscode_>
i know this is a wrong channel to ask, but how do you compare py to ruby?
<ytti>
with snark and sarcasm
edwinvdgraaf has joined #ruby
Derperperd has quit [Quit: Derperperd]
nofxx has joined #ruby
<baweaver>
Depends on what you want to do really
<baweaver>
I'm not particularly a fan of the forced indentation, but I do like that you can pass methods as functions more cleanly.
<baweaver>
though there's still that whole nasty fight over 2 vs 3
ur5us has quit [Remote host closed the connection]
arashb has joined #ruby
<Fetch>
baweaver: one hotdog, obv
<frankiee_>
py has forced indentation?
<Fetch>
frankiee_: yes
<frankiee_>
that's gotta suck
<Fetch>
plusses and minuses
<fbt>
axscode_, personally, I've found the codecademy ruby course lacking, but decent enough as an introduction
<baweaver>
Currently writing a book on Ruby myself, though that'll take a while.
<fbt>
Depending on your taste in learning material, it can be pretty nice.
<baweaver>
that, and it's way more focused on Ops.
<Fetch>
frankiee_: there are other things I find more annoying about it, like reliance on global namespace for too much, pain when chaining methods, etc.
<fbt>
It will just feed you concepts one by one, which I like a lot
arashb has quit [Ping timeout: 260 seconds]
<baweaver>
The Cloud Administrator's Guide to Ruby.
<axscode_>
thanks fbt will check on that.
<baweaver>
should be fun.
<Fetch>
baweaver: "How do I gem install fog and awssdk?" :)
<fbt>
baweaver, I'll check it out if it's not $50 :D
<baweaver>
$49.99
<fbt>
Well that's ideal then
elhu_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<Fetch>
basically free at that point
<baweaver>
Joking aside, I'll probably have it up for free with donations appreciated.
<fbt>
But seriously, a digital educational book for $50 is just... why.
k200 has joined #ruby
<Fetch>
baweaver: what's your timeframe look like? a few months out?
<fbt>
I keep seeing those
<baweaver>
Probably. Doing a class on it at work later this month
<fbt>
Fetch, sure, but $50 for a digital book is also a bit much
<Fetch>
fbt: time spent writing isn't free *shrug*
<baweaver>
k200: everything except nil/false is truthy, remember that
duncannz has quit [Ping timeout: 250 seconds]
<k200>
shall I use !! in ruby, to get a boolean result ?
<Fetch>
I think I've paid that for a few, but pretty atypically
duncannz has joined #ruby
<baweaver>
It'll cover cloud providers. Basically how to DevOps with Ruby.
<baweaver>
does nil not work for it?
<k200>
baweaver: my code return nil. i want it to return false.
<k200>
no.
<baweaver>
why?
firstdayonthejob has quit [Ping timeout: 250 seconds]
<k200>
if its nil it executes that if block. i dont want it to execute that if block if its false (==nil)
jxf has quit [Ping timeout: 240 seconds]
bsrd has joined #ruby
<Fetch>
baweaver: I work at a consulting firm where we do a bunch of infrastructure and pipeline coding in Ruby. In the unlikely event I remember in a few months, I'll see about pinging you on whether we should check it out
<baweaver>
I'll probably fire it around here and on Twitter
<baweaver>
you'll likely see the entire thing OS'd on github.com/baweaver
<Fetch>
twitter handle same as irc?
<baweaver>
funny story there
<baweaver>
keystonelemur on Twitter
<baweaver>
baweaver on twitter is a sorority girl
<baweaver>
the only reason I know this is because someone tried to recruit her thinking it was me
<Fetch>
it's very nearly the initials/last name of my ex from college
<fbt>
Heh. fbt on freenode used to be some other guy who was apparently contacted a few times when people were searching for me
<fbt>
He dropped the nick, it seems
jxf has joined #ruby
<baweaver>
I have this and lemur
stemid has left #ruby [#ruby]
<k200>
everyones animal on internet!
<lemur>
considering lemur was my original.
<fbt>
I'd do the same, honestly. If there is someone who is known better by the nick I use, I'd just choose another.
<baweaver>
baweaver is my more professional sounding alias
<baweaver>
baweaver -> B.A. Weaver
<baweaver>
which might or might not stand for badass
<fbt>
Heh.
<Fetch>
"oh look at me, I'm a weaver who's a BADASS"
<Fetch>
which come to think of it, was the basis for some book I read back a while
<baweaver>
My old team name was BaDASS too
<baweaver>
Anyways. #ruby-offtopic for the rest of this.
<baweaver>
Build and Deployment Automation Support System
tvw has joined #ruby
<baweaver>
k200: You can !!value for booleans
<k200>
baweaver: yeah. thats what i was asking for!
<baweaver>
just remember that things are implicitly boolean by nature.
axscode_ has quit [Ping timeout: 248 seconds]
<k200>
k
<k200>
ok
Dimik has joined #ruby
Pumukel has joined #ruby
conta has joined #ruby
qwertyco has joined #ruby
Tempesta has quit [Quit: See ya!]
aganov has joined #ruby
wugy has joined #ruby
jaguarmagenta has joined #ruby
ddffg has joined #ruby
axscode has joined #ruby
Pumukel has quit [Read error: Connection reset by peer]
<axscode>
"<p>string</p>" <-- what's the best way to remove substring
<dminuoso_>
axscode: By using an XML parser.
Pumukel has joined #ruby
<dminuoso_>
nokogiri is your friend.
<axscode>
any gem for that
<dminuoso_>
(There's a couple other, but Nokogiri is likely the gem you want to be accustomed to for future work)
diNZy has quit [Read error: Connection reset by peer]
<baweaver>
nokogiri +1
frankiee1 has joined #ruby
<axscode>
nokogiri it is :D
DoubleMalt has joined #ruby
frankiee_ has quit [Read error: No route to host]
jaguarmagenta has quit [Ping timeout: 265 seconds]
<axscode>
aw, can you help with example removing <p> on a string
<workmad3>
apeiros: it provides some interactive prompts (it's built in file copy action prompts for user input if the file already exists, for example)
<workmad3>
but it's not exactly a full terminal toolkit...
<apeiros>
ok
zotherst1 has quit [Ping timeout: 260 seconds]
zotherst1 has joined #ruby
jgt1 has quit [Quit: WeeChat 1.4]
jmignault has joined #ruby
cdg has joined #ruby
nonnatus has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
andrewvos has joined #ruby
symm- has joined #ruby
ARCADIVS has joined #ruby
Xentil has joined #ruby
failshell has joined #ruby
DoubleMalt has joined #ruby
Toledo is now known as croberts
kyle__ has quit [Disconnected by services]
vitd has joined #ruby
brendan- has joined #ruby
codfection has joined #ruby
mvxlr has joined #ruby
tcrypt[away] is now known as tcrypt
tcrypt is now known as tcrypt[away]
malconis has joined #ruby
codfection has quit [Client Quit]
vitd has quit [Ping timeout: 248 seconds]
ta_ has quit [Remote host closed the connection]
DLSteve has joined #ruby
ta_ has joined #ruby
codfection has joined #ruby
Aquazi has joined #ruby
codfection has quit [Remote host closed the connection]
hutch34 has joined #ruby
yfeldblum has joined #ruby
ta_ has quit [Ping timeout: 260 seconds]
Pumukel has quit [Remote host closed the connection]
symm- has quit [Quit: Leaving...]
sarbs has quit [Ping timeout: 260 seconds]
JoshL has joined #ruby
samof76 has quit [Ping timeout: 260 seconds]
<k200>
how to find out if in my array of hashes, "second_key" has value for all those hashes where "first_key" has value ??
Zamyatin has joined #ruby
coolboy has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
_sfiguser has quit [Remote host closed the connection]
Pumukel has joined #ruby
Wayne_Shephard has quit [Read error: Connection reset by peer]
<zotherst1>
is there a gem for converting video media files to DASH (Dynamic Adaptive Streaming over HTTP)?
catphish has joined #ruby
zotherst1 has quit [Quit: WeeChat 1.6]
andrewvos has quit [Quit: WeeChat 0.4.2]
ocbtec has joined #ruby
<catphish>
can anyone please suggest the most efficient way to 1) detect if a string contains a newline, 2) read data up to the new line 3) discard the data that's been read
pawnbox has quit [Remote host closed the connection]
failshell has quit []
<catphish>
the reason being that i want to use gets with epoll, so i was planning to read data into a buffer, then i need to do "gets" on the buffer
<heftig>
write it in C
<catphish>
:(
binaryplease has joined #ruby
pwnd_nsfw` has joined #ruby
shinnya has joined #ruby
<catphish>
for now i can of course use String#index, and String#[]
<catphish>
perhaps that's good enough
<ljarvis>
catphish: stringio maybe?
<catphish>
i considered that, but i fear it won't deal with discarding the old data
Robtop__ has quit [Ping timeout: 260 seconds]
<eam>
what do you mean discard?
<ljarvis>
discarding in what sense? it uses a position and a buffer, so you can always discard previously read data
k200 has quit [Quit: leaving]
<catphish>
ljarvis: how would i do the discard?
<heftig>
i'm serious, btw. you want efficient custom low level IO, you write an extension.
<ljarvis>
stringio is written in c
<ljarvis>
catphish: what exactly do you mean by discard?
<eam>
the character semantics of ruby array indexing are probably the most expensive part of any of this
<catphish>
i want to "gets" data from the string, i want the data to then no longer be in the underlying string
<ljarvis>
why?
<ljarvis>
create a new string
Azure has quit [Ping timeout: 265 seconds]
<heftig>
catphish: string.slice!(/^[^\n]*/) might do what you want
<catphish>
well because my buffer will keep getting larger forever
GodFather has quit [Ping timeout: 268 seconds]
<heftig>
er,
<heftig>
string.slice!(/^[^\n]*\n/)
tk__ has quit [Quit: ばいばい]
<catphish>
come to think of it, perhaps just: line, string = string.split("\n", 2)
<heftig>
actually, that's better, yes
<catphish>
after checking string.index("\n")
<catphish>
it creates an extra copy of the string, but i realiase that's largely unavoidable without writing an extension
codfection has quit [Read error: Connection reset by peer]
<eam>
catphish: when you allocate a new string and discard the old one it'll get gc'd
<heftig>
catphish: you can just do the split
mim1k|wo1k has joined #ruby
<catphish>
yep, that should be ok
<heftig>
if there's no \n in there, the return array won't contain a second element
<catphish>
thanks for helping me think, i think that split will be fine for now
marr has quit [Read error: Connection reset by peer]
malconis_ has joined #ruby
hutch34 has quit [Ping timeout: 250 seconds]
brendan- has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
shinnya has quit [Ping timeout: 260 seconds]
patarr has quit [Client Quit]
malconis has quit [Ping timeout: 240 seconds]
shinnya has joined #ruby
kallisti6 is now known as kallisti5
vitd has quit [Ping timeout: 248 seconds]
dminuoso_ has quit [Ping timeout: 248 seconds]
TomyLobo2 has quit [Ping timeout: 256 seconds]
jcao219 has joined #ruby
bmurt has joined #ruby
dviola has joined #ruby
patarr has joined #ruby
wldcordeiro has quit [Ping timeout: 260 seconds]
<frankiee1>
Hi! Silly question time !!!
last_staff has quit [Quit: *poof*]
<frankiee1>
How do I output `categories = ['Foo', 'Bar']` as a hashes with `name` as their value? This obviously won't work: categories = ['Foo', 'Bar']; categories.each do |category|; puts category.to_h; end
<frankiee1>
Ie. {:name=>"Foo"}, {:name=>"Bar"}
Filiphe has joined #ruby
pawnbox has joined #ruby
<Nilium>
So you just want an array of everything from :name?
<frankiee1>
Nilium: sounds about right, yeah
bascht has quit [Ping timeout: 240 seconds]
<Nilium>
Are all of your hashes in an array?
fladson[m] has quit [Ping timeout: 240 seconds]
M-manveru has quit [Ping timeout: 240 seconds]
pawnbox has quit [Remote host closed the connection]
M-manveru has joined #ruby
pawnbox has joined #ruby
<frankiee1>
Not exactly sure I need an array
<ljarvis>
categories.map { |cat| { name: cat } }
<Nilium>
I don't think that's a yes or a no
dminuoso_ has joined #ruby
<frankiee1>
ljarvis: sweet, one sec
<Nilium>
Wait, so the goal is to turn an array of names _into_ a bunch of hashes?
<frankiee1>
Oh yeah yeah, all my hashes are in an array, yes
<frankiee1>
Sorry I misunderstood
loincloth has joined #ruby
<Nilium>
Are you trying to get names out of hashes or convert names to hashes?
<ljarvis>
lol
fladson[m] has joined #ruby
bascht has joined #ruby
<ljarvis>
maybe show us what you have vs what you want
igniting has quit [Ping timeout: 248 seconds]
codfection has joined #ruby
<frankiee1>
Ok, one second let me make a nice gist for you guys
nonnatus has joined #ruby
nonnatus has quit [Client Quit]
TomyLobo2 has joined #ruby
antgel has quit [Ping timeout: 265 seconds]
xall has joined #ruby
Burgestrand has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<ljarvis>
btw, private followed by attr_reader doesn't do what you think it does
Rodya_ has quit [Remote host closed the connection]
Zamyatin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
xall has quit [Ping timeout: 248 seconds]
<frankiee1>
ljarvis: excellent !!!!
ichkv has quit [Remote host closed the connection]
<frankiee1>
ljarvis: oh yeah? hmm.. not sure what i was thinking
<ljarvis>
actually ignore me about the private
<frankiee1>
ah ok
<ljarvis>
i thought you were doing something else
<frankiee1>
cool cool
theRoUS has joined #ruby
theRoUS has joined #ruby
theRoUS has quit [Changing host]
nowhereman has quit [Ping timeout: 250 seconds]
codfection has quit [Remote host closed the connection]
<frankiee1>
ljarvis: categories.map { |c| puts c["name"] } is empty for some reason
<ljarvis>
frankiee1: what does `p categories` show?
<frankiee1>
ljarvis: ["Jeans", "Sko"]
tvw has quit [Read error: Connection reset by peer]
<ljarvis>
im so confused
<ljarvis>
i thought you wanted to pull categories out of that JSON
harai_ has joined #ruby
<frankiee1>
well, i could do that too. but the reason im specifying the categories beforehand is so i can filter products belonging to those categories i need
<ljarvis>
sorry but you're going to have to reduce the issue you're having down to a smaller piece of code, it's very confusing, so it's either very complex or you're not explaining it well (or i'm just not being very clever today)
Robtop__ has joined #ruby
<ljarvis>
my understanding: you have: { "name" => "foo", "name" => "bar" } and want ["foo", "bar"] but apparently that's incorrect
aganov has quit [Remote host closed the connection]
<frankiee1>
I figured it would be best to create the actual categories in Solidus based on that preconfigured categories array, rather than fishing it out of the JSON
<ruby[bot]>
ljarvis: # => /tmp/execpad-c5104156f399/source-c5104156f399:2: warning: key "name" is duplicated and overwritten o ...check link for more (https://eval.in/659535)
<ljarvis>
right, so product has a single category, not the categories at the bottom of that JSON file? (which are a list)
<ljarvis>
in which case, what you have already looks correct.. so what's wrong exactly?
ruby-lang477 has joined #ruby
<frankiee1>
ljarvis: yes. the categories are known as `productGroup` in the JSON file
brendan- has joined #ruby
<frankiee1>
well the problem is that i can output / feed Solidus with the product info.. unfortunately i need to create the categories in Solidus before I can feed anything into them
<frankiee1>
(categories in Solidus are known as Taxons.. for some weird reason)
<frankiee1>
SO MANY NAMES FOR CATEGORIES!! killing me
<ljarvis>
do you know what the URL payload needs to look like?
<frankiee1>
sorry what do you mean?
<ljarvis>
you said you need to feed the categories into Solidus (i have no idea what that is) but presumably this happens when you send a request to that url with paramString?
mark_66 has quit [Remote host closed the connection]
<frankiee1>
Solidus is a fork of Spree.. the ecommerce thingie, http://solidus.io/.. pretty neat stuff
Azure has quit [Ping timeout: 240 seconds]
Robtop__ has quit [Read error: Connection reset by peer]
<frankiee1>
oh no, the paramString thing fetches the JSON from this supplier
jcao219 has quit [Ping timeout: 248 seconds]
Robtop__ has joined #ruby
Zamyatin has joined #ruby
<frankiee1>
so we can safely ignore that part i think
<ljarvis>
sorry but we've been talking for 30 minutes and i still have no idea what you want or what's wrong, so i don't think i can help
lupine has joined #ruby
Snowy has quit [Quit: ragequit]
sheepman is now known as sheepman0
sheepman0 is now known as sheepman
<frankiee1>
i want to mass import products from my supplier into my Solidus store. but before i can import the products, i must create their categories in Solidus. that's basically it
zapata has joined #ruby
<ljarvis>
How do I output `categories = ['Foo', 'Bar']` as a hashes with `name` as their value? This obviously won't work: categories = ['Foo', 'Bar']; categories.each do |category|; puts category.to_h; end
<ljarvis>
^ that was your question
<frankiee1>
yeah that was me trying to be smart and creating a reduced test case lol
<frankiee1>
damn this code is a mess
<frankiee1>
thanks for trying to help though :))
<ljarvis>
that IS smart, nobody cares about Solidus, keep it simple
<ljarvis>
problem is, it's not simple enough
<ljarvis>
and the code looks like to me, im just having trouble working out what you want or even what's wrong :)
tylersmith has quit [Ping timeout: 240 seconds]
marr has joined #ruby
patarr has quit [Quit: patarr]
bsrd has joined #ruby
^mtkd has quit [Ping timeout: 240 seconds]
feelx- has joined #ruby
Chagel has quit [Ping timeout: 260 seconds]
tylersmith has joined #ruby
pawnbox has joined #ruby
nettoweb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
symm- has quit [Quit: Leaving...]
mtkd has joined #ruby
feelx has quit [Ping timeout: 248 seconds]
<ljarvis>
im pretty sure what you actually wanted was my first answer: [{name: category }] but who knows
<frankiee1>
hmmm
M-mistake has quit [Write error: Connection reset by peer]
cpfeilschifter[m has quit [Write error: Connection reset by peer]
bascht has quit [Write error: Connection reset by peer]
M-shine has quit [Write error: Connection reset by peer]
M-manveru has quit [Write error: Connection reset by peer]
fladson[m] has quit [Write error: Connection reset by peer]
blackmesa has joined #ruby
igniting has joined #ruby
pawnbox has quit [Ping timeout: 260 seconds]
Oclair has joined #ruby
<frankiee1>
ljarvis: any chance you're available for paid work?
<ljarvis>
I'm afraid not :) not for a long time anyway
vitd has joined #ruby
<frankiee1>
okidokie
Fetch_ is now known as Fetch
hutch34 has joined #ruby
pwnd_nsfw has joined #ruby
Oclairi has quit [Ping timeout: 248 seconds]
antgel has quit [Ping timeout: 268 seconds]
tcrypt[away] is now known as tcrypt
nowhereman has joined #ruby
ponga has joined #ruby
tcrypt is now known as tcrypt[away]
i5um41ru has quit [Ping timeout: 260 seconds]
i5um41ru has joined #ruby
Robtop__ has quit [Ping timeout: 240 seconds]
vitd has quit [Ping timeout: 248 seconds]
pawnbox has joined #ruby
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<ruby-lang477>
Hello all! I've got some trouble with using rescue to catch ssh errors (timeouts, refused connections, etc.) I'm following the syntax I found online, but the script still kicks back an error and exits instead of catching the exception and executing "next". Here is the code and at the bottom is the error. Any help would be greatly appreciated. Thank you.
<ruby-lang477>
Timeout::Error is not connection timeout?
<ljarvis>
but, it's raising Net::SSH::ConnectionTimeout, so you need to add that to your rescue list
BlueDragons has joined #ruby
<ljarvis>
nope I'm afraid not
fladson[m] has joined #ruby
pwnd_nsfw has quit [Read error: Network is unreachable]
<ljarvis>
it's different
<ljarvis>
I don't suspect your code would raise a Timeout::Error so you can probably remove that
pwnd_nsfw has joined #ruby
<ruby-lang477>
so Timeout::Error is an exception that triggers if the command run via ssh timeouts, not if the ssh connection itself times out?
<ljarvis>
I'm not sure I haven't used Net::SSH, but that could be the case yeah
<ljarvis>
if you want to be sure, you can cover them both
<ljarvis>
the docs might say
GodFather has quit [Ping timeout: 268 seconds]
<ruby-lang477>
ok, one more question please: what syntax would I use when adding it to the exception array?
<ljarvis>
just add a new entry to the list in the code? or do you mean dynamically?
xall has quit [Ping timeout: 260 seconds]
<ruby-lang477>
Net::SSH::ConnectionTimeout?
<ruby-lang477>
ok, thank you very much ljarvis
<ljarvis>
yep
banisterfiend has joined #ruby
aufi has quit [Quit: Leaving]
CloCkWeRX has quit [Quit: Leaving.]
bsrd has quit [Quit: WeeChat 1.6]
Torrone has quit [Quit: This computer has gone to sleep]
[Butch] has joined #ruby
cschneid_ has joined #ruby
tylersmith has quit [Ping timeout: 240 seconds]
LBRapid has quit [Ping timeout: 240 seconds]
tonini has quit [Quit: Connection closed for inactivity]
jmignault has joined #ruby
jsrn_ has quit [Read error: Connection reset by peer]
patarr has joined #ruby
[Butch] has quit [Client Quit]
[Butch] has joined #ruby
yfeldblum has quit [Ping timeout: 240 seconds]
amclain has joined #ruby
Jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tomphp has quit [Ping timeout: 250 seconds]
xall has joined #ruby
UserJosh has quit [Quit: Leaving]
LBRapid has joined #ruby
tylersmith has joined #ruby
vitd has joined #ruby
<LyndsySimon>
I've got some code that is shared between several codebases at work, and I'd like to centralize it somehow. How is that typically done in the Ruby community?
synthroid has joined #ruby
<LyndsySimon>
I could write a gem for it, but am unsure how to host it privately or whether or not that's the right approach.
wldcordeiro has quit [Ping timeout: 260 seconds]
yfeldblum has joined #ruby
Couch has quit [Ping timeout: 244 seconds]
theshitisay has joined #ruby
theshitisay has quit [Remote host closed the connection]
<darix>
LyndsySimon: private gem server
<darix>
LyndsySimon: it isnt rocket science to run that
vitd has quit [Ping timeout: 268 seconds]
<LyndsySimon>
darix: Fair enough, and I'm sure I can Google up how to set it up - but is that effort justified for the benefit if I've only got a single gem at the moment I want to distribute?
agent_white has joined #ruby
<darix>
LyndsySimon: i hope you just see it as a starting point to refactor out code into gems so you can share it more easily
Torrone has joined #ruby
<darix>
^^
<dminuoso>
LyndsySimon, here we simply use git.
djellemah has quit [Ping timeout: 260 seconds]
teotwaki has quit [Ping timeout: 240 seconds]
<ljarvis>
we use git too, pointing a Gemfile to a private git repo
<dminuoso>
LyndsySimon, commit releases into a release branch and then have Bundler point at it.
<LyndsySimon>
darix: Again, fair. I'm definitely trying to think longer-term here, but I don't anticipate that we'll have a ton of private gems floating around, ever. Maybe I'm wrong on that.
xall has quit [Ping timeout: 250 seconds]
<ljarvis>
no way i'm ever hosting a gem server
<dminuoso>
^-
<LyndsySimon>
ljarvis: that's the way I've done similar things in the past, with Python.
<dminuoso>
I mean if we were a company with a hundred ruby devs, sure - own gem server might be a thing.
BlueDragons has quit [Quit: Leaving]
<LyndsySimon>
It's possible of course to run a private PyPI server, but generally speaking the juice isn't worth the squeeze.
BlueDragons has joined #ruby
<dminuoso>
LyndsySimon, exactly. And since you are likely to have git anyway, you get this for free - together with tight access control through ssh keys.
BlueDragons has quit [Client Quit]
<LyndsySimon>
There's less than a dozen of us, and we probably won't cross twenty for a year or more.
BlueDragons has joined #ruby
teotwaki has joined #ruby
tdy1 is now known as tdy
tenderlove has quit []
nettoweb has joined #ruby
alibby1 has joined #ruby
alibby has quit [Ping timeout: 268 seconds]
User458764 has joined #ruby
bmurt has joined #ruby
knamehost has quit [Ping timeout: 240 seconds]
craigp_ has quit [Ping timeout: 240 seconds]
fivmo has joined #ruby
claudiuinberlin has quit []
elhu has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
wldcordeiro has joined #ruby
svankmajer has quit [Ping timeout: 268 seconds]
kobain has joined #ruby
brendan- has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
brendan- has joined #ruby
mvxlr has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<agent_white>
Mornin' folks
nankyokusei has joined #ruby
xall has joined #ruby
marxarelli has joined #ruby
amclain has quit [Quit: Leaving]
nitric has joined #ruby
destructure has quit [Changing host]
destructure has joined #ruby
nankyokusei has quit [Ping timeout: 260 seconds]
potatope has joined #ruby
raeoks has joined #ruby
nettoweb1 has joined #ruby
alibby has joined #ruby
nettoweb has quit [Ping timeout: 265 seconds]
Filiphe has quit [Remote host closed the connection]
iamvery has quit [Read error: Connection reset by peer]
yqt has joined #ruby
iamvery has joined #ruby
AnarchyAo has joined #ruby
mikecmpbll has joined #ruby
barajasfab has quit [Quit: Ex-Chat]
GodFather has joined #ruby
nonnatus has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
elifoster has joined #ruby
en0x has joined #ruby
<en0x>
hi
<havenwood>
en0x: hi
magellanicloud has joined #ruby
<en0x>
i'm lookin for some help. i have something like this: http://wklej.org/hash/2f073755b4e/ how can i achive the same each loop without specifying alpha beta in the array?
KnownSyntax has quit [Ping timeout: 240 seconds]
<havenwood>
en0x: settings.keys
skweek has joined #ruby
patarr has joined #ruby
<apeiros>
or settings.each do |service_name, service_data| …
<apeiros>
where service_data will contain the data you get via settings[service_name.to_sym]
TomyLobo has joined #ruby
patarr has quit [Client Quit]
jackjackdripper has joined #ruby
naftilos76 has quit [Quit: Αποχώρησε]
<en0x>
cool thanks havenwood and apeiros
_djbkd has quit [Remote host closed the connection]
KnownSyntax has joined #ruby
KnownSyntax has quit [Changing host]
KnownSyntax has joined #ruby
_djbkd has joined #ruby
patarr has joined #ruby
pokalyis has quit [Read error: Connection reset by peer]
pokalyis_ has joined #ruby
tylersmith has quit [Ping timeout: 240 seconds]
johnmilton has quit [Remote host closed the connection]
_djbkd has quit [Ping timeout: 260 seconds]
znz_jp has quit [Ping timeout: 240 seconds]
tylersmith has joined #ruby
User458764 has joined #ruby
Torrone has joined #ruby
cibs has quit [Ping timeout: 268 seconds]
f4cl3y has joined #ruby
platzhirsch has quit [Ping timeout: 260 seconds]
DoubleMalt has quit [Ping timeout: 265 seconds]
cibs has joined #ruby
djellemah has quit [Ping timeout: 268 seconds]
znz_jp has joined #ruby
nonnatus has joined #ruby
SeepingN has joined #ruby
pawnbox has quit [Remote host closed the connection]
platzhirsch has joined #ruby
loechel has joined #ruby
chouhoul_ has joined #ruby
loechel has quit [Remote host closed the connection]
User458764 has quit [Ping timeout: 250 seconds]
xall has quit [Ping timeout: 248 seconds]
loechel has joined #ruby
chouhou__ has joined #ruby
hutch34 has quit [Quit: WeeChat 1.5]
Giordano has joined #ruby
chouhoulis has quit [Ping timeout: 240 seconds]
cdg has joined #ruby
conta has quit [Ping timeout: 260 seconds]
hutch34 has joined #ruby
kitikonti has joined #ruby
chouhoul_ has quit [Ping timeout: 265 seconds]
pawnbox has joined #ruby
nonnatus has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Rodya_ has joined #ruby
dminuoso_ has joined #ruby
patarr has quit [Quit: patarr]
Derperperd has quit [Quit: Derperperd]
elhu has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Madplatypus has joined #ruby
elhu has joined #ruby
rippa has quit [Ping timeout: 265 seconds]
_djbkd has joined #ruby
sirfichi has joined #ruby
nopolitica has quit [Quit: leaving]
hutch34 has quit [Quit: WeeChat 1.5]
<sirfichi>
hey folks. I have a problem after updating some packages of my server. i think the problem is that pessanger (or something other) whants /var/lib/gems/2.1.0/$FOO, but the ruby version is 2.2 and the packages are in /var/lib/gems/2.2.0/$FOO. Is there a quick help to solve that problem? don't know which keywords are great for google =/
pawnbox has quit [Ping timeout: 260 seconds]
Zamyatin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
_whitelogger has joined #ruby
xall has joined #ruby
hutch34 has joined #ruby
ace05_ has quit [Ping timeout: 268 seconds]
djellemah has joined #ruby
Pumukel has quit [Read error: Network is unreachable]
Pumukel has joined #ruby
pokalyis has joined #ruby
ramfjord has joined #ruby
pawnbox has joined #ruby
<sonOfRa>
I'm writing a native extension, and I'm currently adding a class that shouldn't be constructible by the user of the library (it can be returned by function calls to the library, and it can be passed into the library). What's the best way to achieve this? Just make initialize a private method?
pokalyis_ has quit [Ping timeout: 248 seconds]
Ishido has quit [Quit: Roads? Where We're Going We Don't Need Roads.]
patarr has joined #ruby
<dminuoso>
sonOfRa, don't define new/alloc
claudiuinberlin has quit [Remote host closed the connection]
<dminuoso>
sonOfRa, or at least dont define these funcs for Ruby so that you can still construct it internally.
<bjensen82>
Hi guys, I have a simple example array = [1,7,4,9,33]; and I would like to make a oneliner to put them into the variables odd and even. I was kinda hoping that #group_by would work but it assigns everything into odd if I do odd, even = array.group_by{|d| d.odd?}
<sonOfRa>
dminuoso: is the alloc function not needed to assign the object to something else, or does that simply create another reference to the existing object?
<dminuoso>
sonOfRa, allocate merely returns an uninitialized object effectively
bjensen82 has quit []
pawnbox has joined #ruby
jenrzzz has joined #ruby
elhu has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
<sonOfRa>
Right. And do objects in general NEED an initialize method (even if it's private), or is it safe to not export that at all?
blackgoat has joined #ruby
Rodya_ has quit [Remote host closed the connection]
ta_ has joined #ruby
chrisja has joined #ruby
Dimik has quit [Ping timeout: 248 seconds]
ace05 has quit [Ping timeout: 240 seconds]
ace05 has joined #ruby
xall has quit [Ping timeout: 240 seconds]
skweek has quit [Ping timeout: 248 seconds]
vuoto has quit [Read error: Connection reset by peer]
duncannz has joined #ruby
claudiuinberlin has quit []
igniting has quit [Ping timeout: 248 seconds]
wrkrcoop has joined #ruby
airstream66 has joined #ruby
<wrkrcoop>
you know how ppl are always having problems with timezones … if you just use the unix timestamp does that solve most problems?
<wrkrcoop>
i feel like no matter what timezone the unix timestamp will always be the same
<dminuoso>
sonOfRa, why make it private.
<dminuoso>
sonOfRa, just dont expose it to Ruby at all.
<dminuoso>
sonOfRa, remember, you dont need to make it a Ruby method to be usable from C.
<dminuoso>
sonOfRa, making it private invites people to be smart and use .send()
pawnbox has quit [Ping timeout: 240 seconds]
<sonOfRa>
dminuoso: If that is OK, I'll do that, I was just wondering if ruby is "OK" with having classes without any constructor
<dminuoso>
sonOfRa, sure.
<dminuoso>
sonOfRa, Module is such a class.
Zamyatin has joined #ruby
<dminuoso>
Not not constructible.
<sonOfRa>
alrighty, no constructor it is. Thank you
f4cl3y has quit [Remote host closed the connection]
<dminuoso>
wrkrcoop, unix timestamps have that issue wrt leap seconds
<wrkrcoop>
wrt?
smlocal has joined #ruby
<dminuoso>
So if you don't need your timestamps to be monotone, then yeah - unix timestamps are great.
<dminuoso>
*monotonic
airstream66 has quit [Remote host closed the connection]
Platini has quit [Ping timeout: 250 seconds]
seventy has quit [Ping timeout: 260 seconds]
<dminuoso>
wrkrcoop, also if you are in need of storing timestamps before 1970 or after 2038 - the unix timestamp are problematic.
<dminuoso>
They are definitely good, but with their own problems.
<wrkrcoop>
thanks dminuoso
symm- has joined #ruby
symm- has quit [Client Quit]
Platini has joined #ruby
<sirfichi>
hey folks. I have a problem after updating some packages of my server. i think the problem is that pessanger (or something other) whants /var/lib/gems/2.1.0/$FOO, but the ruby version is 2.2 and the packages are in /var/lib/gems/2.2.0/$FOO. Is there a quick help to solve that problem? don't know which keywords are great for google =/
<dminuoso>
sirfichi, edit your apache config, and point passenger to the correct location.
<sirfichi>
dminuoso: thx
<miah>
might need to rebuild passenger too
<miah>
reasons to never use the system ruby
<dminuoso>
sirfichi, (or nginx of course, depending on which you are using)
tomphp has joined #ruby
synthroid has quit []
tomphp has quit [Client Quit]
Torrone has quit [Quit: This computer has gone to sleep]
Azure has quit [Ping timeout: 248 seconds]
Mia has quit [Read error: Connection reset by peer]
Azure has joined #ruby
Mia has joined #ruby
Mia has quit [Changing host]
Mia has joined #ruby
fmcgeough has quit [Quit: fmcgeough]
nonnatus has joined #ruby
Bounga has joined #ruby
gizmore has quit [Ping timeout: 260 seconds]
chadwtay_ has joined #ruby
symm- has joined #ruby
coolboy has joined #ruby
tcrypt[away] is now known as tcrypt
gizmore has joined #ruby
_whitelogger_ has joined #ruby
teotwaki_ has joined #ruby
tylersmi- has joined #ruby
LBRapid_ has joined #ruby
coolboy has quit [*.net *.split]
chadwtay_ has quit [*.net *.split]
blackgoat has quit [*.net *.split]
jenrzzz has quit [*.net *.split]
Pumukel has quit [*.net *.split]
_whitelogger has quit [*.net *.split]
sirfichi has quit [*.net *.split]
platzhirsch has quit [*.net *.split]
chouhou__ has quit [*.net *.split]
znz_jp has quit [*.net *.split]
tylersmith has quit [*.net *.split]
magellanicloud has quit [*.net *.split]
LBRapid has quit [*.net *.split]
arashb has quit [*.net *.split]
teotwaki has quit [*.net *.split]
craigp_ has quit [*.net *.split]
mtkd has quit [*.net *.split]
phredus has quit [*.net *.split]
bascht has quit [*.net *.split]
eliotk[m] has quit [*.net *.split]
meinside has quit [*.net *.split]
zidane_g has quit [*.net *.split]
alibby has quit [*.net *.split]
wldcordeiro has quit [*.net *.split]
fladson[m] has quit [*.net *.split]
cpfeilschifter[m has quit [*.net *.split]
M-manveru has quit [*.net *.split]
M-shine has quit [*.net *.split]
M-mistake has quit [*.net *.split]
harai_ has quit [*.net *.split]
alem0lars has quit [*.net *.split]
RTFM[away] has quit [*.net *.split]
sepp2k has quit [*.net *.split]
epochwolf has quit [*.net *.split]
Guest95198 has quit [*.net *.split]
oblique has quit [*.net *.split]
jxf has quit [*.net *.split]
Lyubo1 has quit [*.net *.split]
AndrewIsHere has quit [*.net *.split]
arooni has quit [*.net *.split]
ghostlight has quit [*.net *.split]
JackMc has quit [*.net *.split]
ramblinpeck has quit [*.net *.split]
blackjid has quit [*.net *.split]
iooner has quit [*.net *.split]
snapcase has quit [*.net *.split]
Scient has quit [*.net *.split]
sheepman has quit [*.net *.split]
kent\n has quit [*.net *.split]
A124 has quit [*.net *.split]
PaulCapestany has quit [*.net *.split]
twodayslate has quit [*.net *.split]
jlyndon has quit [*.net *.split]
rann has quit [*.net *.split]
tpendragon has quit [*.net *.split]
shiver has quit [*.net *.split]
tessi_zz has quit [*.net *.split]
cschneid- has quit [*.net *.split]
Seich_ has quit [*.net *.split]
teotwaki_ is now known as teotwaki
Pumukel_ is now known as Pumukel
epochwolf|2 is now known as epochwolf
LBRapid_ is now known as LBRapid
<al2o3-cr>
dave101: line 30 include? is spelt wrong
tessi_zz has joined #ruby
fladson[m] has joined #ruby
<dave101>
al2o3-cr: ffs thanks
wrkrcoop has quit [Quit: wrkrcoop]
ddddddd has joined #ruby
eliotk[m] has joined #ruby
mistergibson_ has joined #ruby
<al2o3-cr>
np :)
iooner has joined #ruby
ocbtec_ has joined #ruby
RTFM[away] has joined #ruby
sirfichi has joined #ruby
<dave101>
al2o3-cr: become blind to things if you stare at them for too long ...
Oclair has quit [Ping timeout: 265 seconds]
ocbtec has quit [Ping timeout: 265 seconds]
banisterfiend has quit [Ping timeout: 265 seconds]
sheepman_ has quit [Ping timeout: 265 seconds]
Zamyatin has quit [Ping timeout: 265 seconds]
ddffg has quit [Ping timeout: 265 seconds]
mistergibson has quit [Ping timeout: 265 seconds]
SCHAAP137 has quit [Ping timeout: 265 seconds]
hammond has quit [Ping timeout: 265 seconds]
cschneid_ has quit [Ping timeout: 265 seconds]
wrkrcoop has joined #ruby
harai_ has joined #ruby
SCHAAP137 has joined #ruby
bascht has joined #ruby
twodayslate has joined #ruby
bigkevmcd has quit [Ping timeout: 265 seconds]
JoshL has quit [Ping timeout: 265 seconds]
arooni_team_b is now known as arooni
hammond has joined #ruby
jxf_ is now known as jxf
sheepman has joined #ruby
alem0lar- has joined #ruby
craigp has quit [Ping timeout: 265 seconds]
KnownSyntax has quit [Ping timeout: 265 seconds]
iamvery has quit [Ping timeout: 265 seconds]
terlar has quit [Ping timeout: 250 seconds]
iamvery has joined #ruby
zidane_g_ has quit [Ping timeout: 260 seconds]
<al2o3-cr>
dave101: yep
AndrewIs_ has joined #ruby
rann has joined #ruby
bigkevmcd has joined #ruby
Dimik has joined #ruby
AndrewIs_ has quit [*.net *.split]
alem0lar- has quit [*.net *.split]
Cork has quit [*.net *.split]
adaedra has quit [*.net *.split]
sysanthrope has quit [*.net *.split]
ElderFain has quit [*.net *.split]
adambeynon has quit [*.net *.split]
skmp has quit [*.net *.split]
halfdan has quit [*.net *.split]
Tharbakim has quit [*.net *.split]
ujjain has quit [*.net *.split]
atmosx has quit [*.net *.split]
nyuszika7h has quit [*.net *.split]
Fernando-Basso has quit [*.net *.split]
raz has quit [*.net *.split]
majoh has quit [*.net *.split]
nebben has quit [*.net *.split]
ghr has quit [*.net *.split]
saneax-_-|AFK has quit [*.net *.split]
mjc_ has quit [*.net *.split]
joaomdmoura__ has quit [*.net *.split]
darthvorik has quit [*.net *.split]
zipkid has quit [*.net *.split]
podman has quit [*.net *.split]
Yonk has quit [*.net *.split]
poikon has quit [*.net *.split]
jidar has quit [*.net *.split]
blingrang has quit [*.net *.split]
sysanthrope has joined #ruby
JoshL has joined #ruby
ujjain has joined #ruby
ujjain has joined #ruby
ujjain has quit [Changing host]
spectra has joined #ruby
blingrang has joined #ruby
M-manveru has joined #ruby
cdg has quit [*.net *.split]
duncannz has quit [*.net *.split]
blackmesa has quit [*.net *.split]
potatope has quit [*.net *.split]
rakm has quit [*.net *.split]
ixti has quit [*.net *.split]
oblique has joined #ruby
techntoke_ has quit [Read error: Connection reset by peer]
zero7 has quit [Ping timeout: 260 seconds]
M-shine has joined #ruby
wldcordeiro has joined #ruby
cpfeilschifter[m has joined #ruby
meinside has joined #ruby
deimos has quit [Ping timeout: 260 seconds]
Eleeleth has quit [Ping timeout: 260 seconds]
nyuszika7h has joined #ruby
zidane_g_ has joined #ruby
zero7 has joined #ruby
craigp has joined #ruby
M-mistake has joined #ruby
KnownSyntax has joined #ruby
KnownSyntax has joined #ruby
KnownSyntax has quit [Changing host]
epistrephein has quit [Ping timeout: 260 seconds]
Cork has joined #ruby
jlyndon has joined #ruby
majoh has joined #ruby
atmosx has joined #ruby
Tharbakim has joined #ruby
skmp has joined #ruby
raz has joined #ruby
adaedra has joined #ruby
halfdan has joined #ruby
nebben has joined #ruby
Fernando-Basso has joined #ruby
alem0lar- has joined #ruby
adambeynon has joined #ruby
ElderFain has joined #ruby
AndrewIs_ has joined #ruby
ghr has joined #ruby
mjc_ has joined #ruby
saneax-_-|AFK has joined #ruby
podman has joined #ruby
zipkid has joined #ruby
joaomdmoura__ has joined #ruby
darthvorik has joined #ruby
Yonk has joined #ruby
jidar has joined #ruby
poikon has joined #ruby
elifoster has quit [Quit: class]
Eleeleth has joined #ruby
ramblinpeck has joined #ruby
techntoke_ has joined #ruby
ramblinpeck has joined #ruby
deimos has joined #ruby
ramblinpeck has quit [Changing host]
techntoke_ has joined #ruby
techntoke_ has quit [Changing host]
tomaw is now known as 02HAAAAAB
Guest68051 is now known as olspookishmagus
epistrephein has joined #ruby
ace05 has quit [Read error: Connection reset by peer]
tpendragon has joined #ruby
blackjid has joined #ruby
jlyndon has quit [Max SendQ exceeded]
nettoweb has joined #ruby
pwnd_nsfw` has joined #ruby
Bounga has quit [Ping timeout: 260 seconds]
02HAAAAAB is now known as tomaw
petervo has quit [Read error: Connection reset by peer]
dminuoso_ has quit [Ping timeout: 260 seconds]
navycrosser has quit [Ping timeout: 250 seconds]
jlyndon has joined #ruby
Xeago has quit [Ping timeout: 260 seconds]
ramortegui has quit [Quit: Ex-Chat]
pwnd_nsfw has quit [Ping timeout: 260 seconds]
snapcase has joined #ruby
JackMc has joined #ruby
Xeago has joined #ruby
chadwtay_ has joined #ruby
JeanCarloMachado has quit [Ping timeout: 260 seconds]
chadwtaylor has quit [Read error: Connection reset by peer]
chadwta__ has quit [Read error: No route to host]
chadwtaylor has joined #ruby
ace05 has joined #ruby
Jackneill has quit [Remote host closed the connection]
ghostlight_ is now known as ghostlight
djellemah has quit [Ping timeout: 248 seconds]
MadWasp has quit [Ping timeout: 260 seconds]
nofxx has joined #ruby
nofxx has joined #ruby
nofxx has quit [Changing host]
Wizznt has joined #ruby
ddddddd has quit [Quit: Leaving]
chadwtay_ has quit [Ping timeout: 258 seconds]
chadwtay_ has joined #ruby
chadwta__ has joined #ruby
chadwtaylor has quit [Read error: No route to host]
MadWasp has joined #ruby
mistergibson_ has quit [Quit: Leaving]
<dave101>
I have used %w(a A b B).include? could you do %i(1 2 3 4 5 6 7 8 9 10).include? in the same fashin?
<dave101>
instead of saying letters im saying numbers..
[Butch] has quit [Quit: I'm out . . .]
<ytti>
%i isn't numbers, it's symbols
<dave101>
right, so how do i say 'if 1 or 2'.include?
<ytti>
[1,2,3].include? 2
<al2o3-cr>
dave101: you could do (1..10).include?(5)
<zenspider>
the ruby side is basically done... it could use some cleanup and maybe some extra expansions, but it is good enough for now. you can test it with `ri_search.rb assert_` or `ri_search.rb Benchmark::`
<zenspider>
the problem is the tab completion code is wonky... I had to steal a bunch from the bash_completion package (which I stripped heavily)
alibby has quit [Quit: Leaving.]
<zenspider>
and now when you complete "Benchmark::IPS." it comes back with nothing because it is stripping at the last colon (which is good) and for some reason not passing enough data to ri_search.rb (which is bad)... so it expands to nothnig
Felipe__ has joined #ruby
twalla has joined #ruby
patarr has quit [Ping timeout: 248 seconds]
SeepingN has quit [Quit: The system is going down for reboot NOW!]