tonni has quit [Read error: Connection reset by peer]
tonni has joined #ruby-lang
imajes has quit [Ping timeout: 256 seconds]
imajes has joined #ruby-lang
justinram has quit [Remote host closed the connection]
thatdutchguy has quit [Remote host closed the connection]
dous_ has joined #ruby-lang
dous_ has quit [Changing host]
dous_ has joined #ruby-lang
nertzy has joined #ruby-lang
dous has quit [Ping timeout: 276 seconds]
pkrnj has joined #ruby-lang
datanoise has quit [Ping timeout: 276 seconds]
bluepojo has quit [Quit: Leaving.]
bluepojo has joined #ruby-lang
thinkdevcode has quit [Remote host closed the connection]
nertzy has quit [Quit: This computer has gone to sleep]
rue|w has joined #ruby-lang
rue|w has quit [Ping timeout: 240 seconds]
gregmoreno has quit [Remote host closed the connection]
tomzx_ has joined #ruby-lang
apeiros_ has quit [Remote host closed the connection]
runeb has joined #ruby-lang
ddd has quit [Ping timeout: 245 seconds]
cultureulterior_ has quit [Quit: cultureulterior_]
ddd has joined #ruby-lang
runeb has quit [Ping timeout: 240 seconds]
CaptainJet has joined #ruby-lang
<zenspider>
ddd: I'm not speaking out against metaprogramming... (which I've done--and plenty... just google: zenspider clevar)... I'm speaking out against refinements
<zenspider>
steveklabnik: to be fair... kay thinks he should have _emphasized_ messages over objects. he doesn't have a problem with OO. see fonc for plenty of examples of how kay isn't fixing OO they way he originally designed it.
<steveklabnik>
he said he got the size of objects wrong
<steveklabnik>
you should think of subsystems as objects
<steveklabnik>
like your tcp stack
<steveklabnik>
this was very recent
<steveklabnik>
you'r referencing his older stuff, which is also good. the 'i didnt have C++/Java in mind' stuff
<zenspider>
I'm also referencing stuff he's publishing RIGHT NOW. combined object / lambda architecture is still the OO we know and love
<steveklabnik>
"One of the mistakes that we made years ago is that we made objects too small." (~00:26)
<steveklabnik>
true
<steveklabnik>
i'm really excited tos ee how VIPR turns out
<steveklabnik>
personally
erichmenge has joined #ruby-lang
charliesome has joined #ruby-lang
mistym has quit [Remote host closed the connection]
<steveklabnik>
wait, hmm, was that the name? the crazy DSL stuff?
<steveklabnik>
VPRI
<steveklabnik>
not vipr
<zenspider>
heh
ddd has quit [Quit: Leaving.]
<steveklabnik>
OS + GUI + tools in under 10kloc
<zenspider>
vpri is just their firm. fonc is the overarching project. cola is an implementation detail
<zenspider>
under 30kloc
datanoise has joined #ruby-lang
<steveklabnik>
roger
<steveklabnik>
i check up every once in a while
GarethAdams has joined #ruby-lang
<zenspider>
they seriously don't publish enough... but one should be due shortly given the month
<zenspider>
holy crap... MBA update is 130 meg. usually they're like... 5
pkrnj has quit [Quit: Computer has gone to sleep.]
<zenspider>
bbl
jxie has quit [Ping timeout: 264 seconds]
Kyril has joined #ruby-lang
datanoise has quit [Ping timeout: 260 seconds]
jperry2 has joined #ruby-lang
jxie has joined #ruby-lang
erichmenge has quit [Read error: Connection reset by peer]
erichmenge has joined #ruby-lang
methods has joined #ruby-lang
ttilley has quit [Quit: ttilley]
ttilley has joined #ruby-lang
methods has left #ruby-lang [#ruby-lang]
bfreeman has quit [Quit: bfreeman]
ananna has quit [Remote host closed the connection]
jperry2 has quit [Quit: jperry2]
arubin_ has joined #ruby-lang
ttilley has quit [Quit: ttilley]
setmeaway has joined #ruby-lang
mjio has quit [Quit: Computer has gone to sleep.]
GarethAdams has quit [Quit: Leaving...]
datanoise has joined #ruby-lang
Madis has quit [Quit: ChatZilla 0.9.89 [Firefox 16.0.1/20121026125834]]
tomzx_ has quit [Ping timeout: 246 seconds]
mrsolo has quit [Quit: Leaving]
<Spaceghostc2c>
The real metaprogrammming developer always know where self is. That's one of the first hurdles to being an accomplished metaprogrammer. Otherwise, you're just metabrogramming.
<jmena>
Aria: Thank you! How did you go about finding it?
<zzak>
Aria: yes ma'am
<Aria>
jmena: I followed the inheritance chain -- I looked in several likely looking included modules, then checked Thor.
<Aria>
zzak: Eugh. Good luck?
<zzak>
haha, thanks, its probably not necessary
<zzak>
but i was curious
<Aria>
Yeah. Oy. What a mess -- 16 digits is a decent /guess/ but there's edge cases, since of course, bits don't map to decimal digits.
nateeeee has quit [Quit: Leaving]
<jmena>
Aria: But I mean, did you do it manually by browsing Github?
villainate has joined #ruby-lang
<Aria>
jmena: Yes. If it was any more complicated, I'd have downloaded the two repos and git grepped them for 'def say'
<jmena>
Aria: Good to know. Thank you!
villainate has quit [Client Quit]
villainate has joined #ruby-lang
kitallis has joined #ruby-lang
aetcore has quit []
<villainate>
when using ruby threads, if i make a system call to openssl will there be issues with threadsafety?
phaedrix_ has quit [Quit: WeeChat 0.3.9]
<zzak>
why not use the OpenSSL module?
<villainate>
sure i can do that. i was under the impression that openssl could have issues with thread safety in general.
<burgestrand>
If by system call you mean system() or `` (backticks) or %x, or similar, then that in and of itself does not raise any thread safety issues.
<villainate>
system()
<villainate>
i see
<zzak>
yeh i think system() forks a new process
<villainate>
i am probably just reading too much into using openssl in a c-implementation
spuk has quit [Quit: Human beings were created by water to transport it uphill.]
<burgestrand>
It’s wise to assume that no library explicitly stating thread-safety is thread-safe.
<burgestrand>
WIth that said I have no idea if the openssl library is thread-safe or not.
<Aria>
Yeah, system() isn't about threads at all, it fully spawns a new process. OpenSSL is a heap of mess though, so don't trust it ;-)
<zzak>
if you're just shelling out for a quick fix, then whatever, but if you're doing any heavy lifting i'd go with OpenSSL and if you run into any issues with thread-safety bugs.ruby-lang.org is your friend
<Aria>
OpenSSL is "safe" to use from threads in some cases, not others. There's no such thing as absolute thread-safety, but it's understandable.
<villainate>
right so you mean using the ruby library is recommended. ok i will look into it.
lcdhoffman has quit [Quit: lcdhoffman]
<zzak>
give it a shot, report any thread related issues you run into
<Aria>
Oh, quite. But shelling out is completely safe. Just depends on what you're doing.
<villainate>
due the fact that it is forking?
<Aria>
Yeah.
<Aria>
Has nothing to do with threads, so there's no thread safety issue ;-)
<villainate>
gotcha thanks
<zzak>
right, but its also possible to use the streaming or chunk apis using the module
<villainate>
i see
<Aria>
(and as a point of terminology, "a call to system()" is not "a system call")
<villainate>
ok what is "a system call"? using ruby to call a kernel level method?
<Aria>
Yeah. Or any userland process calling into the operating system kernel.
<villainate>
ok gotcha
<Aria>
read, write, select, open a file.
<rohit_>
Will it be correct in saying that Ruby 2.0 is the same platform as 1.9? I'm asking this in reference to the Bundler Gem and this issue https://github.com/carlhuda/bundler/issues/2151
<Aria>
All of those are system calls. All the stuff in section 2 of the unix manpages.
<villainate>
thanks aria
<Aria>
sure thing, villainate
febuiles has quit [Quit: febuiles]
<villainate>
and zzak of course
<zzak>
good luck
ilyam has quit [Quit: ilyam]
jmena has quit [Ping timeout: 245 seconds]
sn0wb1rd has quit [Quit: sn0wb1rd]
woollyams has quit [Quit: Computer has gone to sleep.]
AlHafoudh has quit [Quit: Computer has gone to sleep.]
svyatov has joined #ruby-lang
thinkdevcode has joined #ruby-lang
jxie has quit [Read error: Connection reset by peer]
havenn has quit [Ping timeout: 248 seconds]
ryanf has quit [Ping timeout: 264 seconds]
Rizzle has joined #ruby-lang
ViperMaul|_ has quit [Ping timeout: 256 seconds]
jxie has joined #ruby-lang
svyatov has quit [Quit: svyatov]
francisfish has quit [Ping timeout: 252 seconds]
Paradox has joined #ruby-lang
datanoise has joined #ruby-lang
uuair has joined #ruby-lang
rohit has quit [Ping timeout: 246 seconds]
datanoise has quit [Ping timeout: 246 seconds]
yanovitchsky has quit [Quit: yanovitchsky]
<rking>
Hi guys. Trying to golf this down for a buddy, suggestions welcome: @content_home_main = if home_main = Content.find_by_name("home_main"); home_main.content else "home_main not found." end
<rking>
I found his use of the temp var interesting. I actually like it better than redundantly doing 'Content.find_by_name'
ryanf has joined #ruby-lang
<rking>
One option is this:
<rking>
(Content.find_by_name("home_main") || OpenStruct.new(content: "home_main not found")).content
Dreamer3 has quit [Quit: Computer has gone to sleep.]
<bluepojo>
your second paste is pretty convoluted
<bluepojo>
or even better
<bluepojo>
define a method on Content
<bluepojo>
that returns "not found" or the content
<rking>
bluepojo: That gist doesn't actually do anything except move the temp out of the statement.
<bluepojo>
right, but why make it shorter?
<rking>
Which is OK, but I have this sense that there's a more fundamental way to say this.
<bluepojo>
your goal is to write software that works and is easy to maintain, not to be extra clever with leet ruby skills
<bluepojo>
write code that is easy to read
<bluepojo>
instead of code that uses every facet of the language you've ever learned
<rking>
I agree, but you have to have a full vocabulary to be able to make wise choices.
<bluepojo>
I have a full vocabulary
<bluepojo>
you're being too clever
<bluepojo>
and you'll hate yourself for it
<rking>
The OpenStruct thing was just a brainstorm, though I actually do advocate the NullObject idea
<bluepojo>
in 6 monhts
lun_ has quit [Remote host closed the connection]
<bluepojo>
I think the best option is to define a method on Content
<bluepojo>
encapsulate the functionality
<rking>
OK, but that merely pushes the problem elsewhere.
<bluepojo>
right, but it encapsulates it
<rking>
This is a low-level, tactical challenge.
<bluepojo>
so the rest of your app doesn't need to worry about it
<rking>
Yes, that's completely orthogonal.
<bluepojo>
and you can change it in future in 1 place
<bluepojo>
instead of everywhere
<bluepojo>
no it's not
<rking>
=|
<rking>
How do you even know this isn't in a method?
<bluepojo>
if it is, then write it clearly and leave it alone
<rking>
Of course I wouldn't do this several times, and in classes that don't own this data.
<rking>
This is a pattern I've seen enough that I wanted to ask about it here.
rohit has joined #ruby-lang
cosah has quit [Ping timeout: 240 seconds]
<rking>
Another example is a nested data structure, like: a[:b][:c][:e], where you either want that or a default value
lun_ has joined #ruby-lang
cosah has joined #ruby-lang
<bluepojo>
ah yeah, that's more of challenge… if :c isn't defined, you'll get undefined [] for nilclass
<bluepojo>
the vanilla way to do it is
<bluepojo>
if a && a[:b] && a[:b][:c] && a[:b][:c][e]
<bluepojo>
which kinda sucks
<bluepojo>
but it's a hard problem to solve and I don't believe there are libraries to do it
<bluepojo>
cause you'd impact Hash's retrieval performance pretty significantly if you have it check for everything along the way
<bluepojo>
some times the answer is to create a more specific data structure instead of deeply nested hashes
<bluepojo>
depends on your specific usecase though
<rking>
Yeah
<tpope>
you want deep_fetch
<bluepojo>
andand makes the above pattern a little nicer
<bluepojo>
the gem
<rking>
tpope: Yeah, good point. That would be worth writing if you had that going on in one or two places.
icooba has joined #ruby-lang
gsav has quit [Read error: Connection reset by peer]
jxie has quit [Read error: Connection reset by peer]
<rking>
bluepojo: Aha! Yes, andand is exactly the solution to the first.
<rking>
bluepojo: See? Now I feel like your chiding me for zooming in on this problem was a bit chideful.
jxie has joined #ruby-lang
<rking>
There's two perfectly viable tools I didn't think of before, .andand + .deep_fetch. I can choose whether they are helpful or not in context, but just telling people with questions: "You don't mean that" isn't always profitable.
<bluepojo>
I was pretty clear in giving a solution, I thought… the first question I was a bit chideful cause it's an extremely common thing for rubyists to be super clever, thinking it's great at the moment only to come back to their code months later and being unable to read it… or the other devs spend another 10mins when they get to the code trying to figure it out.
<bluepojo>
It's usually better to write more code if it's clearer than less code cause it's cleverer
<bluepojo>
didn't mean to direct any hate at you, it's more of a conditioned reaction
<bluepojo>
apologies if you were offended
<rking>
bluepojo: BTW the andand docs mention another way to do this, which is also convoluted but interesting: @phone = ->(loc){ loc && loc.phone }.call(Location.find(:first, ...elided... ))
<bluepojo>
ow, that's painful
<bluepojo>
haha
<bluepojo>
cool tho
<rking>
bluepojo: At this point I have a conditioned reaction in response to that particular conditioned reaction. I love cutting through users' "xy problems", but I think the total support solution says answer both x and y if possible.
<bluepojo>
Generally I like to tell people how i do things. I'll say there are other ways to do it, but it often confuses people if you give them too many options… I leave it up to them to find other ways to do it if they like.
<bluepojo>
they're already confused enough if they're coming to you for help
<rking>
I should have done a better job of purifying the context to make it seem like a more intentional question.
<bluepojo>
fair enough
bluepojo has quit [Ping timeout: 256 seconds]
solars has joined #ruby-lang
<erikh>
c[:a][:b][:c] rescue default_value
<rking>
erikh: Right
<rking>
But =~(
<erikh>
yes, you can easily load up your projects with 800 additional gems and writing 300 lines of code to solve this problem "properly"
<rking>
I think for a Hash access like that, it's probably idiom-worthy
<erikh>
or you can cheat with inject too
<erikh>
but not sure which is worse
<rking>
erikh: I'd pretty seriously consider putting that in Hash#deep_fetch
<rking>
I don't think it's great to have it propagate across many spots in the code.
<rking>
Nah, in that case you wouldn't have any benefit of using rescue over has_key?
<erikh>
if you're going to call out to something that takes a list of items, might as well use the inject method
<rking>
erikh: I'm not quite seeing your inject solution.
adamdonahue has left #ruby-lang [#ruby-lang]
amd has joined #ruby-lang
amd has left #ruby-lang [#ruby-lang]
svyatov has joined #ruby-lang
<erikh>
list.inject(o) { |h,k| if h.respond_to?(:[]) then h[k] else return nil }
NemesisD has joined #ruby-lang
Mon_Ouie has joined #ruby-lang
<rking>
Oh, OK.
<rking>
So yeah, still more of a candidate for the definition of deep_fetch, though.
<NemesisD>
anyone familiar with SAX parsing in nokogiri? i want to fire an event for every certain element, but i can't figure out how i could access that node
<erikh>
right; it also doesn't have the other problems that rescue nil does
hinbody has quit [Ping timeout: 255 seconds]
<NemesisD>
the hooks it exposes are start_element and stop_element, but those only expose name and attributes
ezkl has joined #ruby-lang
Gekz has quit [Read error: Connection reset by peer]
hinbody has joined #ruby-lang
achiu has quit [Ping timeout: 252 seconds]
Gekz has joined #ruby-lang
Gekz has quit [Changing host]
Gekz has joined #ruby-lang
achiu has joined #ruby-lang
dhruvasagar has quit [Read error: Connection reset by peer]
bpuzzled has joined #ruby-lang
bpuzzled has quit [Changing host]
bpuzzled has joined #ruby-lang
vlad_starkov has joined #ruby-lang
vlad_starkov has quit [Remote host closed the connection]
dhruvasagar has joined #ruby-lang
mytrile has joined #ruby-lang
vlad_starkov has joined #ruby-lang
thinkdevcode has quit [Remote host closed the connection]
dr_bob has joined #ruby-lang
rohit has quit [Quit: Leaving]
datanoise has joined #ruby-lang
AlHafoudh has joined #ruby-lang
dr_bob has quit [Ping timeout: 246 seconds]
datanoise has quit [Ping timeout: 252 seconds]
dr_bob has joined #ruby-lang
NemesisD has quit [Quit: leaving]
yanovitchsky has joined #ruby-lang
qwerxy has joined #ruby-lang
uuair has quit [Quit: uuair]
woollyams has joined #ruby-lang
hinbody has quit [Ping timeout: 246 seconds]
cschwartz has joined #ruby-lang
Averna has quit [Quit: Leaving.]
hinbody has joined #ruby-lang
rue|w has joined #ruby-lang
datanoise has joined #ruby-lang
leopard_me has joined #ruby-lang
jashank has quit [Changing host]
jashank has joined #ruby-lang
datanoise has quit [Ping timeout: 268 seconds]
wallerdev has quit [Quit: wallerdev]
d3vic3 has joined #ruby-lang
ruurd has joined #ruby-lang
agarcia has joined #ruby-lang
ilyam has joined #ruby-lang
<yorickpeterse>
Morning
havenn has joined #ruby-lang
havenn has quit [Remote host closed the connection]
moonglum has joined #ruby-lang
gnufied has joined #ruby-lang
vbatts has quit [Ping timeout: 252 seconds]
znake has joined #ruby-lang
ilyam has quit [Quit: ilyam]
lake has quit [Quit: WeeChat 0.3.7]
lake has joined #ruby-lang
blacktulip has joined #ruby-lang
qwerxy has quit [Quit: offski]
dc5ala has joined #ruby-lang
jxie has quit [Quit: leaving]
icooba has quit [Ping timeout: 260 seconds]
Mon_Ouie has quit [Ping timeout: 246 seconds]
lsegal has quit [Quit: Quit: Quit: Quit: Stack Overflow.]
<roadt>
steveklabnik, py module doesn't respond for mixin. so it allow inherit a list of class.1st is base class, later classes are mixin'ed in. actually a fake multiple inheritance
<yorickpeterse>
roadt: no, that's exactly the reason
rohit has quit [Ping timeout: 246 seconds]
<roadt>
steveklabnik, no gist stuff yet.. tks :)
<yorickpeterse>
A class inherits, it doesn't include
<yorickpeterse>
A module can be included, it can't extend
<yorickpeterse>
That's just the way things are
rohit has joined #ruby-lang
jarib has quit [Excess Flood]
<apeiros_>
A class inherits and includes
<yorickpeterse>
Saying something like "But classes should be mixed in to!" is like saying you want to perform mathematical calculations using regular expressions
jarib has joined #ruby-lang
jarib has quit [Excess Flood]
<yorickpeterse>
* too
<apeiros_>
it can't be included
datanoise has quit [Ping timeout: 240 seconds]
<gnufied>
although there was a discussion, couple of days back here, so as a class can borrow features from other classes
AlHafoudh has quit [Ping timeout: 240 seconds]
jarib has joined #ruby-lang
<gnufied>
trying to find relevant ticket in ruby-lang redmine
<apeiros_>
if define_method wasn't so picky this wouldn't be an issue at all. you could just reattach methods at will
<rohit>
So what was said after my </end_guess> message? I got d/c :(
<roadt>
yorickpeterse, no, concetually speaking. it is possilbe , with the proper meaning.
<roadt>
gnufied, by meta programming
<roadt>
gnufied, ?
* apeiros_
never understood that limitation of define_method with UnboundMethod
levicole has quit [Ping timeout: 268 seconds]
<yorickpeterse>
roadt: The answer is simple: No, you can not include/mix in a class into another one
<apeiros_>
I think he was more asking for the "why"
<apeiros_>
as in, what's the design rationale behind it
<yorickpeterse>
If you could modules would serve no purpose
<gnufied>
^ yup
<roadt>
yorickpeterse, i know it can not. yup ... look for some background about this.
<yorickpeterse>
roadt: then what exactly is your question?
vlad_starkov has quit [Remote host closed the connection]
<apeiros_>
well, I guess in such a world you could view modules as a) pure namespaces and b) something akin to an abstract class (since you can't instantiate)
levicole has joined #ruby-lang
yellow5 has quit [Quit: time to go!]
<roadt>
yorickpeterse, why ruby not permit to include another class but only module. (since there are langs permit that).
yellow5 has joined #ruby-lang
<roadt>
apeiros_, yeah. exactly.
<gnufied>
long and short, it is by design
<steveklabnik>
ruby's object protocl is different than python's
<steveklabnik>
is the short answer
<apeiros_>
that's still "what", not "why"
<rohit>
What does it mean to mix a module into a class?
<rohit>
What *would* it mean to mix a class into a class?
<gnufied>
(redmine is failing me)
<gnufied>
borrow methods without going whole hog of unbounded methods etc I suppose
<yorickpeterse>
rohit: because that's the way it's designed
<yorickpeterse>
there's no point in having two different data types do the same thing
<yorickpeterse>
or one data type being used for two different things
<yorickpeterse>
It's like trying to use a hammer to bake a steak while also using it for hitting nails
mlangenberg has joined #ruby-lang
<roadt>
yorickpeterse, not really. py , c++ allow this. and give the example that. this is a window. wow. this is also a shape.
<roadt>
yorickpeterse, so i mean it is possible. with the proper meaning.
<rohit>
AFAIK mixins are like interfaces. You want a class to be of a certain type, say Shape, but you also want to be able to do stuff that a window would so you inherit from Shape and mix Window module in
<yorickpeterse>
Because X does it too doesn't make it a good idea
<rohit>
BUT if you mix another class, you are effectively doing multiple inheritance
<rohit>
yorickpeterse, Nobody is questioning if it's a good!
<rohit>
idea*
<rohit>
yorickpeterse, It's a valid question to ask - why ruby doesn't allow mixing a class into another class. Dismissing the question as RUBY IS DESIGNED SO is not helpful
<roadt>
yorickpeterse is quite defensing something. which i don't get clear. yet. :)
<yorickpeterse>
...
<yorickpeterse>
Except that *is* the reason
<yorickpeterse>
it's a design issue, that's it
<mlangenberg>
I'm caching some data in memory in a Hash by date. I noticed that using MAP[date.today] ||= {} is much faster than MAP[date.today.to_s] ||= {}. Why would this be?
<yorickpeterse>
There isn't some super natural reason as to why it's not possible
<yorickpeterse>
It just isn't because it hasn't been added
<yorickpeterse>
mlangenberg: the latter converts it to a string
<yorickpeterse>
and quite possibly formats it
<steveklabnik>
mlangenberg: not sure, but you're not converting stuff to a string, so the first one does less stuff
<steveklabnik>
you'd have to profile to learn for sure
<roadt>
yorickpeterse, it looks like explicitly forbidden, so should have a reason, which is i'm looking for.
<steveklabnik>
because modules are not classes ;)
<mlangenberg>
Sure, but what does Hash use internally? Because the date object has a different object_id every time.
<steveklabnik>
mlangenberg: what do you mean by 'uses internall'y?
<roadt>
yorickpeterse, i'm ok with either options actually. difference make the world more beautiful :P
<mlangenberg>
Actually I'm wondering: This is faster, can I use it?
<steveklabnik>
use for what?
<rohit>
yorickpeterse, No there isn't a super natural reason. Somebody made a choice not to add multiple inheritance to Ruby. Somebody decided interfaces weren't good. So decided to have modules and mixins. But why? Reasoning about language choices is a good thing ...
<mlangenberg>
steveklabnik: key for hash lookup
<steveklabnik>
mlangenberg: object id
<yorickpeterse>
Oh jezus, I'm not going to try to explain this any further
<roadt>
steveklabnik, why don't say Class is_a Module ? XD
<gnufied>
roadt: there is some info there. So, what if for example, you mixin - String class inside Array class?
rohit has joined #ruby-lang
<mlangenberg>
apeiros_: I could do: h[Date.today.hash] ||= …, so it will just lookup Fixnums
<gnufied>
ruby does not check receiver and that will crash the interpreter
<rohit>
Umm did my gist link get through? Sorry getting d/c a lot. :(
<gnufied>
I mean, if you call a string method after it gets mixed into Array class, that will most likely crash the interpreter
<apeiros_>
mlangenberg: that's pointless
<gnufied>
so, this goes back to what steveklabnik was saying, that Ruby has different method dispatching rules
<gnufied>
(no receiver checking for one)
<mlangenberg>
apeiros_: why? It will save memory size of the hash.
<apeiros_>
mlangenberg: a) you're not save against collisions with that
<gnufied>
and including classes within other classes will wreck havoc. especially if you consider classes that were defined in C
<apeiros_>
b) unless you have tens of thousands of keys, this will not save you any significant amount of memory
<mlangenberg>
apeiros_: You are right, I am over thinking this.
<apeiros_>
c) if you have the dates around anyway, it will not even save you any memory
<apeiros_>
since, as said, you're using an existing object as the key. using an existing object as a key does *not* increase memory usage (since no new object is being created)
<gnufied>
roadt: and no, didn't see your gist. sorry
<rohit>
roadt, I think your question boils down to why multiple inheritance is bad, this might help http://stackoverflow.com/a/407928
<rohit>
Hashing plane date obj vs converting to string and then hashing - https://gist.github.com/4045084 - big difference, I don't know why
<gnufied>
because you are essentially creating more objects in second case
<gnufied>
not sure, if that exactly accounts for the difference. but surely, that will be a factor
<roadt>
gnufied, that means matz make class's method call validate reciever 's data type (in ruby interpreter). quite impl details..
<roadt>
rohit, actually , i put my question to why mixin class is not good, usually, mixin means 'no multiple-inhertance!' , right? XD
GarethAdams has joined #ruby-lang
<rohit>
And I ask again - What does it *mean* to mixin a Module? What does it mean to mixin a Class? The later implies multiple inheritance imho.
<rohit>
Actually nm, I don't know the answer, I was just speculating. I would have suggested to ask on Ruby Core mailing list but so far I've only seen emails from the issue tracker, none from just people :D
<roadt>
rohit, yeah, i know the point.and can they be the same?
beiter has quit [Read error: Connection reset by peer]
beiter_ has joined #ruby-lang
bastilian has joined #ruby-lang
<roadt>
rohit, yeah, tks. still nice talking. thoughtful. :)
<rohit>
roadt, IMO no, just adding methods + state from a module doesn't make the class obj a type of the module. In fact I suspect the reason why there is a Module object is to differentiate between the two. Module is basically an abstract class i.e it can't be initialized
<workmad3>
rohit: Object.is_a?(Kernel)
<rohit>
And with that my whole theory goes down the drain :D
<rohit>
workmad3, hello :)
<workmad3>
rohit: also, mixins are a form of multiple inheritance, they just aren't unconstrained class interface inheritance :)
<workmad3>
and hi :)
<workmad3>
*unconstrained class multiple inheritence even
<workmad3>
mixins are a form of interface with implementation
<rohit>
Ah
jarib has quit [Excess Flood]
jarib has joined #ruby-lang
<rohit>
Scala interfaces also allow implementation
<workmad3>
so in the same way that java allows single class inheritance but multiple interface inheritance, ruby supports single class inheritance with multiple mixin inheritance
<rohit>
I was on the right path till I started speaking gibberish :D
<workmad3>
it's multiple class inheritance that can get messy :)
<workmad3>
especially C++'s implementation of it
<roadt>
rohit, yeah. Module is quite abstract. I should say it is comfortable that parent doesn't has features of child class. say Class can initialize some obj, Module, not you can't.
<andrewvos>
Anyone know if I can use -X -L in Net::SSH?
<workmad3>
python has a form of multiple inheritance that doesn't have the same foibles, but it does so by imposing a specific ordering to the inheritance that basically collapses it down into a single inheritance tree in essence
<rohit>
inheritance trees are good, inheritance graphs bad
<workmad3>
:)
<workmad3>
C++ gets really weird... you can have virtual private superclasses
<workmad3>
private inheritance is quite a nice idea though...
<workmad3>
it's basically implementation inheritence on its own
Paradox has quit [Ping timeout: 268 seconds]
<workmad3>
so you could do private inheritance from, say, Array, and internally you could treat the class as an Array, but YouClass.is_a?(Array) would be false
rohit has left #ruby-lang ["Leaving"]
<workmad3>
but it's really easy to just do that with object proxies in ruby, so it's not that big an ommission :)
rohit has joined #ruby-lang
* roadt
think workmad3 fall in love with C++.
<workmad3>
I like C++, it has some nice stuff in it
<workmad3>
haven't touched it for years now though :)
<workmad3>
and it can be a nightmare at times too
<roadt>
workmad3, me too.
<workmad3>
more importanting, IMO, is that you can learn quite a lot of OO ideas from looking at a selection of languages that implement different styles of inheritance, different types of OO, etc
<workmad3>
*importantly
<rohit>
I did a fantastic job of not paying attention to my c++ lectures, and I'm glad for it. I wish we had data structures in C rather C++.
<workmad3>
importanting? wtf?
beiter_ has quit [Read error: Connection reset by peer]
beiter has joined #ruby-lang
beiter has quit [Client Quit]
<workmad3>
my C++ lectures @ uni were... crap
<workmad3>
I taught myself the interesting and useful aspects of C++ :)
<workmad3>
templates, template metaprogramming, RAII, standard library stuff...
<workmad3>
then I discovered ruby :D
* roadt
thought he know the possible reason that ruby does't allow mixin a class. and think it not a big deal now.
Criztian has quit [Remote host closed the connection]
<roadt>
workmad3, do you like c++11 (oh, i'm offtopicing..)
<workmad3>
roadt: I stopped C++ stuff before it was released, never really looked at it in depth :(
<rohit>
Templates are pretty cool
<roadt>
workmad3, i see..
<workmad3>
and yeah... ruby might actually be able to allow mixing in a class in terms of implementation... but it would screw with the semantics IMO
<workmad3>
roadt: Templates are indeed cool :D they're a complete, functional language that operates on types, and they're programs that run in the compiler
<workmad3>
^^ rohit even
<rohit>
I have this in my bookmarks for a long time, about time I start looking at Mirah - http://www.mirah.org/
<roadt>
workmad3, yeah.. but complex and debug issues still need to be resolved. ah...seems ruby channel is quite comfortable with native language topic. :)
<roadt>
workmad3, like ruby, implemented by ruby, replace java, compile to javabytecode directly. good to know.
Paradox has joined #ruby-lang
Hakon has quit [Quit: Leaving...]
<roadt>
s/workmad3/rohit/
<roadt>
sorry, rohit.
<roadt>
:P
<workmad3>
:)
<rohit>
Actually Mirah has an odd feature. It's type system is *pluggable*. Won't that make programs unpredictable?
<roadt>
should be good with caution. i, for one, like go language. which is try to use a free-type system to replace template .
<roadt>
c++ template..
lun_ has quit [Ping timeout: 246 seconds]
<roadt>
but still a adventure
<roadt>
but maybe worthy.
lun_ has joined #ruby-lang
* roadt
put 'Mirah' in his bookmarks.
Hakon has joined #ruby-lang
vlad_starkov has joined #ruby-lang
lun_ has quit [Ping timeout: 276 seconds]
Hakon has quit [Ping timeout: 240 seconds]
jxie has quit [Quit: leaving]
lun_ has joined #ruby-lang
robbyoconnor has joined #ruby-lang
robbyoconnor has quit [Client Quit]
<andrewvos>
hello
rub has quit [Ping timeout: 255 seconds]
<naquad>
what are alternative to rails? i like ActiveRecord orm, but rails are really heavy, sinatra has very limited functionality, ramaze seems to be not supported (last commit was more than 6 month ago)
<andrewvos>
Sinatra has limited functionality?
datanoise has joined #ruby-lang
<andrewvos>
`gem install functionality`
<naquad>
andrewvos, no controllers, no view helpers, ...
<roadt>
lol
<workmad3>
naquad: if you need those things, maybe you want to reassess your view that rails is heavy
rohit has quit [Quit: Leaving]
<naquad>
workmad3, if rails would be less resource consumptive (>100 megs of memory on application with 2 models and <300 r/s)
carloslopes has joined #ruby-lang
<naquad>
i wouldn't even think about alternatives
<andrewvos>
naquad: My phone has more memory than that.
<workmad3>
naquad: if your app is that small, do you need controllers, view helpers, etc?
<naquad>
workmad3, i've got used to that, plus i have backend/frontend separation
rindolf has joined #ruby-lang
<workmad3>
naquad: ok, so what you're basically saying is 'I like the stuff that rails gives me, but I want it to do that for free'
<naquad>
workmad3, basically yes :3
<workmad3>
naquad: well... tough
anildigital_work has quit [Read error: Connection reset by peer]
<roadt>
better rails.
anildigital_work has joined #ruby-lang
<workmad3>
naquad: if you want a less heavyweight solution, you're going to need to lower your expectations of what you'll get
datanoise has quit [Ping timeout: 256 seconds]
<workmad3>
naquad: or pay the price of a broader framework in terms of resource consumption
<roadt>
need better rails, means , you need make rails better. XD
<workmad3>
naquad: on top of which, as andrewvos pointed out, *phones* have more memory than that... free hosting solutions give you more than that...
<stardiviner>
yorickpeterse: I see, thanks for help
<oddmunds>
%w{blah blah} is the equalent of "blah blah".split(' ')
<andrewvos>
stardiviner: It's an Array Literal
* andrewvos
just watched RubyTapas
<oddmunds>
it's more common to see %w(blah blblah) isn't it?
datanoise has joined #ruby-lang
<yorickpeterse>
Doesn't really matter what you use
<yorickpeterse>
As long as it doesn't conflict with the contents
<yorickpeterse>
e.g. %w{foo bar{ } is invalid
<stardiviner>
Yes, I'm write vim snippets, so I want a name for it, for different types similar snippets.
<oddmunds>
yorickpeterse: you can use spaces and perverse things like that, can't you?
mlangenberg has quit [Quit: mlangenberg]
<yorickpeterse>
Anything but the "container" characters can be used
<yorickpeterse>
But spaces separate words in this case
nertzy has quit [Quit: This computer has gone to sleep]
mlangenberg has joined #ruby-lang
<yorickpeterse>
Hrmpf, I suppose I have to come up with a proper topic if I want to give that talk
<yorickpeterse>
Just "Here's my code, it only sucks a little bit! You should totally use it!" doesn't really work out
gmci has joined #ruby-lang
gmci is now known as Guest26286
jxie has joined #ruby-lang
<roadt>
lol
nitti has joined #ruby-lang
mistym has joined #ruby-lang
mistym has quit [Changing host]
mistym has joined #ruby-lang
justinram has joined #ruby-lang
villainate has quit [Quit: Leaving]
erichmenge_ has joined #ruby-lang
lcdhoffman has joined #ruby-lang
<jmena>
What would be a good way to modify (increment/decrement) a number that is in a line from a text file I'm reading?
erichmenge has quit [Disconnected by services]
erichmenge_ is now known as erichmenge
Serial_Killer_C has joined #ruby-lang
<jmena>
Right now I'm reading the text file line by line, using regex to to detect the number, convert the number to an integer, adding/subtracting 1 to that number and converting it back to a string.
<jmena>
Looks like this: modified_score = line.slice(/-?\d+/).to_i.send(operation.to_sym, 1).to_s
mlangenberg has quit [Quit: mlangenberg]
<jmena>
Operation is a single character: either + or -
<rindolf>
jmena: can't you use (s.to_i + 1).to_s
rindolf has quit [Read error: Connection reset by peer]
rindolf has joined #ruby-lang
<jmena>
I don't think so. Each line in the file looks like this:" first_name last_name | score"
<jmena>
That's why I'm using regex to match digits first.
dc5ala has quit [Quit: Ex-Chat]
<jmena>
And I'm using send(operation.to_sym 1) because I'm using the same method for both addition and subtraction. operation contains that single string '+' or '-'.
<steveklabnik>
drbrain may want to know as well ;)
Hakon has joined #ruby-lang
<jmena>
steveklabnik: Thanks!
wallerdev has joined #ruby-lang
carloslo_ has joined #ruby-lang
carlosl__ has joined #ruby-lang
carloslopes has quit [Ping timeout: 276 seconds]
carloslo_ has quit [Ping timeout: 246 seconds]
Mon_Ouie has joined #ruby-lang
<yorickpeterse>
If a particular setter method is evaluated in the context of a instance method, is there a nicer way to call that method (instead of assigning a var) other than `my_setter=(param)`?
<yorickpeterse>
`my_setter = param` would just create a local variable
<steveklabnik>
self.my_setter = param
<yorickpeterse>
ta
Connecti0n has joined #ruby-lang
vlad_starkov has quit [Remote host closed the connection]
<workmad3>
yorickpeterse: also 'my_setter=(param)' will evaluate as 'my_setter = (param)' (i.e. it would still be a local variable)
<yorickpeterse>
Oh?
<yorickpeterse>
hmmm, that might explain why the tests failed
<yorickpeterse>
Yup, seems that was the case. Thansk
justinram has quit [Remote host closed the connection]
hakunin_ has joined #ruby-lang
Uranio has joined #ruby-lang
hakunin has quit [Read error: Connection reset by peer]
mlangenberg has joined #ruby-lang
datanoise has quit [Ping timeout: 252 seconds]
runeb has quit [Remote host closed the connection]
savage- has quit [Quit: savage-]
mlangenberg has quit [Client Quit]
bradland has quit [Ping timeout: 246 seconds]
ottbot has joined #ruby-lang
cschwartz has quit [Ping timeout: 252 seconds]
mytrile has quit [Remote host closed the connection]
ruurd has joined #ruby-lang
<rolfb>
is something replacing Iconv in ruby 2.0?
bradland has joined #ruby-lang
<manveru>
string encoding
<freedrull>
i think i am going to give up getting eventmachine-twitter working with ruby-processing, and just make an alternative to eventmachine-twitter(in some sort of nonblocking way), how about the old fashioned way with threads lol
slyphon has joined #ruby-lang
<manveru>
processing is on java?
agarcia has quit [Quit: Konversation terminated!]
<freedrull>
yeah
<manveru>
then go for it, jruby has native threads :)
<manveru>
oh, damn, now i summoned headius
<freedrull>
oh yeah! perfect
<freedrull>
maybe just open a connection to twitter's streaming api in another thread, have it write to some shared datastructure when there is new tweets, have my #draw method check that shared data for updates when its time to refresh the screen
vlad_sta_ has quit [Remote host closed the connection]
rampantmonkey has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<manveru>
just make sure you put a mutex around the access
sailias has quit [Quit: Leaving.]
<freedrull>
oh good idea
darix has quit [Quit: brb]
<freedrull>
although only one thing should be writing at a time
<gnufied>
there are like 10 locking primitives in JVM
<manveru>
yeah, but writing and reading at the same time is no good idea :)
<manveru>
of course you could just use a queue, if you only need one update at a time
darix has joined #ruby-lang
darix has quit [Changing host]
darix has joined #ruby-lang
vlad_starkov has joined #ruby-lang
cosah has joined #ruby-lang
<freedrull>
that would be fine too, the screen updates so fast anyway
areil has quit [Remote host closed the connection]
apeiros_ has quit [Read error: Connection reset by peer]
apeiros has joined #ruby-lang
<reactormonk>
tockitj_, .pryrc?
beiter has quit [Ping timeout: 246 seconds]
thinkdevcode has joined #ruby-lang
cschwartz has joined #ruby-lang
<tockitj_>
reactormonk, thats ok.. but i'm thinking of maybe some more general mechanism ? aside of pry
ruurd has joined #ruby-lang
<manveru>
tockitj_: RUBYOPT="-r whatevergem"
banisterfiend has joined #ruby-lang
cschwartz has quit [Ping timeout: 260 seconds]
apeiros has quit [Ping timeout: 264 seconds]
<tockitj_>
manveru, nice
<manveru>
man ruby for more :)
<tockitj_>
but gem can't auto-include itself into ruby (to act as core gem)
<manveru>
?
<manveru>
you mean in prelude?
<tockitj_>
don't know what prelude is :)
apeiros_ has joined #ruby-lang
<manveru>
heh
davidbalber|away is now known as davidbalbert
methods has left #ruby-lang [#ruby-lang]
<manveru>
that's where for example rubygems is required in 1.9
rampantmonkey has joined #ruby-lang
<manveru>
all the ruby core is in C
apeiros has joined #ruby-lang
<manveru>
only a few parts in the prelude.c are ruby
apeiros has quit [Read error: Connection reset by peer]
<tockitj_>
_all_ core stuff is C ?
<manveru>
yes
<manveru>
in MRI, that is
davidbalbert is now known as davidbalber|away
<tockitj_>
didn't know that :)
<tockitj_>
thanks
apeiros has joined #ruby-lang
<Harzilein>
h,,
<Harzilein>
hmm*
apeiros_ has quit [Ping timeout: 248 seconds]
Connecti0n has quit [Remote host closed the connection]
<Harzilein>
i feel a bit bad about using ragel for my informally specified format
<Harzilein>
the other extreme would be something like while line =~ /^Outdated gems/../^$/ # chris2
<Harzilein>
(i want to parse the output of bundle outdated)
<manveru>
oh my...
<manveru>
you had a problem, then you used regex... :)
<manveru>
and because two problems ain't enough, you square that with bundler
<Harzilein>
in the middle is something where i get to name the most important things, along the lines of statemachine
<chris2>
manveru: haha
<Harzilein>
uh, no, i did not start by wanting to parse something, then deciding it ought to be bunder output ;)
justinram has joined #ruby-lang
<chris2>
(more seriously, i would just do some plain line-based code with regexps)
beiter has joined #ruby-lang
<Harzilein>
any other input?
<bougyman>
you know what's fun? making a regexp parser in vimscript.
<reactormonk>
bougyman, writing syntax HL for vim?
<Harzilein>
no, vimscript isn't fun. i wanted to use it for... hmm... good thing i don't remember what i used it for, but i spent an entire saturday night (i.e. till long after dawn) with it
<bougyman>
reactormonk: yep
<chris2>
i curse the day someone decided to make vi.* programmable
<reactormonk>
bougyman, muahaha
<Harzilein>
oh, yes, i remember: i wanted to use vim's quite expansive language detection code as a file(1) replacement
<reactormonk>
bougyman, but at least you can get speed in vim - try implementing something similar to vim-CommandT in emacs
<jhn>
How come "hello".gsub(/([aeiou])/, '<\1>') #=> "h<e>ll<o>"
<jhn>
But "oh hai 10".gsub(/-?\d+/, '<\1>') #=> "oh hai <>"
<Harzilein>
bougyman: i need a ltgrey on slightly-less-ltgrey-theme to look at that i think... so when i pull back i can be sure i won't accidentally see it again :D
<reactormonk>
jhn, you didn't capture?
<bougyman>
Harzilein: ahahaha
<jhn>
Oh.
<jhn>
Parenthesis!
<jhn>
Oops! :)
stiang has joined #ruby-lang
<jhn>
I spent like an hour figuring that one out. Maybe I should ask for help more often...
tockitj_ has quit [Quit: Leaving]
<reactormonk>
you know the saying with tree and wood?
<jhn>
Yep. :)
headius has joined #ruby-lang
jarib has quit [Excess Flood]
beiter has quit [Quit: beiter]
jarib has joined #ruby-lang
jarib has quit [Excess Flood]
jarib has joined #ruby-lang
Axsuul has joined #ruby-lang
headius has quit [Ping timeout: 246 seconds]
beiter has joined #ruby-lang
beiter has quit [Client Quit]
beiter has joined #ruby-lang
headius has joined #ruby-lang
beiter has quit [Client Quit]
lcdhoffman has joined #ruby-lang
robotmay has quit [Remote host closed the connection]
rampantmonkey has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
pkrnj has quit [Client Quit]
pkrnj has joined #ruby-lang
wmoxam has quit [Ping timeout: 260 seconds]
oreoshake has joined #ruby-lang
<oreoshake>
anyone know of a lib to detect if two urls satisfy the same-origin policy? or a snippet of code I can use and attribute?
iamlacroix has left #ruby-lang [#ruby-lang]
Uranio has joined #ruby-lang
ryanf has joined #ruby-lang
carlosl__ has quit [Remote host closed the connection]
<andrewvos>
oreoshake: Kindly elaborate.
<andrewvos>
oreoshake: Ok I googled it. Cookies don't generally store the host name. So no, this is not possible.
<oreoshake>
it's unrelated to cookies, related to CSP (firefox won't send CSP reports cross-origin)
<andrewvos>
Holy shit. I just read that back. Why did I think you said cookies?
<andrewvos>
I think I saw the word cookie in another window.
<oreoshake>
well, that is usually the context in which it is discussed :)
<oreoshake>
i only ask because my first impl didn't work, realized this has to have been done a thousand times over
<andrewvos>
So you need to share a cookie between domains right?
<andrewvos>
This is your goal I'm assuming?
bluepojo has joined #ruby-lang
<oreoshake>
i need to determine if report-uri points to an external host, if so handle it differently. so my question isn't really about urls, just hosts
<andrewvos>
oreoshake: Well you would do that client side?
<oreoshake>
argh, terminology fail. i need to determine if repoort-uri points to a host on a different origin (which includes port numbers)
nitti_ has joined #ruby-lang
<oreoshake>
no, server side. i change the report-uri if its cross-origin
havenn has quit [Remote host closed the connection]
<oreoshake>
(uses an internal endpoint to forward the reports)
<andrewvos>
What is report-uri?
<oreoshake>
it's a directive of CSP that determines where the browser sends reports
<andrewvos>
This seems complex. Have you stopped to ask yourself "Why am I doing this shit?"?
nitti has quit [Ping timeout: 240 seconds]
<andrewvos>
If the introduction to something has the word "mitigate", you going to have a bad time.
<oreoshake>
absolutely. if you want to receive content security policy reports at a central endpoint that is not on the same origin, you need to work around this limitation in Firefox
wmoxam has joined #ruby-lang
<whitequark>
andrewvos: I can.
havenn has quit [Ping timeout: 246 seconds]
nitti_ has quit [Ping timeout: 246 seconds]
<oreoshake>
and it all boils down to determining if a URI satisfies the same origin policy for a base URI
<whitequark>
browsers were designed from scratch to allow embedding content from different origins. when the content is malicious and you don't filter your input, you get an [XSS] security hole.
<andrewvos>
whitequark: You can?
nitti has joined #ruby-lang
<whitequark>
CSP is a band-aid designed to save your ass if you don't filter your input.
stiang has quit [Quit: stiang]
<oreoshake>
agreed, but security is about layers
rippa has quit [Ping timeout: 245 seconds]
<andrewvos>
whitequark: What I don't understand is how you would filter external content?
<whitequark>
oreoshake: I don't believe that adding complexity to a problem with security will solve it
<whitequark>
andrewvos: don't include external content on your site
<andrewvos>
whitequark: If you're loading up some JS from an external source it's too late.
<whitequark>
yeah yeah. don't do that.
<andrewvos>
Okay
<oreoshake>
whitequark: agree to disagree :)
<andrewvos>
whitequark: So I think we both agree that CSP shouldn't be needed.
<andrewvos>
oreoshake: Are you a Technical Architect?
<oreoshake>
it isn't needed, it's a nice to have
<whitequark>
andrewvos: if you're already including untrusted code, nothing will save you
<oreoshake>
if you use CSP and don't allow inline-script, you can be pretty sure you don't have xss - again, as a blanked
<andrewvos>
oreoshake: A nice to have is a better web app. Don't waste time yak shaving this shit.
<oreoshake>
if you have CSP, it will identify xss in your app
nitti__ has quit [Ping timeout: 276 seconds]
<andrewvos>
Well done. Your users will be really excited.
<oreoshake>
you don't get it
<andrewvos>
(Sorry I'm not trying to be rude, just trying to explain my point)
<andrewvos>
I should get a card that says that on it, so I can hand it to coworkers.
vlad_starkov has quit [Remote host closed the connection]
Dreamer3 has joined #ruby-lang
jhn has quit [Ping timeout: 245 seconds]
dstywho has quit [Quit: Leaving]
senekis has quit [Read error: Operation timed out]
senekis has joined #ruby-lang
enebo has joined #ruby-lang
davidbalber|away is now known as davidbalbert
havenn has joined #ruby-lang
davidbalbert is now known as davidbalber|away
emptyflask has quit [Remote host closed the connection]
datanoise has quit [Ping timeout: 260 seconds]
runeb has joined #ruby-lang
runeb has quit [Remote host closed the connection]
blazes816 has joined #ruby-lang
BobAnon has quit [Ping timeout: 252 seconds]
array_ is now known as array
havenn has quit [Read error: Connection reset by peer]
L0L0L0L0L has joined #ruby-lang
pr0ton_ has joined #ruby-lang
davidbalber|away is now known as davidbalbert
<pr0ton_>
okay, i have some questions about threading / processes
<pr0ton_>
but i'm a bit confused because of different ruby versions and implementations
<pr0ton_>
i'm using 1.9.3 and i wanted to know if a thread will be a real kernel thread or more of a green thread?
<ryanf>
a real kernel thread
<pr0ton_>
i'm doing some fairly CPU intensive work (parsing XML) so I wanted to run it in a threadpool
<ryanf>
but with a global interpreter lock, so that only one thread can execute ruby code at a time
<pr0ton_>
ah i see. there is no way to get over the GIL ?
<banisterfiend>
pr0ton_: jruby
<pr0ton_>
hmmm.
Nisstyre has quit [Quit: Leaving]
beiter has quit [Quit: beiter]
methods1 has joined #ruby-lang
havenn has joined #ruby-lang
ruurd has quit [Quit: Leaving...]
ruurd has joined #ruby-lang
mwjcomputing has quit [Quit: Leaving]
pkrnj has quit [Quit: Computer has gone to sleep.]
<erikh>
totally unsure why Singleton has to make Marshal blow up
<erikh>
it should at least be configurable.
<oddmunds>
datanoise has joined #ruby-lang
emptyflask has joined #ruby-lang
ruurd has quit [Quit: Leaving...]
methods1 has left #ruby-lang [#ruby-lang]
oreoshake has quit [Remote host closed the connection]
ilyam_ has joined #ruby-lang
ruurd has joined #ruby-lang
pkrnj has joined #ruby-lang
oreoshake has joined #ruby-lang
oreoshake has quit [Remote host closed the connection]
alexkira has quit []
wmoxam_ has joined #ruby-lang
ilyam has quit [Ping timeout: 255 seconds]
ilyam_ is now known as ilyam
ilyam has quit [Read error: Connection reset by peer]
postmodern has joined #ruby-lang
ilyam has joined #ruby-lang
datanoise has quit [Ping timeout: 240 seconds]
apeiros_ has joined #ruby-lang
vlad_starkov has joined #ruby-lang
woollyams has quit [Quit: Computer has gone to sleep.]