ljarvis changed the topic of #ruby-lang to: Ruby 2.1.2; 2.0.0-p481; 1.9.3-p547: http://ruby-lang.org || Paste code on http://gist.github.com
dorei has quit []
vintik has quit [Remote host closed the connection]
jhass is now known as jhass|off
sepp2k1 has joined #ruby-lang
sepp2k has quit [Ping timeout: 245 seconds]
yatish27 has quit [Remote host closed the connection]
marr has quit [Ping timeout: 255 seconds]
haraoka has joined #ruby-lang
tkuchiki has joined #ruby-lang
sleepee has joined #ruby-lang
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
danijoo has quit [Read error: Connection reset by peer]
danijoo has joined #ruby-lang
sleepee has quit [Ping timeout: 255 seconds]
brnorion has joined #ruby-lang
jordanbsanders has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nathanstitt has quit [Quit: I growing sleepy]
Newbie0086 has joined #ruby-lang
bsvineeth has joined #ruby-lang
nertzy has joined #ruby-lang
jgpawletko has joined #ruby-lang
arBmind1 has quit [Ping timeout: 255 seconds]
arBmind has joined #ruby-lang
|jemc| has joined #ruby-lang
alexju has joined #ruby-lang
nertzy has quit [Quit: This computer has gone to sleep]
sepp2k1 has quit [Read error: Connection reset by peer]
nathanstitt has joined #ruby-lang
flori has quit [Ping timeout: 255 seconds]
flori has joined #ruby-lang
brnorion has quit [Ping timeout: 245 seconds]
amerine has quit [Ping timeout: 245 seconds]
miqui has joined #ruby-lang
arooni-mobile has joined #ruby-lang
omosoj has joined #ruby-lang
bsvineeth has quit [Remote host closed the connection]
bsvineeth has joined #ruby-lang
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bsvineeth has quit [Ping timeout: 255 seconds]
omosoj has quit [Quit: Leaving]
Miphix has joined #ruby-lang
migbar has quit [Remote host closed the connection]
migbar has joined #ruby-lang
<CorrosiveOne> anyone know how to get ruby1.9.2 working properly on ubuntu? apparently it's only upto 1.9.1
<CorrosiveOne> nvm.. it's on the 'unstable' repo
migbar has quit [Read error: Connection reset by peer]
migbar has joined #ruby-lang
* CorrosiveOne is just going to compile
karamazov has joined #ruby-lang
migbar has quit [Ping timeout: 245 seconds]
dm78 has joined #ruby-lang
dm78 has quit [Read error: No route to host]
dm78 has joined #ruby-lang
thomasxie has joined #ruby-lang
torrieri has joined #ruby-lang
nathanstitt has quit [Quit: I growing sleepy]
migbar has joined #ruby-lang
<firesorc> is anyone familiar with ruby koans?
<firesorc> I am working on the about_sandwich_cod.rb and am confused...
gix has quit [Ping timeout: 255 seconds]
<firesorc> the code is running line counting methods on a theoretical file and I am asked to show the result?
migbar has quit [Ping timeout: 260 seconds]
zz_anildigital is now known as anildigital
karamazov has quit []
<harly> what's the question
<harly> it's a real file, not theoritical.
<firesorc> oh, it is?
<harly> hyep :)
gix has joined #ruby-lang
<firesorc> oh ok that removes the mystery
<firesorc> thanks
rizel has quit [Quit: Page closed]
Kandinsky has joined #ruby-lang
nathanstitt has joined #ruby-lang
<Kandinsky> i love ruby
Kandinsky is now known as Guest3838
kaji has joined #ruby-lang
eam_ is now known as eam
alexju has quit [Remote host closed the connection]
kaji has quit [Remote host closed the connection]
havenwood has joined #ruby-lang
kgrz has joined #ruby-lang
dwknoxy has quit [Quit: Textual IRC Client: www.textualapp.com]
malconis has joined #ruby-lang
spuk has joined #ruby-lang
spuk_ has quit [Ping timeout: 260 seconds]
malconis has quit [Client Quit]
danijoo has quit [Read error: Connection reset by peer]
danijoo has joined #ruby-lang
jgpawletko has quit [Quit: jgpawletko]
spuk has quit [Read error: Connection reset by peer]
kgrz has quit [Remote host closed the connection]
migbar has joined #ruby-lang
spuk has joined #ruby-lang
migbar has quit [Ping timeout: 255 seconds]
bsvineeth has joined #ruby-lang
bsvineeth has quit [Remote host closed the connection]
bsvineeth has joined #ruby-lang
|jemc| has quit [Ping timeout: 260 seconds]
anildigital is now known as zz_anildigital
cleopatra has joined #ruby-lang
toastynerd has joined #ruby-lang
sindork has quit [Quit: ZNC - http://znc.in]
sindork has joined #ruby-lang
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> ruby-lang789: You might start poking around here: https://github.com/rails/rails/blob/master/activerecord/lib/active_record/reflection.rb
<havenwood> ruby-lang789: Or ask #RubyOnRails folk.
ruby-lang789 has quit [Ping timeout: 246 seconds]
shortCircuit__ has joined #ruby-lang
hotpancakes has joined #ruby-lang
j4cknewt has quit [Remote host closed the connection]
apeiros has quit [Read error: Connection reset by peer]
j4cknewt has joined #ruby-lang
apeiros has joined #ruby-lang
yell0wgh0st has joined #ruby-lang
lele has joined #ruby-lang
lele has quit [Excess Flood]
<havenwood> oh, was gunna blab about Delegator a bit but ruby-lang7's gone :P
<havenwood> poof!
hotpancakes has quit [Ping timeout: 255 seconds]
<shortCircuit__> no i came back as a registered user
<havenwood> shortCircuit__: nice!
lele has joined #ruby-lang
<shortCircuit__> so u can teach me a bit on delegator
<havenwood> shortCircuit__: in that case, if you're just generally interested, maybe poke around with Forwardable and Delegator etc
<shortCircuit__> ok
j4cknewt has quit [Ping timeout: 245 seconds]
<shortCircuit__> and what will i be looking for mostly
<havenwood> shortCircuit__: hem, good question... :P
<havenwood> shortCircuit__: guess it depends what you're looking for
<shortCircuit__> :D
<havenwood> shortCircuit__: Maybe start with SimpleDelegator: http://hashrocket.com/blog/posts/using-simpledelegator-for-your-decorators
Guest89619 has quit [Quit: This computer has gone to sleep]
<shortCircuit__> ok
ianmcshane has quit [Remote host closed the connection]
hellangel7 has joined #ruby-lang
* havenwood mutters something about ducks
hellangel7 has quit [Max SendQ exceeded]
hellangel7 has joined #ruby-lang
kwd has joined #ruby-lang
<shortCircuit__> i have heard about ducks ... i nevr ate one
<havenwood> shortCircuit__: but have you eaten anything that looked and quacked like a duck?
<shortCircuit__> :) yes .. in js ... duck typing
<havenwood> close enough, you've eaten a duck!
<shortCircuit__> ok , i umm, sort of understand the code.. but i could have just
<shortCircuit__> class Person
<shortCircuit__> attr_reader :first_name, :last_name
<shortCircuit__> def initialize(first_name, last_name)
<shortCircuit__> @first_name, @last_name = first_name, last_name
<shortCircuit__> end
<shortCircuit__> def full_name
<shortCircuit__> @first_name+" "+@last_name
<shortCircuit__> end
<shortCircuit__> end
<harly> duck typing: interfaces without runtime verification?
<harly> compile even
kwd_ has joined #ruby-lang
saarinen has quit [Quit: saarinen]
kwd has quit [Read error: Connection reset by peer]
solars has joined #ruby-lang
<havenwood> interfaces without interfaces
<harly> that too
kyb3r_ has quit [Read error: Connection reset by peer]
toastynerd has joined #ruby-lang
<shortCircuit__> thoughts are great sites
<shortCircuit__> i mean great ppl
ur5us has joined #ruby-lang
<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?
<harly> it should be a file
<harly> just type this in your terminal
<harly> echo xterm.*backarrowKey: false >> ~/.Xdefaults
<harly> then try the IDE again
mkaesz has quit [Ping timeout: 272 seconds]
yell0wgh0st has joined #ruby-lang
arBmind has quit [Quit: Leaving.]
<Weston_> Not working at the moment.
<harly> which isn't working.
<harly> did the file get created?
<Weston_> Yes it did and it did not work in the ide.
<harly> ok, maybe it needs to be set to true. (or it's not really an xterm, or isn't reading that file...)
<harly> echo xterm.*backarrowKey: true >> ~/.Xdefaults
<harly> set it to true. see if that works
<harly> (we'll needt o clean up after)
<Weston_> Still not working in the ide.
<harly> hrm
<harly> lets clean that up: type: wc ~/.Xdefaults
<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]
chussenot has joined #ruby-lang
arBmind1 has joined #ruby-lang
toastynerd has joined #ruby-lang
[spoiler] has joined #ruby-lang
arBmind has quit [Ping timeout: 264 seconds]
arBmind1 is now known as arBmind
arooni-mobile has joined #ruby-lang
jordanbsanders has joined #ruby-lang
toastynerd has quit [Ping timeout: 272 seconds]
Guest90641 has quit [Ping timeout: 255 seconds]
karamazov has joined #ruby-lang
sleepee has quit [Ping timeout: 245 seconds]
ianmcshane has joined #ruby-lang
apt-get_ has quit [Ping timeout: 255 seconds]
railzForDaiz has joined #ruby-lang
railzFor_ has joined #ruby-lang
railzForDaiz has quit [Client Quit]
hotpancakes has joined #ruby-lang
karamazov has quit [Client Quit]
MSY has joined #ruby-lang
MSY is now known as Guest88814
ianmcshane has quit [Ping timeout: 240 seconds]
hotpancakes has quit [Ping timeout: 260 seconds]
wm3|away has quit [Ping timeout: 272 seconds]
yfeldblum has quit [Ping timeout: 260 seconds]
joast has quit [Quit: Leaving.]
malconis has joined #ruby-lang
jordanbsanders has quit [Quit: Textual IRC Client: www.textualapp.com]
dm78 has joined #ruby-lang
allomov has quit [Ping timeout: 240 seconds]
Lewix has quit [Remote host closed the connection]
railzFor_ has quit [Quit: Textual IRC Client: www.textualapp.com]
Lewix has joined #ruby-lang
dm78 has quit [Ping timeout: 260 seconds]
allomov has joined #ruby-lang
hellangel7 has joined #ruby-lang
Lewix has quit [Remote host closed the connection]
kyledreger has joined #ruby-lang
kyledreger has quit [Client Quit]
bsvineeth has quit [Read error: Connection reset by peer]
bsvineeth has joined #ruby-lang
joast has joined #ruby-lang
jxie_ has joined #ruby-lang
Doytollovski has joined #ruby-lang
arooni-mobile has quit [Ping timeout: 255 seconds]
amigo99 has joined #ruby-lang
torrieri has joined #ruby-lang
jxie has quit [Ping timeout: 255 seconds]
arooni-mobile has joined #ruby-lang
alexju has joined #ruby-lang
wm3|away has joined #ruby-lang
yfeldblum has joined #ruby-lang
<Doytollovski> Hola
yatish27 has quit [Remote host closed the connection]
<Doytollovski> ¿alguien necesidta de un alumno?
bsvineeth has quit [Remote host closed the connection]
bsvineeth has joined #ruby-lang
torrieri has quit [Ping timeout: 260 seconds]
yfeldblum has quit [Ping timeout: 255 seconds]
anildigital is now known as zz_anildigital
bsvineeth has quit [Ping timeout: 245 seconds]
sleepee has joined #ruby-lang
bsvineeth has joined #ruby-lang
yatish27 has joined #ruby-lang
toastynerd has joined #ruby-lang
Lewix has joined #ruby-lang
momomomomo has joined #ruby-lang
toastynerd has quit [Ping timeout: 268 seconds]
csaunders has joined #ruby-lang
bsvineeth has quit [Remote host closed the connection]
bsvineet_ has joined #ruby-lang
hotpancakes has joined #ruby-lang
torrieri has joined #ruby-lang
torrieri has quit [Client Quit]
allomov has quit [Remote host closed the connection]
momomomomo has quit [Quit: momomomomo]
hotpancakes has quit [Ping timeout: 272 seconds]
banister has joined #ruby-lang
banister has quit [Max SendQ exceeded]
banister has joined #ruby-lang
banister has quit [Max SendQ exceeded]
dm78 has joined #ruby-lang
banister has joined #ruby-lang
banister has quit [Max SendQ exceeded]
arooni-mobile has quit [Ping timeout: 272 seconds]
bsvineet_ has quit [Remote host closed the connection]
banister has joined #ruby-lang
banister has quit [Max SendQ exceeded]
allomov has joined #ruby-lang
banister has joined #ruby-lang
Guest88814 has quit [Quit: This computer has gone to sleep]
bsvineeth has joined #ruby-lang
banister_ has joined #ruby-lang
banister_ has quit [Max SendQ exceeded]
shortCircuit__ has quit [Quit: ChatZilla 0.9.90.1 [Firefox 31.0/20140715214327]]
banister_ has joined #ruby-lang
banister_ has quit [Max SendQ exceeded]
Doytollovski has quit [Quit: Page closed]
momomomomo has joined #ruby-lang
banister_ has joined #ruby-lang
banister_ has quit [Max SendQ exceeded]
yell0wgh0st has quit [Quit: yell0wgh0st]
arBmind1 has joined #ruby-lang
banister_ has joined #ruby-lang
zz_anildigital is now known as anildigital
banister_ has quit [Max SendQ exceeded]
arBmind has quit [Ping timeout: 276 seconds]
banister_ has joined #ruby-lang
banister has quit [Ping timeout: 246 seconds]
shinnya has joined #ruby-lang
banister_ has quit [Max SendQ exceeded]
banister has joined #ruby-lang
banister has quit [Max SendQ exceeded]
kek_ has joined #ruby-lang
banister has joined #ruby-lang
banister has quit [Max SendQ exceeded]
Lewix has quit [Remote host closed the connection]
banister has joined #ruby-lang
banister has quit [Max SendQ exceeded]
banister has joined #ruby-lang
kgrz_ has quit [Remote host closed the connection]
banister has quit [Max SendQ exceeded]
allomov has quit [Remote host closed the connection]
kgrz has joined #ruby-lang
kek has quit [Ping timeout: 240 seconds]
momomomomo_ has joined #ruby-lang
arBmind1 is now known as arBmind
loincloth has joined #ruby-lang
bsvineeth has quit [Remote host closed the connection]
amigo99 has quit [Ping timeout: 260 seconds]
banister has joined #ruby-lang
bsvineeth has joined #ruby-lang
banister has quit [Max SendQ exceeded]
momomomomo has quit [Ping timeout: 276 seconds]
momomomomo_ is now known as momomomomo
kgrz has quit [Ping timeout: 245 seconds]
allomov has joined #ruby-lang
j4cknewt has joined #ruby-lang
banister has joined #ruby-lang
banister has quit [Max SendQ exceeded]
DivineEntity has joined #ruby-lang
yfeldblum has joined #ruby-lang
bsvineeth has quit [Remote host closed the connection]
ta_ has quit [Remote host closed the connection]
bsvineeth has joined #ruby-lang
yfeldblum has quit [Ping timeout: 252 seconds]
bsvineeth has quit [Remote host closed the connection]
wm3|away is now known as workmad3
RobertBirnie has joined #ruby-lang
momomomomo has quit [Quit: momomomomo]
RobertBirnie has quit [Client Quit]
toertore is now known as toretore
Benstr has joined #ruby-lang
anildigital is now known as zz_anildigital
FiXato|VPS is now known as FiXato
allomov has quit [Remote host closed the connection]
nertzy has joined #ruby-lang
benlovell has quit [Ping timeout: 260 seconds]
tbuehlmann has quit [Quit: Leaving]
hellangel7 has quit [Quit: Leaving]
matp has joined #ruby-lang
mistym has joined #ruby-lang
allomov has joined #ruby-lang
zz_anildigital is now known as anildigital
allomov has quit [Remote host closed the connection]
ianmcshane has joined #ruby-lang
sleepee has quit [Ping timeout: 240 seconds]
sleepee has joined #ruby-lang
AKASkip has quit [Ping timeout: 260 seconds]
j4cknewt has quit [Remote host closed the connection]
marr has quit [Ping timeout: 245 seconds]
RobertBirnie has joined #ruby-lang
hotpancakes has joined #ruby-lang
ianmcshane has quit [Ping timeout: 246 seconds]
momomomomo has joined #ruby-lang
face has quit [Remote host closed the connection]
toastynerd has joined #ruby-lang
kek_ has quit [Remote host closed the connection]
hotpancakes has quit [Ping timeout: 264 seconds]
j4cknewt has joined #ruby-lang
benlovell has joined #ruby-lang
face has joined #ruby-lang
sleepee has quit [Ping timeout: 245 seconds]
s1kx has joined #ruby-lang
sleepee has joined #ruby-lang
enebo has joined #ruby-lang
cmhobbs has joined #ruby-lang
Sphynx has quit [Remote host closed the connection]
anildigital is now known as zz_anildigital
havenwood has joined #ruby-lang
ender|dkm has quit [Ping timeout: 264 seconds]
kwd_ has quit [Quit: Sleeping now. ZZZzzz…]
dwknoxy has joined #ruby-lang
csaunders has quit [Ping timeout: 268 seconds]
kek_ has joined #ruby-lang
kgrz has joined #ruby-lang
joevandy1 is now known as joevandyk
yfeldblum has joined #ruby-lang
Adam_ActiveState has quit [Ping timeout: 245 seconds]
solars has quit [Ping timeout: 255 seconds]
sleepee has quit [Ping timeout: 246 seconds]
Adam_ActiveState has joined #ruby-lang
yfeldblum has quit [Ping timeout: 246 seconds]
toastynerd has quit [Remote host closed the connection]
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
RobertBirnie has joined #ruby-lang
toastynerd has joined #ruby-lang
nertzy has quit [Quit: This computer has gone to sleep]
Phrogz has joined #ruby-lang
|jemc| has joined #ruby-lang
shinnya has quit [Ping timeout: 276 seconds]
toastynerd has quit [Ping timeout: 240 seconds]
shinnya has joined #ruby-lang
jasiek has joined #ruby-lang
hotpancakes has joined #ruby-lang
bsvineeth has joined #ruby-lang
RobertBirnie has quit [Ping timeout: 268 seconds]
RobertBirnie has joined #ruby-lang
wallerdev has joined #ruby-lang
hotpancakes has quit [Remote host closed the connection]
RobertBirnie has quit [Client Quit]
CaptainJet has joined #ruby-lang
nathanstitt has joined #ruby-lang
jonathan_alban has joined #ruby-lang
gregf__ is now known as gregf_
fullybaked has quit []
thagomizer has joined #ruby-lang
allomov has joined #ruby-lang
hotpancakes has joined #ruby-lang
arBmind has quit [Ping timeout: 252 seconds]
sharpmachine has joined #ruby-lang
eddiezane_zzz is now known as eddiezane
eddiezane is now known as eddiezane_zzz
symm- has quit [Ping timeout: 240 seconds]
skade has quit [Quit: Computer has gone to sleep.]
enkristoffer has joined #ruby-lang
gix- has joined #ruby-lang
gix has quit [Disconnected by services]
skade has joined #ruby-lang
jxpx777 has joined #ruby-lang
thegeekinside has joined #ruby-lang
allomov has quit [Remote host closed the connection]
arBmind has joined #ruby-lang
yatish27 has quit [Remote host closed the connection]
omosoj has joined #ruby-lang
csaunders has joined #ruby-lang
saarinen has joined #ruby-lang
emmesswhy has joined #ruby-lang
hotpancakes has quit []
emmesswhy has quit [Client Quit]
toastynerd has joined #ruby-lang
workmad3 has quit [Quit: leaving]
Kerber0s has quit [Remote host closed the connection]
momomomomo has quit [Quit: momomomomo]
RobertBirnie has joined #ruby-lang
yatish27 has joined #ruby-lang
saarinen has quit [Quit: saarinen]
michaeldeol has joined #ruby-lang
jonathan_alban has quit [Quit: Textual IRC Client: www.textualapp.com]
momomomomo has joined #ruby-lang
yell0wgh0st has joined #ruby-lang
mistym has quit [Remote host closed the connection]
amsi has joined #ruby-lang
hahuang65 has quit [Ping timeout: 245 seconds]
allomov has joined #ruby-lang
Phrogz has quit [Ping timeout: 246 seconds]
kek_ has quit [Remote host closed the connection]
Siyfion has quit []
benlovell has quit [Ping timeout: 255 seconds]
mikecmpbll has quit [Ping timeout: 260 seconds]
wallerdev has quit [Quit: wallerdev]
qba73 has quit []
apeiros has quit []
mikecmpbll has joined #ruby-lang
workmad3 has joined #ruby-lang
j4cknewt has quit [Remote host closed the connection]
chussenot has quit [Quit: chussenot]
|jemc| has quit [Quit: WeeChat 0.4.3]
nertzy has joined #ruby-lang
Benstr has quit [Read error: Connection reset by peer]
|jemc| has joined #ruby-lang
Nilium has quit [Ping timeout: 240 seconds]
Benstr has joined #ruby-lang
djbkd has joined #ruby-lang
Nilium has joined #ruby-lang
momomomomo has quit [Quit: momomomomo]
marr has joined #ruby-lang
michaeldeol has quit [Ping timeout: 246 seconds]
AKASkip has joined #ruby-lang
jxpx777_ has joined #ruby-lang
mmus has joined #ruby-lang
jxpx777- has joined #ruby-lang
yfeldblum has joined #ruby-lang
ender|dkm has joined #ruby-lang
jxpx777 has quit [Read error: Connection reset by peer]
momomomomo has joined #ruby-lang
shinnya has quit [Ping timeout: 245 seconds]
solars has joined #ruby-lang
jxpx777_ has quit [Read error: Connection reset by peer]
bsvineeth has quit [Remote host closed the connection]
saarinen has joined #ruby-lang
nertzy has quit [Quit: This computer has gone to sleep]
bsvineeth has joined #ruby-lang
yfeldblum has quit [Ping timeout: 264 seconds]
Miphix has quit [Quit: Leaving]
allomov has quit [Remote host closed the connection]
parenjitsu has joined #ruby-lang
hahuang65 has joined #ruby-lang
parenjitsu has quit [Read error: Connection reset by peer]
tdy_ has quit [Quit: WeeChat 0.4.3]
parenjitsu has joined #ruby-lang
workmad3 has quit [Ping timeout: 272 seconds]
__butch__ has joined #ruby-lang
mistym has joined #ruby-lang
j4cknewt has joined #ruby-lang
tmegano has joined #ruby-lang
Lewix has joined #ruby-lang
ianmcshane has joined #ruby-lang
tommylommykins has quit [Ping timeout: 240 seconds]
enkristoffer has quit [Quit: ❤]
tommylommykins has joined #ruby-lang
skade has quit [Quit: Computer has gone to sleep.]
havenwood has quit [Remote host closed the connection]
skade has joined #ruby-lang
postmodern has joined #ruby-lang
jxpx777- has quit [Quit: Linkinus - http://linkinus.com]
djbkd has quit [Remote host closed the connection]
djbkd has joined #ruby-lang
emmesswhy has joined #ruby-lang
ianmcshane has quit [Read error: Connection reset by peer]
ianmcsha_ has joined #ruby-lang
bin7me has joined #ruby-lang
michaeldeol has joined #ruby-lang
enkristoffer has joined #ruby-lang
wallerdev has joined #ruby-lang
symm- has joined #ruby-lang
mikecmpbll has quit [Quit: i've nodded off.]
apt-get_ has joined #ruby-lang
tdy has joined #ruby-lang
relix has quit [Remote host closed the connection]
relix has joined #ruby-lang
vintik has joined #ruby-lang
jxpx777 has joined #ruby-lang
vintik has quit [Client Quit]
j4cknewt has quit [Remote host closed the connection]
stamina has quit [Quit: WeeChat 0.4.3]
momomomomo has quit [Quit: momomomomo]
yatish27 has quit [Remote host closed the connection]
j4cknewt has joined #ruby-lang
kek has joined #ruby-lang
CaptainJet has quit [Ping timeout: 240 seconds]
j4cknewt has quit [Read error: Connection reset by peer]
j4cknewt has joined #ruby-lang
CaptainJet has joined #ruby-lang
mikecmpbll has joined #ruby-lang
jxpx777 has quit [Quit: Linkinus - http://linkinus.com]
kek has quit [Ping timeout: 260 seconds]
ironhide_604 has quit [Ping timeout: 246 seconds]
zastern is now known as pizzaops
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
<jhass> the module takes it out
<jhass> *modulo
<jhass> >> (1..6).map {|i| [i, i % 3] }
<eval-in____> jhass => [[1, 1], [2, 2], [3, 0], [4, 1], [5, 2], [6, 0]] (https://eval.in/187363)
<seamon> I’m sorry?
<jhass> necro: you see for 3 it returns 0, so it becomes 0*100 == 0
<seamon> the topic is strange behavior
kgrz has quit [Ping timeout: 255 seconds]
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
<yorickpeterse> I'm aware of the spec
mistym has quit [Ping timeout: 245 seconds]
amystephen has joined #ruby-lang
<whitequark> yorickpeterse: so what's the relevant part from HTML spec?
mistym_ is now known as mistym
yell0wgh0st has quit [Quit: yell0wgh0st]
<yorickpeterse> lemme commit my specs so you have an actual code example
<yorickpeterse> whitequark: git clone git@github.com:YorickPeterse/oga.git; cd oga; bundle install; rake
<yorickpeterse> failing spec is the one related to this
sepp2k has quit [Quit: Konversation terminated!]
saarinen has joined #ruby-lang
<whitequark> pffff don't expect me to write code
<whitequark> reading the HTML spec now though
benanne has joined #ruby-lang
<yorickpeterse> You'd rather read the W3 spec?
<yorickpeterse> you must be crazy
<whitequark> of course I would rather read the W3 spec
<yorickpeterse> Granted the HTML spec is not as bad as the xpath spec
<whitequark> my brain is already mangled enough the spec doesn't seem particularly opaque
AKASkip has joined #ruby-lang
yatish27 has joined #ruby-lang
<whitequark> okay, gotcha
<whitequark> yorickpeterse: in your case I would do it like this
seamon has quit [Quit: Zzzzzzz]
<whitequark> use '<' [0-9a-zA-Z] at line 282
cleopatra has joined #ruby-lang
<whitequark> and replace the action with the following:
j4cknewt_ has quit [Remote host closed the connection]
<whitequark> { callback_simple("on_element_start"); fhold; fnext element_name; }
ur5us has joined #ruby-lang
<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 "&lt; " 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> &lt; 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…]
amerine has quit [Ping timeout: 260 seconds]
j4cknewt has quit [Read error: No route to host]
j4cknewt has joined #ruby-lang
diegoviola has joined #ruby-lang
jbardin has joined #ruby-lang
dm78 has quit [Remote host closed the connection]
JohnBat26 has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
ur5us has joined #ruby-lang
sarkyniin has quit [Ping timeout: 276 seconds]
<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.
centrx has joined #ruby-lang
<whitequark> yorickpeterse: try this
<whitequark> any+ - (any+ ('<' [0-9a-zA-Z] | '<!--' | '<![CDATA[' ))
<yorickpeterse> huh
<whitequark> admittedly it is a little arcane
<yorickpeterse> eh, it seems to just consume everything (so inc the entire <!-- and whatever follows)
<yorickpeterse> so now you get stuff like [:T_TEXT, "if ( number < 10 ) { }</script>", 1]
<whitequark> ugh
<whitequark> yes, indeed
<yorickpeterse> :P
<whitequark> let me think for a bit more
allomov has joined #ruby-lang
<yorickpeterse> I shall call this "The Midnight Ragel"
<yorickpeterse> effectively the -- operator would have to bail out on the first character of whatever comes to the right, not when it matches it
<whitequark> well, this should work:
<yorickpeterse> so when using any+ -- 'foo' it would have to bail out on the "f"
<yorickpeterse> instead of after the 2nd "o"
<whitequark> any+ (any{2} - '<' [0-9a-zA-Z] | any{4} - '<!--' | any{9} - '<![CDATA[' | "")
<whitequark> errr, no
<whitequark> crap
<whitequark> just use the @{ p_tmp = p } trick
<whitequark> that's how I do it in parser anyway
<whitequark> trying to write the perfect state machine combination isn't worth it
<yorickpeterse> doesn't that mess it up when you transition back into another machine (main in this case)?
<whitequark> no
<yorickpeterse> oh, you'd reset p back to p_tmp before you go back?
<whitequark> yes
<yorickpeterse> hmm
<whitequark> like this
<yorickpeterse> That however would still include the first few characters of the stuff after the -- operator
<yorickpeterse> (in the text content)
<whitequark> nonono
<whitequark> you'd do it like: text = |* any* @{ pt = p } ('<' [0-9a-zA-Z] | '<!--' | '<![CDATA[' | "" ) => { p = pt; fnext main; }; *|
earthquake has joined #ruby-lang
<whitequark> and for T_TEXT, you'll do @source[@ts...pt]
<whitequark> for the token content
<yorickpeterse> hmmmm
kgrz has joined #ruby-lang
<yorickpeterse> ha wtf, that works if you have something like "<script>foo</script>" but not when you have "<script>foo<!--bar--></script>"
<yorickpeterse> Then the text token includes "<!"
<yorickpeterse> so you have to reset subtract whatever amount of characters comes before the final matched character
<whitequark> huh? no, that should not be necessary
<yorickpeterse> so what I have is...
seamon has quit [Quit: Zzzzzzz]
<whitequark> see, the idea is that if it *does* include <!--, it will match that
<yorickpeterse> any+ @{ mark = p; } -- ('</' | comment_start) => { emit_text; p = mark - 1; p = 0; fnext main; } [...]
jgpawletko has quit [Quit: jgpawletko]
<yorickpeterse> If the input is "<script>if ( number < 10 ) { }</script>" this results in the correct tokens
workmad3 has quit [Ping timeout: 260 seconds]
<yorickpeterse> However, for input "<script>if ( number < 10 ) { }<!--foo--></script>" this results in...
<whitequark> wtf
<yorickpeterse> [:T_TEXT, "if ( number < 10 ) { }<!", 1], [:T_TEXT, "--foo-->", 1], [:T_ELEM_END, nil, 1]
<whitequark> your @{ mark = p; }
<whitequark> is useless
<whitequark> I mean, p = mark - 1; does nothing here
<whitequark> also why do you do p = 0?!
kgrz has quit [Ping timeout: 245 seconds]
<whitequark> and why do you have -- there?
<yorickpeterse> mark = 0 is to reset it (it's used in some other place too)
<yorickpeterse> oh derp
<yorickpeterse> I misread the lack of the --
<yorickpeterse> heh
<whitequark> and you set p to 0
<whitequark> not mark
<whitequark> are you drunk or what
<yorickpeterse> oh derp
<yorickpeterse> that's a IRC typo
<yorickpeterse> that's supposed to be mark = 0
<yorickpeterse> so yes, I'm drunk
<whitequark> k
<whitequark> and it doesn't include tag starts too
<whitequark> only comment and end tag
Voker57 has joined #ruby-lang
<yorickpeterse> I know that
<whitequark> ok
<yorickpeterse> I'm starting small to see if this even works
havenwood has quit [Remote host closed the connection]
momomomomo has joined #ruby-lang
thegeekinside has quit [Quit: (null)]
tmegano has joined #ruby-lang
<yorickpeterse> hm, it appears I really do have the dumb today
<whitequark> hmm?
<yorickpeterse> So my rule is:
<yorickpeterse> any* @{ mark = p; } ('</' | comment_start) => {callback("on_text", data, encoding, ts, mark); p = mark; mark = 0; fnext main;};
<yorickpeterse> But then you get stuff like
<yorickpeterse> [:T_TEXT, "if ( number < 10 ) { }</script", 1]
<yorickpeterse> or
<yorickpeterse> [:T_TEXT, "if ( number < 10 ) { }<!--foo--></script", 1]
<yorickpeterse> Considering I'm getting sleepy I'm probably missing something super obvious
amerine_ has quit [Ping timeout: 276 seconds]
AKASkip has quit [Ping timeout: 272 seconds]
momomomomo has quit [Ping timeout: 246 seconds]
<whitequark> hmmm
dm78 has joined #ruby-lang
<whitequark> no, not super obvious
<whitequark> try this
<whitequark> (any* -- ('</' | comment_start)) @{ mark = p; } ('</' | comment_start | "")
dm78 has quit [Remote host closed the connection]
dm78_ has joined #ruby-lang
<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…]
mistym_ is now known as mistym
malconis has joined #ruby-lang
bsvineeth has joined #ruby-lang
jhass is now known as jhass|off
<yorickpeterse> whitequark: before I run off, fixed it (for the most part) https://github.com/YorickPeterse/oga/commit/49ddebf358e0e8af2f28de953350eefe2ceb7a68
malconis has quit [Ping timeout: 272 seconds]
seamon has joined #ruby-lang
<whitequark> yorickpeterse: you can use a single rule for both
<whitequark> just add "" to terminate_text.
<whitequark> otherwise, looks pretty good
esmet_ has joined #ruby-lang
jgpawletko has joined #ruby-lang
necro has quit [Ping timeout: 246 seconds]
seamon has quit [Quit: Zzzzzzz]
seamon has joined #ruby-lang
bsvineeth has quit [Remote host closed the connection]
bsvineeth has joined #ruby-lang
benanne has quit [Quit: kbai]
charliesome has quit [Quit: zzz]
necro has joined #ruby-lang
bsvineeth has quit [Ping timeout: 240 seconds]
elico has quit [Quit: Leaving.]
Sgeo has joined #ruby-lang
nofxx_ has joined #ruby-lang
malconis has joined #ruby-lang
dorei has quit []
hahuang65 has quit [Quit: WeeChat 1.0]
hahuang65 has joined #ruby-lang
<necro> I understand the attr_reader defines and returns :name - but why is :name equal to @name? https://gist.github.com/anonymous/5efc03c212258504aaaa
mikecmpbll has quit [Quit: i've nodded off.]
hahuang65 has quit [Client Quit]
hahuang65 has joined #ruby-lang
malconis has quit [Ping timeout: 255 seconds]
ryba has joined #ruby-lang
ryba is now known as retro|cz
saarinen has quit [Quit: saarinen]
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.
toastynerd has joined #ruby-lang
Kerber0s has joined #ruby-lang