apeiros changed the topic of #ruby-lang to: Nick registration required to talk || Ruby 2.0.0-p247: http://ruby-lang.org (Ruby 1.9.3-p448) || Paste >3 lines of text on http://gist.github.com
Gaelan is now known as GaelanAintAround
qba73 has quit [Remote host closed the connection]
lfox has quit [Quit: ZZZzzz…]
richardburton has quit [Ping timeout: 264 seconds]
kek has quit [Remote host closed the connection]
richardburton has joined #ruby-lang
GaelanAintAround is now known as Gaelan
flip_digits has quit [Remote host closed the connection]
flip_digits has joined #ruby-lang
flip_digits has quit [Read error: Connection reset by peer]
flip_digits has joined #ruby-lang
shinnya has joined #ruby-lang
Gaelan is now known as GaelanAintAround
jinslee has joined #ruby-lang
jinslee has left #ruby-lang [#ruby-lang]
benanne has quit [Quit: kbai]
jinslee has joined #ruby-lang
elia has quit [Quit: Computer has gone to sleep.]
ssb123 has joined #ruby-lang
lfox has joined #ruby-lang
jinslee has left #ruby-lang [#ruby-lang]
jinl has joined #ruby-lang
elia has joined #ruby-lang
ssb123 has quit [Remote host closed the connection]
ssb123 has joined #ruby-lang
RickHull1 has quit [Quit: Leaving.]
mdedetrich has joined #ruby-lang
Squarepy has quit [Read error: Operation timed out]
mac___ has quit [Remote host closed the connection]
mac___ has joined #ruby-lang
mac___ has quit [Read error: Connection reset by peer]
mac___ has joined #ruby-lang
jarm has quit [Read error: Connection reset by peer]
jarm has joined #ruby-lang
jarm has quit [Read error: Connection reset by peer]
jarm has joined #ruby-lang
GeissT has joined #ruby-lang
fosky has joined #ruby-lang
hashkey has joined #ruby-lang
Squarepy has joined #ruby-lang
ykk` has joined #ruby-lang
ykk` has quit [Client Quit]
GaelanAintAround is now known as Gaelan
arBmind1 has joined #ruby-lang
lsegal has quit [Quit: Quit: Quit: Quit: Stack Overflow.]
mucker has quit [Remote host closed the connection]
mucker has joined #ruby-lang
arBmind has quit [Ping timeout: 240 seconds]
RickHull1 has joined #ruby-lang
ItSANgo has quit [Read error: Connection reset by peer]
ItSANgo_ has joined #ruby-lang
mucker has quit [Ping timeout: 264 seconds]
arBmind1 has quit [Quit: Leaving.]
jarm has quit [Ping timeout: 260 seconds]
fosky has quit [Ping timeout: 264 seconds]
JoshuaPaling has joined #ruby-lang
fakeer has joined #ruby-lang
ykk` has joined #ruby-lang
Squarepy has quit [Ping timeout: 252 seconds]
jinl has quit [Ping timeout: 264 seconds]
symm- has quit [Ping timeout: 240 seconds]
<fakeer> On Mac I am trying to install Jekyll. I have latest `Command Lines Tools`installed but not xCode(IDE etc). I am getting this: https://gist.github.com/6848285. Is it because XCode is not installed, or some other problem?
nertzy has joined #ruby-lang
ruby-lang879 has joined #ruby-lang
<flip_digits> hello
<flip_digits> I would install xcode and open it. i think you need to accept the license agreement
flip_digits has quit [Remote host closed the connection]
ruby-lang879 has quit [Ping timeout: 250 seconds]
ssb123 has quit [Remote host closed the connection]
lsegal has joined #ruby-lang
nertzy has quit [Ping timeout: 252 seconds]
elia has quit [Quit: Computer has gone to sleep.]
richardburton has quit [Ping timeout: 256 seconds]
yfeldblum has quit [Read error: Connection reset by peer]
yfeldblum has joined #ruby-lang
jinl has joined #ruby-lang
<Barrin6> any of you folks program on ubuntu?
jxie has quit [Read error: Connection reset by peer]
jxie has joined #ruby-lang
Gaelan is now known as GaelanAintAround
franckverrot has quit [Ping timeout: 240 seconds]
vadviktor has quit [Read error: Operation timed out]
jds has quit [Ping timeout: 240 seconds]
vadviktor has joined #ruby-lang
jds has joined #ruby-lang
franckverrot has joined #ruby-lang
JoshuaPaling has quit [Quit: Textual IRC Client: www.textualapp.com]
captain_chen has quit [Quit: Page closed]
jinl has quit [Ping timeout: 245 seconds]
bf4 has joined #ruby-lang
jonathanmarvens has joined #ruby-lang
cads has joined #ruby-lang
sepp2k1 has quit [Read error: Connection reset by peer]
jinl has joined #ruby-lang
diegoviola has joined #ruby-lang
alexju has quit [Remote host closed the connection]
alexju has joined #ruby-lang
rue|w has joined #ruby-lang
lsegal has quit [Quit: Quit: Quit: Quit: Stack Overflow.]
relix has joined #ruby-lang
Harzilein has quit [Ping timeout: 248 seconds]
rue_XIW has quit [Ping timeout: 248 seconds]
alexju has quit [Ping timeout: 256 seconds]
KM has quit [Read error: Connection reset by peer]
jarib has quit [Ping timeout: 248 seconds]
jarib has joined #ruby-lang
arooni has quit [Ping timeout: 256 seconds]
grough has quit []
KM has joined #ruby-lang
lfox has quit [Quit: ZZZzzz…]
arooni has joined #ruby-lang
fakeer has left #ruby-lang [#ruby-lang]
<xybre> Barrin6: Sometimes
jefflyne has joined #ruby-lang
roadt_ has quit [Ping timeout: 240 seconds]
mdedetrich has quit [Quit: Computer has gone to sleep.]
jeff_r has joined #ruby-lang
jefflyne has quit [Quit: WeeChat 0.4.1]
jefflyne has joined #ruby-lang
jefflyne has quit [Client Quit]
jefflyne has joined #ruby-lang
jinl has quit [Ping timeout: 246 seconds]
tkuchiki has joined #ruby-lang
postmodern has joined #ruby-lang
mucker has joined #ruby-lang
nofxx has quit [Ping timeout: 245 seconds]
Barrin6 has quit [Read error: Connection reset by peer]
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nathanstitt has quit [Quit: I growing sleepy]
alexju has joined #ruby-lang
jeff_r has quit [Remote host closed the connection]
grough has joined #ruby-lang
nofxx has joined #ruby-lang
iliketurtles has joined #ruby-lang
RickHull1 has quit [Quit: Leaving.]
iliketurtles has quit [Ping timeout: 245 seconds]
jinl has joined #ruby-lang
nisstyre has quit [Quit: Leaving]
jeff_r has joined #ruby-lang
arooni has quit [Ping timeout: 246 seconds]
jinl has quit [Quit: leaving]
jinl has joined #ruby-lang
jinl has quit [Client Quit]
RickHull1 has joined #ruby-lang
roadt_ has joined #ruby-lang
alexju has quit [Remote host closed the connection]
lguardiola has quit [Ping timeout: 248 seconds]
bzalasky has joined #ruby-lang
lguardiola has joined #ruby-lang
hexreel has quit [Ping timeout: 248 seconds]
waxjar has quit [Ping timeout: 248 seconds]
charliesome has joined #ruby-lang
hexreel has joined #ruby-lang
waxjar has joined #ruby-lang
mj12albert has quit []
rikai has joined #ruby-lang
iliketurtles has joined #ruby-lang
banisterfiend has quit [Quit: Computer has gone to sleep.]
rikai_ has quit [Ping timeout: 240 seconds]
sevvie_ has joined #ruby-lang
sevvie has quit [Disconnected by services]
sevvie_ has left #ruby-lang [#ruby-lang]
banisterfiend has joined #ruby-lang
mdedetrich has joined #ruby-lang
kurko_ has joined #ruby-lang
rikai_ has joined #ruby-lang
kurko_ has quit [Ping timeout: 252 seconds]
kurko_ has joined #ruby-lang
rikai has quit [Ping timeout: 260 seconds]
rikai has joined #ruby-lang
bzalasky has quit [Remote host closed the connection]
bzalasky has joined #ruby-lang
rikai_ has quit [Ping timeout: 252 seconds]
rikai_ has joined #ruby-lang
rikai_ has quit [Read error: Connection reset by peer]
bzalasky has quit [Ping timeout: 240 seconds]
rikai has quit [Ping timeout: 240 seconds]
mucker has quit [Remote host closed the connection]
mucker has joined #ruby-lang
amerine has joined #ruby-lang
mucker has quit [Ping timeout: 256 seconds]
amerine has quit [Ping timeout: 264 seconds]
Forgetful_Lion_ has joined #ruby-lang
Forgetful_Lion has quit [Ping timeout: 264 seconds]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jonathanmarvens has quit [Remote host closed the connection]
jeff_r has quit [Remote host closed the connection]
charliesome has joined #ruby-lang
lsegal has joined #ruby-lang
GaelanAintAround is now known as Gaelan
kurko_ has quit [Ping timeout: 252 seconds]
mdedetrich has quit [Quit: Computer has gone to sleep.]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
kurko_ has joined #ruby-lang
Gaelan is now known as GaelanAintAround
GaelanAintAround is now known as Gaelan
roadt__ has joined #ruby-lang
hhatch has joined #ruby-lang
roadt_ has quit [Read error: Operation timed out]
charliesome has joined #ruby-lang
charliesome has quit [Client Quit]
hogeo has joined #ruby-lang
mistym has joined #ruby-lang
tesseract-2 has joined #ruby-lang
tesseract-2 has left #ruby-lang [#ruby-lang]
Gaelan is now known as GaelanAintAround
nofxx has quit [Ping timeout: 264 seconds]
a1ph4g33k has joined #ruby-lang
kurko_ has quit [Ping timeout: 246 seconds]
kurko_ has joined #ruby-lang
bzalasky has joined #ruby-lang
rippa has joined #ruby-lang
bfleischer has quit [Quit: leaving]
kurko_ has quit [Quit: Computer has gone to sleep.]
iliketurtles has quit [Quit: zzzzz…..]
jithu has joined #ruby-lang
bzalasky has quit [Remote host closed the connection]
dhruvasagar has joined #ruby-lang
bzalasky has joined #ruby-lang
jeff_r has joined #ruby-lang
Bosox20051 has joined #ruby-lang
banisterfiend has quit [Quit: Computer has gone to sleep.]
bzalasky has quit [Ping timeout: 264 seconds]
jeff_r has quit [Ping timeout: 264 seconds]
mistym has quit [Remote host closed the connection]
iliketurtles has joined #ruby-lang
mistym has joined #ruby-lang
ykk` has quit [Quit: ykk`]
ykk` has joined #ruby-lang
ykk` has quit [Client Quit]
adambeynon has joined #ruby-lang
iliketurtles has quit [Quit: zzzzz…..]
adambeynon has quit [Quit: Textual IRC Client: www.textualapp.com]
vimetus has joined #ruby-lang
workmad3 has joined #ruby-lang
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
mdst has joined #ruby-lang
mdst3 has quit [Read error: Connection reset by peer]
qba73 has joined #ruby-lang
diegoviola has quit [Quit: WeeChat 0.4.1]
jonathanmarvens has joined #ruby-lang
a1ph4g33k has quit [Read error: Connection reset by peer]
banisterfiend has joined #ruby-lang
workmad3 has quit [Ping timeout: 246 seconds]
hogeo has quit [Remote host closed the connection]
hogeo has joined #ruby-lang
wallerdev has quit [Quit: wallerdev]
hogeo has quit [Ping timeout: 240 seconds]
tonni has joined #ruby-lang
TTilus has joined #ruby-lang
GeissT has quit [Read error: Connection reset by peer]
GeissT has joined #ruby-lang
Tearan has quit [Quit: Sleepy Badger....]
fosky has joined #ruby-lang
adambeynon has joined #ruby-lang
CoreData has joined #ruby-lang
Tearan has joined #ruby-lang
heftig has quit [Ping timeout: 245 seconds]
heftig has joined #ruby-lang
Nss has joined #ruby-lang
tbuehlmann has joined #ruby-lang
CoreData has quit [Ping timeout: 240 seconds]
Squarepy has joined #ruby-lang
MrZYX|off is now known as MrZYX
Coincidental has quit [Remote host closed the connection]
Coincidental has joined #ruby-lang
Coincidental has quit [Ping timeout: 256 seconds]
VTLob has joined #ruby-lang
mucker has joined #ruby-lang
hashkey has quit [Quit: Leaving]
jefflyne has quit [Ping timeout: 252 seconds]
arooni-mobile has joined #ruby-lang
relix has joined #ruby-lang
arooni-mobile has quit [Ping timeout: 264 seconds]
thebastl has joined #ruby-lang
pellenation has joined #ruby-lang
thebastl has quit [Read error: Connection reset by peer]
pellenation has quit [Client Quit]
mistym has quit [Remote host closed the connection]
postmodern has quit [Quit: Leaving]
postmodern has joined #ruby-lang
<ddfreyne> Important service announcement: http://twitter.com/ddfreyne/status/386788304630595584
fosky has quit [Ping timeout: 245 seconds]
* Nilium curses ddfreyne with spider hatchlings in his armpits' skin pores
apeiros has quit [Remote host closed the connection]
apeiros has joined #ruby-lang
<ddfreyne> Ew.
dhruvasagar has quit [Ping timeout: 264 seconds]
mucker has quit [Remote host closed the connection]
<igalic> I'm getting this error: Error: undefined method `grep' for "true":String
<igalic> Do I understand this correctly, that grep is a method of enumerable?
<apeiros> yes
<ddfreyne> igalic: String is not an Enumerable in recent versions of Ruby (1.9.0+ I believe)
<apeiros> and String is not Enumerable
<apeiros> .each_line.grep
<ddfreyne> igalic: You can convert a String into an Enumerable by calling #lines or #chars
<ddfreyne> Or yeah, #each_* is better
<apeiros> ddfreyne: no. #lines will return an array (not sure whether in 2.0 already or only as of 2.1)
<igalic> The code I'm editing here looks like so:
<apeiros> 2.0 already
<apeiros> (just checked)
<igalic> tmparg='--virt-auto-boot=1' if value.to_s.grep(/false/i).empty?
<igalic> which of course fails madly.
<igalic> (On 1.9.3)
<ddfreyne> apeiros: It'll still work, because it is Enumerable
<igalic> So what's a ruby 1.8 - 2.1 compatible manner of doing this?
<ddfreyne> igalic: You can use "if value.to_s =~ /false/i"
<apeiros> ddfreyne: right. you create a potentially large array with all the strings, though.
<ddfreyne> apeiros: Indeed
<igalic> I believe that value at prior to .to_s is possibly a symbol (:true, :false) or something else entirely.
<igalic> ddfreyne: ACK.
<ddfreyne> Can you be more certain about the value of value?
<ddfreyne> (Worst sentence I'll write today)
<igalic> ddfreyne: after watching The Value of Values, I.. could, but not in Ruby.
<ddfreyne> igalic: Clojure?
<igalic> ddfreyne: yes.
<igalic> (I don't speak Clojure.. or any functional language, yet.)
<ddfreyne> Rich Hickey has the best hair in the world
<ddfreyne> I use Clojure at work :)
<igalic> hrm.. does ruby have a += for strings?
<ddfreyne> igalic: yes, because it is just syntactic sugar for x = x + y
<ddfreyne> igalic: It does not modify the string, but generates a new one
<ddfreyne> igalic: #<< will modify the string
<igalic> tmparg='--virt-auto-boot=' += if value.to_s =~ /false/i then '1' else '0' end says: unexpected tOP_ASGN, expecting keyword_end
<igalic> Which of those new-age functional programming languages on the JVM was it that has that FRIGHTENING type system?
<xybre> Java?
<igalic> haaah.
yfeldblum has quit [Ping timeout: 246 seconds]
<ddfreyne> igalic: Add () around the if...end
lsegal has quit [Quit: Quit: Quit: Quit: Stack Overflow.]
<igalic> ddfreyne: nah..I did the += wrong -_- foo = bar += baz << this doesn't work.
Mon_Ouie has quit [Ping timeout: 264 seconds]
hhatch has quit [Read error: Operation timed out]
hhatch has joined #ruby-lang
mucker has joined #ruby-lang
arBmind has joined #ruby-lang
<matled> igalic: if you really want to do that: x += (if true then "a" else "b" end)
<matled> oh, ddfreyne said that already
<igalic> matled: tmparg='--virt-auto-boot=' + if value.to_s =~ /false/i then '1' else '0' end
<matled> I'd rather put that into a helper method and go args = "--foo=" + to_bool_arg(value), or something along the lines
<igalic> matled: and so would I. except, that'd be a one-shot method, because sometimes this thing accepts only 0/1, and sometimes it's fine with true/false.
yfeldblum has joined #ruby-lang
<igalic> So I'd have loads of helper methods..
Mon_Ouie has joined #ruby-lang
jiuweigui has joined #ruby-lang
toretore has joined #ruby-lang
benanne has joined #ruby-lang
Squarepy has quit [Ping timeout: 240 seconds]
yfeldblum has quit [Ping timeout: 245 seconds]
dhruvasagar has joined #ruby-lang
michael_mbp has joined #ruby-lang
michael_mbp has left #ruby-lang [#ruby-lang]
jefflyne has joined #ruby-lang
hramrach has quit [Ping timeout: 240 seconds]
<ddfreyne> I am tempted to drop Ruby 1.9.x support for this project... wondering whether that is a smart thing to do ;)
<ddfreyne> (It'll be finished in Q1 2014 at the earliest)
hramrach has joined #ruby-lang
schaerli has joined #ruby-lang
MaddinXx_ has joined #ruby-lang
jonjames has joined #ruby-lang
omninonsense_ has joined #ruby-lang
omninonsense_ has quit [Remote host closed the connection]
omninonsense_ has joined #ruby-lang
omninonsense_ has left #ruby-lang [#ruby-lang]
jxie has quit [Quit: leaving]
[spoiler] has joined #ruby-lang
cads has quit [Ping timeout: 260 seconds]
arBmind has quit [Quit: Leaving.]
ledestin has quit [Quit: ledestin]
<[spoiler]> Did anyone ever attempt to use opal.rb (http://opalrb.org/) in productiopn?
<[spoiler]> production*
<adambeynon> [spoiler]: we have a few sites that are using it (Im the author, btw)
<adambeynon> and there are a few other people using it
<[spoiler]> adambeynon: Oh, that's great! I played with it a lot, and it seemed pretty robust, but I thought I'd ask here anyway. :-) It's great work, by the way!
<adambeynon> thanks! I will update the website with a link to some apps/sites using opal to get an idea of who is using it. I've got to go, but ping me if you need any help/direction etc
dhruvasagar has quit [Ping timeout: 245 seconds]
symm- has joined #ruby-lang
rikai has joined #ruby-lang
ruby-lang402 has joined #ruby-lang
michi has joined #ruby-lang
ruby-lang402 has quit [Client Quit]
michi is now known as Guest38073
Guest38073 has left #ruby-lang [#ruby-lang]
Oak has joined #ruby-lang
micho has joined #ruby-lang
jefflyne has quit [Ping timeout: 245 seconds]
rippa has joined #ruby-lang
rippa has quit [Client Quit]
<micho> is keeping, all the references to instances of class, in class variable, a good idea?
<ddfreyne> micho: No, because you'll prevent the garbage collector from ever reclaiming that memory
<ddfreyne> micho: An alternative would be weak references, but I think you should reconsider your approach
<ddfreyne> micho: Can you explain why you need that?
<micho> sure. I am making a sinatra app, which downloads info of about ~30 users from API, and output them(somehow parsed) in many ways.
<micho> I have a class which downloads the data and creates a single instances of Users class, and fills them
<[spoiler]> micho: if you think you will need to keep that data indefinitely, then you should store them. If you think they're a one-time thing I can't possibly think of a reason why you'd store them
<micho> I'll refresh them every minute
<ddfreyne> micho: I'd create a UsersCache, maybe with a #refresh method
<micho> what UsersCache would be? a class?
<micho> I'd like to call them like Users.all, but I don't want to bring all active record from Rails, I won't use any database
<ddfreyne> A class that you instantiate and it would store the user information at the instance level
<[spoiler]> Well, if you have something like: @@users_cache = [User, User, User, User, User], and if you override/replace the array, then the GC will clean it up eventually
<ddfreyne> micho: Classes should never have state. Singletons are evil if they have state, classes are singletons, and classes with state are evil.
mbj has joined #ruby-lang
<micho> so @@users_cache = [User, User, User...] is a good approach, or not? It was my primary idea.
<ddfreyne> I would advise against that
<micho> we're talking about keeping like <100 users this way
<ddfreyne> micho: It might be <100 users today, but it's a good thing to keep scalability in mind, because things tend to grow anyway
<micho> sure, it's just why I am asking
<[spoiler]> I don't think there's anything wrong with it? If you remove the user out of users_cache, the GC will destroy the User object, if you replace @@users_cache with a completely new array, the User objects will be destroyed, but a bit later, I reckon
<ddfreyne> Besides, applying good practices is always a good idea. That means *not* having global state, and @@users_cache is global state and you should avoid that.
<micho> ok, so I'll need to call Downloader, that way: cache = Services::API_Parser.new; tallest_users = Services::API_Parser.tallest_users(cache) ?
<micho> *Downloader = API_Parser, just to give the name better meaning
<[spoiler]> ddfreyne: What would be the alternative approach, then? Having a UsersCache doesn't solve the problem, ihmo.
<[spoiler]> I could only think of ObjectSpace.each_object User {|u| ... }, but that's definitely a bad idea
<ddfreyne> [spoiler]: I believe it does.
<ddfreyne> Yeah, avoid that at all costs
<micho> I thought about something like Users#all_objects, but such a thing doesn't exist yet
<micho> guys I'll be back in 20 minutes
<ddfreyne> Something like that, maybe?
<lupine> identity map
roadt__ has quit [Quit: 暂离]
<[spoiler]> ddfreyne: Isn't this similar to storing them in an array, though?
<ddfreyne> [spoiler]: Sure
<ddfreyne> [spoiler]: My main concern is using global state
<[spoiler]> ddfreyne: I must admit, the performance benefit completely eludes me. Apart from there being a global state (which, for the given example I think is perfectly acceptable), I genuinely can't fathom why an array is a bad idea!
<ddfreyne> [spoiler]: I'm not complaining about the array itself, but I am complaining about global state
<lupine> lookups will scale O(n)
<ddfreyne> It's not perfectly acceptable because global state makes testing a lot harder than it should be
<lupine> global state is pretty meh
<ddfreyne> (Actually, arrays are not quite OK because as lupine says, searching through that will take O(n))
<lupine> but it keeps line count down
postmodern has quit [Quit: Leaving]
<[spoiler]> lupine: but, wouldn't the lookup increase with the UsersStore+UsersCache method, too? I'm just curious
<lupine> hash keyed by id - or a set - would be fine
<ddfreyne> [spoiler]: It all depends on your use case.
<ddfreyne> If you want to look up users by ID, you need a mapping of ID->user for which a hash is a good data structure, as opposed to an array
<[spoiler]> Oh, I completely agree with that, but I assumed he didn't need to look-up individual users. The way I understood it was: he just wanted to have a list and export the users in some form
bastilian has joined #ruby-lang
<ddfreyne> Again, depends on the use case. Just avoid global state :)
<ddfreyne> Class variables shoud never have existed in the first place IMO
<[spoiler]> Can you portray a short example where (or when or how or all of the afformentioned) global state is bad? I know why global *variables* are bad, no idea about global states, though. I always thought it's useful to keep track of things
symm- has quit [Ping timeout: 256 seconds]
<lupine> global variables are just one form of global state. they're bad for the same reasons
<lupine> I've just tried, and can't think of a good use for @@vars
<[spoiler]> Well, global variables are bad because they pollute the namespace (afaik, that's the only bad thing about them).
<[spoiler]> Oh, and I suppose, if it's a multi-threaded app, you'd have to be careful which thread writes-reads from it, and in the the case of multiple back-ends, the state won't be that *global* across all backends
stamina has joined #ruby-lang
<micho> I am back
rondale_sc has quit [Quit: leaving]
<micho> now parsing in my mind, what you have wrote
<micho> (thanks for answers for all of you)
<[spoiler]> Oh, welcome back! :D
fijimunkii has quit [Quit: Lost terminal]
fosky has joined #ruby-lang
fijimunkii has joined #ruby-lang
Oak has quit [Ping timeout: 240 seconds]
eponymi has joined #ruby-lang
stamina has quit [Ping timeout: 246 seconds]
fosky has quit [Ping timeout: 252 seconds]
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
eponymi has quit [Quit: Colloquy for iPhone - http://colloquy.mobi]
nazty has quit [Quit: Leaving]
kurko_ has joined #ruby-lang
kurko_ has quit [Ping timeout: 240 seconds]
mucker has quit [Remote host closed the connection]
mbj has quit [Quit: leaving]
kurko_ has joined #ruby-lang
mucker has joined #ruby-lang
jefflyne has joined #ruby-lang
havenwood has joined #ruby-lang
relix has joined #ruby-lang
sepp2k has joined #ruby-lang
rippa has joined #ruby-lang
wallerdev has joined #ruby-lang
jinslee has joined #ruby-lang
hhatch has quit [Ping timeout: 245 seconds]
nathanstitt has joined #ruby-lang
GaelanAintAround is now known as Gaelan
banisterfiend has quit [Quit: Computer has gone to sleep.]
dhruvasagar has joined #ruby-lang
jinslee has quit [Ping timeout: 264 seconds]
Mon_Ouie has quit [Ping timeout: 240 seconds]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
banisterfiend has joined #ruby-lang
jithu has quit [Quit: Mother, did it need to be so high?]
wallerdev has quit [Quit: wallerdev]
nertzy has joined #ruby-lang
jxie has joined #ruby-lang
jefflyne has quit [Ping timeout: 264 seconds]
arooni-mobile has joined #ruby-lang
jonjames has quit [Ping timeout: 240 seconds]
stamina has joined #ruby-lang
sevvie has joined #ruby-lang
Gaelan is now known as GaelanAintAround
nertzy has quit [Quit: This computer has gone to sleep]
soba_ has joined #ruby-lang
soba__ has joined #ruby-lang
soba_ has quit [Ping timeout: 240 seconds]
nofxx has joined #ruby-lang
wallerdev has joined #ruby-lang
sepp2k has quit [Quit: Leaving.]
hogeo has joined #ruby-lang
skade has joined #ruby-lang
bzalasky has joined #ruby-lang
Plyturon has joined #ruby-lang
rippa has joined #ruby-lang
qba73 has quit [Remote host closed the connection]
hogeo has quit [Remote host closed the connection]
hogeo has joined #ruby-lang
hogeo has quit [Ping timeout: 245 seconds]
dhruvasagar has quit [Ping timeout: 264 seconds]
mac___ has quit [Remote host closed the connection]
mac___ has joined #ruby-lang
mac___ has quit [Read error: Connection reset by peer]
mac___ has joined #ruby-lang
bzalasky has quit [Remote host closed the connection]
bzalasky has joined #ruby-lang
[spoiler] has quit [Quit: [spoiler]]
bzalasky has quit [Ping timeout: 260 seconds]
bzalasky has joined #ruby-lang
shinnya has quit [Ping timeout: 252 seconds]
bzalasky has quit [Remote host closed the connection]
bzalasky has joined #ruby-lang
user64 has joined #ruby-lang
mac___ has quit [Remote host closed the connection]
user64 has quit [Remote host closed the connection]
kenta_ has quit [Remote host closed the connection]
dmitrykorotkov has joined #ruby-lang
kenta_ has joined #ruby-lang
bzalasky has quit [Ping timeout: 245 seconds]
dmitrykorotkov__ has quit [Ping timeout: 252 seconds]
schaerli has quit [Remote host closed the connection]
kenta_ has quit [Ping timeout: 256 seconds]
jeff_r has joined #ruby-lang
symm- has joined #ruby-lang
jinslee has joined #ruby-lang
mucker has quit [Remote host closed the connection]
schaerli has joined #ruby-lang
rue_XIV has quit [Remote host closed the connection]
rue has joined #ruby-lang
mucker has joined #ruby-lang
arooni-mobile has quit [Ping timeout: 245 seconds]
violarium has joined #ruby-lang
rue_XIV has joined #ruby-lang
rue has quit [Read error: Operation timed out]
soba__ has quit [Read error: Connection reset by peer]
vimetus has quit [Ping timeout: 260 seconds]
imperator has left #ruby-lang ["Leaving"]
arBmind has joined #ruby-lang
tkuchiki has quit [Remote host closed the connection]
tkuchiki has joined #ruby-lang
jeff_r has quit [Remote host closed the connection]
tkuchiki has quit [Ping timeout: 240 seconds]
arooni-mobile has joined #ruby-lang
benanne has quit [Quit: kbai]
bzalasky has joined #ruby-lang
sepp2k has joined #ruby-lang
qba73 has joined #ruby-lang
[spoiler] has joined #ruby-lang
dhruvasagar has joined #ruby-lang
Plyturon has quit [Quit: Leaving]
jithu has joined #ruby-lang
kurko_ has quit [Ping timeout: 260 seconds]
kurko_ has joined #ruby-lang
nisstyre has joined #ruby-lang
jefflyne has joined #ruby-lang
dhruvasagar has quit [Ping timeout: 256 seconds]
tomzx_mac has joined #ruby-lang
schaerli has quit [Remote host closed the connection]
schaerli has joined #ruby-lang
hakunin_ is now known as hakunin
grough has quit []
schaerli has quit [Ping timeout: 264 seconds]
bzalasky has quit [Remote host closed the connection]
bzalasky has joined #ruby-lang
bzalasky has quit [Ping timeout: 256 seconds]
workmad3 has joined #ruby-lang
grough has joined #ruby-lang
jinslee has quit [Ping timeout: 240 seconds]
tbuehlmann has quit [Remote host closed the connection]
Johz has joined #ruby-lang
Bosox20051 has quit [Remote host closed the connection]
axsuul has joined #ruby-lang
bf4 has quit [Ping timeout: 240 seconds]
sush24 has joined #ruby-lang
dsferreira has quit [Quit: Leaving]
sharma_ has joined #ruby-lang
sush24 has quit [Ping timeout: 256 seconds]
workmad3 has quit [Ping timeout: 245 seconds]
yxhuvud has quit [Quit: Leaving]
axsuul has quit [Ping timeout: 240 seconds]
sharma_ has quit [Ping timeout: 245 seconds]
micalexander has joined #ruby-lang
<micalexander> I'm writing a program the allows a user to drag a folder into the terminal in order to retrieve the directory path, however if the user has a folder with a space in the name I need to be able to remove the escaped backslash. Any ideas
<micalexander> ?
<micalexander> Ive used gsub(/\\/, "") but it doesn't remove the slash
<apeiros> >> "hello\\ world".gsub(/\\/, '')
<eval-in> apeiros => "hello world" (https://eval.in/52987)
<apeiros> works for me
<havenwood> micalexander: is the backslash you're trying to remove itself an escape maybe?
<micalexander> yes
<apeiros> well, you can't remove an escape
<apeiros> it's not really there, after all
<apeiros> "hello \"world\"!"
<apeiros> this string does not contain any backslashes
<micalexander> havenwood: well it is actually from the string that is dragged into the window from the directory
<micalexander> havenwood: its the terminal escaping the path not ruby
<micalexander> havenwood: so I guess I should have answered no
schaerli has joined #ruby-lang
mucker has quit [Remote host closed the connection]
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mucker has joined #ruby-lang
<micalexander> havenwood: got it thanks tho
micalexander has quit [Read error: Connection reset by peer]
relix has joined #ruby-lang
eponymi has joined #ruby-lang
grough has quit []
toertore has joined #ruby-lang
toretore has quit [Read error: Connection reset by peer]
apeiros has quit [Remote host closed the connection]
apeiros has joined #ruby-lang
nofxx has quit [Ping timeout: 252 seconds]
ruby-lang121 has joined #ruby-lang
yxhuvud has joined #ruby-lang
headius has joined #ruby-lang
ruby-lang121 has quit [Client Quit]
imperator has joined #ruby-lang
mucker has quit [Ping timeout: 264 seconds]
sgt_mactavish has joined #ruby-lang
brain64bit has joined #ruby-lang
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
sgt_mactavish has quit [Ping timeout: 256 seconds]
mucker has joined #ruby-lang
brain64bit has quit [Ping timeout: 256 seconds]
banisterfiend is now known as aryaching_
aryaching_ is now known as banisterfiend
eponymi has quit [Quit: Colloquy for iPhone - http://colloquy.mobi]
malev has joined #ruby-lang
GaelanAintAround is now known as Gaelan
Coincidental has joined #ruby-lang
jithu has quit [Quit: Mother, did it need to be so high?]
arooni-mobile has quit [Ping timeout: 264 seconds]
jithu has joined #ruby-lang
jithu has quit [Client Quit]
benanne has joined #ruby-lang
relix has joined #ruby-lang
fenicks has joined #ruby-lang
mbj has joined #ruby-lang
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
mbj has quit [Client Quit]
Elico has quit [Read error: Connection reset by peer]
nofxx has joined #ruby-lang
mac___ has joined #ruby-lang
austinja has joined #ruby-lang
yxhuvud has quit [Remote host closed the connection]
robbyoconnor has quit [Ping timeout: 260 seconds]
yxhuvud has joined #ruby-lang
headius has quit [Quit: headius]
mistym has joined #ruby-lang
judofyr has joined #ruby-lang
robbyoconnor has joined #ruby-lang
fuhgeddaboudit has joined #ruby-lang
bastilian has quit [Quit: Leaving...]
schaerli has quit [Remote host closed the connection]
robbyoconnor has quit [Ping timeout: 240 seconds]
schaerli has joined #ruby-lang
Johz has quit [Quit: Leaving]
bastilian has joined #ruby-lang
schaerli has quit [Ping timeout: 268 seconds]
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mac___ has quit [Remote host closed the connection]
adambeynon has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
fosky has joined #ruby-lang
headius has joined #ruby-lang
axsuul has joined #ruby-lang
MaddinXx_ has quit [Remote host closed the connection]
charliesome has joined #ruby-lang
workmad3 has joined #ruby-lang
robbyoconnor has joined #ruby-lang
<ljarvis> ohai
MaddinXx_ has joined #ruby-lang
MaddinXx_ has quit [Remote host closed the connection]
judofyr has quit [Remote host closed the connection]
<[spoiler]> Heya
skade has quit [Quit: Computer has gone to sleep.]
violarium has quit [Quit: Konversation terminated!]
<[spoiler]> Fgs. This is giving me a headache. How would one go about keeping a list of all (for example) connected users without using global state? How do you have a list without using an actual list?!
<whitequark> you do not
<whitequark> there naturally must exist some global state.
<whitequark> if you think about it, a list of TCP connections which your OS keeps *is* global state
arBmind has quit [Ping timeout: 246 seconds]
kenta_ has joined #ruby-lang
<whitequark> I'd solve it by packing all that state in, say, a Server class and instantiating it once. Or not once, 'cause why not?
<[spoiler]> But, someone earlier claimed global state is bad. I have no idea what they were getting at, then!
workmad3 has quit [Ping timeout: 268 seconds]
<[spoiler]> I spent all day researching it, and I kept coming to the conclusion that it is not possible.
qba73 has quit [Remote host closed the connection]
<heftig> [spoiler]: in the interest of keeping your code from becoming a spaghetti mess, you should strive to limit the scope of state as much as possible
kenta_ has quit [Ping timeout: 268 seconds]
<heftig> that doesn't mean you cannot use global state
<[spoiler]> I'd quote, but I am on my phone right now, but the person either said "never use global state" or "avoid global state at all costs" I think it was the former
<MrZYX> so I guess the other question is why do you need that list, is it really impossible to implement the feature you need without it?
<whitequark> [spoiler]: it's simply not possible to not have any global state
<[spoiler]> Oh, I don't need it, someone asked a question earlier and I responded, but the person complained that there's global state in the example and it thus became invalid. I'm guess the user wants to print the user data. no idea.
<whitequark> there's something you use to hook up to the OS. say, an event loop
<[spoiler]> MrZYX: previous message was for you, btw
<MrZYX> sure
<[spoiler]> So, I am trying to find an alternative all day, and they all involve global state in some form
elia has joined #ruby-lang
iliketurtles has joined #ruby-lang
jinslee has joined #ruby-lang
felipec has left #ruby-lang ["Leaving"]
<imperator> anyone here used the atomic gem? I'm trying to figure out how to create an atomic hash, but I'm having trouble setting keys
bastilian has quit [Quit: Leaving...]
havenwood has quit [Remote host closed the connection]
<imperator> a = Atomic.new({}); a.try_update{ |h| h[:foo] = 1 } # a.value is now 1 instead of {:foo => 1}
havenwood has joined #ruby-lang
bastilian has joined #ruby-lang
<[spoiler]> Hmm. Perhaps the return value of the block is what assigned to a. Did you try printing H out?
<[spoiler]> what's *
<[spoiler]> because the []= operator returns the assigned value
<imperator> yeah, that must be what it does
havenwood has quit [Ping timeout: 248 seconds]
<[spoiler]> a.try_update{ |h| {foo: 1} } perhaps
<imperator> so i'll just make sure h is returned last
<imperator> a.try_update{ |h| h[:foo] = 1; h } # works
<[spoiler]> oops, I meant to write h=
<imperator> well, i hope it does under the hood anyway
<[spoiler]> yeah, that should do the trick
<[spoiler]> try reading the source
<[spoiler]> that always sheds light!
CoreData has joined #ruby-lang
arBmind has joined #ruby-lang
jarm has joined #ruby-lang
<imperator> bleh, didn't work out
<[spoiler]> To the source, then!
cads has joined #ruby-lang
<imperator> eh, i think it's more my problem domain
<imperator> basically, i need a volatile hash variable for an ffi program
<imperator> not sure what to do
arBmind has quit [Quit: Leaving.]
<zzak> imperator: i think fiddle calls this a freefunc
jarm has quit [Ping timeout: 264 seconds]
havenwood has joined #ruby-lang
<imperator> fiddle?
<imperator> that thing irb is always warning me about?
<zzak> that's the one
iliketurtles has quit [Quit: zzzzz…..]
<imperator> zzak, you're takling at rubyconf 2013, right?
<zzak> imperator: yes sir!
<imperator> congrats
<zzak> thanks :D
<ljarvis> zzak: nice
<ljarvis> zzak: did you check out brussels much?
<zzak> 1 month to learn 4 languages!
<zzak> and make a talk about them
<zzak> ljarvis: i basically havent left the airbnb since i got here, been working :(
<ljarvis> zzak: :/
<zzak> and im spent after the drinkup
<ljarvis> zzak: grand place is impressive check it out before you leave, if nowhere else
<ljarvis> also, waffle factory is <3
<zzak> my flight is in the morning
<ljarvis> well that sucks
<zzak> :(
<zzak> there is always next year
<ljarvis> yeah
havenwood has quit [Remote host closed the connection]
<ljarvis> zzak: I have like 30 mosquito bites :(
havenwood has joined #ruby-lang
jinslee_ has joined #ruby-lang
jinslee has quit [Read error: Connection reset by peer]
jarm has joined #ruby-lang
nisstyre has quit [Remote host closed the connection]
<zzak> lol
Squarepy has joined #ruby-lang
Squarepy has quit [Changing host]
Squarepy has joined #ruby-lang
<zzak> that sucks bro
havenwood has quit [Ping timeout: 268 seconds]
<[spoiler]> When I got asked by Santa as a kid, I literally responded: "death to mosquitos". My mum has it on tape. I was around 5, I reckon
<[spoiler]> what I want for Christmas *
omninonsense has joined #ruby-lang
grough has joined #ruby-lang
<ljarvis> i guess you were on the bad list that year
<omninonsense> Clearly.
<omninonsense> oh, nick changed!
<omninonsense> oh right, because my connection died. :/
<omninonsense> gtfo, shit isp
[spoiler] has quit [Ping timeout: 245 seconds]
omninonsense is now known as [spoiler]
<[spoiler]> there there.
jonahR has joined #ruby-lang
jonahR has left #ruby-lang [#ruby-lang]
sevvie has quit [Quit: love, love, love]
lsegal has joined #ruby-lang
Nss has quit [Ping timeout: 240 seconds]
iliketurtles has joined #ruby-lang
CoreData has quit [Ping timeout: 252 seconds]
Gaelan is now known as GaelanAintAround
banisterfiend has quit [Quit: Computer has gone to sleep.]
banisterfiend has joined #ruby-lang
jarm has quit [Ping timeout: 245 seconds]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
apeiros has quit [Remote host closed the connection]
apeiros has joined #ruby-lang
[spoiler] has quit [Quit: Bye]
mac___ has joined #ruby-lang
bastilian has quit [Quit: Leaving...]
GaelanAintAround is now known as Gaelan
Coincidental has quit [Remote host closed the connection]
shinnya has joined #ruby-lang
Coincidental has joined #ruby-lang
apeiros has quit [Remote host closed the connection]
bastilian has joined #ruby-lang
Coincidental has quit [Ping timeout: 248 seconds]
jinslee_ has quit [Ping timeout: 248 seconds]
charliesome has joined #ruby-lang
havenwood has joined #ruby-lang
Gaelan is now known as GaelanAintAround
wallerdev has quit [Quit: wallerdev]
arooni-mobile has joined #ruby-lang
wallerdev has joined #ruby-lang
jiuweigui has quit [Quit: iQuit!]
iliketurtles has quit [Quit: zzzzz…..]
iliketurtles has joined #ruby-lang
postmodern has joined #ruby-lang
VTLob has quit [Quit: VTLob]
Naeblis_ has joined #ruby-lang
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
arooni-mobile has quit [Ping timeout: 240 seconds]
nofxx1 has joined #ruby-lang
apeiros has joined #ruby-lang
nofxx has quit [Ping timeout: 245 seconds]
therealtesseract has joined #ruby-lang
fijimunkii has quit [Ping timeout: 240 seconds]
cads has quit [Ping timeout: 264 seconds]
Squarepy has quit [Remote host closed the connection]
charliesome has joined #ruby-lang
grough has quit []
nathanstitt has quit [Quit: I growing sleepy]
yfeldblum has joined #ruby-lang
sepp2k1 has joined #ruby-lang
sepp2k has quit [Ping timeout: 240 seconds]
elia has quit [Quit: Computer has gone to sleep.]
jrobeson has joined #ruby-lang
Naeblis_ has quit [Ping timeout: 246 seconds]
nathanstitt has joined #ruby-lang
stamina has quit [Ping timeout: 264 seconds]
Coincidental has joined #ruby-lang
benanne has quit [Quit: kbai]
bastilian has quit [Quit: Linkinus - http://linkinus.com]
MrZYX is now known as MrZYX|off
x0f_ has joined #ruby-lang
bzalasky has joined #ruby-lang
fijimunkii has joined #ruby-lang
x0f has quit [Ping timeout: 264 seconds]
jarm has joined #ruby-lang
bzalasky has quit [Remote host closed the connection]
bzalasky has joined #ruby-lang
jarm has quit [Ping timeout: 246 seconds]
iliketurtles has quit [Quit: zzzzz…..]
nertzy has joined #ruby-lang
bzalasky has quit [Ping timeout: 268 seconds]
mdedetrich has joined #ruby-lang
vlad_starkov has joined #ruby-lang
deweichen has joined #ruby-lang
deweichen has quit [Client Quit]
havenwood has quit [Read error: Connection reset by peer]
havenn has joined #ruby-lang
deweichen has joined #ruby-lang
deweichen has left #ruby-lang [#ruby-lang]
nertzy has quit [Quit: This computer has gone to sleep]
jarm has joined #ruby-lang
DEac- has quit [Ping timeout: 240 seconds]
iliketurtles has joined #ruby-lang
DEac- has joined #ruby-lang