mistym has quit [Remote host closed the connection]
diegoviola has joined #ruby-lang
ezkl has joined #ruby-lang
ezkl has quit [Changing host]
ezkl has joined #ruby-lang
sepp2k1 has quit [Read error: Connection reset by peer]
<deryl>
he
ConstantineXVI has quit [Remote host closed the connection]
ttilley has quit [Read error: Connection reset by peer]
ttilley has joined #ruby-lang
cads has joined #ruby-lang
ttilley has quit [Remote host closed the connection]
lsegal has joined #ruby-lang
VGoff is now known as VGoff_afk
RegEchse has quit [Quit: <3 WeeChat (v0.3.8-dev)]
cjs226 has quit []
VGoff_afk is now known as VGoff
tbuehlmann has quit [Ping timeout: 265 seconds]
ConstantineXVI has joined #ruby-lang
cads has quit [Ping timeout: 272 seconds]
brianpWins has quit [Quit: brianpWins]
mistym has joined #ruby-lang
s0ra_h is now known as sora_h
woollyams has joined #ruby-lang
cantonic has quit [Remote host closed the connection]
cantonic has joined #ruby-lang
savage- has quit [Remote host closed the connection]
fgomez has quit [Ping timeout: 252 seconds]
x0F has quit [Disconnected by services]
x0F_ has joined #ruby-lang
x0F_ is now known as x0F
ryanf has quit [Ping timeout: 252 seconds]
bfreeman has joined #ruby-lang
pygmael has quit [Quit: pygmael]
cirwin has joined #ruby-lang
<cirwin>
is it possible to use treetop on binary languages? I'm struggling to make it accept a regex containing \xff
<cirwin>
otherwise is there an alternative?
savage- has joined #ruby-lang
fgomez has joined #ruby-lang
enebo has quit [Quit: enebo]
brianpWins has joined #ruby-lang
ConstantineXVI has quit [Remote host closed the connection]
x0F has quit [Quit: Leaving]
x0F has joined #ruby-lang
nisstyre has quit [Ping timeout: 246 seconds]
nisstyre has joined #ruby-lang
kain has quit [Quit: Sto andando via]
tRAS has joined #ruby-lang
Watcher7_ has joined #ruby-lang
Watcher7 has quit [Ping timeout: 250 seconds]
macmartine has quit [Quit: macmartine]
Watcher7_ has quit [Client Quit]
savage- has quit [Remote host closed the connection]
savage- has joined #ruby-lang
tRAS has quit [Quit: Mother, did it need to be so high?]
spowers has left #ruby-lang [#ruby-lang]
yugui is now known as yugui_zzz
<epitron>
cirwin: have you ever seen erlang's binary parser?
<cirwin>
epitron: yeah
<cirwin>
it's awesome
<cirwin>
though in this case regexes are fine
<cirwin>
I just hacked a 'n' into the right place
<epitron>
i wonder if that could be reimplemented in ruby
<epitron>
hah
<epitron>
werd
<epitron>
JUST SAYIN
<epitron>
so did you implement motherforker for me? :D
<cirwin>
not yet
<epitron>
doh!
<epitron>
i was working on it a bit...
<epitron>
i've got like 3 blockers
<cirwin>
been writing a CSS-like framework for laying out iOS apps in ruby motion instead :p
<cirwin>
oh?
<epitron>
nice
<bnagy>
there are good binary parsers which are idiomatic ruby already
<epitron>
layout is so shitty
<epitron>
after a lot of thought, i realized that interfaces need to know about the data so that they can automatically lay things out
<epitron>
and so that the user/developer can supply layout hints
<epitron>
semantic stuff
<cirwin>
bnagy: linky?
<bnagy>
google ruby bindata
<postmodern>
cirwin, also you can use String#unpack if you don't mind it's character codes
<epitron>
bindata looks familiar...
fukushima has joined #ruby-lang
<cirwin>
postmodern: ideally I'd like to use a parser-generator
<cirwin>
or something equally heavyweight
<postmodern>
cirwin, no reason you couldn't use a PEG parser for that
<epitron>
likeeeeee.. ragel? :D
<cirwin>
postmodern: yeah, playing with parselet so far
<cirwin>
looks good
<cirwin>
though I tihnk I may have hit a problem...
<postmodern>
cirwin, just specify \x chars
<cirwin>
because some fields are prefixed with their length
<postmodern>
ha yeah
<cirwin>
postmodern: and make sure everything is marked as BINARY
<postmodern>
cirwin, if your dealing with fixed-length protocols, then you probably want bindata
<postmodern>
cirwin, since your basically mapping in a header structure
<postmodern>
cirwin, then using that to figure out what the remaining payload is
<bnagy>
tlv type stuff is why bindata exists, otherwise you can just wrap unpack
<epitron>
your not using you're properly postmodern
<postmodern>
epitron, merika
<cirwin>
it has the wonderful property of being mostly *not* fixed length (and recursive)
<cirwin>
but with bits of cruft mixed it
<cirwin>
*in
<cirwin>
maybe the best approach is to parse it twice
<cirwin>
one to remove all the cruft, and then once to get the structure
<epitron>
oh snap, i'm in #ruby-lang.. i thought this was #pry
<cirwin>
hiii epitron!
<epitron>
:D
<epitron>
oh yeah, so one of those blockers is just the basic daemon -> launcher script handoff thing
<epitron>
i have to fork off a process, then give control of it to the launcher
<epitron>
my posix fu is weak
<epitron>
apparently you can pass file descriptors thorugh unix domain sockets
<epitron>
but i don't know how to change a child's stdin/stdout file descriptors... or if that's what i'm supposed to do >_<
<postmodern>
epitron, believe you can use IO.pipe
<postmodern>
epitron, or some sort of reopen trickier
<epitron>
orly
yugui_zzz is now known as yugui
<postmodern>
epitron, yeah just like how you'd do it in a C program that setup a pipe, then forks
locks_ has joined #ruby-lang
<epitron>
ahh
<epitron>
okay, so here's the weird trick i'm trying to do
<epitron>
a commandline program has to hook into the forked child created by the daemon
locks_ has quit [Remote host closed the connection]
<epitron>
like this: 1) you run a binary, 2) binary tells the daemon ito make a new child, 3) binary gets control of the child
<ezkl>
PPID?
<epitron>
ppid?
<postmodern>
define: gets control?
<epitron>
stdin/out/err of the child go through the binary
<epitron>
and if the binary dies, the child dies
<epitron>
maybe there's an easy way to do this :)
<epitron>
where i don't have to mess with file descriptors
<ezkl>
epitron: Yeah.
Skif has quit [Quit: Leaving...]
Weems has quit []
Swimming_Bird has quit [Quit: Computer has gone to sleep.]
yugui is now known as yugui_zzz
tRAS has joined #ruby-lang
Weems has joined #ruby-lang
Weems has quit [Changing host]
Weems has joined #ruby-lang
yugui_zzz is now known as yugui
fukushima has quit [Quit: Leaving...]
yugui is now known as yugui_zzz
newbold_cloud has quit [Quit: Connection closed for inactivity]
brianpWins has quit [Quit: brianpWins]
fukushima has joined #ruby-lang
deobald__ has joined #ruby-lang
ramonmaruko has quit [Remote host closed the connection]
ramonmaruko has joined #ruby-lang
ramonmaruko has quit [Remote host closed the connection]
bryancp has quit [Remote host closed the connection]
ramonmaruko has joined #ruby-lang
yugui_zzz is now known as yugui
mistym has quit [Remote host closed the connection]
yxhuvud has joined #ruby-lang
rushed has joined #ruby-lang
rippa has joined #ruby-lang
cirwin has quit [Read error: Operation timed out]
tomzx has quit [Ping timeout: 260 seconds]
morozovm has joined #ruby-lang
morozovm has quit [Client Quit]
slyphon has quit [Ping timeout: 245 seconds]
petercooper has quit [Remote host closed the connection]
imperator2 has joined #ruby-lang
tRAS has quit [Quit: Mother, did it need to be so high?]
ryanf has joined #ruby-lang
deobald__ has quit [Ping timeout: 260 seconds]
<epitron>
yugui is a light sleeper
tRAS has joined #ruby-lang
imperator2 has quit [Quit: Leaving]
ridders24 has joined #ruby-lang
shevy has quit [Ping timeout: 245 seconds]
ridders24 has quit [Ping timeout: 248 seconds]
ridders24 has joined #ruby-lang
shevy has joined #ruby-lang
|Vargas| has joined #ruby-lang
burgestrand has quit [Quit: Leaving.]
ryanf_ has joined #ruby-lang
ridders24 has quit [Ping timeout: 256 seconds]
Weems has quit []
Karmaon has quit [Ping timeout: 276 seconds]
Weems has joined #ruby-lang
Weems has quit [Changing host]
Weems has joined #ruby-lang
ramonmaruko has quit [Remote host closed the connection]
ramonmaruko has joined #ruby-lang
Radium has quit [Ping timeout: 252 seconds]
brianpWins has joined #ruby-lang
Radium has joined #ruby-lang
gouthamvel has joined #ruby-lang
ramonmaruko has quit [Remote host closed the connection]
ramonmaruko has joined #ruby-lang
sei has joined #ruby-lang
ramonmaruko has quit [Read error: Connection reset by peer]
indeterminate has quit [Ping timeout: 260 seconds]
indeterminate has joined #ruby-lang
ramonmaruko has joined #ruby-lang
sei has quit [Ping timeout: 244 seconds]
neoesque has quit [Quit: Bye!]
gouthamvel has left #ruby-lang [#ruby-lang]
b1rkh0ff has joined #ruby-lang
fukushima has quit [Quit: Leaving...]
fukushima has joined #ruby-lang
WillMarshall has quit [Quit: Computer has gone to sleep.]
woollyams has quit [Quit: Computer has gone to sleep.]
woollyams has joined #ruby-lang
fukushima has quit [Quit: Leaving...]
vmoravec has joined #ruby-lang
ramonmaruko has quit [Remote host closed the connection]
robbyoconnor has joined #ruby-lang
ramonmaruko has joined #ruby-lang
dvorak has quit [Ping timeout: 245 seconds]
zz_chrismcg is now known as chrismcg
fukushima has joined #ruby-lang
vmoravec has quit [Ping timeout: 240 seconds]
S2kx has left #ruby-lang [#ruby-lang]
vmoravec has joined #ruby-lang
srbartlett has quit [Remote host closed the connection]
tRAS has quit [Ping timeout: 255 seconds]
tRAS has joined #ruby-lang
JohnBat26 has quit [Remote host closed the connection]
tomb_ has joined #ruby-lang
zmack has quit [Read error: Connection reset by peer]
zmack has joined #ruby-lang
robotmay has joined #ruby-lang
Harzilein has left #ruby-lang [#ruby-lang]
Harzilein has joined #ruby-lang
<Harzilein>
hmm
<Harzilein>
hi
youngin has quit [Read error: Connection reset by peer]
youngin has joined #ruby-lang
<Harzilein>
is there any wrapper-something where i can plug in some mapping between properties and websites, (say) associated nokogiri scraping methods and it will do caching for me and allow me to query the results in an activerecord-like way
<Harzilein>
?
ryanf_ has quit [Quit: leaving]
aef has quit [Remote host closed the connection]
aef has joined #ruby-lang
ryanf has quit [Quit: leaving]
futurechimp has joined #ruby-lang
schroedinbug has quit [Ping timeout: 272 seconds]
gasbakid__ has joined #ruby-lang
woollyams has quit [Ping timeout: 255 seconds]
d3vic3 has quit [Read error: Connection reset by peer]
gasbakid has quit [Ping timeout: 272 seconds]
dnbert has quit [Ping timeout: 252 seconds]
futurechimp has quit [Ping timeout: 244 seconds]
ramonmaruko has quit [Ping timeout: 244 seconds]
futurechimp has joined #ruby-lang
ramonmaruko has joined #ruby-lang
d3vic3 has joined #ruby-lang
cantonic has quit [Remote host closed the connection]
cantonic has joined #ruby-lang
gouthamvel has joined #ruby-lang
cantonic has quit [Read error: Connection reset by peer]
bryancp has quit [Remote host closed the connection]
yugui is now known as yugui_zzz
yugui_zzz is now known as yugui
mistym has quit [Remote host closed the connection]
tommyvyo has joined #ruby-lang
hynkle has joined #ruby-lang
* imperator
wonders what the semantics of class Foo << Bar would be
<imperator>
shortcut for class Foo; include Bar perhaps?
<chris2>
syntax error, unexpected tLSHFT
<rue>
chris2: That’s syntax, not semantics :)
<chris2>
without syntax, there is no semantics
<rue>
Semantic error: what the fuck do you think you’re doing?
<chris2>
rather extend than include imo
<rue>
Yes, that would make sense
<rue>
Extend all instances of the class
<chris2>
class << is metaclass stuff
<rue>
I.e. where < inserts to the normal parent slot, << inserts before the class in MRO
<chris2>
good
<rue>
Time for an RCR
<imperator>
deep in the bowels of parse.y
<chris2>
should be easy to add
<imperator>
please do :)
<chris2>
i dare touch the ruby syntax
<imperator>
"experimental fork"
mistym has joined #ruby-lang
mstratman has joined #ruby-lang
<rue>
* Real fork, not one of those pansy-ass Github sporks
tekin_ has joined #ruby-lang
naquad has quit [Excess Flood]
naquad has joined #ruby-lang
<tsou>
getting my first steps in ruby here.. having an object_id, can i get back the object?
Defusal has quit [Remote host closed the connection]
<imperator>
"spork: a pansy-ass fork of a github project"
Defusal has joined #ruby-lang
tekin_ has quit [Client Quit]
rmascarenhas has joined #ruby-lang
<rue>
tsou: 1. never do that, 2. you can maintain your own structure for it, or 3. you can use ObjectSpace
benanne has joined #ruby-lang
<tsou>
rue: no, i want to test some numbers for waht object they represent.. i'll look into ObjectSpace now..
gix has quit [Ping timeout: 256 seconds]
<shevy>
tsou I don't think it is possible
<tsou>
Hmmm didn't find a method in ObjectSpace that would allow me to do that..
<tsou>
simultaneously I'm trying to understand why there is no Boolean class..
slyphon has joined #ruby-lang
<bnagy>
works fine for me
publicvoid has joined #ruby-lang
<shevy>
tsou true.class # => TrueClass
<bnagy>
s="frog";s.object_id;ObjectSpace.each_object {|o| p o if o.object_id==70346485335520}
<imperator>
tsou, was proposed and rejected many years ago
<bnagy>
"frog"
<tsou>
shevy: yes, I'm wondering why
<tsou>
imperator: I see.. was there a justification for the rejection that I can find?
<dr_bob>
bnagy, tsou: use ObjectSpace._id2ref
<bnagy>
oh, that's nice
<bnagy>
why didn't I know about that before? Oh wait, cause it's a stupid thing to do in the first place :D
<shevy>
indeed that is cool
<dr_bob>
Not more stupid than using ObjectSpace.each_object...
<dr_bob>
s/Not/no/
gix has joined #ruby-lang
<rue>
I think the general concept was meant
<tsou>
dr_bob: thanks, that worked fine ;)
<bnagy>
dr_bob: it's a much nicer way to do a stupid thing
<dr_bob>
ywc
carloslopes has joined #ruby-lang
<imperator>
no, YOUR STUPID!
<tsou>
bnagy: definitelly not nicer :P
<tsou>
interesting, 0 is false, 2 is true, 4 is nil, and the odd number 2k+1 seems to be mapped to k...
<dr_bob>
A boolean class would not bring any advantages IMHO since any value can be used as boolean already. A test for a boolean class would not bring any advantages
<rking>
tsou: Wait, mapped to k?
<tsou>
..and object_id's can be negative..!
<tsou>
rking: yeap
<tsou>
dr_bob: first, it makes more "sense", and you could have a not method flipping the values, but I see that they are immutable now..
<rking>
tsou: How do you know it's "mapped to k"?
<imperator>
dr_bob, are NULL's in a database true or false?
srbartlett has quit [Remote host closed the connection]
<rking>
A NULL is the falsest thing I know of.
<tsou>
rking: well.. by playing with k.object_id and with ObjectSpace._id2ref(k)
<imperator>
no, it's not false...it's undefined
<rking>
Even NULL != NULL in many contexts.
sockmonk has joined #ruby-lang
<imperator>
a boolean class would let me reopen it and define things like that
<michael_mbp>
thanks Mon_Ouie got distracted on a call.
<tsou>
imperator: which seems to be a freedom that ruby liked to give to its programmers.. at leas from waht i've seen so far..
<rking>
imperator: Hrm, but in a boolean context you don't have 3 options.
<rking>
tsou: OK, I thought you meant 'k', the string.
<dr_bob>
imperator, not needed. You can simply add methods to Object, FalseClass and NilClass
<carloslopes>
tsou: this is an interesting thing about ruby internals :)
bryancp has joined #ruby-lang
<tsou>
carloslopes: heh obrigado, pretty much it's the conclusion i reached by playing with those two methods myself :)
<imperator>
rking, but i could
<imperator>
quantum superpositions!
<imperator>
true and false at the same time!
<carloslopes>
tsou: ;)
<imperator>
or something
<tsou>
dr_bob: so pretty much you deleted the "advantage" you just suggested, so...
<tsou>
oops sorry confusion
<rking>
imperator: Resorting to qoolean context is cheating. >=(
<tsou>
dr_bob, the advantage taht imperator suggested
<imperator>
anyway, just google "ruby boolean class" if you want to find the discussions
<tsou>
imperator: i did, i read them, but they didn't make much sense
mistym has quit [Remote host closed the connection]
michael_mbp has quit [Remote host closed the connection]
<imperator>
used to be an RCR out there, but rcrchive.net appears to be defunct
dv310p3r has joined #ruby-lang
rippa has quit [Quit: derp herp]
<imperator>
tsou, the fudge is module Boolean; end; class TrueClass; include Boolean; end; class FalseClass; include Boolean; end
yugui is now known as yugui_zzz
<tsou>
imperator: ermm.. ugly, using mixins instead of inheritance :P
jbwiv has quit [Ping timeout: 272 seconds]
<tsou>
i guess it seems 'wrong' to me thinking of them as types
<tsou>
and nil makes a lot of sense being singleton, while true/false seem to "want" a class of their own..
<imperator>
anyway, it's an old battle i'm too tired to fight again
<tsou>
guess so, sorr for bringing it up ;)
<rue>
False
<imperator>
Maybe
<tsou>
just couldn't find a satisfying answer on the online discussions i checked
<tsou>
bur thanks for the input everyone ;)
dfr|mac has joined #ruby-lang
tekin has joined #ruby-lang
rmascarenhas has quit [Quit: leaving]
slyphon has quit [Ping timeout: 245 seconds]
rmascarenhas has joined #ruby-lang
ConstantineXVI has joined #ruby-lang
enebo has joined #ruby-lang
dfr|mac has quit [Remote host closed the connection]
gix has quit [Ping timeout: 265 seconds]
gix has joined #ruby-lang
<shevy>
tsou that's always been the problem... mixin vs. inheritance
<tsou>
shevy: in this case, mixin didn't make sense, at least not the way I meant it
gregf has quit [Quit: WeeChat 0.3.7]
bhrgunatha has joined #ruby-lang
yugui_zzz is now known as yugui
<tsou>
is there a way to "close" a class so that no more new instances of it can be created, or to make a method in a class non-overidable (to either subclasses or singleton methods of its objects)?
<imperator>
tsou, gem install final
<shevy>
dont think you can close a class?
<tsou>
imperator: doesn't look like it does that..
<tsou>
"This prevents your class from being subclassed or having its methods redefined."
Radium has quit [Read error: Connection reset by peer]
<shevy>
yeah guess it still allows you to create a new instance of itself
<imperator>
oh, no new instances either, hm
<shevy>
tsou you seem to want to go into the dark corners of ruby ;)
<tsou>
it was two questions in one..
<shevy>
tsou my brain proudly takes the first question and haaaappily discards everything else!
<imperator>
class Foo; def initialize; raise; end; end;
<tsou>
1) if i can close a class in the sense that I cannot create new objects from it.
<shevy>
1) k you can not
<tsou>
imperator: seems like cheating ;)
mistym has joined #ruby-lang
<shevy>
Foo.finalize would be nice
<shevy>
tsou though, what about modules?
<tsou>
2) make a method "final", so that if I subclass this class and override this method, *or* if I try to re-open the class and change it, to fail.
<tsou>
shevy: heh, I like dark corners :P
<tsou>
imperator: because right after that you can do again class Foo; def initialize; a bunch of stuff; end; end;
<imperator>
Foo.freeze
<shevy>
well we can always write a proposal for ruby core team
<singpolyma>
tsou: monkeypatch def initialize to throw an exception ;)
<shevy>
someone copy pasted here ... :P
<tsou>
imperator: nope ;)
<imperator>
tsou, can't modify a frozen class, though you can still instantiate it
toretore has quit [Read error: Connection reset by peer]
toertore has joined #ruby-lang
<Pupeno_W>
Mon_Ouie: interesting!
Swimming_Bird has joined #ruby-lang
bfreeman has quit [Quit: bfreeman]
toertore has quit [Read error: Connection reset by peer]
toretore has joined #ruby-lang
headius has quit [Quit: headius]
dfr|mac has joined #ruby-lang
rippa has joined #ruby-lang
headius has joined #ruby-lang
Skif has joined #ruby-lang
|Vargas| has quit [Quit: ...]
savage- has quit [Remote host closed the connection]
jacobwg has joined #ruby-lang
jacobwg has quit [Client Quit]
benanne has quit [Quit: kbai]
tsou has quit [Quit: leaving]
wmoxam has joined #ruby-lang
wmoxam has quit [Changing host]
wmoxam has joined #ruby-lang
shajith has quit [Ping timeout: 245 seconds]
TDJACR has quit [Ping timeout: 250 seconds]
asdfqwer has joined #ruby-lang
TDJACR has joined #ruby-lang
Asher has quit [Ping timeout: 244 seconds]
Asher has joined #ruby-lang
brianpWins has quit [Quit: brianpWins]
d3vic3 has quit [Ping timeout: 250 seconds]
<rue>
Conventions R good
d3vic3 has joined #ruby-lang
tekin has quit [Remote host closed the connection]
tekin has joined #ruby-lang
<apeiros_>
yeah, everybody loves going to conventions! ( ;-) )
CarlosAkaRubyNoo has joined #ruby-lang
<carloslopes>
apeiros_: +1
Asher1 has joined #ruby-lang
d3vic3 has quit [Read error: Operation timed out]
CarlosAkaRubyNoo has quit [Client Quit]
Asher has quit [Ping timeout: 245 seconds]
<andrewvos>
rue: Not sure what you -r talking about?
slyphon has joined #ruby-lang
d3vic3 has joined #ruby-lang
tenderlove has joined #ruby-lang
SilverMonkey has joined #ruby-lang
kings has joined #ruby-lang
bryancp has quit [Remote host closed the connection]
kings is now known as Guest91606
SilverMonkey has quit [Client Quit]
Guest91606 has quit [Client Quit]
ruby_noob has joined #ruby-lang
MilkyWay has joined #ruby-lang
headius has quit [Quit: headius]
ruby_noob has left #ruby-lang [#ruby-lang]
ruby_noob has joined #ruby-lang
d3vic3 has quit [Quit: leaving]
ruby_noob has left #ruby-lang [#ruby-lang]
<cout>
I wish miniunit would run my tests in the order in which they are defined :(
asdfqwer has quit [Read error: No route to host]
lele|w has quit [Ping timeout: 264 seconds]
Waikiki has quit [Quit: Bye]
futurechimp has joined #ruby-lang
<cout>
it's harder to track down problems in more complex tests when the simpler ones don't even run
lele|w has joined #ruby-lang
d3vic3 has joined #ruby-lang
<manveru>
get yourself some bacon :)
<andrewvos>
That can't be your answer to everything manveru.
<apeiros_>
it's a great answer
<apeiros_>
to most questions
manxingxing has joined #ruby-lang
<shevy>
what is the meaning of life?
manxingxing has left #ruby-lang [#ruby-lang]
<apeiros_>
there's none
<andrewvos>
shevy: Bacon.
manxingxing has joined #ruby-lang
<apeiros_>
oh, dang!
<apeiros_>
see, bacon would have been the far better answer!
<andrewvos>
Maybe manveru is on to something.
manxingxing has left #ruby-lang [#ruby-lang]
markizko has joined #ruby-lang
manxingxing has joined #ruby-lang
novodinia has joined #ruby-lang
<markizko>
Hello.
<markizko>
YAML.load tries to open non existent 'utf16_le.so' and 'utf16_be.so' files instead of 'utf_16le.so' and 'utf_16be.so' filling up strace log. Is that even intentional? (gist: https://gist.github.com/27e50a02f7b2dfd6f365 )
vmoravec has quit [Quit: Leaving]
manxingxing has left #ruby-lang [#ruby-lang]
<rking>
markizko: I'd say that's an above-average LD dirs, but the idea is pretty common, there.
<apeiros_>
ah load-path bloat
<shevy>
haha
<markizko>
It's not that it tries to load all those files
<markizko>
every time a model with a serialized field is received from a db
<apeiros_>
markizko: what engine?
<apeiros_>
--> YAML::ENGINE.yamler
<markizko>
Psych
unsymbol has quit [Ping timeout: 272 seconds]
<apeiros_>
ok, ping tenderlove then
unsymbol has joined #ruby-lang
<markizko>
ping tenderlove
<apeiros_>
or even better, submit an issue on github
bryancp has joined #ruby-lang
<tenderlove>
HELLO
<shevy>
oh noes
<shevy>
HIDE EVERYONE its tenderlove
<tenderlove>
O_O
<markizko>
(ducks)
<apeiros_>
tenderlove: shevy's got huganoya
<apeiros_>
he's afraid of hugs…
trips has joined #ruby-lang
<apeiros_>
hm, s/huganoya/huganoia/ - way to kill a joke :-S
<tenderlove>
markizko: I'd guess that's from psych trying to load those encodings.
<tenderlove>
yaml supports utf8, utf16be, and utf16le
<markizko>
well it does so with every YAML.load call
<markizko>
and it tries the wrong file
<tenderlove>
that's pretty crazy
robotmay has quit [Remote host closed the connection]
<markizko>
utf16_le instead of utf_16le
gouthamvel has joined #ruby-lang
manxingxing has joined #ruby-lang
<tenderlove>
I don't think it's anything to do with psych, but more to do with ruby's encoding system
<tenderlove>
(since psych doesn't actually try to load those so files)
savage- has joined #ruby-lang
trips has quit [Client Quit]
<tenderlove>
hmmm
trips has joined #ruby-lang
<tenderlove>
markizko: you said you're just loading yaml from the db?
<trips>
Editing/Appending to a regex... Can you somehow? r = %r{foo}; s = r + /\d?/. So s matches /foo\d?/. I mean I could convert r to a string and create a new regex with it I guess, but is there an alternative?
tsou has joined #ruby-lang
<Mon_Ouie>
s = /#{r}\d?/
<carloslopes>
trips: use Regexp interpolation, like Mon_Ouie said
<Mon_Ouie>
Which pretty much works as you said, actually
<markizko>
tenderlove: yep, indirectly, an AR model with a `serialize`d field
<markizko>
it uses YAML by default
<markizko>
using YAML.load directly results in same strace output
<rue>
tenderlove: Hey, when chris2 adds the class Foo << SomeModule; end syntax to automatically extend all instances of Foo with SomeModule, will you merge it in trunk? imperator and me agreed it’s necessary.
<tenderlove>
seems legit! ;-)
dr_bob has joined #ruby-lang
<rue>
Sweet
<rue>
NP: A-Ha: Take on Me
<carloslopes>
tenderlove: sends a hug to Gorbachev in my name :)
benanne has joined #ruby-lang
<tenderlove>
carloslopes: done!
<carloslopes>
tenderlove: sweet! \o/
manxingxing has joined #ruby-lang
manxingxing has left #ruby-lang [#ruby-lang]
cirwin has joined #ruby-lang
manxingxing_ has joined #ruby-lang
carloslopes has quit [Ping timeout: 245 seconds]
<hagabaka>
rue: class Foo << SomeModule; end syntax to automatically extend all instances of Foo with SomeModule? is it for Ruby 2?
<rue>
Yep
<hagabaka>
does extending all instances mean the same as including it in the class?
manxingxing_ has left #ruby-lang [#ruby-lang]
<hagabaka>
or was it a joke?
<andrewvos>
Extending instances is no laughing matter hagabaka.
chrismcg is now known as zz_chrismcg
<hagabaka>
:/
wvdschel has joined #ruby-lang
burgestrand has joined #ruby-lang
dr_turkleberry has joined #ruby-lang
francisfish has quit [Remote host closed the connection]
<rue>
hagabaka: #extend and #include do different things
burgestrand has quit [Remote host closed the connection]
burgestrand has joined #ruby-lang
<hagabaka>
but doesn't including in the class have the effect of extending to all instances? other than the included hook
tRAS has joined #ruby-lang
<rue>
No
<rue>
There’s one very important difference
gouthamvel has quit [Ping timeout: 272 seconds]
<hagabaka>
what's that?
wvdschel has quit [Read error: Connection reset by peer]
gouthamvel has joined #ruby-lang
b1rkh0ff has quit [Ping timeout: 272 seconds]
mssola has joined #ruby-lang
wvdschel has joined #ruby-lang
wvdschel has joined #ruby-lang
<markizko>
tenderlove: btw, it seems to impact Psych speed A LOT
<markizko>
simple deserialization takes 15 times longer in Psych than in Syck
<tenderlove>
even just feeding the libyaml parser (without doing ruby deserializiation) is slower :(
17SAA51V4 has joined #ruby-lang
Pupeno_W has quit [Ping timeout: 272 seconds]
Pupeno_W_ is now known as Pupeno_W
jbsan has quit [Quit: jbsan]
<markizko>
tenderlove: I see. That's kinda sad.
<tenderlove>
yup
<tenderlove>
I should report it to the libyaml folks, but it means I'd have to write a C program that compares libyaml vs syck
imperator2 has joined #ruby-lang
mark_locklear has quit [Remote host closed the connection]
deobald__ has joined #ruby-lang
fukushima has joined #ruby-lang
ryez has quit [Ping timeout: 245 seconds]
macmartine has joined #ruby-lang
Swimming_Bird has joined #ruby-lang
zmack has joined #ruby-lang
francisfish has joined #ruby-lang
musl has quit [*.net *.split]
knu has quit [*.net *.split]
solars has quit [*.net *.split]
rmascarenhas has quit [*.net *.split]
spuk has quit [*.net *.split]
singpolyma has quit [*.net *.split]
flebel has quit [*.net *.split]
chris2 has quit [*.net *.split]
ged has quit [*.net *.split]
tr-808 has quit [Remote host closed the connection]
tr-808_ has joined #ruby-lang
tr-808 has joined #ruby-lang
musl has joined #ruby-lang
solars has joined #ruby-lang
spuk has joined #ruby-lang
rmascarenhas has joined #ruby-lang
chris2 has joined #ruby-lang
ged has joined #ruby-lang
flebel has joined #ruby-lang
singpolyma has joined #ruby-lang
knu has joined #ruby-lang
lsegal has joined #ruby-lang
bryancp has joined #ruby-lang
dalekurt has joined #ruby-lang
Guedes has quit [Ping timeout: 244 seconds]
Guedes has joined #ruby-lang
tenderlove has quit [Remote host closed the connection]
deobald__ has quit [Ping timeout: 260 seconds]
francisfish has quit [Remote host closed the connection]
dr_turkleberry has left #ruby-lang [#ruby-lang]
lianj has quit [Ping timeout: 265 seconds]
17SAA51V4 has quit [Quit: 17SAA51V4]
markizko has left #ruby-lang [#ruby-lang]
lianj has joined #ruby-lang
lianj has quit [Changing host]
lianj has joined #ruby-lang
benanne has quit [Quit: kbai]
toretore has quit [Read error: Connection reset by peer]
toertore has joined #ruby-lang
ridders24 has joined #ruby-lang
vmatiyko has quit [Read error: Connection reset by peer]
znake has joined #ruby-lang
Swimming_Bird has quit [Quit: Computer has gone to sleep.]
imperator2 has quit [Ping timeout: 244 seconds]
gregf has joined #ruby-lang
vmatiyko has joined #ruby-lang
vmatiyko has quit [Read error: Connection reset by peer]
Pupeno_W_ has joined #ruby-lang
francisfish has joined #ruby-lang
vmatiyko has joined #ruby-lang
Pupeno_W has quit [Ping timeout: 245 seconds]
Pupeno_W_ is now known as Pupeno_W
<sockmonk>
how can I do a regex match against a string with invalid encoding? I keep getting 'ArgumentError: invalid byte sequence in UTF-8'
<sockmonk>
ruby 1.9.2; the string comes from ERB: erb_instance.result(binding)
<sockmonk>
everything in the app that I can think of is consistently UTF-8; just checking .valid_encoding? at multiple steps shows that it stops being valid after calling .result(binding)
dr_turkleberry has joined #ruby-lang
dr_turkleberry has left #ruby-lang [#ruby-lang]
chimkan_ has joined #ruby-lang
voker57 has joined #ruby-lang
voker57 has quit [Changing host]
voker57 has joined #ruby-lang
publicvoid has quit [Remote host closed the connection]
yxhuvud has quit [Ping timeout: 245 seconds]
vmatiyko has quit [Read error: Connection reset by peer]
deryldoucette has joined #ruby-lang
vmatiyko has joined #ruby-lang
vmatiyko has quit [Read error: Connection reset by peer]
ezkl has quit [Quit: QUIT!]
vmatiyko has joined #ruby-lang
Swimming_Bird has joined #ruby-lang
znake has quit [Read error: Connection reset by peer]
znake has joined #ruby-lang
vmatiyko has left #ruby-lang [#ruby-lang]
imperator2 has joined #ruby-lang
sei has joined #ruby-lang
dalekurt has quit [Ping timeout: 245 seconds]
publicvoid has joined #ruby-lang
indeterminate has quit [Read error: Operation timed out]
Guedes is now known as Guedes_out
francisfish has quit [Remote host closed the connection]