<charliesome>
cirwin: they could pass { raise LocalJumpError } to each function ;)
<cirwin>
yeah :)
yadav has quit [Remote host closed the connection]
xalei has quit [Remote host closed the connection]
cirwin has quit [Quit: Leaving.]
apeiros_ has joined #ruby-lang
retro|cz has quit [Ping timeout: 248 seconds]
ronaldo__ has quit [Quit: eyb]
apeiros_ has quit [Remote host closed the connection]
dhruvasagar has quit [Ping timeout: 240 seconds]
megha has joined #ruby-lang
vlad_starkov has joined #ruby-lang
tenderlove has quit [Ping timeout: 248 seconds]
jxie has quit [Quit: leaving]
apeiros_ has joined #ruby-lang
dhruvasagar has joined #ruby-lang
<yorickpeterse>
Morning
<apeiros_>
moin
havenn has quit [Remote host closed the connection]
havenn has joined #ruby-lang
headius has quit [Quit: headius]
megha has quit [Ping timeout: 276 seconds]
<judofyr>
morning
havenn has quit [Ping timeout: 260 seconds]
<yorickpeterse>
whitequark: fix your blog links, they point to localhost:4000
gnufied has quit [Quit: Leaving.]
<yorickpeterse>
(in your latest article)
<whitequark>
yorickpeterse: ow crap
vlad_starkov has quit [Remote host closed the connection]
<whitequark>
yorickpeterse: fixed
vlad_starkov has joined #ruby-lang
<yorickpeterse>
heh
gnufied1 has joined #ruby-lang
agarcia has joined #ruby-lang
blacktulip has joined #ruby-lang
<apeiros_>
there's nothing like starting the year with reading some rails 1.2.3 code…
<apeiros_>
%-S
<whitequark>
software archaeology!
<Muz>
Hah, my Just Before Christmas project at work involves a Rails 1.2.5 project.
<Muz>
That seemingly /requires/ 1.8.6. Needless to say, I'm still working on figuring out what the fuck it does exactly. So far there've been tears and laughter and moments of sheer disbelief.
havenn has joined #ruby-lang
<apeiros_>
Muz: yeah, I totally sympathize with your situation
<apeiros_>
one may bitch about rails, but there's no denying that there was a lot of progress, and that the conventions help a lot in digging into foreign code…
<Muz>
The "funny" thing about this is how the people who did work on this 6 years ago have either left the corp, or moved on elsewhere and have magically been struck by mass amnesia.
<apeiros_>
(the absence of those conventions in early rails projects is just mind blowing…)
<Muz>
It's a sodding production tool that is still broadcast critical that all of 3 people know and support to a limited extent. I've been tasked with speccing up something to deprecate it and retain functionality.
<apeiros_>
Muz: reminds me that I should plan my own leave properly :D
<Muz>
Sadly, it's the most interesting thing I've had to work on in the past few weeks, so I'm willing to stick it out until I've finished serving my notice period and can move on :D
<Muz>
As much as I dislike Rails, the current state of it is a significant step forwards from what it used to be for sure. The same goes for Ruby's core.
sush24 has quit [Quit: This computer has gone to sleep]
tenderlove has joined #ruby-lang
zmack has joined #ruby-lang
<manveru>
i'm still trying to find a remote ruby job without rails :P
<manveru>
but all those job sites make it damn near impossible to find anything
<manveru>
or maybe i'm just really weird
<apeiros_>
you probably are :-p
<apeiros_>
still in austria?
<lianj>
"sysadmin who know ruby" like?
<manveru>
germany
<manveru>
lianj: more like rubyists who knows sysadmin
tenderlove has quit [Ping timeout: 264 seconds]
<manveru>
but if i had a choice, i'd just as well use go
<manveru>
it's just that finding jobs with that is even harder
<lianj>
^^
gja has joined #ruby-lang
<Muz>
I think half the problem is that recruiters and non-technical types will put Rails onto a Ruby posting in order to raise awareness
<Muz>
And ultimately, the collateral damage of deterring a small special subset of neckbeard is minimal compared to the additional attention and appeal it ultimately brings.
<Muz>
I've certainly had bottom-feeders^Wrecruiters modify my CV to claim I have Rails experience in the past. The bastards.
<manveru>
you really think the normal ruby community is that small?
<jMCg>
Heh.. The manager currently repsonsible for the Ops team I work in went on saying: We don't need any ruby programmers in our Ops Team. If we need any ruby programmers for Ops, I'd put them in a Programmers team.
<Muz>
The amount that finds a Rails job actively unattractive enough to decline it instead of sucking it up? Comparatively, yes.
<manveru>
:)
<manveru>
then they are not a company worth working for
<jMCg>
Awesome, that's exactly what we're need. Someone sitting in a different district of the city, with all the (java and python) developers, when all of our infrastructure is written in Ruby.
vlad_starkov has quit [Remote host closed the connection]
<manveru>
yeah... i'd prefer not searching for languages at all
<manveru>
i can learn those in a few weeks if needs be
<whitequark>
manveru: y u hate rails?
<Muz>
Magic.
<Muz>
Too much fucking magic.
<whitequark>
just curious. I, for example, prefer to avoid them because webdev. But if I only need to write the backend, it's fine.
<charliesome>
haha
<charliesome>
too much magic in rails
<charliesome>
you can say that again
<manveru>
rails is freaking big
<whitequark>
manveru: puppet or chef aren't?
<Muz>
I've a history in working primarily with backend and service level systems here. Web dev I've dabbled a bit in, but it's not comfortable territory.
<judofyr>
it got some nice SQL-injections and remote code execution though
<manveru>
they are too
<Muz>
throwing in a metric fuckton of voodoo magic that requires a hardhat and pickaxe to spelunk through does not help.
<whitequark>
manveru: so what job are you expecting to find?
<Muz>
Less so when it's 6 fucking years old.
<charliesome>
judofyr: i have an rce that triggers during deserialize now
<manveru>
whitequark: chef at least is somewhat sane :)
<judofyr>
charliesome: I've seen one. have you refined it even more?
<whitequark>
Muz: for a 6 year old project rails is in pretty good state. the cost of legacy breakage is high, through.
<charliesome>
yeah f5 it
<Muz>
I suppose part of it is compounded by never really bothering to get too in depth with learning Rails, but it's not exactly an appealing task either.
<Muz>
whitequark: sure, but even modern day rails has too much magic for my tastes. At least it's a bit more consistant and not quite so crack-addled.
<manveru>
anything with generators in it is a big red flag for me
<judofyr>
manveru: totally agree
<whitequark>
manveru: I never ever use generators in rails. I've no idea why were they added.
<judofyr>
I so hate scaffolding
<whitequark>
it doesn't really make life harder
<manveru>
because it made the blog example doable in 15 minutes? :)
dwu1 has quit [Quit: Leaving.]
<charliesome>
the only generator i ever use is rails g model
<Muz>
The generators are great if you want to build yet another sodding Twitter clone.
<whitequark>
manveru: I bet you I'd write that without generators in 15 minutes either.
tbuehlmann has joined #ruby-lang
<Muz>
The moment you stray from that and take help from 20 different people on #RubyOnRails you've got a shitheap of a mess.
<manveru>
yeah, easier these days
schaerli has quit [Remote host closed the connection]
<manveru>
but generators were in rails from the start
<manveru>
and the whole config mess
<manveru>
and bundler proliferation
<whitequark>
meh
<whitequark>
manveru: and why do you hate bundler now?
<judofyr>
whitequark: btw, is there actually market for Ruby-on-embedded-devices?
<charliesome>
bundler is the best thing that has happened to ruby
<Muz>
Bundler's great if people use it properly and don't leave lock files all over the place with poorly specified Gemfiles.
<whitequark>
^ that
<judofyr>
well, bundler-the-concept is awesome
<manveru>
because imho it creates more problems than it solves
<charliesome>
gemsets are so ghetto
<judofyr>
haven't looked at the implementation
<charliesome>
i had to install an old misbehaving rails 2.x app ages ago
<charliesome>
it was so bad
<charliesome>
i needed to compile its own ruby
<whitequark>
judofyr: I hope so. Otherwise I have problems ;)
* Muz
gives it a moment before the RVM whine kicks in from someone.
<manveru>
no, not this time
<judofyr>
whitequark: ah. was just wondering if you know the market.
* Muz
grins
<whitequark>
judofyr: I know what the embedded programmers want. But it's half of the problem.
<charliesome>
whitequark: plan to take on rubymotion?
<whitequark>
charliesome: nay
<charliesome>
i reckon a rubyos would be damn cool
<whitequark>
charliesome: iphones are nowhere like embedded
<whitequark>
it's more powerful than your pc from 5 years ago
<charliesome>
yeah but you aren't targeting just strictly embedded though are you?
<whitequark>
charliesome: a rubyos? here you are. like 2/3 of embedded applications include an RTOS ;)
<charliesome>
surely you could take your compiler and target it at x86 or arm
<whitequark>
charliesome: I'm not. but embedded is something I at least remotely know how to make money with.
rolfb has joined #ruby-lang
<whitequark>
plus embedded needs more treatment than x86 or arm. a superset of features if you'd like
<charliesome>
whitequark: can i have a free foundry license to play with an x86 rubyos?
retro|cz has joined #ruby-lang
<whitequark>
charliesome: I'm fairly certain it would be just free for personal use
<whitequark>
even if not FOSS.
<charliesome>
awesome!
<whitequark>
the mess with license enforcement simply never works.
<whitequark>
especially if you give your sw to professional embedded programmers, for whom debuggin assembly is a routine ;)
<manveru>
a ruby os? on mruby or rbx or something?
<whitequark>
manveru: forget about interpreters, they're shit
<charliesome>
manveru: on whitequark's awesome static ruby compiler
<whitequark>
manveru: forget about JIT, it's hungry as hell.
<charliesome>
whitequark: i wrote a javascript os with the world's slowest js vm
KA_ has quit [Quit: KA_]
<whitequark>
charliesome: port it to raspberry pi
<charliesome>
it'd run like a dog
<whitequark>
you'll get fucking famous across roflprogrammers
<whitequark>
manveru: there are some alternatives listed at the end of my rpi article
<whitequark>
charliesome: le sigh
<manveru>
ok
AZAZ has joined #ruby-lang
<manveru>
only embedded stuff i've done was with arduino and mforth
AZAZ has quit [Client Quit]
<manveru>
brb
gja has quit [Quit: This computer has gone to sleep]
nyuszika7h has quit [Quit: Here we are, going far to save all that we love - If we give all we've got, we will make it through - Here we are, like a star shining bright on your world - Today, make evil go away!]
<whitequark>
charliesome: you might want to rewrite the codegen of jsos with Furnace::SSA
<whitequark>
and possibly begin optimizing it ;)
<charliesome>
whitequark: i am not as smart as you
<charliesome>
also jsos triple faults these days
<whitequark>
charliesome: this is why *I* wrote Furnace::SSA for you :)
<charliesome>
i broke it somehow and i don't know how to fix it
<charliesome>
ever seen a FAT16 driver in javascript?
<whitequark>
in fact I more or less rewrote llvm infrastructure, because I'm not that smart either
<whitequark>
my attempt of writing it was a pathetic failure
<whitequark>
charliesome: yea seen your webiste
<whitequark>
*website.
<charliesome>
:p
<whitequark>
charliesome: optimizing SSA is trivial, that's the good part
<whitequark>
and the algorithms are googled even more trivially
<charliesome>
reading the wikipedia page right nopw
nyuszika7h has joined #ruby-lang
<richardburton>
hey there
<whitequark>
charliesome: I'll write some nice docs for furnace-ssa, with examples and patterns. but in the meantime you can just dive in the llvm sources
<richardburton>
would anyone mind giving me some advice on how i can refactor this code?
<whitequark>
it's pretty simple actually. understanding CPS (which is mathematically equivalent to SSA) is way harder :)
<charliesome>
i understand cps
<whitequark>
continuation-passing style?
<charliesome>
yeh
<whitequark>
it took me an imperial fuckton of time to make any sense of it
<charliesome>
like nodejs amirite
havenn has quit [Remote host closed the connection]
<charliesome>
but i've written a few cps-ey things in c if that counts
<whitequark>
... well, it could be phrased that way
dc5ala has joined #ruby-lang
havenn has joined #ruby-lang
<whitequark>
and you're saying you are less clever than me!
<whitequark>
hah
<charliesome>
trust me i have no clue about half the stuff you talk about
<apeiros_>
richardburton: line 99-105 and 108-115 are the same code. make that a class and take *_data as initialization value
<apeiros_>
so you have e.g. @today.visits instead of @visits_today
<whitequark>
charliesome: it took me roughly half a year (effectively) to learn.
<whitequark>
a year of wall time.
ryanf has quit [Ping timeout: 256 seconds]
<richardburton>
apeiros_: thanks
<richardburton>
i felt like there is something wrong there
<apeiros_>
richardburton: also "#{CURRENCY}" is a rather bad way to say CURRENCY
<apeiros_>
(since CURRENCY already is a string)
<richardburton>
any chance you could gist that for guidance?
<charliesome>
whitequark: it is a continual learning process i guess
<richardburton>
ah great point thank you
<apeiros_>
richardburton: sorry, no, got work to do on my own
<charliesome>
i am trying to learn this stuff as fast as i can
<whitequark>
charliesome: continual as in what?
<tbuehlmann>
richardburton, I see you adapted some code from yesterday :)
<charliesome>
the more you know the more you know that you don't know
schaerli has joined #ruby-lang
nertzy3 has joined #ruby-lang
<whitequark>
charliesome: ... and the better you see what should you learn next
havenn has quit [Ping timeout: 240 seconds]
<richardburton>
tbuehlmann: yeh, thanks!
<richardburton>
so helpful :)
<whitequark>
charliesome: also, some areas feel more or less finished to me. at least that's what I think when the state of the art is same now and 20yrs ago.
nertzy2 has quit [Ping timeout: 276 seconds]
<manveru>
whitequark: your ruby sounds kinda like mirah, but more awesomer :)
<whitequark>
manveru: blergh, I don't have any fat hosted runtimes!
<manveru>
yeah
<manveru>
i'm no fan of the jvm
<whitequark>
but yeah, they're similar
<manveru>
but if i have to do android, that's the way i do it
<charliesome>
the jvm sounds awesome except for the fact that you have to use the jvm
rue|w has joined #ruby-lang
<whitequark>
manveru: JVM is absolutely cool. It's just that not every problem in this world is best solved with JVM.
<whitequark>
manveru: you might want to follow RubyFlow, headius' last brainchild
<whitequark>
he explicitly targets android, among other things
<whitequark>
mirah seems dead to me
<manveru>
it's been years since i used it last
<manveru>
so you got a point :)
<andrewvos>
charliesome: My thoughts EXACTLY.
havenn has joined #ruby-lang
vlad_starkov has joined #ruby-lang
<yorickpeterse>
I just suggested XML for something
<charliesome>
xml is seriously useful
<yorickpeterse>
5 years later: XML ohgodwhy
<yorickpeterse>
charliesome: when used properly, yes
<whitequark>
yorickpeterse: so did you suggest to use it for markup?
<manveru>
whitequark: got a link? rubyflow is a news since only from what i can tell
<manveru>
*news site
JohnBat26 has joined #ruby-lang
<yorickpeterse>
whitequark: Markup for a PDF generator instead of raw Prawn calls
<yorickpeterse>
Because that's one of the few use cases where it's actually a good idea to use XML
nertzy3 has quit [Ping timeout: 252 seconds]
<yorickpeterse>
(users want to be able to customize these PDFs using an interface)
<yorickpeterse>
whitequark: CTO hated it until the most recent update and now it's somewhat usable from what I can tell
<judofyr>
btw, I noticed that chruby *always* sets GEM_HOME to ~/.gem/ruby/1.9.3. could this cause any problems with C-extensions and/or JRuby or something?
hemangpatel has joined #ruby-lang
<yorickpeterse>
Mind you we have a bit of a weird setup to work around several issues
<manveru>
yorickpeterse: 2.2?
<socialcoder>
rvm docs generate not working
<kalleth>
is there a way i can attach a logging method to each method in a class to log each method call?
<hemangpatel>
Hello.
<socialcoder>
rvm is not recognised as internal...
<kalleth>
i.e. class Foo, for each method called on an instance of Foo, log me something
<hemangpatel>
I'm php guy. Now my hands on ruby.
<judofyr>
hemangpatel: heya
<yorickpeterse>
manveru: 2.2.2
<manveru>
kalleth: delegator or set_trace_func
<kalleth>
set_trace_func seems a bit too overkill
<kalleth>
delagator?
<socialcoder>
rvm docs generate not working
<hemangpatel>
So i'm finding good resources.
<yorickpeterse>
whitequark: e.g. the user facing side is read-only with one tiny exception (literally one option)
<judofyr>
hemangpatel: or you might think it's very, very annoying
<kalleth>
charliesome: lol
<kalleth>
charliesome: are you steve jobs in disguise
<charliesome>
yes
<kalleth>
cool, buy me a yacht
<judofyr>
hemangpatel: use http://ruby-doc.org/ (1.9 core) for documentation about classes and methods (kinda like php.net/<insert function name>)
<kalleth>
oh god i remember doing that judofyr
<kalleth>
it got to the stage where i didnt need google i'd just remember the exact function
<hemangpatel>
judofyr : ok..great help
<judofyr>
hemangpatel: for more language-level documentation, I think Run Paint Run Run's book could be useful: http://ruby.runpaint.org/
<kalleth>
but i'd still need to check the docs every time i used it because it could be str_pos or strpos or strpos(needle, haystack) or strpos(haystack, needle) depending on what branch of witchcraft was runnign
gja has joined #ruby-lang
gja has quit [Changing host]
gja has joined #ruby-lang
<judofyr>
although it's a bit specification-y
<whitequark>
judofyr: yeah runpains' book is one of the best
<whitequark>
*runpaint's
<judofyr>
whitequark: well, not a very good beginner's book though
<hemangpatel>
ahh lots of stuff.
<judofyr>
but it's a good reference
<whitequark>
judofyr: it
<whitequark>
*it's a reference
<hemangpatel>
judofyr : do i need only command line to run the code ?
<hemangpatel>
on linux
<manveru>
yeah
<hemangpatel>
ok
<judofyr>
hemangpatel: yes. although on some distributions you might need to install extra packages to get all the features (e.g. OpenSSL)
megha has joined #ruby-lang
<hemangpatel>
Thanks a lot.. good bye.
<judofyr>
hemangpatel: also, make sure that you're using Ruby 1.9.3 (ruby -v)!
<hemangpatel>
see you later guys
<yorickpeterse>
whitequark: "$ gut status" seems I'm not the only one that seems to type "gut"
<hemangpatel>
judofyr : why ?
<judofyr>
hemangpatel: because it's recent. many Linux distributions also ship with Ruby 1.8 (for legacy reasons), but you don't want to start learning that :)
<whitequark>
yorickpeterse: indeed
<judofyr>
hemangpatel: I think e.g. Debian/Ubuntu has a sperate ruby1.9-package
<hemangpatel>
judofyr : ok
<hemangpatel>
bye
sspiff has joined #ruby-lang
sspiff has quit [Changing host]
sspiff has joined #ruby-lang
<hemangpatel>
judofyr : ubuntu 12.10 has 1.9.3
<judofyr>
hemangpatel: then you're good to go :)
hemangpatel has left #ruby-lang ["Leaving"]
nkr has joined #ruby-lang
gnufied2 has joined #ruby-lang
schaerli has quit [Remote host closed the connection]
spuk has quit [Quit: Human beings were created by water to transport it uphill.]
vlad_starkov has quit [Remote host closed the connection]
lele|w has quit [Read error: Connection reset by peer]
<imperator>
emocakes, it is...mostly
lele|w has joined #ruby-lang
thone has quit [Ping timeout: 265 seconds]
<judofyr>
emocakes: nice cross-platform support too
<banisterfiend>
how do i delete rvm without deleting the installed rubies?
vlad_starkov has joined #ruby-lang
<charliesome>
banisterfiend: copy the rubies out
<charliesome>
rvm implode
<charliesome>
copy them back
francisfish has joined #ruby-lang
<banisterfiend>
charliesome: there's no way to just uninstall rvm and tell it to keep the rubies?
<injekt>
banisterfiend: just delete everything but rubies?
<judofyr>
LEAVE ME RUBIES ALONE
<judofyr>
MY*
<injekt>
you cant change the install location, so just remove everything else
<charliesome>
banisterfiend: i dunno, but i know rvm likes to control its little .rvm dir
<rue|w>
Werdos
<charliesome>
s/little/humongous/
<charliesome>
judofyr: "LEAVE ME RUBIES ALONE" sounded better
<judofyr>
charliesome: a typrovement
<emocakes>
ffi just looks useful from the 'i want to code fast stuff in C, but wrap it nicely' perspective
<banisterfiend>
alternatively how do i tell rvm to stop automatically creating crippled bundler environments
<rue|w>
emocakes: Also from “I can’t be sure the user has a compiler installed” perspective
<charliesome>
whitequark: what's the technical barrier to putting faster_you_bastards! around the entire program
<injekt>
banisterfiend: just delete everything and start again?
<banisterfiend>
injekt: i would except i have pretty bad internet right now it would take a long time to install all my rubies
<injekt>
banisterfiend: ah ok, well yeah I would just delete everything in .rvm except the rubies directory
<judofyr>
for some reason, I think "rubies" sounds really silly
<injekt>
agreed
<judofyr>
juuubies
lcdhoffman has joined #ruby-lang
<injekt>
bubies
<injekt>
banisterfiend: or just dont load rvm into your shell and figure that part out when you have internet
fjfish has quit [Ping timeout: 252 seconds]
<judofyr>
I like how we have alternative layers of crap and good in Ruby
<judofyr>
e.g. bundler fixes rubygems
vlad_sta_ has joined #ruby-lang
<injekt>
hehe fixes
<judofyr>
*improves
<imperator>
emocakes, plus, works with JRuby
tenderlove has joined #ruby-lang
<imperator>
although I've learned that sometimes it's better to use the Java API instead of using C functions
vlad_starkov has quit [Ping timeout: 260 seconds]
<emocakes>
for types etc
thone has joined #ruby-lang
<emocakes>
I'm guessing
<emocakes>
and threads?
<imperator>
no. well, maybe, but i'm just referring to how to do certain things
<imperator>
e.g. i was trying to use C functions for temp files, but then realized java had a pretty nice (and better) api for it already, so i just used that
<imperator>
it is nice to be able to mix ruby's features with C: begin; fh = open(file); ... ; ensure; close(fh); end
tenderlove has quit [Ping timeout: 276 seconds]
thone has quit [Ping timeout: 260 seconds]
tbuehlmann has quit [Ping timeout: 272 seconds]
tbuehlmann has joined #ruby-lang
<retro|cz>
Anyone using debugger gem with 1.9.3-p362? I'm getting old "undefined symbol: ruby_current_thread " bug from ruby-debug. :(
<retro|cz>
Same for 1.9.3-p327
<banisterfiend>
retro|cz: is this the debugger gem or ruby-debug ?
<retro|cz>
banisterfiend, debugger gem in gemfile
<retro|cz>
damn
<retro|cz>
probably my bad
<banisterfiend>
retro|cz: check the debugger gem's github issues
megha has quit [Quit: WeeChat 0.3.9.2]
<retro|cz>
I found ruby-debug19 in Gemfile also.
<retro|cz>
It was hidden there in mongodb group.
<retro|cz>
banisterfiend, how are you doing with binding_of_caller Ruby 2.0 porting?
tbuehlmann has quit [Remote host closed the connection]
<banisterfiend>
retro|cz: haven't looked at it a lot in depth yet, but we've isolated the issue i think
<banisterfiend>
i've got a debugging environment setup i've just been busy getting a new pry release out of the door
tbuehlmann has joined #ruby-lang
<banisterfiend>
after that i'll probably have more time for messing around in gdb
<judofyr>
banisterfiend: doesn't Ruby 2.0 ship with the same functionality now?
<roolo>
Hi, is it possible to get same shell environment for running commands from ruby?
<roolo>
* shell commands
<yorickpeterse>
eh?
<Uranio>
roolo: I guest that when you need run shell command, is a good time for program with bash instead of ruby
<roolo>
yorickpeterse: Wut? ;) You have some shell environment in your terminal (system variables and so) i want to run shell comands in ruby scripts which will behave same as in terminal
<apeiros_>
roolo: by default, env is passed on unchanged
banisterfiend has quit [Ping timeout: 255 seconds]
<apeiros_>
i.e., a child will have the parent's env
<roolo>
Uranio: If you don't know answer, don't answer ;)
<apeiros_>
roolo: a ;-) doesn't make an impolite statement polite. behave.
<judofyr>
lianj: I think there'll be a new Rails release today :)
<judofyr>
when the U.S. wakes up
kurko_ has joined #ruby-lang
<lianj>
good i dont use rails. my cgi bash blog is unbreakable
<judofyr>
lianj: I mean, it's just a SQL-injection and a remote code execution (by the excellent charliesome) :-)
<judofyr>
in Rails 3+
<lianj>
another or the one that hit the news latly?
<judofyr>
lianj: another. but it was found after the one that hit the news
<judofyr>
way worse SQL-injection
<judofyr>
and well, RCE is always bad
<judofyr>
I'll have to give charliesome a lot of credit though
<lianj>
always fun to see someone try sql injection on your rails site if you dont even use activerecord
banister_ has quit [Remote host closed the connection]
<judofyr>
I should probably finish the data-structure-thingie first. it's just a little tricky to debug :(
pkrnj has joined #ruby-lang
sailias has joined #ruby-lang
goshakkk has quit [Quit: Computer has gone to sleep.]
banisterfiend has joined #ruby-lang
methods has joined #ruby-lang
methods has quit [Client Quit]
vmoravec has quit [Quit: Leaving]
jtoy has joined #ruby-lang
ortuna has joined #ruby-lang
Rarrikins has joined #ruby-lang
lcdhoffman has quit [Quit: lcdhoffman]
rondale_sc has joined #ruby-lang
ortuna has quit [Client Quit]
breakingthings has joined #ruby-lang
scottschecter has quit [Remote host closed the connection]
Rarrikins_p has joined #ruby-lang
Rarrikins has quit [Ping timeout: 246 seconds]
vmoravec has joined #ruby-lang
GarethAdams has joined #ruby-lang
jperry2 has quit [Quit: jperry2]
goshakkk has joined #ruby-lang
vlad_starkov has joined #ruby-lang
jtoy__ has joined #ruby-lang
jtoy has quit [Read error: Connection reset by peer]
jtoy__ is now known as jtoy
jtoy has quit [Read error: Connection reset by peer]
jtoy has joined #ruby-lang
vmoravec has quit [Remote host closed the connection]
Rarrikins_p_g has joined #ruby-lang
Rarrikins_p has quit [Ping timeout: 255 seconds]
megha has quit [Quit: WeeChat 0.3.9.2]
tenderlove has joined #ruby-lang
vmoravec has joined #ruby-lang
rolfb has quit [Quit: Leaving...]
Rarrikins_p_g_e has joined #ruby-lang
outoftime has joined #ruby-lang
richardburton has joined #ruby-lang
Rarrikins_p_g has quit [Ping timeout: 252 seconds]
Nisstyre-laptop has joined #ruby-lang
<gnufied>
tenderlove: you there?
lcdhoffman has joined #ruby-lang
Rarrikins_p_g_e_ has joined #ruby-lang
Rarrikins_p_g_e has quit [Ping timeout: 256 seconds]
tenderlove has quit [Ping timeout: 246 seconds]
Nisstyre-laptop has quit [Client Quit]
megha has joined #ruby-lang
richardburton has quit [Ping timeout: 248 seconds]
karasawa has joined #ruby-lang
mistym has quit [Remote host closed the connection]
Rarrikins_p_g_e_ has quit [Ping timeout: 248 seconds]
sailias has quit [Quit: Leaving.]
Rarrikins has joined #ruby-lang
sailias has joined #ruby-lang
Nisstyre-laptop has joined #ruby-lang
mistym has joined #ruby-lang
mistym has quit [Changing host]
mistym has joined #ruby-lang
thisirs has joined #ruby-lang
lcdhoffman_ has joined #ruby-lang
lcdhoffman has quit [Ping timeout: 260 seconds]
vmoravec has quit [Quit: Leaving]
Rarrikins_m has joined #ruby-lang
Banistergalaxy has quit [Ping timeout: 248 seconds]
havenn has joined #ruby-lang
Rarrikins has quit [Ping timeout: 248 seconds]
rcvalle has quit [Ping timeout: 252 seconds]
carloslopes has quit [Remote host closed the connection]
Banistergalaxy has joined #ruby-lang
karasawa has quit [Ping timeout: 248 seconds]
Rarrikins_m_r has joined #ruby-lang
lcdhoffman_ has quit [Ping timeout: 248 seconds]
serhart has joined #ruby-lang
Rarrikins_m has quit [Ping timeout: 248 seconds]
lcdhoffman has joined #ruby-lang
vmatiyko has joined #ruby-lang
Rarrikins_m_r_c has joined #ruby-lang
Rarrikins_m_r_c_ has joined #ruby-lang
Rarrikins_m_r has quit [Ping timeout: 255 seconds]
TerabyteST has joined #ruby-lang
Rarrikins_m_r_c has quit [Ping timeout: 256 seconds]
tenderlove has joined #ruby-lang
vmoravec has joined #ruby-lang
atadesk has joined #ruby-lang
TerabyteST has quit [Ping timeout: 248 seconds]
Rarrikins_m_r_c_ has quit [Ping timeout: 260 seconds]
Rarrikins has joined #ruby-lang
tenderlove has quit [Ping timeout: 240 seconds]
rcvalle has joined #ruby-lang
Rarrikins_c has joined #ruby-lang
Rarrikins has quit [Ping timeout: 260 seconds]
rcvalle_ has joined #ruby-lang
Nisstyre-laptop has quit [Quit: Leaving]
lcdhoffman has quit [Ping timeout: 248 seconds]
rcvalle has quit [Ping timeout: 248 seconds]
Rarrikins_c_t has joined #ruby-lang
mistym_ has joined #ruby-lang
agnitio has joined #ruby-lang
megha has quit [Quit: WeeChat 0.3.9.2]
karasawa has joined #ruby-lang
Rarrikins_c has quit [Ping timeout: 240 seconds]
mistym_ has quit [Changing host]
mistym_ has joined #ruby-lang
mistym has quit [Disconnected by services]
mistym_ is now known as mistym
Antiarc has joined #ruby-lang
mistym_ has joined #ruby-lang
<Antiarc>
Hey folks - I'm working on a database driver, and I have one exceptionally small piece of code that *must* run, but it can apparently be prevented from running via Timeout if you get really unlucky, putting the whole driver into a bad state. Is there any accepted way to suppress Timeout from working for a code block? All I can think is to monkeypatch Thread#raise to allow for suppressing it for the duration of my method, but that seems
havenn has quit [Remote host closed the connection]
havenn has joined #ruby-lang
<Antiarc>
begin..ensure doesn't work, because if the Timeout thread fires while my thread is in its ensure block normally, then the exception jumps out of the ensure block immediately.
sabfer has joined #ruby-lang
rcvalle__ has joined #ruby-lang
<judofyr>
Antiarc: there has been some talk on ruby-core about having interruptible code-blocks, but nothing has landed yet
<judofyr>
I think rbfu and chruby are pretty much the same thing
<injekt>
I'm pretty sure they do the same thing
<injekt>
eh
<judofyr>
or, same concept
<judofyr>
same solution
<judofyr>
different implementation
<andrewvos>
They do the same thing, but one of them is teh win
<judofyr>
whatever dude
<injekt>
yeah BRO
<andrewvos>
(Because I'm used to it)
<injekt>
I came second on the readme for Op so I mad
<andrewvos>
hehe
<injekt>
i gave up on version managers, i only ever use 1 version anyway
tenderlove has quit [Ping timeout: 264 seconds]
<judofyr>
injekt: hm. what about RCs?
<injekt>
judofyr: what about them? I have a 'ruby' which is 1.9 and a 'ruby2' which points to the latest 2.0 install
<judofyr>
oki :)
<injekt>
I usually keep the ruby source code lying around too so I can quickly switch tags and build a copy i might need
<judofyr>
yeah, I have a git clone too
ryanv-raptor has joined #ruby-lang
<judofyr>
still like to install the official releases
<judofyr>
current status: compiling rust
<injekt>
sure, version manages make this faster but i dont think i really use them enough i seem to have issues with the damn version managers anyway
<injekt>
yeah me too
<injekt>
ugh not @ rust
<judofyr>
injekt: what do you think about Rust?
<injekt>
judofyr: I LOVE its type system, but i just can't deal with the syntax
yfeldblum has joined #ruby-lang
<injekt>
rust has some awesome stuff, and i think it'll be real popular, but I'm a Go dude
<judofyr>
Go just seems a bit too … high-level? though
<judofyr>
at least for certain tasks
<injekt>
oO
<judofyr>
Go is a Java-killer
<injekt>
like what?
<judofyr>
Rust is a C-killer
<judofyr>
injekt: forced GC
<injekt>
I disagree, I think it's way lower than java
<injekt>
heh
stevechiagozie has joined #ruby-lang
<injekt>
I'll probably screw around with rust as the 'next lang' but right now I chose go over rust because it's a little more stable and I prefer the syntax
<judofyr>
I like go to :)
rcvalle__ has quit [Ping timeout: 248 seconds]
<judofyr>
too*
<judofyr>
I like goto too
TerabyteST has joined #ruby-lang
<injekt>
I built our work web api in go rather than sinatra
Mon_Ouie has joined #ruby-lang
<bstrie>
injekt: you can be both a go dude and a rust dude, they're really quite different :)
<bstrie>
go is what you get if you combine python and C, rust is what you get if you combine haskell and C++
<injekt>
bstrie: I'm sure I could, and yeah they're very different. I just had to choose one to fully immerse myself into
<injekt>
Yeah some rust stuff reminded me a lot of haskell
<bstrie>
yeah rust is way too immature to really bother learning right now
<bstrie>
unless you like compiler hacking and language design
goshakkk has quit [Quit: Computer has gone to sleep.]
<judofyr>
who doesn't like compiler hacking and language design?
<Mon_Ouie>
People who don't like progr… never mind :)
<injekt>
Mon_Ouie did a funny
vmatiyko has quit [Quit: Page closed]
retro|cz has quit [Ping timeout: 248 seconds]
carloslopes has joined #ruby-lang
<injekt>
I really like go fmt
<injekt>
Ruby needs something like that
<injekt>
although that would be very hard to build :)
havenn has joined #ruby-lang
<judofyr>
yes, I'm a big fan of gofmt too
<judofyr>
s/too/also/
<judofyr>
err
<bstrie>
injekt: how about a tool to transpile ruby to go, then run gofmt, then transpile it back
<judofyr>
put the "also" some words earlier
<injekt>
bstrie: D:
<injekt>
judofyr: lol
<judofyr>
injekt: I need a Englishfmt
wyhaines has quit [Remote host closed the connection]
<judofyr>
injekt: well, we do have ruby_parser
<injekt>
:/
<injekt>
yeah..
<judofyr>
and ruby2ruby :)
kiddorails has joined #ruby-lang
<judofyr>
or we can hack it up with regexen!
vlad_starkov has quit [Remote host closed the connection]
<injekt>
yeah that sounds most viable
<injekt>
maybe we shouldn't write it in ruby either
<injekt>
that'll be slow
<injekt>
we can write it in a go-rust hybrid
rcvalle has joined #ruby-lang
<judofyr>
grust
<judofyr>
grust-rbfmt
<injekt>
lol
<injekt>
rugo
mytrile has quit [Remote host closed the connection]
<judofyr>
gotta go
judofyr has quit [Remote host closed the connection]
blahwoop has quit [Ping timeout: 255 seconds]
megha has quit [Quit: WeeChat 0.3.9.2]
zhul_mechanos has joined #ruby-lang
blahwoop has joined #ruby-lang
<imperator>
what can't be solved with regexen?
willdrew has joined #ruby-lang
<blahwoop>
my stds
FiXato has quit [Remote host closed the connection]
setmeaway has quit [Ping timeout: 272 seconds]
<imperator>
have you tried?
<injekt>
that would be an interesting expression
FiXato has joined #ruby-lang
kiddorails1 has joined #ruby-lang
kiddorails has quit [Ping timeout: 248 seconds]
asaaki has joined #ruby-lang
retro|cz has joined #ruby-lang
sush24 has joined #ruby-lang
setmeaway has joined #ruby-lang
holgerno has quit [Quit: Leaving...]
cored has joined #ruby-lang
rue|w has joined #ruby-lang
thisirs has quit [Remote host closed the connection]
kiddorails1 has quit [Read error: Connection reset by peer]
rsl has joined #ruby-lang
goshakkk has joined #ruby-lang
apeiros_ has quit []
agarcia has quit [Quit: Konversation terminated!]
rue|w has quit [Ping timeout: 260 seconds]
megha has joined #ruby-lang
richardburton has joined #ruby-lang
dankest has joined #ruby-lang
richardburton has quit [Ping timeout: 240 seconds]
cored has quit [Quit: leaving]
cored has joined #ruby-lang
RubyHead has joined #ruby-lang
cored has quit [Client Quit]
cored has joined #ruby-lang
cored has quit [Changing host]
cored has joined #ruby-lang
gregmoreno has joined #ruby-lang
megha has quit [Quit: WeeChat 0.3.9.2]
megha has joined #ruby-lang
GarethAdams has quit [Quit: Leaving...]
pkrnj has quit [Ping timeout: 255 seconds]
atadesk has joined #ruby-lang
sn0wb1rd has quit [Quit: sn0wb1rd]
rue|w has joined #ruby-lang
rue|w has quit [Remote host closed the connection]
emocakes has quit [Quit: emocakes]
tenderlove has joined #ruby-lang
solars has quit [Ping timeout: 272 seconds]
pkrnj has joined #ruby-lang
megha has quit [Quit: WeeChat 0.3.9.2]
atadesk has quit [Quit: Leaving.]
holgerno has joined #ruby-lang
tenderlove has quit [Ping timeout: 248 seconds]
dankest has quit [Quit: Leaving...]
blahwoop has quit [Ping timeout: 240 seconds]
tbuehlmann has quit [Remote host closed the connection]
retro|cz has quit [Ping timeout: 248 seconds]
ssl has joined #ruby-lang
vlad_starkov has joined #ruby-lang
njerichelimo has quit [Ping timeout: 240 seconds]
sn0wb1rd has joined #ruby-lang
kiddorails has joined #ruby-lang
bfreeman has joined #ruby-lang
tbuehlmann has joined #ruby-lang
ryanf has joined #ruby-lang
ryanf has quit [Client Quit]
agnitio has quit [Quit: Leaving]
<JMcAfreak>
out of context, the last four lines would be very, um... interesting
apeiros_ has joined #ruby-lang
__butch__ has joined #ruby-lang
wallerdev has joined #ruby-lang
<naquad>
is there some gem implementing dispatcher pattern (thats where i can subscribe to specific kind of messages then send them from some other place) which plays nice with EventMachine?
swav has quit [Read error: Connection reset by peer]
swav has joined #ruby-lang
carloslopes has quit [Remote host closed the connection]
madhadron has joined #ruby-lang
ryanv-raptor has joined #ruby-lang
dr_bob has left #ruby-lang [#ruby-lang]
brianpWins has quit [Quit: brianpWins]
jef_abraham has joined #ruby-lang
rcvalle has quit [Ping timeout: 248 seconds]
toretore has joined #ruby-lang
<madhadron>
Why in blazes are read and write called something different on SSLSocket and TCPSocket?
<naquad>
madhadron, because those are different system calls
<naquad>
and they're actually different in implementation and behavior
<naquad>
send/recv
<madhadron>
Fair enough. The correct question should be why doesn't SSLSocket have a send method.
<naquad>
send can accept flags, able to raise errors (broken pipe, conn reset, etc)
<naquad>
madhadron, because openssl is insane. thats the only thing that comes to my mind
<madhadron>
*sigh*
alan_sebastian has joined #ruby-lang
karasawa has joined #ruby-lang
<madhadron>
I must say, I'm looking forward to not writing Ruby on a regular basis.
gjaldon has quit [Quit: Leaving]
<manveru>
openssl is insane in every language :)
alan_sebastian has left #ruby-lang [#ruby-lang]
<manveru>
that's the joy with shared libraries
<pabs>
you're in the wrong channel for that
<madhadron>
manveru: The interface to it need not be.
<manveru>
well, you can add your method
<pabs>
and re: ssl, there are a large number of things that can potentially happen when you read or write to an ssl socket
<pabs>
if you want a send method extend the class and create it
<pabs>
or override the base class
<naquad>
i have a hash containing symbols as keys and array of Proc instances as values. when i add to this array i return hash of Proc as unique id. now i need to implement quick removal by this id. to do this i'm traversing all hash and remove it from arrays. i'm doing it like that: delete_if {|p| p.hash == h} - but it seems to be inefficient way. is there anything better? i can change the structure if its required
<madhadron>
pabs: Yes, that's the answer I'm reluctantly coming to.
<madhadron>
pabs: The base class of SSLSocket is Object, though
<madhadron>
And here I am writing an SDK and contemplating monkey patching the standard library.
ivanoats has quit [Remote host closed the connection]
<manveru>
naquad: how large are those arrays?
<naquad>
manveru, not big, 5-20 elements max
rcvalle has joined #ruby-lang
<naquad>
total ~10 arrays
<manveru>
then leave it like that
<manveru>
anything more complex would make it slower, imho :)
<manveru>
if you want to maintain order, that is
<naquad>
hm, i've just remembered about set
<naquad>
does it maintain order?
<manveru>
no
<naquad>
order is important
<naquad>
crap :(
<manveru>
set is an hash
<naquad>
manveru, it uses hashing, but its not a hash
<madhadron>
naquad: Use an Array of 2 element lists (an association list) and Array#assoc to search
<naquad>
but then it maintains the order, because since 1.9.x hash maintains the order
alan_sebastian has joined #ruby-lang
<manveru>
insertion order, and you're not guaranteed that this won't change
sulo has joined #ruby-lang
<andrewvos>
What happened to erikh?
<manveru>
it's an implementation detail, not set in stone :)
<manveru>
though by now i fear a lot of people rely on it already
Axsuul has joined #ruby-lang
<madhadron>
naquad: If you look at ordered dictionary-ish data structures in other languages, you'll find they tend to use an association list, or an association tree if they're aiming for better lookup performance.
hahuang65_ has joined #ruby-lang
<manveru>
andrewvos: i think he started at a new company or something
cultureulterior_ has quit [Quit: cultureulterior_]
<manveru>
madhadron: assoc is pretty good i think
<madhadron>
manveru: Sure, it's O(n), just like any other assoc on an association list since the dawn of Lisp
<manveru>
but given that Proc#hash is very cheap, not sure how much that would save
mistym is now known as mistym_lunch
<manveru>
so is delete_if
<manveru>
both do a linear search
marr has joined #ruby-lang
glebm has quit [Quit: Computer has gone to sleep.]
<manveru>
assoc has the issue that you have to find the element again in order to delete it
<manveru>
and it only finds one entry, which might be ok for this case though
alan_sebastian has quit [Client Quit]
<madhadron>
manveru: You typically would recurse until false
<manveru>
in ruby?
<madhadron>
But if you need fast lookup, it's best to maintain a bimap
io_syl has joined #ruby-lang
<madhadron>
manveru: Sufficiently in the dark ages where there's no tail call recursion?
<manveru>
in ruby there is no tail recursion unless you compile a custom ruby :)
<madhadron>
When you insert key -> [Proc], also insert Proc -> key, index in another structure so you can find it again without traversal
<madhadron>
I guess since there's Ruby on the JVM, that would have to be true.
<manveru>
yeah, headius tries to make sure tail-call-optimization doesn't go standard
<manveru>
until the JVM gets it, that is
<manveru>
2034 or sometime around there
<madhadron>
Right.
<manveru>
but anyway, we speak about 20 elements per array
<madhadron>
Right, any optimization in this case is premature
<madhadron>
Just traverse and delete
<manveru>
i think the overhead of maintaining an index would be slower
solars has quit [Ping timeout: 246 seconds]
<manveru>
aye
<naquad>
ok, will do with simple traverse. thanks for help people
njerichelimo has quit [Quit: Leaving]
thone_ has quit [Ping timeout: 276 seconds]
megha has quit [Quit: WeeChat 0.3.9.2]
thone has joined #ruby-lang
micaeked has joined #ruby-lang
schaerli has quit [Remote host closed the connection]
ivanoats has joined #ruby-lang
ivanoats has quit [Changing host]
ivanoats has joined #ruby-lang
sush24 has quit [Quit: This computer has gone to sleep]
TerabyteST has quit [Quit: terabytest]
stevechiagozie has quit [Quit: Computer has gone to sleep.]
vlad_starkov has quit [Remote host closed the connection]
mistym_ has quit [Remote host closed the connection]
mrsolo has joined #ruby-lang
jbwiv has joined #ruby-lang
<jbwiv>
guys, is there a way to filter backtraces with a regex in rdb? the backtraces I'm getting are incredibly long, yet I'm only looking for a few particular lines
<apeiros_>
jbwiv: backtraces are ordinary arrays
breakingthings has quit []
<apeiros_>
Array#grep e.g. should work just fine
<jbwiv>
apeiros_: hmmm...I mean in rdb via the bt or where commands
zmack has quit [Remote host closed the connection]
<apeiros_>
oh, fun, I somehow read drb and thought you were getting backtraces from a remote process :)
<apeiros_>
don't know then
<jbwiv>
apeiros_: lol. ok.
justinram has joined #ruby-lang
kogent has joined #ruby-lang
TerabyteST has joined #ruby-lang
sush24 has joined #ruby-lang
kogent has quit [Remote host closed the connection]
kogent has joined #ruby-lang
rue|w has joined #ruby-lang
larrylv has quit [Remote host closed the connection]
larrylv has joined #ruby-lang
brianpWins has joined #ruby-lang
larrylv has quit [Remote host closed the connection]
havenn has quit [Remote host closed the connection]
jef_abraham has quit [Remote host closed the connection]
jef_abraham has joined #ruby-lang
havenn has joined #ruby-lang
aedorn has joined #ruby-lang
swav_ has joined #ruby-lang
havenn has quit [Read error: Operation timed out]
Mon_Ouie has quit [Ping timeout: 248 seconds]
retro|cz has joined #ruby-lang
rue|w has quit [Ping timeout: 260 seconds]
swav has quit [Read error: Connection reset by peer]
havenn has joined #ruby-lang
jtoy has quit [Quit: jtoy]
xcombelle has joined #ruby-lang
Mon_Ouie has joined #ruby-lang
blahwoop has quit [Ping timeout: 255 seconds]
larrylv has joined #ruby-lang
stevechiagozie has joined #ruby-lang
KA_ has joined #ruby-lang
sulo has quit [Remote host closed the connection]
workmad3 has quit [Ping timeout: 255 seconds]
S1kx has quit [Quit: Leaving]
schaerli has joined #ruby-lang
blahwoop has joined #ruby-lang
Future[Chimp] has quit [Quit: Leaving]
larrylv has quit [Remote host closed the connection]
headius has joined #ruby-lang
davidbalber|away is now known as davidbalbert
MaddinXx has joined #ruby-lang
tbuehlmann has quit [Remote host closed the connection]
<darix>
yorickpeterse: stack depth isnt too bad imho :p
jbsan_ has joined #ruby-lang
slyphon has joined #ruby-lang
jbsan has quit [Ping timeout: 252 seconds]
jbsan_ is now known as jbsan
<yorickpeterse>
Is it actually possible to modify the trace line on the fly? In this case it would help tremendously if each line would state the node type (or something similar) that was processed at that time
<yorickpeterse>
darix: also mind you this will grow *fast* depending on the amount of code being processed
<yorickpeterse>
(this is from parsing the code of OpenStruct)
vlad_starkov has joined #ruby-lang
<canton7>
yorickpeterse, you could always break the recursion out into an explicit stack, then just inspect the stack
<yorickpeterse>
wat
<darix>
yorickpeterse: hmmm ... things like puma have cleaned up stack traces .... maybe as part of a general exception handler?
<yorickpeterse>
I don't want to remove lines because it's actually helpful, I want to add some info to them without having to wrap everything in a giant begin/rescue
<yorickpeterse>
(gotta catch em all)
<yorickpeterse>
But I doubt that's possible without some grotesque hack
karasawa has joined #ruby-lang
ivanoats has quit [Remote host closed the connection]
swav_ has quit [Read error: Connection reset by peer]
larrylv has joined #ruby-lang
larrylv has quit [Ping timeout: 248 seconds]
RubyHead has quit [Remote host closed the connection]
sabfer has quit [Read error: No route to host]
sabfer has joined #ruby-lang
<yorickpeterse>
whitequark: so my linter is slowly turning into a Ruby interpreter, pretty cool stuff
<yorickpeterse>
A very limited one that is
richardburton has quit [Quit: Leaving.]
davidbalbert is now known as davidbalber|away
postmodern has joined #ruby-lang
<whitequark>
yorickpeterse: that's called "partial evaluation"
<yorickpeterse>
that's the boring name
<whitequark>
yorickpeterse: I have a kind of a hard problem here
<yorickpeterse>
Not sure how I'm going to deal with more complex values. I can resolve stuff such as `index = 0; numbers[index] = 10` but it becomes a bit annoying when using hashes as values (or something else)
<whitequark>
but the problem is that I need to have a way to map errors back to the source
<whitequark>
including, sometimes, the whole inference path
<yorickpeterse>
Hmmm
<yorickpeterse>
well, I'd start by storing the file + line number somewhere
<whitequark>
the problem is that I need to show *why* that type is present there
<yorickpeterse>
I'm afraid the only answer I can give at this time is "eehhh"
<whitequark>
oh ok.
<yorickpeterse>
I'm fist deep in my own code so I'm not of much use atm :/
<banisterfiend>
yorickpeterse: the average fist is only a few cm
<yorickpeterse>
haha
bfreeman_ has joined #ruby-lang
bfreeman has quit [Read error: Connection reset by peer]
yalue has joined #ruby-lang
carloslopes has quit [Remote host closed the connection]
tbuehlmann has quit [Quit: Yaaic - Yet another Android IRC client - http://www.yaaic.org]
MaddinXx has quit [Remote host closed the connection]
<whitequark>
yorickpeterse: I think what I'll do is to add a field to each instruction
<whitequark>
or maybe even to each value
nyuszika7h has quit [Remote host closed the connection]
<yorickpeterse>
What type of output is this actually?
<yorickpeterse>
As in, what tool generated it and such
<whitequark>
which will either point directly to a source location, or there'll be a singly linked list of transformations applied to that source location
<whitequark>
yorickpeterse: foundry
<whitequark>
well it's the default Furnace::SSA formatter
mrsolo has quit [Quit: This computer has gone to sleep]
<whitequark>
but this is how Foundry LIR looks like
apeiros_ has quit [Remote host closed the connection]
<andrewvos>
llaskin: What?
<andrewvos>
llaskin: Question please
<llaskin>
I managed to install 1.9.3 and ruby-debug-ide however, I'm getting errors in is_binary_data? and also this: https://gist.github.com/4478661 which seems ....strange
<llaskin>
i expected the result on line 6 to be "Automation Test Same Shard01-07-2013--11-59-40 Site"
<llaskin>
without the \s and []
<andrewvos>
llaskin: Why is ot strange?
<andrewvos>
Use puts instead of p then.
workmad3 has joined #ruby-lang
<llaskin>
i'm also seeing these "Exception in DebugThread loop: undefined method `is_binary_data?' for "[[\"Automation Test Same Shard01-07-2013--11-59-40 Site\"]]":String
<llaskin>
"
<andrewvos>
I have no idea about that :)
<tbuehlmann>
llaskin, can you provide a minimalist example for this?
<llaskin>
sure one sec tbuehlmann
ebouchut has joined #ruby-lang
<llaskin>
hrm
<llaskin>
might be harder then I thought
lcdhoffman has joined #ruby-lang
KA_ has joined #ruby-lang
dankest has quit [Quit: Leaving...]
karasawa has joined #ruby-lang
jMCg has quit [Remote host closed the connection]
ebouchut has quit [Ping timeout: 276 seconds]
neocoin has quit [Remote host closed the connection]
<andrewvos>
llaskin: Print out RUBY_VERSION to see hwhat version pf ruby you're really running.
bantic has joined #ruby-lang
<andrewvos>
of
<andrewvos>
what
<andrewvos>
*
<andrewvos>
*
<llaskin>
C:\Ruby193\bin>irb
<llaskin>
irb(main):001:0> puts RUBY_VERSION
<llaskin>
1.9.3
<andrewvos>
hm
sabfer has quit [Quit: sabfer]
alec has quit [Quit: back at putzis, slothrop curls in a wide crisp sheeted bed beside solange, asleep and dreaming about zwolfkinder, and bianca smiling, he and she riding on the wheel, their compartment become a room, one hes never seen, a room in a great complex of apartm]
<andrewvos>
Do you need to require syck or something?
<madhadron>
This is bizarre. I have a method in a module, and code farther down that module that calls it at evaluation time...
<madhadron>
And it's giving me: undefined method `default_xml_library' for Splunk:Module (NoMethodError)
sush24_ has quit [Quit: This computer has gone to sleep]
kogent has quit [Read error: Operation timed out]
kogent_ is now known as kogent
<madhadron>
Apparently, if you have a module A with a method in one file and code that calls it, and you include that file in another file that also puts code in module A, it can't find the method when the other code is executed.
<madhadron>
a.rb:6:in `<module:A>': undefined method `f' for A:Module (NoMethodError)
<madhadron>
from a.rb:1:in `<main>'
<lianj>
madhadron: ofc it does
<micaeked>
madhadron: def self.f
itsmeduncan has joined #ruby-lang
<madhadron>
micaeked: …that works.
<madhadron>
Let's see if it works in the full size code base.
<lianj>
madhadron: def f defines a instance method. def self.f defines a class method
<madhadron>
On a module. Joy.
<madhadron>
How do I just get a function in a namespace?
<lianj>
?
<madhadron>
Modules are namespaces, in the absence of anything else. How do I define a function in the namespace that I can call after it's defined, both locally and from functions elsewhere, without having to prefix it with ModuleName. ?
<lianj>
you cant
<lianj>
unless you extend the main scope with that module
<madhadron>
I see. So modules aren't actually namespaces, they're just the closet thing Ruby has.
mercwithamouth has joined #ruby-lang
<lianj>
not sure what you want :) maybe show code
ryanf has quit [Ping timeout: 264 seconds]
<madhadron>
Nevermind. It's not part of the public API so I can hack it. Anything extending the time I have to write Ruby isn't to be contemplated.
<lianj>
maybe its worth learning ruby first ;)
kogent has quit [Quit: kogent]
<madhadron>
lianj: I have. I just keep running across corner cases where the language design was obviously screwed up.
<madhadron>
I mean, it's better than Perl or PHP, but still in the same category as those.
<madhadron>
That sounds very close to a troll, I realize, but this project has largely been an exercise in frustration.