apeiros_ has quit [Remote host closed the connection]
Erlkoenig has quit [Quit: Leaving.]
ilyam has quit [Quit: ilyam]
khoa has quit [Read error: Connection timed out]
havenn has joined #ruby-lang
khoa has joined #ruby-lang
spuk has quit [Ping timeout: 240 seconds]
chimkan has quit [Quit: chimkan]
S1kx has quit [Ping timeout: 246 seconds]
goshakkk has joined #ruby-lang
s0ra_h is now known as sora_h
desmondmonster has joined #ruby-lang
t44879 has quit [Remote host closed the connection]
nirix has joined #ruby-lang
t70675 has joined #ruby-lang
khoa has quit [Read error: Connection timed out]
ilyam has joined #ruby-lang
khoa has joined #ruby-lang
crankharder has quit [Ping timeout: 248 seconds]
crankharder has joined #ruby-lang
havenn has quit [Remote host closed the connection]
<seanstickle>
steveklabnik: yt?
ryez has quit [Quit: Page closed]
ilyam has quit [Quit: ilyam]
chessguy has quit [Remote host closed the connection]
kingCrawlerx has quit [Quit: Computer has gone to sleep]
Tearan has joined #ruby-lang
gsav has quit [Read error: Connection reset by peer]
<steveklabnik>
huh?
voker57 has joined #ruby-lang
voker57 has quit [Changing host]
voker57 has joined #ruby-lang
dous has quit [Remote host closed the connection]
savage- has quit [Ping timeout: 265 seconds]
<banisterfiend>
seanstickle: sup stick
khoa has quit [Read error: Connection timed out]
khoa has joined #ruby-lang
<seanstickle>
steveklabnik: hi! just wanted to thank you for the recommendation of "Protocol"
<seanstickle>
steveklabnik: reading it today, quite good
<seanstickle>
banisterfiend: hey pry guy!
robbyoconnor has joined #ruby-lang
gsav has joined #ruby-lang
robbyoconnor has quit [Changing host]
robbyoconnor has joined #ruby-lang
<banisterfiend>
seanstickle: wats up
<steveklabnik>
awesome!
<steveklabnik>
glad you're enjoying it
<steveklabnik>
i was just confused as to what yt? meant
<steveklabnik>
oh, you there?
<steveklabnik>
i bet
<seanstickle>
steveklabnik: it helps that it's written a little more accessibly than raw Deleuze
<seanstickle>
steveklabnik: yt = you there, yes
<seanstickle>
Good lord, trying to read "The Fold" had my brain all seized up
<seanstickle>
banisterfiend: reading critical theory applied to networking protocols, thanks to steveklabnik
robbyoconnor has quit [Read error: Connection reset by peer]
<banisterfiend>
lol is that kind of like the quantum mechanics of potatoes
<seanstickle>
banisterfiend: ah, no,
<seanstickle>
banisterfiend: more about how distributed systems can be mechanisms of social control
<seanstickle>
Sort of like Lessig's "Code", but with a French analytic twist
<seanstickle>
Basically, anti-utopianism for the Internet
<banisterfiend>
"french" and "analytic" dont go well together in my mind
<banisterfiend>
in my experience the french just write 'mush'
<seanstickle>
banisterfiend: aw, you don't read the good people then
<steveklabnik>
heh
<steveklabnik>
no, i bet he's talking about the same people
<steveklabnik>
you're right, it's way more accesible than straight deleuze. i havent read the fold, but i did recently finish both volumes of capitalism and schizophrenia
<steveklabnik>
and by 'finish' i mean 'say wtf repeatedly'
<seanstickle>
I just started Anti-Oedipus
<seanstickle>
Which is quite shocking
<steveklabnik>
i hope you have a background in freud!
<seanstickle>
A fair bit, yes.
<seanstickle>
We read him in college, and then I have read him since
<steveklabnik>
you'll be far better equipped than me
<steveklabnik>
but i guess if you've already started than you know that
<seanstickle>
We'll see.
<seanstickle>
So you list Critical Code Studies as an interest on your site.
<seanstickle>
Can you point me to good examples of that?
<seanstickle>
That is, non-bullshit stuff (no phallocentric virus readings, please)
spuk has joined #ruby-lang
robbyoconnor has joined #ruby-lang
khoa has quit [Read error: Connection timed out]
khoa has joined #ruby-lang
<steveklabnik>
welllllllll
<steveklabnik>
just because i'm interested doesnt mean i find things GOOD
t97393 has quit [Remote host closed the connection]
mortice has joined #ruby-lang
t29826 has joined #ruby-lang
bytephilia has joined #ruby-lang
jarib has joined #ruby-lang
khoa has quit [Read error: Operation timed out]
khoa has joined #ruby-lang
<gnufied>
lzhz: quite a lot of projects have switched to new hash syntax. to my horror even libraries. so the only reason for them to stop supporting 1.8 is - gotta use new hash syntax
<gnufied>
"support of ruby 1.8 has been dropped due to Mongoid 3.0 that only supports 1.9 new hash syntax"
<banisterfiend>
gnufied: in a way it's good, as it may force people to move OFF 1.8, and therefore other libraries dont have to concern themselves with supporting 1.8 in the future ;)
<banisterfiend>
1.8 support is a PITA
<yorickpeterse>
judofyr: madness!
<matled>
1.9 support, too
rue has joined #ruby-lang
chendo has quit [Ping timeout: 256 seconds]
<gnufied>
banisterfiend: I understand, but I have a largish project still on 1.8, so i am being selfish I guess
<banisterfiend>
gnufied: how much of an effort is it for you to upgrade to 1.9?
<banisterfiend>
just curious..
<whitequark>
1.8 is past its end of life
<whitequark>
you don't have a choice to migrate or not to migrate off 1.8
<whitequark>
you have to.
<gnufied>
we just upgraded to rails 3 and it took a month. product owners won't be happy, if we ask another 10 days for upgrading to 1.9
<judofyr>
yorickpeterse: madness?
<foucist>
seems like there should be an oldruby2newruby tool, like html2haml
<gnufied>
banisterfiend: small team, really and lot of critical stuff. not typical crud app.
<judofyr>
foucist: Python tried that (2to3) , but it didn't work out
<whitequark>
foucist: stdlib changes cannot be automatically applied to the code
<whitequark>
and there are quite a few things except the syntax. Encoding to say at least.
t65405 has quit [Remote host closed the connection]
t25400 has joined #ruby-lang
yankov has joined #ruby-lang
wallerdev has joined #ruby-lang
andrewhl has joined #ruby-lang
gnufied has quit [Quit: Leaving.]
<rue>
It’s cool
qpingu has quit [Ping timeout: 260 seconds]
erichmenge has joined #ruby-lang
kitallis has quit [Quit: Computer has gone to sleep.]
m3nd3s_ has quit []
eyda|mon has quit [Ping timeout: 265 seconds]
|Vargas| has quit [Quit: ...]
EvilJStoker has quit [Excess Flood]
alvaro_o has joined #ruby-lang
bougyman_ has quit [Changing host]
bougyman_ has joined #ruby-lang
bougyman_ is now known as bougyman
gnufied has joined #ruby-lang
EvilJStoker has joined #ruby-lang
tenderlove has joined #ruby-lang
tenderlove has quit [Remote host closed the connection]
tenderlove has joined #ruby-lang
gnufied has quit [Client Quit]
dhruvasa1ar has quit [Ping timeout: 245 seconds]
gnufied has joined #ruby-lang
outoftime has joined #ruby-lang
areil has quit [Remote host closed the connection]
eyda|mon has joined #ruby-lang
eyda|mon has quit [Changing host]
eyda|mon has joined #ruby-lang
dhruvasagar has joined #ruby-lang
ivanoats has joined #ruby-lang
ivanoats has quit [Changing host]
cschwartz has quit [Ping timeout: 256 seconds]
ivanoats has joined #ruby-lang
Erlkoenig has joined #ruby-lang
ivanoats has quit [Ping timeout: 246 seconds]
heftig has quit [Ping timeout: 245 seconds]
heftig has joined #ruby-lang
goshakkk has quit [Ping timeout: 244 seconds]
<Erlkoenig>
is there a way to tell wether a specific `Class' instance refers to a class thats derived from another one? Like, given B is derived from A, something like A.is_a?(B) => true -- just that this is_a? works on the `Class' class and not on the `A' class...
elux has quit [Quit: Leaving...]
<Erlkoenig>
argh, i mean the other way round: B.is_a?(A)
<judofyr>
Erlkoenig: wat? you can use "Fixnum < Integer" to check if something is a subclass of something
<judofyr>
or
tmartiro has quit [Quit: Leaving]
<judofyr>
do you mean kind_of?
<judofyr>
123.kind_of?(Object)
<judofyr>
# => true
<judofyr>
beacuse 123.class < Object
dhruvasa1ar has joined #ruby-lang
dhruvasagar has quit [Ping timeout: 256 seconds]
tallship has joined #ruby-lang
<Erlkoenig>
ah, the "<" is what i was looking for
<Erlkoenig>
"<" is a very descriptive name
<Erlkoenig>
thanks ;-)
<judofyr>
Erlkoenig: they also work the other way around: "Integer > Fixnum"
<Mon_Ouie>
It just comes from the syntax for defining subclasses
<Mon_Ouie>
(class Foo < Bar; …; end)
goshakkk has joined #ruby-lang
apeiros_ has quit [Remote host closed the connection]
<Erlkoenig>
okay makes sense... but isn't easy to find :D
<judofyr>
can't disagree with that ;)
<Erlkoenig>
wouldn't it be "Integer < Fixnum"? From the doc: mod < other Returns true if mod is a subclass of other.
neocoin has quit [Read error: Connection reset by peer]
ivanoats has joined #ruby-lang
ivanoats has quit [Changing host]
ivanoats has joined #ruby-lang
cjs226 has joined #ruby-lang
<judofyr>
Erlkoenig: Fixnum is subclass of Integer
neocoin has joined #ruby-lang
mytrile has quit [Remote host closed the connection]
diegoviola has quit [Quit: leaving]
<Erlkoenig>
judofyr: oh, okay...
<judofyr>
Erlkoenig: Integer has two subclasses: Fixnum and Bignum
<Erlkoenig>
i intuitively thought it would be the other way round :D
neocoin has quit [Remote host closed the connection]
macmartine has joined #ruby-lang
cantonic has joined #ruby-lang
enroxorz-work has left #ruby-lang ["Leaving"]
dan|el has joined #ruby-lang
eyda|mon has quit [Read error: Operation timed out]
t25400 has quit [Remote host closed the connection]
t75800 has joined #ruby-lang
dhruvasa1ar has quit [Ping timeout: 246 seconds]
carloslopes has quit [Quit: Leaving.]
dhruvasagar has joined #ruby-lang
neocoin has joined #ruby-lang
naz has quit [Read error: No route to host]
gsav has joined #ruby-lang
Criztian has quit [Read error: Connection reset by peer]
Criztian_ has joined #ruby-lang
wpaulson has joined #ruby-lang
<rue>
“Local man failed by intuition”
Criztian_ has quit [Read error: Connection reset by peer]
Criztian has joined #ruby-lang
neocoin has quit [Remote host closed the connection]
robotmay has quit [Remote host closed the connection]
radar_ has quit [Remote host closed the connection]
runeb has quit [Remote host closed the connection]
rararadar has joined #ruby-lang
dfr|mac has joined #ruby-lang
cantonic has quit [Quit: cantonic]
wpaulson_ has joined #ruby-lang
cantonic has joined #ruby-lang
wpaulson_ has quit [Client Quit]
wpaulson has quit [Ping timeout: 276 seconds]
erichmenge has joined #ruby-lang
erichmenge has quit [Client Quit]
vbatts has joined #ruby-lang
savage- has joined #ruby-lang
gmci has joined #ruby-lang
toretore has quit [Quit: This computer has gone to sleep]
ruby-lang299 has quit [Ping timeout: 245 seconds]
vlad_starkov has joined #ruby-lang
<vlad_starkov>
Question: When I start Rails console with https://github.com/bernerdschaefer/tiff gem it raises error "Library not loaded: /opt/local/lib/libffi.5.dylib (LoadError)". Does anyone know this issue?
tommylommykins has joined #ruby-lang
<mistym>
vlad_starkov: That tiff gem uses the ffi gem, which requires libffi. Looks like you built the gem against a copy of libffi that's no longer available?
goshakkk has quit [Quit: Computer has gone to sleep.]
<vlad_starkov>
mistym: I'll check it..
<mistym>
vlad_starkov: If you remove and reinstall the ffi gem, you should be okay. Try that first.
cantonic has quit [Quit: cantonic]
<mistym>
(Assuming you still have a version of libffi installed at all! What OS are you on?)
chendo has quit [Ping timeout: 268 seconds]
butchanton has joined #ruby-lang
<vlad_starkov>
mistym: OSX Mountain
<mistym>
vlad_starkov: Oh, you should be okay then. libffi comes with Mac OS X. Your ffi was linked against some other libffi (the Macports version?), which I guess you don't have installed anymore.
chendo has joined #ruby-lang
chendo has quit [Changing host]
chendo has joined #ruby-lang
elux has joined #ruby-lang
t75800 has quit [Remote host closed the connection]
ilyam has joined #ruby-lang
t81531 has joined #ruby-lang
m3nd3s has joined #ruby-lang
<vlad_starkov>
mistym: I'll check that lib in a little while. I run 'port update outdated' to make sure that everything is up to date, maybe after it finishes the error will disappear.
brianpWins has joined #ruby-lang
goshakkk has joined #ruby-lang
<zzak>
"found decapitated by mountain lion"
andrewhl has quit [Remote host closed the connection]
cdt has quit [Quit: Ex-Chat]
titaniumNoob has joined #ruby-lang
yankov has quit [Quit: yankov]
chendo has quit [Ping timeout: 248 seconds]
heftig has quit [Quit: leaving]
chendo has joined #ruby-lang
chendo has quit [Changing host]
chendo has joined #ruby-lang
fgomez has joined #ruby-lang
apeiros_ has joined #ruby-lang
eydaimon has joined #ruby-lang
eydaimon has joined #ruby-lang
eydaimon has quit [Changing host]
neocoin has joined #ruby-lang
dan|el has quit [Read error: Operation timed out]
workmad3 has joined #ruby-lang
carloslopes has joined #ruby-lang
carloslopes has quit [Client Quit]
m3nd3s has quit [Read error: Connection timed out]
carloslopes has joined #ruby-lang
gsav has quit [Read error: Connection reset by peer]
bryancp_ has joined #ruby-lang
bryancp has quit [Ping timeout: 276 seconds]
jtoy has joined #ruby-lang
m3nd3s has joined #ruby-lang
_soupnazi has joined #ruby-lang
andrewhl has joined #ruby-lang
t81531 has quit [Remote host closed the connection]
t11565 has joined #ruby-lang
alex_kira has quit [Remote host closed the connection]
workmad3 has quit [Ping timeout: 260 seconds]
alex_kira has joined #ruby-lang
eydaimon has quit [Ping timeout: 244 seconds]
jtoy has quit [Quit: jtoy]
t4nkd has joined #ruby-lang
qwerxy has quit [Ping timeout: 244 seconds]
m3nd3s has quit [Read error: Connection timed out]
m3nd3s has joined #ruby-lang
workmad3 has joined #ruby-lang
yankov has joined #ruby-lang
justinmcp has joined #ruby-lang
benanne has joined #ruby-lang
alex_kir_ has joined #ruby-lang
voker57 has quit [Remote host closed the connection]
titaniumNoob has quit [Ping timeout: 276 seconds]
t11565 has quit [Remote host closed the connection]
t2869 has joined #ruby-lang
justinmcp has quit [Ping timeout: 244 seconds]
alex_kira has quit [Ping timeout: 246 seconds]
chendo has quit [Ping timeout: 252 seconds]
gnufied has quit [Quit: Leaving.]
chendo has joined #ruby-lang
chendo has quit [Changing host]
chendo has joined #ruby-lang
andrewhl has quit [Remote host closed the connection]
fgomez has quit [Quit: leaving]
chimkan has joined #ruby-lang
bytephilia has quit [Quit: Computer has gone to sleep.]
m3nd3s has quit [Read error: Connection timed out]
jxie has joined #ruby-lang
wallerdev has quit [Quit: wallerdev]
titaniumNoob has joined #ruby-lang
krz has joined #ruby-lang
JustinCampbell has joined #ruby-lang
tbuehlmann has quit [Remote host closed the connection]
m3nd3s has joined #ruby-lang
t2869 has quit [Remote host closed the connection]
ricardovaleriano has joined #ruby-lang
t94877 has joined #ruby-lang
ricardovaleriano has quit [Remote host closed the connection]
ricardovaleriano has joined #ruby-lang
m3nd3s_ has joined #ruby-lang
ricardovaleriano has quit [Remote host closed the connection]
ricardovaleriano has joined #ruby-lang
m3nd3s has quit [Ping timeout: 264 seconds]
elux has quit [Quit: Leaving...]
zmack has quit [Remote host closed the connection]
redgetan has quit [Quit: This computer has gone to sleep]
<rue>
Might as well get rid of ports while you’re at it
m3nd3s_ has quit [Read error: Connection timed out]
malev has joined #ruby-lang
wpaulson has joined #ruby-lang
<erikh>
but how will I talk to the rest of the internet then
BigFatFatty has joined #ruby-lang
wallerdev has joined #ruby-lang
ilyam has quit [Quit: ilyam]
m3nd3s has joined #ruby-lang
Hakon has joined #ruby-lang
<vlad_starkov>
Just finished updating ports on OSX Mountain Lion. Now when running rails console I get this error "Could not open library 'libtiff.dylib': dlopen(libtiff.dylib, 5): image not found". Does anyone familiar with it?
titaniumNoob has quit [Quit: Leaving]
savage-_ has joined #ruby-lang
<erikh>
same problem, just with libtiff this time instead of libffi.
chimkan has quit [Quit: chimkan]
savage- has quit [Read error: Connection reset by peer]
<erikh>
expect to see more than a few of these.
Tearan has quit [Quit: Sleepy Badger....]
<vlad_starkov>
erikh: I wanted to use "tiff" gem to have ability to inspect TIFF files to get pages count of it. Maybe there is another gem for this purpose?
t94877 has quit [Remote host closed the connection]
t75681 has joined #ruby-lang
<drbrain>
vlad_starkov: you just need to build libtiff then rebuild the tiff gem
<erikh>
this has absolutely nothing to do with gems really
<drbrain>
the gem doesn't read tiff files all by itself, it depends on libtiff which you are now missing
<erikh>
somewhere along the line you deleted a ton of system libraries, and now you have to recreate them
eydaimon has joined #ruby-lang
eydaimon has quit [Changing host]
eydaimon has joined #ruby-lang
<erikh>
it's not a leap of hyperbole to suggest you should probably just reinstall your OS at this point, but try and fix it first.
wpaulson_ has joined #ruby-lang
ilyam has joined #ruby-lang
<drbrain>
OS X 10.8 doesn't ship with a libtiff, so it must have been installed via home-brew or ports
<rue>
OS reinstall is
<rue>
Just nuke everything to do with ports and start over :)
<zzak>
dang fangled new technology
wpaulson has quit [Ping timeout: 272 seconds]
wpaulson_ is now known as wpaulson
<erikh>
what I'm suggesting is that it might be less trouble for someone who's encountering linker errors
<erikh>
and doesn't understand how to resolve them.
<erikh>
not that it wouldn't be a learning experience, but yeah.
<vlad_starkov>
ports does not see libtiff in repositories. Do you recommend homebrew?
<drbrain>
vlad_starkov: try installing tiff?
<erikh>
at this point, switching is going to result in more problems
<drbrain>
(the port)
<erikh>
anyhow, 3 days of freeballin' says I should probably do laundry
<erikh>
bbl
eydaimon has quit [Ping timeout: 265 seconds]
<vlad_starkov>
drbrain: Computing dependencies for tiff. Cleaning tiff. Scanning binaries for linking errors: 100.0%. No broken files found.
<mistym>
Is Ernno::ENOENT portable? Or is it not available on non-*nix systems?
yankov has quit [Quit: yankov]
<mistym>
irb
<mistym>
Arg. Wrong window.
<apeiros_>
mistym: ri Errno
<apeiros_>
afaik it should be portable
judofyr has quit [Remote host closed the connection]
g0bl1n has joined #ruby-lang
<mistym>
apeiros_: Well, I saw that it's built dynamically based on the OS, so I read it as meaning that the available constants are OS-dependent.
<apeiros_>
yes
<mistym>
But I see that ENOENT is available on Windows. (Could have just fired up a Windows VM before asking!)
malev has quit [Remote host closed the connection]
<apeiros_>
ri Errno lists which are commonly available on what OS
nibbo has joined #ruby-lang
jensn has joined #ruby-lang
m3nd3s has quit [Read error: Connection timed out]
<mistym>
I'm not seeing anything more specific than "On a typical Unix or Windows platform, there are Errno classes such as Errno::EACCES, Errno::EAGAIN, Errno::EINTR, and so on."
bryancp_ has quit [Remote host closed the connection]
chimkan has joined #ruby-lang
yankov has joined #ruby-lang
t75681 has quit [Remote host closed the connection]
<Erlkoenig>
just googled "win32 api error codes" ;-)
<mistym>
apeiros_: Would certainly not go amiss in the ri documentation.
Tearan has joined #ruby-lang
<Erlkoenig>
well i dunno whether you'll ever see such errors within ruby
sepp2k1 has quit [Remote host closed the connection]
<apeiros_>
mistym: yes, the ri isn't what I remember to have seen
Guest57421 has left #ruby-lang [#ruby-lang]
rippa has joined #ruby-lang
m3nd3s has joined #ruby-lang
Tearan has quit [Client Quit]
anannie has joined #ruby-lang
elux has joined #ruby-lang
redgetan has joined #ruby-lang
burgestrand has joined #ruby-lang
reactormonk has quit [Ping timeout: 276 seconds]
chimkan has quit [Quit: chimkan]
m3nd3s has quit [Read error: Connection timed out]
redgetan has quit [Ping timeout: 252 seconds]
<mistym>
I'm wrapping a C library with FFI. The C library's functions write stuff to stderr when there's an error (even though it has exception handling) and I don't think there's a builtin way to make it shut up. Can I silence it from Ruby?
chimkan has joined #ruby-lang
<Erlkoenig>
close (2); :-D
s0ra_h is now known as sora_h
bryancp has joined #ruby-lang
zommi has joined #ruby-lang
rolfb has joined #ruby-lang
workmad3 has quit [Ping timeout: 240 seconds]
<rue>
You could reopen it at the C level
<Erlkoenig>
or: int fd = dup(2); close (2); ... call to library ... dup2 (fd, 2); close (fd);
reactormonk has joined #ruby-lang
rolfb has quit [Client Quit]
t14997 has quit [Remote host closed the connection]
<anannie>
Can someone please explain me what "non-recursive, non-associative data structures" are? It doesn't make sense to me because data structures are non-recursive by default and they aren't array like/associative unless you make them so...
m3nd3s has joined #ruby-lang
<mistym>
Erlkoenig: I'm using FFI's attach_function wrapping. It would be pretty tedious to do that for every single function call. :(
t11621 has joined #ruby-lang
<Erlkoenig>
mistym: if you don't use stderr, you could just close(2); to kill it completely
<erikh>
fd 2 is fd 2 no matter where it's being written to from
<drbrain>
anannie: trees are recursive, lists are not
<Erlkoenig>
i dunno about FFI, you might write some convinience wrapper method
<anannie>
hi drbrain
<drbrain>
I think a hash is associative
<mistym>
Erlkoenig: Seems like users of my Ruby wrapper library would hate me for that.
<anannie>
may I quickly PM drbrain?
<drbrain>
anannie: I prefer discussing things in-channel
havenn has joined #ruby-lang
<anannie>
drbrain: Okay.
<Erlkoenig>
mistym: not your fault, if the library is that screwed...
<mistym>
It's true!
<mistym>
So convenience wrapper method's probably the short-term way to go, yeah.
<anannie>
drbrain: Do you know any resources where I can read up about such data structures? A book or anything? I've tried searching and I couldn't find a good resource
<Erlkoenig>
couldn't you modify the library code?
<mistym>
Long-term: ask the author for a function to shut up stderr.
<erikh>
how far are you into the FFI version?
<mistym>
Pretty far.
<erikh>
this would be pretty easy to do as a normal extension
<mistym>
Basically done the first revision, hoenstly. I ran into this when I was writing some tests that deliberately did stuff to induce exceptions in the C library.
<anannie>
drbrain: Hrm the list doesn't have this class..
<anannie>
drbrain: Except for reflexive which are similar if you don't allow a set to contain a subset
<drbrain>
anannie: which class?
diegoviola has quit [Ping timeout: 272 seconds]
<anannie>
drbrain: a data structure which is "non recursive non associative"
<erikh>
an array.
ivanoats has quit [Remote host closed the connection]
<anannie>
erikh: An array is associative as it has an index associated with it...
<erikh>
bah, that's why the almighty ritchie made pointer arithmetic
<anannie>
drbrain: I'm guessing that the end result is something like a set which is not allowed to contain subsets and doesn't have an associated index or a key->value pair
wpaulson has joined #ruby-lang
<deryl>
then a linked list would also be associative would it not since it knows about the existance of the previous and next link in the list?
<anannie>
deryl: Yes if you strictly look at it that way. I don't think it's possible to make a useful non associative data structure. It has to have some associations to let you find the data
<mistym>
I think I see what's going on here. An exception is being thrown at the C++ level, and it looks like the defined catch is to announce it on stderr with no C-level way of changing that.
<drbrain>
I think "associative" means "some kind of index"
<drbrain>
a linked list item doesn't have such an association
<anannie>
drbrain: but a key value pair is considered associative as well and arguably in a linked list you have a key that points to the next value.
<deryl>
anannie: hmm then even a variable is associative since the var name is associated with the memory location that holds the actual value, under that logic, would it not? (asking not telling)
<deryl>
might be a tangental question there
<drbrain>
even a cell would be associative by this definition
<anannie>
deryl: Yup. This is a pointless exercise I guess and is the computing equivalent of something that violates the second law of thermodynamics
sora_h is now known as s0ra_h
<drbrain>
anannie: I think "associative" should mean "contains some kind of reference for easy lookup"
<deryl>
hehe, took me a second to grok that reference :)
havenn has quit [Remote host closed the connection]
<deryl>
i'm slow today
goshakkk has quit [Quit: Computer has gone to sleep.]
<drbrain>
an Array can fit that definition (through the index) but a linked-list or tree cannot
<anannie>
All data is associative at some level at the hardware, you just can't have a non associative data set.
<anannie>
drbrain: That makes much more sense.
goshakkk has joined #ruby-lang
<drbrain>
since you don't know if the next pointer of a linked list or the leaves of a tree will have the item you're looking for without looking at the following item
m3nd3s has quit [Read error: Connection timed out]
<erikh>
but that doesn't satisfy the recursion requirement, though.
<anannie>
drbrain: But how could you practically use such a thing?
<erikh>
linked lists?
<anannie>
erikh: The only thing that fits is a linked list, and I'm quite sure that the author isn't talking about linked lists. I don't know, it's confusing what the person has done and they haven't even written down too many details. Seems to be a bit on the fraudulent side to me.
<burgestrand>
mistym: attach them to another object and delegate all method calls to it. That allows you to wrap the call with your silencing code.
macmartine has joined #ruby-lang
<erikh>
anannie: head -> next = head
<burgestrand>
mistym: either that, or redefine attach_function to define the wrapper method directly after defining the real method
<abstr4ct>
i have this path '//*[text()="Monday"]/following::p' but that get the value of p tag, but i have many p tags until i reach a span tag... so i want to find the string "monday" then get all the values of all the <p> tags that come after, until i reach a span tag
<abstr4ct>
im looking to have a start here, get all of these and stop here logic
<drbrain>
abstr4ct: sounds like you want SAX
<abstr4ct>
but i am missing something so nothing is working
<mistym>
burgestrand: Don't suppose you'd have an idea why this isn't shutting it up? http://pastie.org/4582653
alex_kira has quit [Remote host closed the connection]
<matti>
Shut what up?
<mistym>
stderr from the C library I'm wrapping.
t51097 has quit [Remote host closed the connection]
t79464 has joined #ruby-lang
<drbrain>
mistym: try STDERR
<drbrain>
mistym: I don't think it'll make a difference, though
<matti>
It won't
<drbrain>
matti: yeah, due to the reopen
chessguy has joined #ruby-lang
<matti>
Indeed.
richardjortega has left #ruby-lang [#ruby-lang]
apeiros_ has quit [Remote host closed the connection]
<matti>
:)
<mistym>
Hm, so what would the right way be?
<drbrain>
mistym: are you sure it's dumping to stderr and not stdout? or an internally cloned stderr?
tbuehlmann has quit [Remote host closed the connection]
tgriffin2081 has joined #ruby-lang
<mistym>
drbrain: It's a C/C++ library, which is writing to stderr via fprintf()
<drbrain>
huh
s0ra_h is now known as sora_h
<mistym>
I'm attaching to it via ffi, which as far as I know doesn't affect it?
JustinCampbell has quit [Read error: Connection reset by peer]
<drbrain>
shouldn't
wpaulson has joined #ruby-lang
richardjortega has joined #ruby-lang
Dreamer3 has quit [Ping timeout: 264 seconds]
gsav has quit [Ping timeout: 240 seconds]
Dreamer3 has joined #ruby-lang
<Defusal>
the Sequel API changed didn't it...
<erikh>
mistym: strace should sort that out in seconds
<Defusal>
suddenly i notice when using my code from a few months ago that it doesn't work, at all
<Defusal>
methods like #query that existed at the time are simply gone
zommi has quit [Remote host closed the connection]
<Defusal>
now i have to learn the new api and rewrite all that code :/
<erikh>
mistym: if it helps, strace/dtruss the program exhibiting the problem and check the fd's the write() calls use when emitting the message
<erikh>
if it's 2, you should be golden
woollyams has joined #ruby-lang
jackhammer2022 has joined #ruby-lang
alex_kira has joined #ruby-lang
nibbo has quit [Quit: Lost terminal]
t79464 has quit [Remote host closed the connection]
t71570 has joined #ruby-lang
anannie has quit [Remote host closed the connection]
woollyams has quit [Quit: Computer has gone to sleep.]
gsav has joined #ruby-lang
totallymike has quit [Quit: WeeChat 0.3.7]
<mistym>
Aha. It *is* 2. And if I just do IO.new(2).reopen("/dev/null"), it works fine. So I guess my wrapper and/or shutup! method isn't doing its jpb.
sora_h is now known as s0ra_h
<mistym>
Yeah. So the problem wasn't actually that it's not stderr, but that my attach_function wrapper wasn't being used properly! Hm.
<eam>
erikh: rad, I will apply those ideas thanks :)
toretore has joined #ruby-lang
benanne has quit [Quit: kbai]
vlad_starkov has quit [Remote host closed the connection]
fgomez has joined #ruby-lang
havenn_ has joined #ruby-lang
totallymike has quit [Quit: WeeChat 0.3.7]
<erikh>
eam: the important concept to take away from it is the lookup table that points at executable code, and the start-time evaluation of said lookup tables
t48890 has quit [Remote host closed the connection]
t59063 has joined #ruby-lang
havenn_ has quit [Read error: Connection reset by peer]
havenn_ has joined #ruby-lang
havenn has quit [Remote host closed the connection]
richardjortega has quit [Quit: richardjortega]
kvirani has joined #ruby-lang
<eam>
erikh: yeah I know how I'd do this in perl, but I don't quite know ruby syntax yet. lambda {} = sub {} is important :)
s0ra_h is now known as sora_h
<erikh>
yeah, there's also proc { }, which is similar to lambda { } but without parameter validation
seanstickle has joined #ruby-lang
Dwarf has quit [Quit: Leaving]
t59063 has quit [Remote host closed the connection]
t75876 has joined #ruby-lang
Dwarf has joined #ruby-lang
Dwarf has quit [Changing host]
Dwarf has joined #ruby-lang
flebel has quit [Ping timeout: 268 seconds]
flebel has joined #ruby-lang
havenn_ has quit [Remote host closed the connection]
sora_h is now known as s0ra_h
<abstr4ct>
I want to grab everything below monday on this page http://ruckuspizza.com/raleigh-nc/specials i am using the xpath '//*[text()="Monday"]/following::p1]' but it gets tuesday and wednesday and so forth.. any ideas?
<abstr4ct>
i am using nokogiri
fgomez has quit [Quit: Lost terminal]
bytephilia has quit [Quit: Computer has gone to sleep.]
<drbrain>
abstr4ct: use SAX?
<abstr4ct>
still not able to work that out
<abstr4ct>
but i do think that is the best strategy
<drbrain>
abstr4ct: what did you try?
<abstr4ct>
so far i have just been reading/thinking... dont know enough yet to make it work
<abstr4ct>
but it seems to be exactly what i need
Dwarf has quit [Quit: Leaving]
Dwarf has joined #ruby-lang
Dwarf has quit [Changing host]
Dwarf has joined #ruby-lang
BigFatFatty has left #ruby-lang [#ruby-lang]
eydaimon has quit [Ping timeout: 246 seconds]
gsav has quit [Ping timeout: 260 seconds]
gsav has joined #ruby-lang
toretore has quit [Quit: This computer has gone to sleep]