j4cknewt has quit [Remote host closed the connection]
j4cknewt has joined #ruby-lang
Adam_ActiveState has quit [Read error: Connection reset by peer]
Adam_ActiveState has joined #ruby-lang
ender|dkm has quit [Read error: Connection reset by peer]
ender|dkm has joined #ruby-lang
toastynerd has quit [Remote host closed the connection]
hotpancakes has quit [Remote host closed the connection]
arooni-mobile has quit [Ping timeout: 245 seconds]
hotpancakes has joined #ruby-lang
mmus has quit [Ping timeout: 260 seconds]
JohnBat26 has joined #ruby-lang
kgrz has joined #ruby-lang
zz_anildigital is now known as anildigital
mistym has quit [Remote host closed the connection]
hotpancakes has quit [Ping timeout: 255 seconds]
Guest3838 has quit [Remote host closed the connection]
spuk has quit [Ping timeout: 255 seconds]
spuk has joined #ruby-lang
toastynerd has joined #ruby-lang
anildigital is now known as zz_anildigital
toastynerd has quit [Remote host closed the connection]
amerine has joined #ruby-lang
ta_ has quit [Remote host closed the connection]
Adam_ActiveState has quit [Read error: Connection reset by peer]
dm78 has quit [Remote host closed the connection]
arooni-mobile has joined #ruby-lang
Adam_ActiveState has joined #ruby-lang
Adam_ActiveState has quit [Read error: Connection reset by peer]
Lewix has quit [Read error: Connection reset by peer]
Lewix has joined #ruby-lang
Adam_ActiveState has joined #ruby-lang
zz_anildigital is now known as anildigital
thomasxie has quit [Quit: Leaving.]
Adam_ActiveState has quit [Read error: Connection reset by peer]
Adam_ActiveState has joined #ruby-lang
Adam_ActiveState has quit [Read error: Connection reset by peer]
torrieri has quit [Quit: Leaving...]
Adam_ActiveState has joined #ruby-lang
hotpancakes has joined #ruby-lang
nathanstitt has quit [Quit: I growing sleepy]
mistym has joined #ruby-lang
Adam_ActiveState has quit [Read error: Connection reset by peer]
migbar has joined #ruby-lang
Adam_ActiveState has joined #ruby-lang
lsegal has joined #ruby-lang
ianmcshane has joined #ruby-lang
blowmage` is now known as blowmage
vintik has joined #ruby-lang
arooni-mobile has quit [Ping timeout: 255 seconds]
migbar has quit [Ping timeout: 245 seconds]
heftig has joined #ruby-lang
ur5us_ has joined #ruby-lang
toastynerd has joined #ruby-lang
kyb3r_ has joined #ruby-lang
hotpancakes has quit [Ping timeout: 260 seconds]
dm78 has joined #ruby-lang
ur5us has quit [Ping timeout: 260 seconds]
ur5us_ has quit [Ping timeout: 255 seconds]
toastynerd has quit [Ping timeout: 260 seconds]
dm78 has quit [Ping timeout: 255 seconds]
AKASkip has joined #ruby-lang
saarinen has joined #ruby-lang
bsvineet_ has joined #ruby-lang
alexju has joined #ruby-lang
hotpancakes has joined #ruby-lang
bsvineeth has quit [Ping timeout: 260 seconds]
skade has joined #ruby-lang
saarinen has quit [Ping timeout: 260 seconds]
hotpancakes has quit [Ping timeout: 255 seconds]
torrieri has joined #ruby-lang
wallerdev has quit [Quit: wallerdev]
danijoo has quit [Read error: Connection reset by peer]
arooni-mobile has joined #ruby-lang
danijoo has joined #ruby-lang
relix has joined #ruby-lang
saarinen has joined #ruby-lang
spastorino has quit [Quit: Connection closed for inactivity]
dm78 has joined #ruby-lang
torrieri has quit [Ping timeout: 255 seconds]
hotpancakes has joined #ruby-lang
vintik has quit [Remote host closed the connection]
AKASkip has quit [Ping timeout: 245 seconds]
dm78 has quit [Ping timeout: 260 seconds]
toastynerd has joined #ruby-lang
skade has quit [Quit: Computer has gone to sleep.]
hotpancakes has quit [Ping timeout: 260 seconds]
tbuehlmann has joined #ruby-lang
toastynerd has quit [Ping timeout: 245 seconds]
thomasxie has joined #ruby-lang
Lewix has quit [Remote host closed the connection]
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
thomasxie has quit [Client Quit]
firesorc has quit [Ping timeout: 246 seconds]
yell0wgh0st has left #ruby-lang [#ruby-lang]
torrieri has joined #ruby-lang
skade has joined #ruby-lang
_ht has joined #ruby-lang
torrieri has quit [Read error: Connection reset by peer]
torrieri_ has joined #ruby-lang
torrieri_ has quit [Read error: Connection reset by peer]
torrieri has joined #ruby-lang
migbar has joined #ruby-lang
arooni-mobile has quit [Ping timeout: 260 seconds]
Kerber0s has joined #ruby-lang
migbar has quit [Ping timeout: 245 seconds]
torrieri has quit [Ping timeout: 260 seconds]
charliesome has quit [Quit: zzz]
hotpancakes has joined #ruby-lang
ruby-lang789 has joined #ruby-lang
<ruby-lang789>
how is this polymorphic: true implemented in rails , is there some kind of interface defined under the hodd!! i can't get much on google
bsvineet_ has quit [Remote host closed the connection]
skade has quit [Quit: Computer has gone to sleep.]
<havenwood>
ruby-lang789: true implemented in Rails? <- whatcha mean?
CaptainJet has quit []
JoL1hAHN has joined #ruby-lang
JoL1hAHN has quit [Changing host]
JoL1hAHN has joined #ruby-lang
<ruby-lang789>
i mean polymorphic associations ...
<havenwood>
ruby-lang789: I don't understand the question, but sounds like it might be a good one for #rubyonrails.
hotpancakes has quit [Ping timeout: 255 seconds]
<havenwood>
ruby-lang789: Just to be clear, the question has nothing to do with the value `true` then?
<havenwood>
>.> I'm confued.
<havenwood>
ruby-lang789: Something to do with polymorphic associatoins or general oop polymorphism or something else?
bsvineeth has joined #ruby-lang
<ruby-lang789>
yes, i was just trying to imply that how is the polymorphic relations actually getting implemented
<ruby-lang789>
is there a special feature in ruby.. or an application of interpface and inheritance
<havenwood>
i've heard rave reviews of POODR but not read it
skade has joined #ruby-lang
<havenwood>
i'm guessing she covers decorators well
<havenwood>
i need to get a copy
toastynerd has quit [Ping timeout: 245 seconds]
skade_ has joined #ruby-lang
ta_ has joined #ruby-lang
Asher has quit [Ping timeout: 240 seconds]
<shortCircuit__>
i also had a little idea on Single Table Inheritance ... while i was googling about this polymorphic thing ... but in the end it said, rails does use a different approach
AKASkip has joined #ruby-lang
Sphynx has joined #ruby-lang
skade has quit [Ping timeout: 260 seconds]
<shortCircuit__>
webcache.googleusercontent.com/search?q=cache:http://robots.thoughtbot.com/whats-the-deal-with-rails-polymorphic-associations here
torrieri has joined #ruby-lang
lsegal has quit [Quit: Quit: Quit: Quit: Stack Overflow.]
mistym has quit [Remote host closed the connection]
migbar has joined #ruby-lang
torrieri has quit [Ping timeout: 260 seconds]
hellangel7 has quit [Max SendQ exceeded]
hellangel7 has joined #ruby-lang
migbar has quit [Ping timeout: 255 seconds]
cih has joined #ruby-lang
j4cknewt has joined #ruby-lang
cleopatra has quit [Remote host closed the connection]
cih has left #ruby-lang [#ruby-lang]
AKASkip has quit [Remote host closed the connection]
toastynerd has joined #ruby-lang
cih_ has joined #ruby-lang
jhass|off is now known as jhass
toastynerd has quit [Read error: No route to host]
yell0wgh0st has quit [Quit: yell0wgh0st]
toastynerd has joined #ruby-lang
yell0wgh0st has joined #ruby-lang
Guest51987 has quit [Ping timeout: 260 seconds]
Miphix has quit [Quit: Leaving]
charliesome has joined #ruby-lang
cih_ has quit [Read error: Connection reset by peer]
toastynerd has quit [Ping timeout: 255 seconds]
Guest51987 has joined #ruby-lang
cih has joined #ruby-lang
alexju has quit [Remote host closed the connection]
AKASkip has joined #ruby-lang
hotpancakes has joined #ruby-lang
sleepee has joined #ruby-lang
Asher has joined #ruby-lang
Siyfion has joined #ruby-lang
Miphix has joined #ruby-lang
ianmcshane has joined #ruby-lang
cih is now known as chumley
chumley is now known as chumley_
hotpancakes has quit [Ping timeout: 255 seconds]
relix has joined #ruby-lang
chumley__ has joined #ruby-lang
skade_ has quit [Ping timeout: 260 seconds]
Kerber0s has quit [Remote host closed the connection]
chumley_ has quit [Ping timeout: 260 seconds]
ianmcshane has quit [Remote host closed the connection]
chussenot has joined #ruby-lang
mikecmpbll has joined #ruby-lang
dm78 has joined #ruby-lang
benlovell has joined #ruby-lang
ianmcshane has joined #ruby-lang
dm78 has quit [Ping timeout: 245 seconds]
vintik has joined #ruby-lang
scottj has joined #ruby-lang
j4cknewt has quit [Remote host closed the connection]
j4cknewt has joined #ruby-lang
skade has joined #ruby-lang
j4cknewt has quit [Ping timeout: 245 seconds]
vintik has quit [Remote host closed the connection]
torrieri has joined #ruby-lang
migbar has joined #ruby-lang
torrieri has quit [Ping timeout: 260 seconds]
bsvineeth has quit [Remote host closed the connection]
migbar has quit [Ping timeout: 255 seconds]
michd is now known as MichD
scottj has left #ruby-lang [#ruby-lang]
yell0wgh0st has quit [Quit: yell0wgh0st]
toastynerd has joined #ruby-lang
yell0wgh0st has joined #ruby-lang
toastynerd has quit [Read error: No route to host]
toastynerd has joined #ruby-lang
<yorickpeterse>
morning
toastynerd has quit [Ping timeout: 245 seconds]
hotpancakes has joined #ruby-lang
jhass is now known as jhass|off
hotpancakes has quit [Ping timeout: 276 seconds]
marr has joined #ruby-lang
ianmcshane has quit [Remote host closed the connection]
Guest51987 has quit [Ping timeout: 245 seconds]
allomov has joined #ruby-lang
mkaesz has joined #ruby-lang
Weston_ has joined #ruby-lang
hellangel7 has quit [Read error: Connection reset by peer]
<Weston_>
Hello all. I am trying to make backspace usable in a ruby script without the console adding
<Weston_>
<H
<harly>
works for me.
<harly>
need more info
diegoviola has quit [Quit: WeeChat 1.0]
<Weston_>
I use linux with an x term console. :)
Silex has joined #ruby-lang
<harly>
what is your TERM env set to?
<Weston_>
It works fine in irb but not when running an actual script.
mkaesz has quit [Ping timeout: 276 seconds]
<Weston_>
I'm sorry, could you tell me how to find out?
<harly>
echo $TERM
Kerber0s has joined #ruby-lang
<Weston_>
this is what it says. xterm
<harly>
and it only happens when y90u're running a ruby script? like ruby something.rb, and it reads in a line you type?
<Weston_>
Yes.
error404_ is now known as error404
<harly>
type: stty -a
<harly>
what does it say erase is set to?
bsvineeth has joined #ruby-lang
torrieri has joined #ruby-lang
<Weston_>
erase = ^?
<Weston_>
That is what it says.
MSY has joined #ruby-lang
MSY is now known as Guest90641
qba73 has joined #ruby-lang
<Weston_>
By the way, my ruby version is 2.1.2. In case this is useful.
<harly>
and what happens when you press ctrl-v ctrl-backspace in your term? ^H or ^? prints?
<harly>
i don't think it's anything to do with ruby
<harly>
just old terminal messiness
<Weston_>
Ah.
<Weston_>
One moment please.
<Weston_>
It works.
<harly>
what do you mean it works
<Weston_>
Well backspaces at least :)
<harly>
was that inside ruby?
<harly>
or just normal terminal?
<Weston_>
Inside ruby.
<harly>
i mean just inside terminal.
<harly>
it should print either ^H or ^?
torrieri has quit [Ping timeout: 272 seconds]
migbar has joined #ruby-lang
<Weston_>
When I press ctrl-v and ctrl-backspace it literally just backspaces. Well in ruby that is.
<harly>
wait.
<harly>
how do you get to your ruby terminal?
<harly>
i was assuming you have a shell prompt
<harly>
but now i wonder
<Weston_>
Well I get to it through an ide :)
<Weston_>
Oh...
<harly>
like, where did you type echo $TERM, and stty -a
workmad3 has joined #ruby-lang
<harly>
i tihnk you just need to switch erase from ^? to ^H. or, in your term, configure it to alternate.
fullybaked has joined #ruby-lang
<harly>
if you control-right click on your xterm it should give you options
stef_204 has joined #ruby-lang
<Weston_>
Let me first say. Backspace works normally in a regular terminal prompt.
migbar has quit [Ping timeout: 246 seconds]
torrieri has joined #ruby-lang
<harly>
all i remember is either toggling the terminal prefs fixed it, toggling the shell prefs did, or changing the $TERM env to something more appropriate.
<harly>
it's also possible an app can be set different, but I'm not sure if ruby has that.
mkaesz has joined #ruby-lang
<harly>
if you cntrl-click on your term you should be able to toggle backarrow key
skade has quit [Quit: Computer has gone to sleep.]
<harly>
try that, see what happens.
symm- has joined #ruby-lang
<Weston_>
Alright. One moment please :)
<Weston_>
Hmm. All I see is a rectangle that says main 0 when I ctrl-click.
<harly>
i think that should be your fix. just worked for me in perl, which also printed ^H by deault when hitting backspace
ianmcshane has joined #ruby-lang
allomov has quit [Remote host closed the connection]
<harly>
ok try: stty erase <ctrl-v><ctrl-h> <enter>
<harly>
that's assuming when you run ruby it's in the same terminal session
<yorickpeterse>
whitequark: so now https://twitter.com/KafkaFranzz also started following me, all because of that Apache Kafka markov chain
banister has joined #ruby-lang
torrieri has quit [Ping timeout: 260 seconds]
toastynerd has joined #ruby-lang
Newbie0086 has quit [Quit: 离开]
<Weston_>
It says syntax error near unexpected token <
<harly>
<ctrl-v> means literally press control and v at the same time. :)
<harly>
you should see: stty erase ^H
<harly>
but the ^H is special, one character, not two.
<Weston_>
Oh. Thank you so much for your patience :)
mkaesz has quit [Ping timeout: 264 seconds]
ianmcshane has quit [Ping timeout: 268 seconds]
mkaesz has joined #ruby-lang
<harly>
also if you
<harly>
're using some IDE, maybe it has an option to toggle the backspace character
<Weston_>
It came up as ^M when I did that.
<harly>
did you press enter while having control down?
<Weston_>
yes :)
<harly>
don't do that
<harly>
hold control for v and h
yell0wgh0st has quit [Quit: yell0wgh0st]
<harly>
then release control
toastynerd has quit [Ping timeout: 252 seconds]
<harly>
then press enter
<Weston_>
Alright then. Retrying now.
<Weston_>
It said stty missing argument to "erase"
<harly>
did it show up as ^H after you pressed ctrl-v-h?
<Weston_>
Not the last time but I just tried again and it worked :)
<harly>
ah ok
<harly>
so now is it working in ruby?
<Weston_>
Yes indeed.
<Weston_>
:)
hotpancakes has joined #ruby-lang
<harly>
that's only temporary though
<harly>
you want to add it to a config
<harly>
and it might break other things. like other terminal programs.
<harly>
basically ctrl-backspace will toggle between the two
<Weston_>
A config file might work well I think :)
<harly>
yeah but it depends on what you're using
<harly>
precisely how do you get to your ruby prompt?
<Weston_>
Geany(My ide) seems to load the xterm each time I run my ruby program.
stamina has joined #ruby-lang
<harly>
and goes straight into running your program?
<harly>
or you have to type ruby ...blah
<Weston_>
It goes straight into it.
<harly>
then where did you type stty -a etc? If that window was your ruby prompt...
<Weston_>
Outside my ide, I typed xterm and got into one exactly like it :)
<harly>
hmm.
hotpancakes has quit [Ping timeout: 246 seconds]
<Weston_>
But that does not work in the long run I guess :(
<harly>
if you typed stty edit ^H into a different window, i'm surprised it worked for a new window that the IDE opened...
<harly>
i thought it was window specific.
mark06 has joined #ruby-lang
havenwood has quit []
<Weston_>
Well. That was all in the same window. I never haven't tried in the ide yet...
<harly>
oh i see.
<Weston_>
Does not work in the ide.
<harly>
right.
<harly>
so you could try editing ~/.Xdefaults
<harly>
and changing, or adding: xterm.*backarrowKey: false
<harly>
whiich should be read when the IDE kicks off a new term
robmiller1 has quit [Quit: Leaving.]
charliesome has quit [Quit: zzz]
<Weston_>
Let me try that. Should I make a new .Xdefaults directory since it is not in my home folder?
<wnd>
sounds like you're talking about xresources. I believe those need to me loaded first, I doubt the IDE does that. how about echo 'xterm.*backarrowKey: true' | xrdb -merge -
<harly>
not sure how the ide would be doing it. could just throw it in .login or .profile i guess.
<harly>
try that xrdb line wnd gave, weston
<wnd>
(and I think that trailing '-' is not needed)
<Weston_>
Alright :)
yell0wgh0st has quit [Ping timeout: 250 seconds]
jasiek has quit [Ping timeout: 240 seconds]
<Weston_>
Sorry just trying to catch up with you guys.
<wnd>
just for the record, I have my xresources defined in ~/.Xresources
<Weston_>
First I should enter echo 'xterm.*backarrowKey: true' | xrdb -merge - this?
charliesome has joined #ruby-lang
<harly>
well we can try xresources first too. very hard to do this when I don't have an env to play on
<harly>
lets clean up first
<harly>
do: wc ~/.Xdefaults
<harly>
does that start with a 2?
<Weston_>
Ok :)
kgrz_ has joined #ruby-lang
dm78 has joined #ruby-lang
<Weston_>
Yes.
<harly>
wnd, know how to poll what a current X var is set to? curious if it's true or false for him atm
<wnd>
xrdb -query
<harly>
ok delete that file then
<harly>
and tyype: xrdb -query xterm.*backarrowKey
<wnd>
you'll need to grep it
<harly>
xrdb -query | grep backarrow
<wnd>
also, it'll naturally only return set variables, not application defaults
<Weston_>
Should I xrdb -query first?
<harly>
you wanna take over? seems lik eyou have an env that matches :)
<harly>
i would have tried all this in about 45 seconds lol
allomov has joined #ruby-lang
kgrz has quit [Ping timeout: 245 seconds]
<wnd>
I really have no clue what you're after here. I just notices something that looked like xresources and wondered if the method that was suggested did do anything immediate at all.
<Weston_>
term.*backarrowKey:true. Is what xrdb -query said :)
<harly>
ah ok. so we want to make it false, by default.
<harly>
try ~/.Xresources... so: echo 'xterm.*backarrowKey: false' >> ~/.Xresources
<harly>
and try the ide
dm78 has quit [Ping timeout: 276 seconds]
<harly>
wnd: just trying to set his xterm so it toggles that preference.
<Weston_>
One moment. It says no such file.
<harly>
it shouldn't say that lol
<harly>
make sure you have no ~/.Xresources and then use > instead of >>
<Weston_>
Well I do have one in my home directory.
arBmind has joined #ruby-lang
<harly>
can you edit it your preferred way and add that line in?
<Weston_>
Worked this time :)
<harly>
ok
<harly>
what worked tho.
<harly>
the ide? just adding it in?
<Weston_>
Oh the echo line.
<Weston_>
Trying the ide now.
<Weston_>
Not yet.
Sphynx has quit [Remote host closed the connection]
<harly>
dunno, i'm grasping at straws here. or rather, sniping with a shotgun
<harly>
need to find out how your IDE can set vars
<harly>
or just use ctrl-backspace instead of backspace
<wnd>
try this: echo 'xterm.*backarrowKey: false' | xrdb -merge , then try the IDE. I still think the resources are not loaded.
<Weston_>
Alright. Trying now.
<Weston_>
That did it :)
<wnd>
also, I wonder if the IDE (what IDE?) looks at resources named for xterm
<wnd>
ok, it does
<Weston_>
Oh and the ide is Geany.
<wnd>
since you now have that resource defined in ~/.Xdefaults, the setting is probably reloaded at next x restart
<wnd>
I use .Xresources, but some archlinux wiki claims it's obsoleted by .Xdefaults
<Weston_>
So no having to do this each time then?
<wnd>
hopefully now
<wnd>
not
<harly>
nope, purpose of all that was to make it permanent
<harly>
i hope ;) haven't uesd xrdb
mark06 has left #ruby-lang [#ruby-lang]
<Weston_>
That is good. Thank you so much you guys for your help. I appreciate it :)
<wnd>
well, it's just a tool to access x resource database
<wnd>
desktop environments probably load the config automagically
<Weston_>
And not once yet harly lol.
<harly>
heh
<harly>
well if it does go away
<harly>
you can just type it agian
haraoka has quit [Ping timeout: 255 seconds]
<harly>
if you do much work in your terminal with other termial programs there's a chance now that backspace won't work in other places. but see how you go.
<harly>
haven't had these problems for like... 10 years? :)
<wnd>
xrdb manual says: "Xrdb does not load any files on its own, but many desktop environments use xrdb to load ~/.Xresources files on session startup to initialize the resource database, as a generalized replacement for ~/.Xdefaults files."
<wnd>
oh well. works for me. if it works for you, great. :-)
<Weston_>
I will have to remember that harly. I think it should be just fine (hopefully lol) in the future :)
<harly>
if you wanna be sure while we're still here to help further, restart everything and see if it's still working :)
face has joined #ruby-lang
<harly>
it's a big hammer. but a solid test. :)
<Weston_>
That is a very good idea.
<Weston_>
And one worth trying:) Be right back
Weston_ has quit [Quit: ChatZilla 0.9.90.1 [Firefox 31.0/20140722231055]]
torrieri has joined #ruby-lang
faces has quit [Ping timeout: 245 seconds]
Kerber0s has quit [Remote host closed the connection]
<harly>
wnd: from that manual entry, it sounds like it's temporary. like just a way to force init of an .X<whatever> file?
<harly>
like a shell's source .bashrc or whatever
tkuchiki_ has joined #ruby-lang
<wnd>
yeah, echo | xrdb -merge is temporary. as I said, I have my stuff in ~/.Xresources and according to xrdb manual many DEs look for that.
torrieri has quit [Ping timeout: 245 seconds]
<wnd>
.bashrc is a bad idea, it doesn't necessarily know anything about x
Weston_ has joined #ruby-lang
tkuchiki has quit [Ping timeout: 255 seconds]
<Weston_>
It works great after reboot too!
migbar has joined #ruby-lang
skade has joined #ruby-lang
<harly>
ok well that's a win then
tkuchiki_ has quit [Ping timeout: 268 seconds]
<harly>
keep a hold of that last command you ran. might need to set it back to true if you get the problem reoccuring in some other program.
<harly>
wnd: if it's temp, i wonder why it's still working. oh. maybe it's the .Xsettings
<Weston_>
Yes it is a win. And will do. Thank you so much again for your assistance harly :)
<harly>
loaded when he rebooted or something. anyway. it's working. good enough lol
<Weston_>
Yea after a complete reboot.
<workmad3>
well, it probably loads when the xserver starts
<harly>
yeah.
<workmad3>
so you could have forced a restart of that without doing a full reboot and (I suspect) have gotten the same effect :)
ianmcshane has joined #ruby-lang
<harly>
and weston, that setting aside, if you get the ^H thing appear again, use ctrl-backspace instead to delete.
<harly>
workmad3: yes. but with 1m turn around for every experiment, i went with the nuke from orbit option :)
<workmad3>
harly: heh :D
<workmad3>
harly: those orbital nukes are always fun
migbar has quit [Ping timeout: 245 seconds]
chumley__ has quit []
<workmad3>
harly: tbh, I was more saying it for Weston_'s benefit to understand when something was happening now his problem was resolved... it wasn't a criticism as I'd have probably suggested doing exactly the same ;)
<harly>
gotchya
<Weston_>
Alright if it fails ctrl-backspace will work. Got it :)
toastynerd has joined #ruby-lang
toastynerd has quit [Read error: No route to host]
<Weston_>
That is all I needed help with. Thank you harly (Just one more time) and all, for your assistance and time (30 or more minutes I think).
<harly>
nps. it's a pretty annoying problem to get on that kind of env, when you haven't had it before.
<Weston_>
Indeed. I was blown away at how much you knew about all that stuff.
<harly>
misspent childhood.
<Weston_>
Well I am glad you knew about. Had you not known, I more than likely would be in tears (maybe?), or still trying to figure out the problem.
michael_imac is now known as michael_mbp
<Weston_>
I am still mostly a noob when it comes to advanced stuff like that.
ianmcshane has quit [Remote host closed the connection]
Voker57 has quit [Ping timeout: 250 seconds]
<Weston_>
Being able to help people like me means that your childhood was not 100% misspent :)
hotpancakes has joined #ruby-lang
ironhide_604 has joined #ruby-lang
earthquake has joined #ruby-lang
<Weston_>
Anyways, please forgive my prattle. Good day harly and those listening. Have a Jolly good day.
Weston_ has left #ruby-lang [#ruby-lang]
mark06 has joined #ruby-lang
hotpancakes has quit [Ping timeout: 246 seconds]
Kerber0s has joined #ruby-lang
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Kerber0s has quit [Read error: Connection reset by peer]
Kerber0s has joined #ruby-lang
postmodern has quit [Quit: Leaving]
_Kerber0s_ has joined #ruby-lang
Kerber0s has quit [Ping timeout: 260 seconds]
dm78 has joined #ruby-lang
banister has joined #ruby-lang
chussenot has quit [Quit: chussenot]
dm78 has quit [Ping timeout: 245 seconds]
Forgetful_Lion has joined #ruby-lang
yell0wgh0st has joined #ruby-lang
migbar has joined #ruby-lang
bsvineeth has quit [Remote host closed the connection]
benlovell has quit [Ping timeout: 245 seconds]
sepp2k has joined #ruby-lang
torrieri has joined #ruby-lang
elico has joined #ruby-lang
Sphynx has joined #ruby-lang
ur5us has quit [Remote host closed the connection]
bsvineeth has joined #ruby-lang
sarkyniin has joined #ruby-lang
kwd_ has quit [Read error: Connection reset by peer]
kwd has joined #ruby-lang
torrieri has quit [Ping timeout: 268 seconds]
ldnunes has joined #ruby-lang
toastynerd has joined #ruby-lang
charliesome has quit [Quit: zzz]
_Kerber0s_ has quit []
nofxx_ has quit [Ping timeout: 245 seconds]
Kerber0s has joined #ruby-lang
heftig has quit [Ping timeout: 272 seconds]
toastynerd has quit [Ping timeout: 255 seconds]
allomov has quit [Remote host closed the connection]
earthquake has quit [Quit: earthquake]
hotpancakes has joined #ruby-lang
Lewix has joined #ruby-lang
Lewix has quit [Remote host closed the connection]
hotpancakes has quit [Ping timeout: 264 seconds]
symm- has quit [Ping timeout: 240 seconds]
benlovell has joined #ruby-lang
Sgeo_ has quit [Read error: Connection reset by peer]
kwd_ has joined #ruby-lang
kwd has quit [Read error: Connection reset by peer]
dm78 has joined #ruby-lang
charliesome has joined #ruby-lang
apt-get_ has joined #ruby-lang
allomov has joined #ruby-lang
charliesome has quit [Client Quit]
dm78 has quit [Ping timeout: 264 seconds]
jhass|off is now known as jhass
sarkyniin has quit [Ping timeout: 245 seconds]
yatish27 has joined #ruby-lang
Lewix has joined #ruby-lang
symm- has joined #ruby-lang
mark06 has left #ruby-lang [#ruby-lang]
workmad3 is now known as wm3|away
jgpawletko has joined #ruby-lang
torrieri has joined #ruby-lang
karamazov has joined #ruby-lang
torrieri has quit [Ping timeout: 272 seconds]
karamazov has quit [Client Quit]
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
spastorino has joined #ruby-lang
Forgetful_Lion has quit [Remote host closed the connection]
skade has quit [Quit: Computer has gone to sleep.]
ironhide_604 has joined #ruby-lang
skade has joined #ruby-lang
AKASkip has quit [Ping timeout: 255 seconds]
yatish27 has joined #ruby-lang
nofxx_ has joined #ruby-lang
yfeldblum has joined #ruby-lang
yatish27 has quit [Remote host closed the connection]
existensil has joined #ruby-lang
yfeldblum has quit [Ping timeout: 252 seconds]
miqui has quit [Read error: Connection reset by peer]
chouhoulis has joined #ruby-lang
io_syl has joined #ruby-lang
Xney has quit [Read error: Connection reset by peer]
Xney has joined #ruby-lang
loincloth has quit [Remote host closed the connection]
havenwood has joined #ruby-lang
zz_dlu has quit [Ping timeout: 240 seconds]
zz_dlu has joined #ruby-lang
j4cknewt has left #ruby-lang [#ruby-lang]
imkmf has joined #ruby-lang
j4cknewt has joined #ruby-lang
djbkd has quit [Remote host closed the connection]
heftig has joined #ruby-lang
djbkd has joined #ruby-lang
djbkd has quit [Remote host closed the connection]
sMecKst has quit [Ping timeout: 250 seconds]
djbkd has joined #ruby-lang
ddd has quit [Read error: Operation timed out]
bsvineeth has quit [Remote host closed the connection]
arBmind has quit [Read error: Connection reset by peer]
ddd has joined #ruby-lang
ianmcshane has joined #ruby-lang
bsvineeth has joined #ruby-lang
zz_sMecKs has joined #ruby-lang
bsvineeth has joined #ruby-lang
djbkd has quit [Read error: Connection reset by peer]
djbkd has joined #ruby-lang
arBmind has joined #ruby-lang
robbyoconnor has quit [Ping timeout: 250 seconds]
ianmcsha_ has quit [Read error: Connection reset by peer]
skade has quit [Quit: Computer has gone to sleep.]
<whitequark>
yorickpeterse: looked at your lexer extensions
<whitequark>
I like them
<whitequark>
nice code
<yorickpeterse>
For the XML or XPath lexer?
<whitequark>
XML
<yorickpeterse>
Ah yeah, it's not too bad
<whitequark>
it's great
<yorickpeterse>
oh?
<whitequark>
xpath isn't bad either
<yorickpeterse>
well grand wizard overlord whitequark certainly helped a lot :)
j4cknewt has quit [Remote host closed the connection]
Mon_Ouie has quit [Quit: WeeChat 1.0]
firesorc has joined #ruby-lang
j4cknewt has joined #ruby-lang
x0f has quit [Ping timeout: 245 seconds]
ianmcshane has quit [Remote host closed the connection]
x0f has joined #ruby-lang
ianmcshane has joined #ruby-lang
workmad3 has joined #ruby-lang
_ht has quit [Remote host closed the connection]
alexju has quit []
j4cknewt has quit [Remote host closed the connection]
j4cknewt has joined #ruby-lang
chussenot has joined #ruby-lang
djbkd has quit [Remote host closed the connection]
loincloth has joined #ruby-lang
djbkd has joined #ruby-lang
j4cknewt has quit [Ping timeout: 246 seconds]
firesorc is now known as necro
stef_204 has quit [Remote host closed the connection]
j4cknewt has joined #ruby-lang
loincloth has quit [Ping timeout: 240 seconds]
arBmind has quit [Quit: Leaving.]
aarellano_ has quit [Quit: Hasta la vista, baby]
mkaesz has joined #ruby-lang
loincloth has joined #ruby-lang
djbkd has quit [Remote host closed the connection]
mistym has quit [Remote host closed the connection]
mistym has joined #ruby-lang
djbkd has joined #ruby-lang
kgrz has quit [Remote host closed the connection]
chouhoul_ has joined #ruby-lang
loincloth has quit [Remote host closed the connection]
necro has quit [Ping timeout: 246 seconds]
loincloth has joined #ruby-lang
necro has joined #ruby-lang
chouhoulis has quit [Ping timeout: 252 seconds]
csaunders has quit [Ping timeout: 276 seconds]
chussenot has quit [Ping timeout: 252 seconds]
chouhoul_ has quit [Remote host closed the connection]
chouhoulis has joined #ruby-lang
dorei has joined #ruby-lang
skade has joined #ruby-lang
migbar_ has joined #ruby-lang
arBmind has joined #ruby-lang
robbyoconnor has joined #ruby-lang
migbar has quit [Ping timeout: 276 seconds]
momomomomo has joined #ruby-lang
yfeldblum has joined #ruby-lang
ta_ has joined #ruby-lang
eddiezane_zzz is now known as eddiezane
ianmcshane has quit [Remote host closed the connection]
amsi has quit [Ping timeout: 260 seconds]
robbyoconnor has quit [Excess Flood]
robbyoconnor has joined #ruby-lang
miqui has joined #ruby-lang
ianmcshane has joined #ruby-lang
<necro>
Can someone explain what's happening on line 4? idice is a new variable, right? Also, I don't understand how .select can be called on dice if dice hasn't been assigned a value...is it saying that each item in dice is == to i? I know I am way off base, very confused, and just need someone to explain what' I'm doing wrong. I have more questions about the rest of the code but starting here...
<jhass>
necro: dice is probably an array of numbers, the code iterates over the numbers 1 to 6 (i) and in each run select all numbers from the dice array that are equal to i
<jhass>
the result is assigned to idice
<jhass>
since only the actual count is used, it's a complicated way to say idice = dice.count(i)
<necro>
dice ought to be an array, but I figured I'd have to specify that it is an array first...
<necro>
oh ok
robbyoconnor has quit [Quit: Konversation terminated!]
<necro>
this is another user's solution to the greed koans, I am tyring to udnerstand their logic so I can solve the problem as I am at a loss
amsi has joined #ruby-lang
<necro>
so idice is going to be only those numbers that match between dice and i
emmesswhy has quit [Quit: This computer has gone to sleep]
<jhass>
yes, select builds a new array with all elements for which the block returns true
<necro>
the block being |d| d==i
<necro>
right?
<jhass>
yeah, we usually include the delimiters, {|..| .. } / do |..| .. end
Kerber0s has joined #ruby-lang
<necro>
right
<necro>
so if the new array is greater than 3...
<necro>
but I don't understand, am I supposed to assume the values in the dice array?
<jhass>
what do you mean assume?
<necro>
well I'm still not understanding how dice is attributed a value
<jhass>
it's an array, most likely
<necro>
right, most likely, so is it unnecessary to know?
<jhass>
[3, 5, 1, 3, 2]
omosoj has quit [Ping timeout: 260 seconds]
<necro>
where'd you get that?
<jhass>
just typed it
<necro>
oh haha
wallerdev has quit [Quit: wallerdev]
<necro>
so you're saying the values of the array are arbitrary?
<jhass>
yeah
<necro>
oh ok
Benstr has quit [Quit: Computer has gone to sleep.]
<jhass>
but in the end you don't need to care, you just expect to be passed a value that responds to the methods you call on it
<jhass>
that's called duck typing
<necro>
ok
<necro>
right
Benstr has joined #ruby-lang
<necro>
can you walk me through liens 5 and 6?
tmegano has quit [Ping timeout: 268 seconds]
tmegano has joined #ruby-lang
<jhass>
if there are more than three elements equal to i and i is one, add 1000 to the sum, if i another number add i*1000 to the sum
<jhass>
i*100
allomov has joined #ruby-lang
Benstr__ has joined #ruby-lang
<jhass>
expr ? a : b is a ternary
<jhass>
basically a shortcut syntax for if / else
<jhass>
if expr is truthy, a is returned, else b
toastynerd has quit [Remote host closed the connection]
seamon has joined #ruby-lang
Benstr has quit [Ping timeout: 240 seconds]
[spoiler] has quit [Quit: Leaving]
sharpmachine has quit [Remote host closed the connection]
<necro>
thank
saarinen has quit [Quit: saarinen]
<necro>
you that is very helpful
kgrz has joined #ruby-lang
<seamon>
Anyone care to explain the following behavior:
j4cknewt_ has joined #ruby-lang
<seamon>
module One
<seamon>
def foo
<seamon>
puts :foo
<seamon>
end
<seamon>
end
<seamon>
module Two
<seamon>
def method_missing sym, *args, &code
<seamon>
puts :mm
<seamon>
end
<seamon>
end
<seamon>
class A
<jhass>
seamon: /topic !
<seamon>
include Two
<seamon>
end
<seamon>
module Two
<seamon>
include One
<seamon>
end
<yorickpeterse>
seamon: please don't paste code into IRC
<seamon>
class B
<seamon>
include Two
<seamon>
end
saarinen has joined #ruby-lang
<seamon>
A.new.foo # => mm
<seamon>
B.new.foo # => foo
<ohsix>
i can't wait to see module Seventeen
<yorickpeterse>
where's the police when you need them
<yorickpeterse>
seamon: use gist.github.com for sharing code snippets
<necro>
I am confused as to the either/or situation here though - three dice with the value of 1 is 1,000 points, and a single dice with the value 1 is worth 100 points...so how does line 6 know if there are three 1s or less than three
<yorickpeterse>
see /topic
<jhass>
necro: they are counted twice. three 1's are worth 1300 in total
j4cknewt has quit [Ping timeout: 255 seconds]
<jhass>
line 8 adds the 300
<jhass>
ah, no I lied
<necro>
but they're not meant to be...according to the rules of the game
djbkd has quit [Remote host closed the connection]
<yorickpeterse>
seamon: No it's very logical, pasting code into IRC doesn't work
<yorickpeterse>
it clutters the channel and many clients don't format whitespace properly
<seamon>
Ok, but i have created a gist
<seamon>
I don’t understand this ruby code
saarinen has quit [Quit: saarinen]
torrieri has joined #ruby-lang
toastynerd has joined #ruby-lang
elico has quit [Quit: Leaving.]
<jhass>
seamon: include modifies the ancestor chain of the class. When you include Two in A, One is not in the ancestor chain of Two and thus doesn't get added to A's
<seamon>
But I thought that was the whole purpose of include
necro has quit [Ping timeout: 246 seconds]
<jhass>
seamon: to retroactively backtrack where a module was included and update the ancestor chain? no
saarinen has joined #ruby-lang
<jhass>
include just updates the ancestor chain of the receiver
<seamon>
But what about the reopening a class monkey patching business?
elico has joined #ruby-lang
wallerdev has joined #ruby-lang
<jhass>
again, include modifies the ancestor chain, not the actual method table
heftig_ has joined #ruby-lang
<seamon>
Ok, thanks but it’s not the least surprise principle at work here. Thanks anyway.
necro has joined #ruby-lang
heftig has quit [Ping timeout: 240 seconds]
cmhobbs has quit [Quit: Leaving]
elico has quit [Client Quit]
nofxx_ has quit [Ping timeout: 260 seconds]
joelmheim_ is now known as joelmheim
<yorickpeterse>
whitequark: I've probably asked similar shit a dozen times, but I need to pick your brain for a sec. So I have this Ragel rule ^'<'+ which matches everything except "<" (e.g. "foo" gets matches this way). Now I'm trying to adjust this rule a little bit so that it *does* match "< foo" but not "<foo" [...]
<yorickpeterse>
whitequark: so basically the rule would be something like ^('<'[a-zA-Z])+
<yorickpeterse>
That however will match waaaaay to much. For example, in the string "foo <bar" that would match the whole input
<yorickpeterse>
I can't use any+ -- '<'[a-zA-Z] since there are a bunch of other rules too which then get swalloed
<yorickpeterse>
* swallowed
<yorickpeterse>
tl;dr would be nice if ragel had a non-greedy any+ that would be processed unless any other rule matched the input
<yorickpeterse>
Hm, perhaps Ragel priorities would work here
jgpawletko is now known as jgpawletko_away
ianmcshane has quit [Remote host closed the connection]
<yorickpeterse>
hm no, that seems to be for within rules themselves, not the machine they are contained in
ianmcshane has joined #ruby-lang
<whitequark>
sigh
ianmcshane has quit [Remote host closed the connection]
djbkd has joined #ruby-lang
<whitequark>
your description is not enough to solve the problem
<whitequark>
what exactly can be between < and foo ?
<whitequark>
ragel doesn't have non-greedy + that would work between rules in a machine
<whitequark>
it's strictly longest-match
<yorickpeterse>
ok so real world case:
<yorickpeterse>
when lexing XML, "<foo>" should be lexed as the start tag of an element
<yorickpeterse>
However, "< foo>" should be lexed as just text
<yorickpeterse>
so basically you'd have T_ELEM vs T_TEXT
jgpawletko_away is now known as jgpawletko
<yorickpeterse>
argh fuckit, probably easier if I show the codez
<yorickpeterse>
(that was from before I knew of --)
<yorickpeterse>
Now the problem of this rule is that it messes up when you have input such as <script>if ( number < 10 ) { ... }</script>
<yorickpeterse>
(this is not the most convenient problem to explain sadly)
allomov has quit [Remote host closed the connection]
arooni-mobile has joined #ruby-lang
avdi_ is now known as avdi
bin7me has quit [Read error: Connection reset by peer]
enkristoffer has quit [Quit: ❤]
saarinen has quit [Ping timeout: 246 seconds]
<whitequark>
uhhh
<whitequark>
do you parse HTML or only XML?
<whitequark>
if XML, then that script snippet is invalid and it has to be wrapped in CDATA
<whitequark>
if HTML, the spec provides the guidelines for lexing
apt-get_ has quit [Quit: Quitte]
emmesswhy has joined #ruby-lang
<whitequark>
if you find them for me, I'll try to convert them to ragel
sarkyniin has joined #ruby-lang
<yorickpeterse>
both
<yorickpeterse>
:P
Kerber0s has quit [Remote host closed the connection]
<yorickpeterse>
The same lexer is used for XML and HTML
mistym_ has joined #ruby-lang
<whitequark>
that sounds inconsistent wrt specifications
<wallerdev>
yeah html follows more with sgml than xml
<yorickpeterse>
actually there aren't that many differences between the two
<whitequark>
there are though
<wallerdev>
<ul><li>one<li>two<li>three</ul>
<yorickpeterse>
the two biggest differences: self closing tags with a / and multiple top-level nodes are already covered
<yorickpeterse>
shit like missing tags isn't specific to HTML, it can happen in XML as well (and parser might or might not handle that, I intend to do handle that)
<wallerdev>
thats not missing tags though, thats valid html lol
<yorickpeterse>
wallerdev: I didn't say it was invalid HTML
<whitequark>
should require no further changes, I believe
toastynerd has quit [Remote host closed the connection]
seamon has joined #ruby-lang
<yorickpeterse>
No, that results in the whole input being consumed as T_TEXT (tried that before as well)
<whitequark>
uh? how come?
omosoj has joined #ruby-lang
<whitequark>
ohhhh wait, ^'<'+
<yorickpeterse>
yes, the + fucks it up
<whitequark>
ok
<whitequark>
we can fix this
<yorickpeterse>
The reason for that being there is because I want a single T_TEXT token for an entire text range, opposed to 1 per character. In an early setup I marked start/stop positions, but that was a total nightmare
<whitequark>
replace the last action with any => { fnext text; }
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
seamon has joined #ruby-lang
<whitequark>
then write a machine which accepts any characters that don't contain the '<' [0-9a-zA-Z] thing
<whitequark>
alternatively you could just do it as any => { emit a T_TEXT node for this single character } but it will probably be a perf nightmare
toastynerd has joined #ruby-lang
<yorickpeterse>
Yeah the last thing isn't an option really
<whitequark>
well, then add a separate state machine
<yorickpeterse>
Yeah trying that atm
momomomomo has quit [Quit: momomomomo]
mkaesz has quit [Remote host closed the connection]
__butch__ has quit [Quit: Leaving.]
<yorickpeterse>
hm, separate state machine doesn't really seem to cut it. Thinking of it, it would end up doing the same as `main` anyway
<yorickpeterse>
since it would have to take care of the other rules (e.g. cdata, comments, etc) too
<yorickpeterse>
comedy option is to replace "< " with "< " upon reading the input, but ugh
tmegano has quit [Ping timeout: 268 seconds]
yatish27 has quit [Remote host closed the connection]
yatish27 has joined #ruby-lang
<whitequark>
yorickpeterse: no
<whitequark>
see, it should return to main at the moment where it detects something that's not text
<whitequark>
so... also should exit on <!, <- and maybe some others
<whitequark>
that's how I did several similar things in parser. it works
arooni-mobile has quit [Ping timeout: 260 seconds]
<whitequark>
< will mess positions
<whitequark>
mess up
<whitequark>
and probably will have other problems, since I *think* you can't just replace it
<yorickpeterse>
I don't track column numbers anyway
<yorickpeterse>
but yeah, it's a comedy option for a reason
<whitequark>
so, yeah, you need to back up on '<' [0-9a-zA-Z!/-]
<whitequark>
that seems to be all the critical characters
emmesswhy has quit [Quit: This computer has gone to sleep]
yatish27 has quit [Ping timeout: 276 seconds]
<whitequark>
or even '<' [0-9a-zA-Z/] | '<!--' | '<![CDATA['
ldnunes has quit [Quit: Leaving]
michaeldeol has joined #ruby-lang
sepp2k has joined #ruby-lang
<yorickpeterse>
hmm, lets see
eddiezane is now known as eddiezane_zzz
mistym has quit [Remote host closed the connection]
<yorickpeterse>
But wouldn't that mean that the rule for text would be any -- ('<' [...] | '<!--' | '<![CDATA[' | ...) ?
<yorickpeterse>
In a separate machine you'd still end up using any+ for the text, which would overrule the other rules
emmesswhy has joined #ruby-lang
<yorickpeterse>
That is, something like text := |* '<!--' => { fnext main; }; any+ => { emit_text }; *|;
<yorickpeterse>
there '<!--' would never be matched
<whitequark>
yes, it would be a machine with a single rule basically
<whitequark>
I'll explain how I arrived at this
<whitequark>
remember the any => { emit T_TEXT } thing? which is clearly correct, but not performant
<whitequark>
so how would one come at optimizing it? add a variable to aggregate the characters, then emit them all at once right before the machine switches to a different staten
<whitequark>
what I now suggest is just that, encoded in Ragel rather than in some ad-hoc way
elico has joined #ruby-lang
emmesswhy has quit [Client Quit]
solars has quit [Ping timeout: 252 seconds]
<yorickpeterse>
But isn't text := |* '<!--' => { fnext main; }; any+ => { emit_text }; *|; main := |* any => { fnext text; }; *|; exactly the same as main := |* any+ -- '<!--' => { ... } *|;
ur5us has quit [Ping timeout: 272 seconds]
toastynerd has quit [Remote host closed the connection]
<yorickpeterse>
errr s/.../emit_text
sMecKs has joined #ruby-lang
<whitequark>
no
yatish27 has joined #ruby-lang
<whitequark>
because you have other rules and longest-match rule
<whitequark>
and in the text machine there is no other match to overtake
<yorickpeterse>
eh, wouldn't any+ there overtake '<!--' ? (in the text machine)
<yorickpeterse>
as far as I know `any+` just overwrites any other rule you define in the same machine
<whitequark>
uhhh what? no, that's not how you write the text machine
sharpmachine has joined #ruby-lang
<yorickpeterse>
Then I think I'm not following your train of thought
<whitequark>
you need "any+ -- ('<' [0-9a-zA-Z] | '<!--' | '<![CDATA[' )"
<yorickpeterse>
hmm
<whitequark>
and a second one which matches "" and just returns to main
amerine_ has joined #ruby-lang
j4cknewt has joined #ruby-lang
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<yorickpeterse>
Hm, so that sort of works yet for some reason it matches part of the <!-- (and other tags) in the text
<yorickpeterse>
e.g.
<whitequark>
ohhhh right
<yorickpeterse>
You get something like [:T_TEXT, "if ( number < 10 ) { }<", 1], [:T_TEXT, "/script>", 1]
<whitequark>
yesyes
<whitequark>
gotcha
<yorickpeterse>
(fhold and friends don't work very well since it's not always 1 character)
<whitequark>
the easy way out is any+ @{ p_temp = p } ('<' [0-9a-zA-Z] | '<!--' | '<![CDATA[' )
<whitequark>
but let me think if there is a better one
charliesome has joined #ruby-lang
<CorrosiveOne>
anyone have a moment to help with an AES/Base64 issue I'm having?
<CorrosiveOne>
http://pastebin.com/BEbke33x I've put the output of the script at the bottom. I'm not using the irc portion yet, just testing the base64/aes portion.
<yorickpeterse>
So that works except when there's a comment again, argh
<yorickpeterse>
In that case you get [:T_TEXT, "if ( number < 10 ) { }<!", 1], [:T_TEXT, "--foo-->", 1], [:T_ELEM_END, nil, 1]
mistym has joined #ruby-lang
<yorickpeterse>
argh, I'm going to bed and think about this when I'm awake again. Thanks for the help!
problame has joined #ruby-lang
<whitequark>
oh ffs
<whitequark>
ping me tomorrow about it
<problame>
Hi, a short question because I'm always stumbling over it: How do you handle rubygem dependencies on libraries like mysqlclient, etc.? I just wasted my setup by doing autoremove which removed many libraries some gems depended upon...
<whitequark>
problame: you don't
<whitequark>
as in, there's no nice way to do that.
loincloth has quit [Remote host closed the connection]
imkmf has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<problame>
whitequark: ok... i'm using freebsd and in the ports/packages collection, there are many rubygems ready to install. this way you get the dependency tree. too bad this doesn't work with bundler et al
imkmf has joined #ruby-lang
mistym_ has joined #ruby-lang
<drbrain>
problame: there's no consistent set of names across all package managers for the library dependencies
imkmf has quit [Client Quit]
<problame>
drbrain: yeah, i get that. is there any project that aims on solving this issue?
dm78_ has quit [Remote host closed the connection]
<drbrain>
while possible, it would require some effort by humans to work across all popular package managers
<drbrain>
problame: nobody has stepped up to do such a thing
<drbrain>
rubygems provides sufficient hooks for this to be possible, though
dm78 has joined #ruby-lang
saarinen has quit [Quit: saarinen]
amerine has joined #ruby-lang
<problame>
drbrain: in general, you would need a list of libraries that gems depend upon (L), a list of gems declaring dependencies on the items of L (G) and an abstraction for installing these libraries and occassionally solving / highlighting conflicts. right?
mistym has quit [Ping timeout: 272 seconds]
<drbrain>
yep
<problame>
drbrain: i can't believe anybody has attempted this. it's such a pain in the ass if you don't isolate every rails app into its own vm that does nothing else... wait....
saarinen has joined #ruby-lang
<problame>
=> Jails / Docker / VMs ftw!
allomov has quit [Remote host closed the connection]
<problame>
OK, i need to crush some gems. bye :)
problame has left #ruby-lang ["Leaving..."]
yatish27 has quit [Remote host closed the connection]
bsvineeth has quit [Remote host closed the connection]
MichD is now known as michd
emmesswhy has joined #ruby-lang
<darix>
drbrain: we were pondering about some syntax for this the other day
<drbrain>
darix: it could go in the metadata section
<darix>
drbrain: e.g. fedora/opensuse (and their enterprise equivalents) use pkgconfig(<pkgconfigname>) to describe library dependencies
<darix>
so you could have gemspec.add_native "pkgconfig(openssl)", ">= 1.0"
<darix>
e.g.
CorrosiveOne has quit [Quit: I was drunk last time I set this message]
<darix>
then we could hook into distro package manager to install them
<darix>
hm
<darix>
tricky are things that dont provide pkgconfig
<darix>
e.g. wasnt there a gem that wrapped python pygments?
<darix>
god i would love to get rid of gems like "libv8"
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
skade has quit [Quit: Computer has gone to sleep.]
|jemc| has quit [Ping timeout: 260 seconds]
<harly>
necro: attr_reader takes a symbol as an argument ( :name ) and creates a getter method for it like def name { @ name }, that's all. :name isn't == @name.
yatish27 has joined #ruby-lang
havenwood has joined #ruby-lang
marr has quit [Ping timeout: 276 seconds]
retro|cz has quit [Ping timeout: 246 seconds]
<necro>
thank you harly! much appreciated, I get it now.