baweaver_ has quit [Read error: Connection reset by peer]
Regulati_ has quit [Remote host closed the connection]
sharpmachine has quit [Remote host closed the connection]
<shevy>
it's the old way!
sarkyniin has quit [Ping timeout: 264 seconds]
lannonbr has joined #ruby
startupality has joined #ruby
<nitenq>
Ox0dea: do you know why I can’t convert : nm = NetAddr.i_to_bits('0xffffff00'.to_i(16)) to a string ? It seems to be an array but i don’t get why
sankaber has joined #ruby
nateberkope has joined #ruby
howdoicomputer has quit [Ping timeout: 244 seconds]
mdcox_ has joined #ruby
scpike has quit [Quit: leaving]
<nitenq>
and I can’t get the value i want, even if i do a nm[0].to_str
<zenspider>
Ox0dea: odd that you quibble "split(//)".length > "chars".length but have no problem opening up Fixnum and adding a whole new (comparatively giant) method.
iceyec_ has joined #ruby
shadoi1 has joined #ruby
<Ox0dea>
zenspider: We have Integer#bit_length, but not Integer#bits?
Rutix`away has joined #ruby
Rutix`away has joined #ruby
lordkryss_ has joined #ruby
bruno-_ has joined #ruby
<Ox0dea>
Additionally, even Rubocop doesn't consider one line "comparatively giant".
MiracleBlue_ has joined #ruby
xkickflip_ has joined #ruby
<Ox0dea>
inb4 s/line/expression/
<jhass>
jeez, this is easily settled: both of you suck. case closed
<bosma>
.texts worked, I tried it before but was using the wrong element.
<bosma>
.texts.join
<nitenq>
ip = NetAddr.i_to_bits(0xffffff00) give me 24
<al2o3-cr>
nitenq: what do you want?
chipotle has quit [Read error: Connection reset by peer]
chipotle has joined #ruby
<nitenq>
I have my netmask in hexadecimal. I want the subnet associated
workmad3 has joined #ruby
howdoicomputer has joined #ruby
<zenspider>
you want the number of leading 1's ... yes?
gambl0re has quit [Ping timeout: 240 seconds]
<nitenq>
I don’t know what is unclear. I have a netmask in hexadecimal, I use ip = NetAddr.i_to_bits(0xffffff00) to have the associated subnet and now I want to use ‘ip’ as a string
workmad3 has quit [Ping timeout: 246 seconds]
<nitenq>
but when I do a ip.to_str it gives me the folowing error : heck failed to run: undefined method `to_str' for 24:Fixnum,
t_ has quit [Read error: Connection reset by peer]
<drbrain>
use #to_s, you almost never want to use to_str
<drbrain>
most objects don't have a to_str
<drbrain>
or a to_XXX
<zenspider>
you never call to_str explicitly... that's for ruby only
startupality has quit [Quit: startupality]
roger_rabbit has quit [Ping timeout: 264 seconds]
<nitenq>
ok
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
oo_ has joined #ruby
lorikeet has quit [Read error: Connection reset by peer]
jhack32 has quit [Ping timeout: 255 seconds]
oo_ has quit [Remote host closed the connection]
oo_ has joined #ruby
transiency has joined #ruby
xkef has joined #ruby
nofxx has quit [Read error: Connection reset by peer]
nofxx has joined #ruby
allcentury has quit [Ping timeout: 250 seconds]
doodleha_ has joined #ruby
rubie has quit [Remote host closed the connection]
danzilio has quit [Quit: My computer has fallen asleep!]
christiandsg has quit [Remote host closed the connection]
<Ox0dea>
What's the least hackish way to determine how we were require'd?
casadei_ has joined #ruby
hfp has quit [Ping timeout: 244 seconds]
<RickHull>
the filename which did the requiring?
<Ox0dea>
Oui.
<RickHull>
(is that what you mean by how?)
<Ox0dea>
I'd rather not muck about in ObjectSpace if possible.
_blizzy_ has quit [Ping timeout: 244 seconds]
hfp_work has quit [Ping timeout: 240 seconds]
<Ox0dea>
And I don't think I can get at the internal loading_table from an extension.
<Ox0dea>
Canonicalization makes this tricky. :/
mleung has quit [Quit: mleung]
christiandsg has joined #ruby
Stratege has quit [Ping timeout: 246 seconds]
hfp has joined #ruby
hfp_work has joined #ruby
Papierkorb has quit [Quit: ArchLinux completes an endless loop faster than any other distro!]
mleung has joined #ruby
<Ox0dea>
Wow, Ruby already contains special-casing for GCC 6.
casadei_ has quit [Ping timeout: 240 seconds]
Stratege has joined #ruby
Feyn has joined #ruby
failshell has joined #ruby
eggoez has quit [Ping timeout: 256 seconds]
mleung has quit [Client Quit]
choke has joined #ruby
Rodya_ has joined #ruby
Muhannad has joined #ruby
user1138 has quit [Ping timeout: 246 seconds]
r00tninja has joined #ruby
failshell has quit [Ping timeout: 256 seconds]
cnngimenez has quit [Ping timeout: 264 seconds]
livcd has joined #ruby
mdcox has joined #ruby
xkickflip has quit [Quit: xkickflip]
paulcsmith has joined #ruby
eggoez has joined #ruby
GnuYawk has quit [Ping timeout: 255 seconds]
sepp2k has joined #ruby
havenwood has joined #ruby
devbug has quit [Ping timeout: 246 seconds]
swgillespie has joined #ruby
nitenq has quit [Quit: nitenq]
tmtwd has joined #ruby
<r00tninja>
Having issues with fswatch..can someone plz help a n00b out? :)
<Ox0dea>
?anyone
<ruboto>
Just ask your question, if anyone has or can, they will respond.
<r00tninja>
fswatch
<r00tninja>
--- Changed: []
<r00tninja>
var/lib/gems/1.9.1/gems/rb-fsevent-0.9.5/bin/fsevent_watch: 1: /var/lib/gems/1.9.1/gems/rb-fsevent-0.9.5/bin/fsevent_watch: ������: not found
<n1lo>
How can I simplify a method call to use only the methods name not Class#Method ? I want to do this: Lorem.sentence not: Faker::Lorem.sentence. I did a require “faker” in my code. Tks.
AnoHito_ has quit [Quit: Leaving]
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Ox0dea>
n1lo: `include Faker`, but maybe consider not doing that.
transiency has quit [Remote host closed the connection]
yqt has quit [Ping timeout: 256 seconds]
<n1lo>
Ox0dea: yeah. =/
<Ox0dea>
n1lo: Do you know the consequences?
t_ has joined #ruby
r00tninja has quit [Quit: Leaving]
<n1lo>
Ox0dea: If I use include? For sure. I just don’t want to repeat every time: Faker::X, Faker::Y etc.
<Ox0dea>
n1lo: Are you going to be using many of the classes from Faker?
yfeldblum has quit [Remote host closed the connection]
danzilio has joined #ruby
cnngimenez has joined #ruby
mdcox has quit [Ping timeout: 244 seconds]
<Ox0dea>
If you don't want to pollute your namespace with all of the constants Faker exports, you could just do `Lorem = Faker::Lorem`, and so on for the modules you actually need.
dwithers2 has joined #ruby
dwithers1 has quit [Read error: No route to host]
jenrzzz has quit [Ping timeout: 264 seconds]
<n1lo>
Ox0dea: I think yes because in every factoryGirl fixture I’m going to use a lot of diferents Classes. Like: Faker::Lorem, Faker::Name, Faker::Address etc.
dwithers3 has joined #ruby
jbw_ has joined #ruby
<Ox0dea>
n1lo: Well, maybe check the output of `Faker.constants` to ensure none of them will conflict with any of yours.
<Ox0dea>
If you find everything to be copacetic, `include Faker` shouldn't do any damage.
<Ox0dea>
Still, it's not something you should get in the habit of doing.
jbw__ has quit [Ping timeout: 244 seconds]
slawrence00 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Casty has joined #ruby
dwithers2 has quit [Ping timeout: 244 seconds]
darkf has joined #ruby
yfeldblum has joined #ruby
michaeldeol has joined #ruby
<n1lo>
Ox0dea: Well for now I’m going to keep this repetion. :~
<n1lo>
Ox0dea: Thanks a lot!
<Ox0dea>
Sure thing.
user1138 has quit [Ping timeout: 246 seconds]
<Ox0dea>
Try to think of it as clarity rather than repetition. :)
<Kalov>
i wish it to return "hola" or "chao" if the first is negative or the second is
<Kalov>
but it just prints the first one
RobertBirnie has joined #ruby
<Kalov>
the first rescue
workmad3 has joined #ruby
CloCkWeRX has left #ruby [#ruby]
<Ox0dea>
Kalov: You've thoroughly misunderstood the purpose of exceptions, I'm afraid.
<Kalov>
:/
<ElSif>
you can just get it to print that when you check the variable's value
astrobunny has joined #ruby
<Kalov>
yeah... i just wanted to know if i could use multiple exceptions for different conditions
symm- has quit [Quit: Leaving...]
<ElSif>
you could, but you would need to use more than 1 error class, or look at the error (first would be clearer probably)
gilest has joined #ruby
<ElSif>
you can pass error into a rescue with `rescue <error_type> => e`
<Ox0dea>
Kalov: Better to just raise once if either argument is negative.
<ElSif>
^
mdcox has quit [Ping timeout: 252 seconds]
jbw__ has quit [Ping timeout: 246 seconds]
jbw_ has joined #ruby
fenjamin has quit [Quit: 离开]
<Kalov>
so how is the syntaxis for multiple error class
Channel6 has joined #ruby
workmad3 has quit [Ping timeout: 244 seconds]
lampd1 has quit [Remote host closed the connection]
dented42 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
lampd1 has joined #ruby
<ElSif>
you can use the same code structure, but you would need to define your own errors (im not really recommending this as the best choice for this situation, see Ox0dea's response)
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
fullofcaffeine has quit [Remote host closed the connection]
smoak has left #ruby ["WeeChat 1.2"]
<Kalov>
thank you very much Ox0dea, that was what i was looking for
fullofcaffeine has joined #ruby
jbw_ has quit [Ping timeout: 244 seconds]
<Ox0dea>
Kalov: Sure thing.
ScriptGeek has quit [Quit: Leaving.]
<Ox0dea>
Kalov: As ElSif mentioned, you *could* create distinct NegativeAError and NegativeBError classes, but that seems rather heavy-handed.
<ElSif>
just a little :)
<ElSif>
but very explicit
Tritone has quit [Remote host closed the connection]
kawaii-imouto has quit [Quit: fix config]
<Ox0dea>
Aye, and it's certainly the right thing to do in many cases, but perhaps not in this particular example. :)
pyon has joined #ruby
pyon is now known as kawaii-imouto
tkuchiki has joined #ruby
Tritone has joined #ruby
Lucky_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
_blizzy_ has joined #ruby
mleung has joined #ruby
ss_much has quit [Quit: Erm. Temp?]
freerobby has quit [Quit: Leaving.]
ss_much has joined #ruby
mdcox has joined #ruby
freerobby has joined #ruby
girakrok has joined #ruby
jbw_ has joined #ruby
_blizzy_ has quit [Read error: Connection reset by peer]
sharpmachine has joined #ruby
jbw__ has quit [Ping timeout: 256 seconds]
_blizzy_ has joined #ruby
lysw123 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sharpmachine has quit [Remote host closed the connection]
chrishough has joined #ruby
Cache_Money has joined #ruby
simplyianm has quit [Remote host closed the connection]
scripore has quit [Quit: This computer has gone to sleep]
sharpmachine has joined #ruby
howdoicomputer has quit [Ping timeout: 250 seconds]
howdoicomputer has joined #ruby
mleung has quit [Quit: mleung]
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mdcox has quit [Ping timeout: 246 seconds]
fgo_ has joined #ruby
dubkoidragon has joined #ruby
<dubkoidragon>
hey, do you guys know where i can find a list of all the ruby built in modules ex.Math and a little desription about them and what I can do with them. Google has failed me, although I'm starting to think that I'm asking a non sensical question
dented42 has joined #ruby
<Ox0dea>
dubkoidragon: Linux?
<dubkoidragon>
win
RobertBirnie has joined #ruby
<Ox0dea>
:(
maletor has joined #ruby
<Ox0dea>
dubkoidragon: I trust you know how to use irb?
<dubkoidragon>
lol I mean is there a website that list like for example 1: Math, list of things its stores : Pi so on an so forth
Jarboe has quit []
<dubkoidragon>
yes i have used irb
<dubkoidragon>
though only to do (1..100).to_a
<Ox0dea>
I see.
fgo_ has quit [Ping timeout: 246 seconds]
<Ox0dea>
Well, Ruby's introspection capabilities make it quite easy to see what all a given module defines, but there's probably not a straight list anywhere. Is the documentation not sufficiently enlightening?
EllisTAA has joined #ruby
mdcox has joined #ruby
<dubkoidragon>
I'd love too see how enlighning it is, where is the documentation? and what's introspection
<Ox0dea>
dubkoidragon: Introspection is a language's ability to ask questions about itself.
<Ox0dea>
dubkoidragon: There's a nice example of introspection. Ruby was able to tell us, from within Ruby, that there are 18 classes whose instances can be converted to an array.
<dubkoidragon>
is that a template of what i should type intp irb?
<dubkoidragon>
oh ok
<dubkoidragon>
i see
<dubkoidragon>
I will play around with that
<dubkoidragon>
in irb right
RobertBirnie has joined #ruby
<dubkoidragon>
it's so frustrating being sucha noob
<Ox0dea>
irb is simply for interactively evaluating Ruby code.
jbw_ has quit [Ping timeout: 244 seconds]
<Ox0dea>
It's a nice "playground", but you'll want to write "real" programs into their own files.
<acl_>
it's actually nice being new
Musashi007 has quit [Quit: Musashi007]
<ElSif>
>> a = []; ObjectSpace.each_with_object(Class, a).select { |c, a| a<< c if c.instance_methods.include?(:to_a) }; p a
<ruboto>
ElSif # => undefined method `each_with_object' for ObjectSpace:Module (NoMethodError) ...check link for more (https://eval.in/402798)
<ElSif>
ah, no each_with_object T_T
<Ox0dea>
ElSif: Just each_object.
<ElSif>
yea i wanted to print out the class names but wanted it not to spew them into chat too mcuh
user1138 has quit [Read error: Connection reset by peer]
<Ox0dea>
It'll print a fair amount, but it stops at the first if there's more than one line of output.
<ElSif>
gotcha, gtk
fenjamin has joined #ruby
freerobby has quit [Quit: Leaving.]
dseitz has joined #ruby
rubie has quit [Remote host closed the connection]
sp1rs has joined #ruby
casadei_ has joined #ruby
oo_ has quit [Remote host closed the connection]
failshell has joined #ruby
audiodude has quit [Ping timeout: 255 seconds]
simplyianm has joined #ruby
Musashi007 has joined #ruby
fyliu_ has joined #ruby
simplyia_ has joined #ruby
simplyianm has quit [Remote host closed the connection]
fyliu_ has left #ruby [#ruby]
failshell has quit [Ping timeout: 244 seconds]
slawrence00 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
yfeldblum has joined #ruby
RegulationD has joined #ruby
casadei_ has quit [Ping timeout: 240 seconds]
EllisTAA has quit [Quit: EllisTAA]
RegulationD has quit [Ping timeout: 240 seconds]
user1138 has joined #ruby
Musashi007 has quit [Quit: Musashi007]
htmldrum has quit [Ping timeout: 255 seconds]
zenguy_pc has quit [Read error: Connection reset by peer]
<dubkoidragon>
Ox0dea: Hey sorry for going into radio silence. two cops just came to my house to arrest me. But i'm good now. Anyway so whats the purpose then of irb
<dubkoidragon>
to test small fragments of code??
tmtwd has quit [Remote host closed the connection]
zenguy_pc has joined #ruby
<Ox0dea>
dubkoidragon: Yes, that's about the size of it.
<Ox0dea>
The interactivity is key.
oo_ has joined #ruby
<Ox0dea>
You can try a snippet of code, immediately get the results and see that they're almost correct, and then iteratively improve it until it's ready to be used in your program.
sharpmachine has quit [Remote host closed the connection]
fantazo has joined #ruby
<dubkoidragon>
ok i see. and for explae that test you posted about the diff kind of instances able to turn to an array. too array = .to_a , so does that documentation page have the different types of methonds like ".to_a", "to_sym" etc. I haven't looked thorugh all of it yty\
<dubkoidragon>
yet**
<Kalov>
i use half screen for code and in the other side the terminal, is pretty easy to use...
Lucky_ has joined #ruby
<dubkoidragon>
im on windows kalov
gilest has quit [Quit: Leaving...]
<Ox0dea>
dubkoidragon: Yes, all the classes have documentation for (almost) all of their methods.
<dubkoidragon>
awsome. much thanks again for that
<dubkoidragon>
I'll be going through all that as soon as I get back from my shower. One more question before i take a break here is have you ever used shoes? for making gui apps. I wanted to play with that here tonight as well
Musashi007 has joined #ruby
htmldrum has joined #ruby
oo_ has quit [Remote host closed the connection]
oo_ has joined #ruby
<Ox0dea>
As I understand it, it makes simple things easy, but not all hard things possible.
Muhannad has quit [Ping timeout: 240 seconds]
jackjackdripper has joined #ruby
pjsim has joined #ruby
user1138 has quit [Read error: Connection reset by peer]
Musashi007 has quit [Client Quit]
<Ox0dea>
It'd be good for getting your feet wet as regards "graphical" programming, but you'll likely find yourself needing something more featureful before long.
bronson has joined #ruby
<dubkoidragon>
oki dokie. I'll be back in a hour, maybe less. look forward to rubying some more with ya. thx again
* dubkoidragon
flies away
jbw__ has quit [Ping timeout: 256 seconds]
jbw__ has joined #ruby
ixti has quit [Ping timeout: 264 seconds]
charliesome has quit [Quit: zzz]
bronson has quit [Ping timeout: 255 seconds]
Cache_Money has quit [Quit: Cache_Money]
dhjondoh has joined #ruby
hololeap|2 is now known as hololeap
CloCkWeRX has joined #ruby
<pontiki>
let's get together and ruby about
dubkoidragon has quit [Ping timeout: 252 seconds]
<Ox0dea>
I'm trying to make it so that $thing *must* be required as 'foo.so'... on all platforms.
<Ox0dea>
I've got it working on Linux. :P
riotjones has joined #ruby
mdcox has quit [Ping timeout: 244 seconds]
user1138 has joined #ruby
tmtwd has joined #ruby
<Kalov>
so the idea of classes is that they can hold local variables and work with them, EJ: (@something)
pjsim has left #ruby [#ruby]
krz has joined #ruby
armyriad has quit [Ping timeout: 256 seconds]
<Ox0dea>
Kalov: The "idea" of classes is simply that you often want more than one of something, but they need only be similar rather than identical.
jbw_ has joined #ruby
slawrence00 has joined #ruby
jbw__ has quit [Ping timeout: 246 seconds]
<Ox0dea>
Ox0dea: The "similar" part is that each instance *behaves* like the others, where "not identical" falls out of, as you say, having different instance variables.
<Ox0dea>
Wow, I just highlighted me. :/
<Ox0dea>
Might be time for sleep.
lysw123 has joined #ruby
Kalov has quit [Ping timeout: 244 seconds]
<pontiki>
:)
yardenbar has joined #ruby
bmurt has quit []
lysw123 has quit [Client Quit]
htmldrum has quit [Ping timeout: 244 seconds]
devbug has quit [Remote host closed the connection]
<pontiki>
nite, all
sepp2k has quit [Quit: Leaving.]
lysw123 has joined #ruby
davedev24 has quit [Remote host closed the connection]
<eam>
Ox0dea: I wonder if you can hook *all* access to $: instead
CaryInVictoria has quit [Remote host closed the connection]
redlegion has quit [Ping timeout: 256 seconds]
<Ox0dea>
eam: Well, I'll need to go at it from a very low level anyhow, on account of trying to permit requiring '.so' files on not-Linux.
<Ox0dea>
The '.so' file needn't actually exist, which is sort of the point.
CloCkWeRX has joined #ruby
<eam>
wtf, $: is read only? That's nonsense
<eam>
when did that happen
redlegion has joined #ruby
<Ox0dea>
>> $: << 1
<ruboto>
Ox0dea # => ["/execpad/interpreters/ruby-2.2.0/lib/ruby/site_ruby/2.2.0", "/execpad/interpreters/ruby-2.2.0/lib/ ...check link for more (https://eval.in/402940)
<Ox0dea>
I'm sure the thing could be finagled/brute-forced into "working" along the lines of require_all, where it just keeps marching until no more NameErrors, but specific imports are supposed to be faster. :/
dubkoidragon has joined #ruby
workmad3 has quit [Ping timeout: 264 seconds]
<dubkoidragon>
back
<Ox0dea>
What is "dubkoid"?
Pupeno has quit [Read error: Connection reset by peer]
Pupeno has joined #ruby
redlegion has quit [Ping timeout: 264 seconds]
djbkd has joined #ruby
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
simplyianm has quit [Remote host closed the connection]
bruno- has quit [Ping timeout: 244 seconds]
simplyianm has joined #ruby
IronTalk has joined #ruby
emilkarl has quit [Quit: emilkarl]
bricker has quit [Ping timeout: 260 seconds]
redlegion has joined #ruby
lysw123 has joined #ruby
jackjackdripper has quit [Quit: Leaving.]
havenwood has quit [Ping timeout: 240 seconds]
<ljarvis>
moin
<adaedra>
plu
simplyianm has quit [Ping timeout: 246 seconds]
fgo_ has joined #ruby
dented42 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mikecmpbll has joined #ruby
tesuji has joined #ruby
Iskarlar has joined #ruby
bricker has joined #ruby
umo has joined #ruby
senayar has quit [Remote host closed the connection]
Musashi007 has quit [Quit: Musashi007]
fgo_ has quit [Ping timeout: 240 seconds]
user1138 has quit [Read error: Connection reset by peer]
senayar has joined #ruby
blaxter has joined #ruby
CaryInVictoria has quit [Ping timeout: 244 seconds]
emilkarl has joined #ruby
iateadonut has quit [Quit: Leaving.]
benlovell has joined #ruby
sameerynho has joined #ruby
<dubkoidragon>
Ox0dea: what do you mean?
Musashi007 has joined #ruby
schaerli has joined #ruby
michael_mbp has quit [Excess Flood]
lxsameer_ has quit [Ping timeout: 240 seconds]
yfeldblum has quit [Ping timeout: 264 seconds]
blaxter has quit [Ping timeout: 252 seconds]
aaeron has quit [Quit: Leaving.]
Spami has joined #ruby
<Ox0dea>
dubkoidragon: Well, does it mean anything?
aspiers has joined #ruby
michael_mbp has joined #ruby
oo_ has quit [Remote host closed the connection]
white_bear has joined #ruby
ironsay has joined #ruby
tomphp has joined #ruby
Olipro has joined #ruby
<shevy>
Ox0dea well it does not read very elegantly so
oo_ has joined #ruby
Musashi007 has quit [Ping timeout: 240 seconds]
<shevy>
require() has one huge thing going - it really is short and elegant. and simple!
<Ox0dea>
shevy: It's short and simple, but not elegant.
<shevy>
not elegant?
<Ox0dea>
I was mostly going for a syntax that could theoretically be retro-fitted.
einarj has joined #ruby
<shevy>
I have come to the conclusion that ruby core will not modify require()
<shevy>
well
<Ox0dea>
shevy: What's elegant about it? What clever operation does it perform in a very neat way?
<shevy>
at least not for 2.x era
<shevy>
it's short!
<shevy>
require 'Ox0dea'
<shevy>
\o/
<Ox0dea>
Elegance has nothing to do with length.
<shevy>
it's cleverness lies in its simplicity
<Ox0dea>
No, that's just simplicity.
<shevy>
that's clever
<Ox0dea>
You're conflating three very different things.
<Ox0dea>
Ruby's require is an MVP; it's the simplest thing that could possibly work.
cnngimenez has quit [Quit: Konversation terminated!]
<dubkoidragon>
Ox0dea: I dunno I have a tattoo of koi fish, and a dargon, so one time in a game I just made that name and then it kind of stuck.
<dubkoidragon>
2 koi fish
<dubkoidragon>
hence the dub
<Ox0dea>
Oh, wow; I accidentally read it as "dubkoid dragon".
<shevy>
koi fish
<dubkoidragon>
yea
Violentr has joined #ruby
<shevy>
that's kinda hilarious :)
<dubkoidragon>
:)
mhib has joined #ruby
TheHodge has joined #ruby
<Ox0dea>
All my tattoos are text.
user1138 has joined #ruby
jbw__ has joined #ruby
<dubkoidragon>
cool cool
lessless has joined #ruby
<Ox0dea>
That's not a terribly common opinion, but fuck 'em. :)
krandi has quit [Remote host closed the connection]
jbw_ has quit [Ping timeout: 244 seconds]
<Ox0dea>
It's very difficult to defend "a word is worth a thousand pictures" in the general case.
senayar has quit [Remote host closed the connection]
senayar has joined #ruby
<dubkoidragon>
what u mean?
<dubkoidragon>
who's opinion
<Ox0dea>
dubkoidragon: You're familiar with the aphorism, "a picture is worth a thousand words"?
<dubkoidragon>
yes
<Ox0dea>
Well, I think the reverse can be just as true, if the word has significant personal meaning.
lordkryss has joined #ruby
<Ox0dea>
But most people don't seem to agree with that premise.
duncannz has quit [Ping timeout: 244 seconds]
<dubkoidragon>
yea, I get that. Totally if it has significant meaning I can totally see that
<yorickpeterse>
morning kids
umo has quit [Ping timeout: 246 seconds]
fantazo has joined #ruby
IronTalk has quit [Quit: leaving]
<Ox0dea>
Can I prevent further execution of a require'd file without wrapping the whole thing in a conditional expression?
<ruboto>
Ox0dea # => /tmp/execpad-175207915089/source-175207915089:2: [BUG] Segmentation fault at 0x000000 ...check link for more (https://eval.in/402990)
mhf has quit [Ping timeout: 246 seconds]
<Ox0dea>
That's not the same thing, of course, but it likely demonstrates the root of the problem.
<ffledgling>
Ox0dea: okay... and a fix would be?
<Ox0dea>
Fuck if I know. :/
meatchicken has quit [Client Quit]
oo_ has quit [Remote host closed the connection]
schaerli has joined #ruby
<ffledgling>
So you're saying that one of (a) libruby or (b) the package manager are broken? :o
<Ox0dea>
Try disabling redcarpet; given it's the biggest processor of text, it seems a reasonable guess for the culprit.
<Ox0dea>
ffledgling: No, a Jekyll dependency.
meatchicken has joined #ruby
quazimodo has quit [Ping timeout: 252 seconds]
<meatchicken>
Hello
senayar has quit [Remote host closed the connection]
<meatchicken>
Why is a struct slower than a class?
senayar has joined #ruby
<meatchicken>
wouldn't the struct normally be quicker?
<ffledgling>
Ox0dea: How do I do that?
bodgix has joined #ruby
oo_ has joined #ruby
allomov has joined #ruby
<ljarvis>
meatchicken: Struct uses a new class. It's for convenience, not metal
<Ox0dea>
ffledgling: Well, redcarpet shouldn't be invoked unless you've got Markdown files to parse.
_blizzy_ has joined #ruby
<meatchicken>
ljarvis, thanks
<Silex>
meatchicken: is there a language where a struct is faster than a class?
<Ox0dea>
Silex: "C".
<meatchicken>
Silex, C#
<Silex>
Ox0dea: not true
poguez_ has quit [Quit: Connection closed for inactivity]
<ffledgling>
Ox0dea: I have no idea how it's being used tbh, this is just a way to build some docs for project
<Silex>
meatchicken: ah, yeah maybe
<ffledgling>
let me see if can figure out a way to fix it the old fashioned way
<Ox0dea>
Silex: Not true?
<ffledgling>
... nuke and reinstall
sevenseacat has quit [Quit: Me dun like you no more.]
<Ox0dea>
"Object-oriented C" is a thing, and chasing function pointers is definitely slower than using raw data.
<Silex>
Ox0dea: well for starter there's no class in C, assuming you meant C++ struct is stricly equivalent to class
<Ox0dea>
Silex: No, I meant C; you can write object-oriented C very similarly to how you'd do in Python.
<Ox0dea>
Explicit "self" everywhere.
<Silex>
Ox0dea: sure but it's not really a class is it?
<Ox0dea>
Why not?
davedev24 has joined #ruby
<Silex>
well it's just a struct function pointers
<Silex>
struct with*
<dubkoidragon>
omg half my focus is on rails and half on showes. I'm so frustrated and confused with everything lol
<flughafen>
shevy no airplanes are taking off
<Ox0dea>
Silex: Is that not the essence of a class?
stamina has joined #ruby
<Ox0dea>
The non-function members are "instance variables", and the function pointers are methods.
<shevy>
flughafen awww
<flughafen>
so sadd
meatchicken has quit [Quit: Leaving]
_blizzy_ has quit [Ping timeout: 255 seconds]
<ffledgling>
Ox0dea: how did you read the stack trace again?
<ffledgling>
I don't see any of the function calls you mentioned
<ffledgling>
not in the raw text anyway
<Ox0dea>
They're hidden amongst all the addresses, but they're there.
ribbons has joined #ruby
<Ox0dea>
I only mentioned rb_str_new_frozen(), for what that's worth.
<Ox0dea>
It's where the interpreter breathes its last.
schaerli has quit [Remote host closed the connection]
<heftig>
Ox0dea: methods are only indirect when they're virtual
<Ox0dea>
heftig: Please see GObject.
<Ox0dea>
ffledgling: Line 10 in your paste.
<ffledgling>
Ox0dea: do I run the trace through gdb with debugging info or something to see the translation from addresses to function names?
<Ox0dea>
ffledgling: The function names are there.
<heftig>
Ox0dea: I know GObject. It allows fine control over static vs. virtual dispatch, and my own code is mostly static
<ffledgling>
I see it
Philipp__ has joined #ruby
<Ox0dea>
ffledgling: That it's not at the very top of the trace indicates that it succeeded in allocating a new frozen string, but something tries to modify it (almost certainly inadvertently) a few instructions later.
user1138 has quit [Quit: Leaving]
psy_ has quit [Ping timeout: 256 seconds]
user1138 has joined #ruby
workmad3 has joined #ruby
Philipp_ has quit [Ping timeout: 256 seconds]
<bnagy>
Ox0dea: that's not a very convincing analysis imho
psy_ has joined #ruby
<Ox0dea>
bnagy: I defer to your expertise.
rubie has joined #ruby
<bnagy>
that crash is in free(), and the pointer it's freeing looks bunk
<ffledgling>
Ox0dea: All I see is a bunch of rb_[ary_each,yield,iterate]
waka has quit [Ping timeout: 244 seconds]
<bnagy>
I'm not sure the frozenness of the string is related
<bnagy>
I mean I'm not saying it's NOT, just that I don't see evidence for it
<Ox0dea>
bnagy: Symbols are garbage-collected now.
dangerousdave has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<bnagy>
it definitely looks GC related
joonty has joined #ruby
<Ox0dea>
Touching an interned string could very well cause free() to bail.
CaryInVictoria has joined #ruby
<bnagy>
that's the only thing that should be calling libc free, those unnamed libruby frames could be in the GC
<bnagy>
but I doubt assembly cares about whether a ruby string is frozen
mhf has joined #ruby
<Ox0dea>
How does assembly come into it?
<bnagy>
unless they implement it by moving it into some magic RO page or something, but I doubt it
dangerousdave has joined #ruby
sankaber has joined #ruby
slawrence00 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
workmad3 has quit [Ping timeout: 244 seconds]
<bnagy>
that's probably a libc assert, but I don't know why the symbol isn't there
<Ox0dea>
I wonder if very small strings are implemented as tagged pointers.
michael_mbp has quit [Excess Flood]
rubie has quit [Ping timeout: 265 seconds]
<bnagy>
usually I would expect the top of that stack to look like free, _GI_abort, _GI_raise
<dubkoidragon>
k guys good night
<bnagy>
cause if it crashed hard you wouldn't get the libc warning
astrobunny has quit [Remote host closed the connection]
CaryInVictoria has quit [Ping timeout: 264 seconds]
<bnagy>
what we need is a deeper stack trace :\
michael_mbp has joined #ruby
<bnagy>
ffledgling: imho your last idea is a good one. Update everything to latest and reinstall etc.
<bnagy>
:>
<ffledgling>
bnagy: I did
<ffledgling>
Didn't really work
<bnagy>
ffledgling: are you on linux?
<ffledgling>
Also, for some reason gem insists on installing everything in ruby ~/.gem/ruby/2.2.0 when my ruby version is 2.2.2
<bnagy>
if so you might see something from the trap handler in the kernel log ( /var/log/kern.log possibly )
<ffledgling>
bnagy: yes, running arch
<bnagy>
ffledgling: ruby uses the ABI level for those dir names, that's probably not a problem
<bnagy>
(I think, anyway)
<jhass>
?abi ffledgling
<ruboto>
ffledgling, Each Ruby release has actually two versions, the interpreter version and the ABI version. The interpreter version is what commonly is referred to, like 2.1.5. The ABI version is for the binary interface used by compiled extensions and it is what you see in your paths. It's shared among one release series, for example for the Ruby versions 2.1.0 to 2.1.5 the ABI version is 2.1.0.
codecop has quit [Remote host closed the connection]
<sonOfRa>
I'm using ruby-net-ldap to talk to our ldap server. The ldap.open method yields a block in which I can carry out other LDAP operations. However, these aren't nestable: https://gist.github.com/sonOfRa/f5c87c810d08a9f4ca8e
Vile` has quit [Read error: Connection reset by peer]
codecop has joined #ruby
<sonOfRa>
So, if I need to call another ldap method from inside one ldap call, I either get an exception, or I have to pass the already opened instance on to another method (but then I can't call that method on its own anymore).
<adaedra>
normally, you can install ruby and gem with yum
<apeiros>
the container managers
<adaedra>
santa claus
serivich has joined #ruby
bruno- has joined #ruby
<Rinzlit>
Okay I did yum install gem
<Rinzlit>
And I got a ton of ruby packages
<[k->
:o
<Rinzlit>
gem works now
<[k->
doesn't gem ship with Ruby
Soda has joined #ruby
<Rinzlit>
gem install bundler is working now
<Rinzlit>
adaedra thank you Q_Q
<Rinzlit>
you are a life savor
<Rinzlit>
saver*
<Rinzlit>
like the candy but better
<adaedra>
a ton? o_O
<Rinzlit>
The guy who wrote this guide...
<Rinzlit>
The BR is real
<workmad3>
[k-: welcome to the joy of package-managed ruby
<adaedra>
Don't have a CentOS at hand, but normally, rubygems is in only one package, rubygems
<adaedra>
no need to install 'a ton'
mikenovikov has quit [Ping timeout: 240 seconds]
safeforge has quit [Remote host closed the connection]
<Rinzlit>
adaedra if you want to help me, I can probably free up a centos server...
<Rinzlit>
I have 4 at the moment...
<workmad3>
adaedra: unless the ruby package hadn't installed some important things... like zlib, openssl, net/http...
<adaedra>
I can fire up a container for that, Rinzlit
<Rinzlit>
fair enough xD...
<Rinzlit>
The people I work for never get their stuff done...
<Rinzlit>
so i have to get a new server every so often....
<adaedra>
lol
<adaedra>
What I know for sure, is that on Fedora the package with gem is rubygems
<Rinzlit>
rake command still doesn't work...
_blizzy_ has quit [Ping timeout: 255 seconds]
<adaedra>
what step are you in the README?
serivich has quit [Ping timeout: 244 seconds]
<Rinzlit>
$ rake db:create db:migrate db:seed
<adaedra>
all the previous commands, including bundle install, worked correctly?
<Rinzlit>
yeah
<Rinzlit>
I just had to rephrase them
<Rinzlit>
to get install bundle
schaerli has quit [Remote host closed the connection]
<Rinzlit>
gem install bower
htmldrum has joined #ruby
ruby-lang285 has joined #ruby
<ruby-lang285>
hey
<Rinzlit>
Hi
<[k->
hi
<ruby-lang285>
i have some array with multiple emails how can i print out each ?
bmurt has joined #ruby
<adaedra>
Rinzlit: woot
<Rinzlit>
What is it adaedra?
psy_ has quit [Ping timeout: 240 seconds]
<Ox0dea>
ruby-lang285: On A4, do you mean?
<adaedra>
the commands you have in the readme should work without changing them
<Rinzlit>
ermmm they don't though
<adaedra>
that's what you have to fix
<Rinzlit>
Well $ doesn't do anything?
<adaedra>
take them one by one, and if one errors, that's what you have to look at
dangerousdave has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<[k->
$ means enter to terminal
<adaedra>
$ represents your shell, ignore it
<Rinzlit>
I need gem file 2.1.0
<Ox0dea>
[k-: As not-root!
<adaedra>
Rinzlit: what's the error (use gist for > 3 lines)
<[k->
ok
<Rinzlit>
Your Ruby version is 2.0.0, but your Gemfile specified 2.1.0
<Rinzlit>
I need to also not run it as root...
<Rinzlit>
-facepalm-
<adaedra>
?root
<ruboto>
General advise in system administration: do not and that means never use sudo or root to "fix" things. Only use it if you exactly know why it would work and why it wouldn't work under any circumstances as normal user. Or if you're told to do it.
<adaedra>
It means the ruby provided by your system is too old, you'll have to get an alternative ruby
<Rinzlit>
Yeah, I'm a bad systems administrator...
Philipp_ has quit [Ping timeout: 246 seconds]
<Ox0dea>
You... thought $ was part of the command.
<Fluent>
I root for days
Philipp_ has joined #ruby
<Rinzlit>
Ox0dea he said the whole command, I was pretty sure $ was just there to be annoying
<adaedra>
If it's just for deployment, better get ruby-install for that
<Rinzlit>
I just need this thing up and running in 8 hours...
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Rinzlit>
ah ha ha....
wpp has joined #ruby
bmurt has quit []
Igorshp has joined #ruby
<Fluent>
That sounds dirty
schaerli has joined #ruby
<Rinzlit>
eh... yeah... I should be less lazy
<ruby-lang285>
AH
Philipp_ has quit [Read error: Connection reset by peer]
<adaedra>
8 hours?
<adaedra>
that's more than needed
<Rinzlit>
great...
<Rinzlit>
because its 4AM and I haven't slept in like 24 hours
<adaedra>
oh
<Rinzlit>
Should I wipe the system?
codenihal has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Fluent>
Sure
<adaedra>
not needed, Rinzlit
<Fluent>
Sounds logical
<Fluent>
lol
<Rinzlit>
Okay, Fluent its instant resets
<Rinzlit>
Its wonderful these servers man
<Rinzlit>
and almost every OS too
<Rinzlit>
adaedra are there any OS's that would make this easier?
<adaedra>
Rinzlit: if you want to do it from scratch, you can, but it's not needed
<Fluent>
Cool
pandaant has joined #ruby
tjbiddle has quit [Quit: tjbiddle]
endash has left #ruby [#ruby]
<adaedra>
Rinzlit: It's possible to make it work on your current OS. I think you chose it for a reason?
webguynow has quit [Ping timeout: 240 seconds]
webguynow has joined #ruby
Xzanron has joined #ruby
<Rinzlit>
uhmmm because my dad always uses centos
scripore has joined #ruby
<adaedra>
:)
<Rinzlit>
all linux is the same to me since I don't use them that often
jeramyRR has joined #ruby
<Rinzlit>
but he is a IT guy of 40 years...
<Rinzlit>
I'm sure he has some amazing reasons
<Fluent>
an IT guy *
<adaedra>
there may be a more recent ruby on another system, but it has also other implications
<Fluent>
I doubt he has amazing reasons
<Fluent>
Probably just preference
<adaedra>
We all do
<adaedra>
but it could be a corporate requirement or something
Papierkorb has quit [Quit: ArchLinux completes an endless loop faster than any other distro!]
ledestin has quit [Read error: Connection reset by peer]
<Rinzlit>
The guys I work with are like kids lol....
<Fluent>
Sounds like me
<Rinzlit>
they think stuff like this is black magic...
<Ox0dea>
Sounds like "\u2649\u{1f4a9}".
iateadonut has joined #ruby
<Rinzlit>
Okay so adaedra someone referenced in one of the guides a ruby installer script
<Rinzlit>
to make life easier do I want that one?
<Rinzlit>
or should I just go and install it the normal way for once?
iateadonut has quit [Client Quit]
<adaedra>
I don't have my crystal ball, I can't see what you're talking about
tkuchiki has quit [Remote host closed the connection]
<[k->
the if block is an expression...
fgo_ has quit [Ping timeout: 260 seconds]
<sonOfRa>
Ox0dea: so the yield statement needs to be the last thing that happens in #connect in order for it to be implicit?
oo_ has joined #ruby
tvw has joined #ruby
<adaedra>
Rinzlit: eep, don't pm without asking first
<Rinzlit>
adaedra: sorry didn't know that was like bad...
<[k->
the explicit return is needed because it was in a loop
<[k->
or else the value gets lost in the next iteration
arup_r has quit [Remote host closed the connection]
<Rinzlit>
adaedra: is it okay if I continue to pm you?
<sonOfRa>
ah, yes.
<Ox0dea>
Rinzlit: First day on IRC?
<adaedra>
Rinzlit: short story, because my lunch time comes soon: you can use it to install a newer version of ruby in a custom place. Look at the readme, it has lot of examples. Then you can use this ruby (use chruby or change your path manually for that) to do the install of catarse.
<Rinzlit>
Ox0dea: last time I was on an IRC was when I was into all those alternative cryptocoins
<Ox0dea>
But you're a sysadmin...
<adaedra>
There are a lot of people in here that can help you, don't push it to pm
<Ox0dea>
Aren't sysadmins legally required to frequent IRC?
<Rinzlit>
Ox0dea I got the job, because I did the companies website, and I'm cheap
<[k->
dun dun dun
<Rinzlit>
I get paid 10$ an hour....
bruno- has quit [Ping timeout: 244 seconds]
davedev24 has joined #ruby
allcentury has joined #ruby
oo_ has quit [Remote host closed the connection]
jeramyRR has quit [Quit: Peace out!]
eGGsha has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<adaedra>
Don't you have colleagues that can help you?
<Rinzlit>
nope, im the only guy there besides the other offsite IT guy...
bmurt has joined #ruby
bmurt has quit [Client Quit]
CaryInVictoria has joined #ruby
<Rinzlit>
And he doesn't like me since they want me to replace him
<Rinzlit>
And he works with some other company too
<[k->
but you can't replace him...
<Ox0dea>
Ouch.
<[k->
better go on a course!
<Rinzlit>
I just turned 18 like 11 days ago...but I think I'll be alright...
<Rinzlit>
Since I also help with their marketing too
<Ox0dea>
/r/nottheonion: Barely legal sysadmin fails to properly install Ruby.
hahuang65 has joined #ruby
<adaedra>
Ox0dea: that's mean
Igorshp has quit [Remote host closed the connection]
<Rinzlit>
ah ha ha.... xD
<Ox0dea>
^_^ <3
<Rinzlit>
I installed an older version of ruby... at least...
<adaedra>
The system provided one
<Rinzlit>
And its only because this is also on a server
snophey has joined #ruby
<Rinzlit>
No I used the bitnami one xD
<adaedra>
ah
<Rinzlit>
Which is just as bad ah ha ha
sameerynho has quit [Quit: Leaving]
<adaedra>
so, let me summarize
fabrice31 has quit [Remote host closed the connection]
ldnunes has joined #ruby
<adaedra>
A junior sysadmin, a server, a ruby project, and 8 hours to have it working
Seich has quit [Ping timeout: 244 seconds]
<Rinzlit>
ah ha ha... xD.....
<Ox0dea>
s/ju/se/
CaryInVictoria has quit [Ping timeout: 256 seconds]
RobertBirnie has joined #ruby
<Rinzlit>
well its not the company i work for that wanted it done...
<Rinzlit>
I have a friend who thinks I'm a magician with computers
<adaedra>
o_O
<Rinzlit>
and he talked to another company, and they wanted a website done in 48 hours
RobertBirnie has quit [Read error: Connection reset by peer]
<Rinzlit>
and my best idea was use an open source template for it
<Rinzlit>
An of course 2/3 haven't worked properly or were really bad
<Rinzlit>
And this last one is kinda my lost hope...
RobertBirnie has joined #ruby
<Rinzlit>
So I'm trying to get this ruby website script going...
<[k->
I can ctrl-a and the screens turns blue!
<[k->
I'm a magician!
<Rinzlit>
lol... you could impress him by turning the screen....
<Ox0dea>
Manually?
yfeldblum has quit [Ping timeout: 244 seconds]
<Rinzlit>
even manually...
schaerli has quit [Remote host closed the connection]
<mikecmpbll>
i've implemented a thread pool in part of my code and I want to write tests for it; so if i queue up 20 jobs with a thread pool of 10 i should really be testing that there's no more than 10 threads i guess? but i don't really know where to start with that
<Rinzlit>
of course they offered me like 500$ for the website, so I leaped at the chance to get some money xD....
<mikecmpbll>
nvm i'm being an idiot
<adaedra>
USD 500 for a website?
<Rinzlit>
Yeah o-o
<adaedra>
I don't know well the marked, but that seems cheap
<adaedra>
market*
<Rinzlit>
well I kinda dropped out of high school ah ha ha...
eGGsha has joined #ruby
<Rinzlit>
and I'm kinda a nobody so....
<adaedra>
well, it's not difficult to learn
<adaedra>
there are plenty of resources on the interwebz
<adaedra>
but better start low
<Rinzlit>
yeah, but I also have to make money to...
<Rinzlit>
like I do a lot of editing of code...
<Rinzlit>
just not any coding my self
failshell has joined #ruby
<Rinzlit>
Anyway I need to get this stuff done I'm sooo tired Q_Q
codenihal has joined #ruby
Seich has joined #ruby
<mikecmpbll>
lol
codenihal has quit [Client Quit]
nofxx has quit [Ping timeout: 240 seconds]
schaerli has joined #ruby
RegulationD has joined #ruby
<adaedra>
anyway, it's time to eat something
<adaedra>
glhf
<Rinzlit>
thank you for the help
<Rinzlit>
I'll probably be here when you get back xD
failshell has quit [Ping timeout: 265 seconds]
<[k->
I thought adaedra was going to miss lunch :o
<Rinzlit>
brb im grabbing a protien drink...
senayar has quit [Remote host closed the connection]
<mikecmpbll>
yeah, better get that protein in your for a coding session
senayar has joined #ruby
<[k->
it's a drink too!
<Rinzlit>
yes... work on that finger strength...
<Rinzlit>
nah i drink them because im fat and there is only 1 gram of sugar
<Rinzlit>
and its 160 calories
<mikecmpbll>
160 calories ...
<mikecmpbll>
is quite a lot for a drink
<[k->
drink water
<mikecmpbll>
if you're fat probably drink something with 0 calories
<Rinzlit>
I drink about 3 of them for meals a day
<Rinzlit>
So about 480 calories
<Rinzlit>
And then I drink water all day .-.
symm- has quit [Ping timeout: 244 seconds]
<mikecmpbll>
k. sounds healthy
lessless has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Rinzlit>
It's alright, its for meal replacement maybe it will work .-.
<Rinzlit>
anyway need to get this done >.<
<[k->
the meal doesn't like the drink because Rinzlit wants the drink to replace him
<mikecmpbll>
:D
<[k->
and the meal is working for another person too
<Rinzlit>
O_o... What...?
<[k->
XD
<mikecmpbll>
lol
<Rinzlit>
I don't think I'm that tired...
<[k->
repeating what you said earlier
<Rinzlit>
uhmmm okay...
<Rinzlit>
I'm like really tired, and like half brain dead after working the last 20 hours...
<[k->
there besides the other offsite IT guy...
<[k->
[19:53:21] <Rinzlit> And he doesn't like me since they want me to replace him
<[k->
[19:53:36] <Rinzlit> And he works with
<[k->
:( it got cut off
<Rinzlit>
Another company
<Rinzlit>
Oh, lol xD
<[k->
the same with the meal!
<mikecmpbll>
a joke loses something when it has to be explained to the very last letter, dontcha think?
<Rinzlit>
yeah, and at some point I'd like to be able to do my job properly...
<[k->
motivation is a key to success!
<Rinzlit>
Maybe 1 of those 3 things will happen xD
<mikecmpbll>
and protein
esantiago has joined #ruby
<[k->
I look like a propaganda spreader, with all those !
esantiago has left #ruby [#ruby]
<Rinzlit>
It's okay spamassasin wouldn't flag you
<Ox0dea>
Rinzlit: There are two asses in assassin.
<mikecmpbll>
:D
<Rinzlit>
Yeah, I should work on my spelling along with learning to program,
<Rinzlit>
and my grammar
<Ox0dea>
And your axe.
<Rinzlit>
I had a math professor point out how bad my grammar is
<mikecmpbll>
maybe he meant your algebraic grammar
<Rinzlit>
no I was doing the support emails till that happened
<[k->
if your math professor pointed it out, you are really bad
<Rinzlit>
he said they should go hire some Americans
<Rinzlit>
lol... I was born in New York....
iateadonut has joined #ruby
Trynemjoel has quit [Max SendQ exceeded]
Tempesta has joined #ruby
benlovell has joined #ruby
schaerli has quit [Remote host closed the connection]
<Rinzlit>
if this template wasn't so nice looking, I'd go find a different one...
<[k->
oops
Trynemjoel has joined #ruby
[k-_ has joined #ruby
<Rinzlit>
Oh, and [k- I can't afford college xD
<Rinzlit>
I work with guys who sell stuff to teachers
Trynemjoel has quit [Max SendQ exceeded]
DoubleMalt has quit [Remote host closed the connection]
<yorickpeterse>
You mean like drugs?
<[k-_>
:(
<Rinzlit>
ah ha ha, almost as good profit margins
DoubleMalt has joined #ruby
<Rinzlit>
They sell insurance
<[k-_>
i feel sad and emphathetic now
arup_r has joined #ruby
<Rinzlit>
Its okay [k- at least I have a job as a systems admin
Trynemjoel has joined #ruby
<Rinzlit>
I can use it as experience to get a real job at some point
* mikecmpbll
ponders what's unreal about systems adminning
<Rinzlit>
hopefuly I can teach my self how to do the stuff I need xD
slawrence00 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
_blizzy_ has quit [Read error: Connection reset by peer]
<Rinzlit>
ERROR: Could not find 'which' command, make sure it's available first before con tinuing installation.
<Rinzlit>
I had used "curl -L get.rvm.io | bash -s stable"
fabrice31 has quit [Remote host closed the connection]
<yorickpeterse>
lol RVM
<yorickpeterse>
lol rbenv
dseitz has joined #ruby
<yorickpeterse>
Seriously, chruby > everything
<shevy>
funny that 'which' would be required
<shevy>
and that it was not available too
<Rinzlit>
...brb bathroom...
despai has quit [Quit: This computer has gone to sleep]
christiandsg has joined #ruby
_blizzy_ has joined #ruby
<esantiago>
shevy, yes it is...
sankaber has joined #ruby
<shevy>
:)
<Rinzlit>
Okay, back.
<esantiago>
shevy, actually is very weird
<Rinzlit>
Okay, louder music, and time to look into chruby.
ggerman has joined #ruby
dimasg has joined #ruby
<esantiago>
LOL
<shevy>
I hope that the music helps
n1lo has left #ruby [#ruby]
<Rinzlit>
Eh, its hollywood undead
<Rinzlit>
#tooedgy
<ggerman>
hello anybody try with ruby in docker? I have this problem: ERROR: Loading command: install (LoadError)
<shevy>
you would make yorickpeterse very happy if you succeed with chruby
<ggerman>
cannot load such file -- zlib
<ggerman>
ERROR: While executing gem ... (NoMethodError)
<ggerman>
undefined method `invoke_with_build_args' for nil:NilClass
galeido has quit [Ping timeout: 264 seconds]
<shevy>
ggerman sounds as if you do not have zlib installed. are you on a debian based system?
<yorickpeterse>
ggerman: you need to have zlib installed when compiling RUby
<yorickpeterse>
* Ruby
<ggerman>
yes debian / jessi
<shevy>
yeah. several ways to fix it. I usually recompile zlib :) in your case you may have to get the dev package for zlib... not sure how it is called on debian
CaryInVictoria has joined #ruby
<Rinzlit>
[k- is it okay to private message you?
<shevy>
perhaps the name is zlib1g-dev BUT I am not sure
stardiviner has quit [Quit: Weird in coding now, or make love, only two things push me away from IRC.]
prefixed has joined #ruby
<ggerman>
i try with this apt-get install zlib1g zlib1g-dev; but dosn't work
msgodf has joined #ruby
despai has joined #ruby
dimasg has quit [Ping timeout: 240 seconds]
Kully3xf has joined #ruby
<ggerman>
let try compiling zlib manually
bmurt has joined #ruby
<shevy>
yeah not sure what convention debian follows. perhaps it is logical, I never found out. you need to find out what your current zlib is
<shevy>
and then find the corresponding -dev component
<shevy>
ggerman hmm in principle, you would not need to have to recompile ruby, the ext/openssl should suffice. however don't quote me 100% on it, in particular with ext/openssl I have had problems in the past, so I also ended up recompiling
<esantiago>
pontiki, nice
mhib has joined #ruby
gamename has joined #ruby
TOAA has quit [Ping timeout: 264 seconds]
[H]unt3r has joined #ruby
mbeasley_ has joined #ruby
mbeasley_ has quit [Client Quit]
TOAA has joined #ruby
jerius has joined #ruby
DEA7TH has quit [Quit: DEA7TH]
bronson has quit [Ping timeout: 252 seconds]
hahuang65 has quit [Ping timeout: 246 seconds]
gamename has quit [Remote host closed the connection]
bahar has joined #ruby
Papierkorb has joined #ruby
gamename has joined #ruby
gamename has quit [Remote host closed the connection]
gamename has joined #ruby
bungoman has joined #ruby
lannonbr has joined #ruby
<ggerman>
working !!!
<ggerman>
but if i'm not compile ruby again after install libssl-dev dosn't work
riotjones has quit [Remote host closed the connection]
sevenseacat has joined #ruby
paulcsmith has joined #ruby
DEA7TH has joined #ruby
<shevy>
ggerman ext/openssl should suffice
<shevy>
the parts there recompiling would take ~20 seconds
malconis has joined #ruby
Feyn has quit [Ping timeout: 260 seconds]
<Rinzlit>
So I finally got ruby 2.2.1 and now it can't find gemfile?
AlexAltea has joined #ruby
<adaedra>
what did you do
<Rinzlit>
"bundle install"
<Rinzlit>
I'm install gem now .-.
<Rinzlit>
-prays that it will fix it-
<pontiki>
did you install the bundler gem for your new ruby?
<Rinzlit>
I don't know what that is
<pontiki>
it is what lets you run "bundle install"
<Rinzlit>
Don't run Bundler as root. Bundler can ask for sudo if it is needed, and installing
<Rinzlit>
your bundle as root will break this application for all non-root users on this
<Rinzlit>
machine.
<Rinzlit>
Could not locate Gemfile or .bundle/ directory
<Rinzlit>
Wops went over 3 lines >.<
<adaedra>
Are you in the right directory?
<Rinzlit>
I am in the root
<jhass>
and why do you run it as root?
a346 has joined #ruby
<adaedra>
Also, what the f*ck are you doing as root.
<Rinzlit>
If I don't run it as root it completely ignores my command
dhjondoh has quit [Remote host closed the connection]
<jhass>
?root
<ruboto>
General advise in system administration: do not and that means never use sudo or root to "fix" things. Only use it if you exactly know why it would work and why it wouldn't work under any circumstances as normal user. Or if you're told to do it.
<adaedra>
Rinzlit: You need to run these commands from the project root directory, as the user that will run the software.
<jhass>
and "the root" is ambiguous, could mean /, could mean the root of the project you want to install, ...
<esantiago>
you need to be in the same directory which have the Gemfile
dblessin_ has joined #ruby
<Rinzlit>
Where are the gemfiles on ubuntu...?
CaryInVictoria has quit [Remote host closed the connection]
<adaedra>
The gemfile is in the thing you're trying to install
<Rinzlit>
I did apt-get install gem
<Rinzlit>
And it just automatically did it for me...
<esantiago>
did you install bundle?
<esantiago>
gem install bundler
eggoez has quit [Ping timeout: 252 seconds]
<adaedra>
Ah, he reset his system finally?
<Rinzlit>
Yes, I am on ubuntu now
<Rinzlit>
But wait this worked on Centos
<Rinzlit>
adaedra you said I needed to follow the order in the readme, and It worked fine if I didn't follow it o-o
serivich has joined #ruby
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dopie has joined #ruby
<adaedra>
wat
greydog has quit [Ping timeout: 252 seconds]
acl_ has joined #ruby
<Rinzlit>
Didn't you tell me to follow the instructions
<Rinzlit>
and not rephrase the commands
<Rinzlit>
RAKE WORKS NOW :D :D :D
<Rinzlit>
OMG!
<pontiki>
did any of these instructions say to use apt-get?
<Rinzlit>
Nope
<pontiki>
but you are
<Rinzlit>
I never follow instructions properly
<pontiki>
ah, good to know
fgo_ has joined #ruby
Xzanron has quit [Ping timeout: 240 seconds]
<Rinzlit>
Yeah, I'm not good at being patient and not trying everything
JoshL has joined #ruby
<pontiki>
it helps me to weed out the people whom i can properly help
<Rinzlit>
Fair enough, I usually figure things out eventually xD
<Rinzlit>
Although adaedra and esantiago helped a lot
despai has quit [Quit: This computer has gone to sleep]
Iskarlar has joined #ruby
<adaedra>
ok
<Rinzlit>
Thank you both ^^
<adaedra>
it's better when you understand what you do though
allomov has quit [Remote host closed the connection]
<Rinzlit>
I'll do that once I have slept and care more about keeping the server working xD
<Rinzlit>
I just need it for a display for like 30 mins xD
rubycoder02 has joined #ruby
<Rinzlit>
and then I got to the part for why I had bitnami >.< ah ha ha
<Rinzlit>
esantiago, I can't sleep till I get the server up then white label it for the company xD
yqt has quit [Ping timeout: 252 seconds]
marr has joined #ruby
<Rinzlit>
I got 5 hours left
freerobby has joined #ruby
sankaber has quit [Read error: Connection reset by peer]
ruby-lang934 has joined #ruby
despai has joined #ruby
<howdoi_>
pry.debugger vs binding.pry ?
bruno- has joined #ruby
<ruby-lang934>
hii
<ruby-lang934>
any rubby programmer there?
sankaber has joined #ruby
<ruby-lang934>
any rubby programmer there?
<pontiki>
i don't know where you are, can't tell
xcesariox has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<ruby-lang934>
xD
senayar has quit [Remote host closed the connection]
arup_r has quit [Remote host closed the connection]
senayar has joined #ruby
<pontiki>
howdoi_: binding.pry afaik; i've never seen the other
ruby128 has joined #ruby
<ruby128>
hi
<ruby-lang934>
hi
<howdoi_>
pontiki: hmm
<adaedra>
?anyone
<ruboto>
Just ask your question, if anyone has or can, they will respond.
duggiefresh has joined #ruby
Igorshp has quit [Remote host closed the connection]
loc22 has joined #ruby
jbw_ has joined #ruby
<ruby-lang934>
Hi, I started programming with ruby a few weeks ago, now I manage the basics but i dont know how to expand my knowledge about ruby, i cant find any course or something, could you give me some advise to carry on learning ruby?
<Rinzlit>
And I'd love for you to teach me stuff like this tomorrow if possible xD
jbw_ has joined #ruby
<Rinzlit>
Maybe you could let some little things slide for now?
flughafen has quit [Ping timeout: 244 seconds]
<Rinzlit>
Or is that actually a real problem?
<adaedra>
no
<jhass>
not really, no
<adaedra>
yes
willywos has joined #ruby
<Rinzlit>
Okay I'll login into none root
<Rinzlit>
So now I need to refile everything under the home directory?
fdjrt has quit [Ping timeout: 246 seconds]
casadei_ has quit [Ping timeout: 240 seconds]
<jhass>
probably
<ruby-lang934>
Is it posible to make GUI's with ruby?
<Rinzlit>
Okay, I'll get right on that
<jhass>
ruby-lang934: yes
<crowell>
ruby-lang934: yes, there are bindings for several toolkits
<Rinzlit>
Will I need to reinstall things?
<jhass>
possibly
freerobby has quit [Quit: Leaving.]
<ruby-lang934>
i don't get the gems at all
jbw__ has quit [Ping timeout: 246 seconds]
<jhass>
ruby-lang934: gems are just libraries for Ruby
<jhass>
Rails is packaged as a bunch of gems for example
freerobby has joined #ruby
<ruby-lang934>
okei
<ruby-lang934>
so ruby on rails is no more than a bunch of gems?
<ruby-lang934>
isn't it?
<ruby-lang934>
ah
<ruby-lang934>
yeah
<adaedra>
yes
troulouliou_div2 has quit [Remote host closed the connection]
mengu has joined #ruby
<adaedra>
actually, it's a gem itself (rails), which depends on many other
Xzanron has joined #ruby
scripore has quit [Quit: This computer has gone to sleep]
<ruby-lang934>
I have just downloaded koans
<ruby-lang934>
i'll do all the exercises during this week
fabrice31 has joined #ruby
<jhass>
cool
<adaedra>
you'll be a ruby pro
ironsay has quit [Ping timeout: 240 seconds]
<ruby-lang934>
xD SUREe
<[k-_>
unlike me who did not read koans :(
<ruby-lang934>
what could i do after koans?
quimrstorres has quit [Remote host closed the connection]
<[k-_>
very powerful stuff
DoubleMalt has quit [Remote host closed the connection]
<pontiki>
write code
slawrence00 has joined #ruby
<ruby-lang934>
thats nice
<ruby-lang934>
does koans also teach GUI's ?
despai has quit [Quit: This computer has gone to sleep]
<pontiki>
sign up with project euler and exercism.io
<TheBrayn>
I don't think that project euler is particulary great for gaining ruby experience
<pontiki>
not especially
<pontiki>
but it's coding
<workmad3>
codewars seems reasonable from what I've seen
<ta>
I'm using CSV.read with throws `"\xE6" on US-ASCII` - offending text seems to be `...,o0xHAi,...` - which is just an id... how can I get CSV.read to just treat as text ?
<ta>
which even
<jhass>
codewars has more things to churn through, exercism.io focuses better on the reviews
andikr has quit [Remote host closed the connection]
anjen has joined #ruby
<workmad3>
ta: 'just treat as text' <-- what encoding?
<ta>
workmad3: `file -i` says us-ascii
<jhass>
ta: sounds like you need to patch up you system locale to actually match your files
<Rinzlit>
Why am I trying to do things as not root...
<Rinzlit>
I can't install stuff or use what I need...
<jhass>
?root Rinzlit
<ruboto>
Rinzlit, General advise in system administration: do not and that means never use sudo or root to "fix" things. Only use it if you exactly know why it would work and why it wouldn't work under any circumstances as normal user. Or if you're told to do it.
<jhass>
Rinzlit: you know sudo?
Vile` has quit [Ping timeout: 252 seconds]
<apeiros>
shouldn't that be "advice"?
<jhass>
probably, fix it
<Rinzlit>
I wish my root password wasn't impossibly long...
CaryInVictoria has quit [Ping timeout: 252 seconds]
<workmad3>
Rinzlit: root gives you no safety net... doing stuff as root when you don't actually know what you're doing or why == tightrope walking over a pit of spikes whilst drunk and blindfolded
<Rinzlit>
workmad3 but im fine with that this is a tossaway server
<jhass>
long password is good, gives you chance to think about what you're doing as root there again
<Rinzlit>
I'll format it once I get what I want going
hahuang65 has quit [Ping timeout: 244 seconds]
<Rinzlit>
and reinstall it correctly on the other one
Vile` has joined #ruby
<jhass>
why not learn to do it correctly in the first place?
<jhass>
reduces number of iterations
ndrei has joined #ruby
<adaedra>
yeah
<adaedra>
could me you get to bed earlier
<adaedra>
mean*
<ruby-lang934>
jhass
<Rinzlit>
....I don't know how to use the sudo command... -facepalm-
tjohnson has joined #ruby
hashrocket has joined #ruby
<jhass>
man sudo
fabrice31_ has joined #ruby
fabrice31 has quit [Read error: Connection reset by peer]
<Rinzlit>
It wants my password
<jhass>
yes
<Rinzlit>
just to tell me I can't use it
<ruby-lang934>
have you programmed anything interesting recently i would be glad to see your projects
<Rinzlit>
It asks for user password not admin password
<ruby-lang934>
it seems like you're such a programmer
<jhass>
yes
<adaedra>
man sudo
ruurd has quit [Quit: ZZZzzz…]
<jhass>
ruby-lang934: guess my github nick
<adaedra>
that's like sysadmin 101
<pontiki>
this is just depressing me
allomov has joined #ruby
pontiki has left #ruby [""Poets have been mysteriously silent on the subject of cheese" -- G.K.Chesterson"]
<ruby-lang934>
what is it ?
<Rinzlit>
pontiki, I'm about to just give up and call it a day tbh...
<ruby-lang934>
jhass
krz has quit [Quit: WeeChat 1.2]
<jhass>
ruby-lang934: github? oO
despai has quit [Ping timeout: 246 seconds]
<ruby-lang934>
no i mean your user name
despai has joined #ruby
<ruby-lang934>
i think ive just found you xD
tkuchiki has joined #ruby
<jhass>
yeah, you didn't even try to guess if you ask that
krz has joined #ruby
fullofcaffeine has joined #ruby
jerius has quit [Quit: /part]
hahuang65 has joined #ruby
<ruby-lang934>
in which languages do you programm
<adaedra>
damn, those people who use the same nick everywhere
<jhass>
ruby-lang934: the ones you find on my github
<ruby-lang934>
do you work on programming?
<jhass>
still finishing up studies :/
symbol is now known as lobmys
jerius has joined #ruby
<ruby-lang934>
nice
Averna has quit [Quit: Leaving.]
havenwood has joined #ruby
ruby-lang934 has quit [Quit: Page closed]
schaerli has quit [Remote host closed the connection]
MissionCritical has quit [Ping timeout: 246 seconds]
schaerli has joined #ruby
fabrice31_ has quit [Remote host closed the connection]
riotjones has joined #ruby
pengin has joined #ruby
mengu has quit [Remote host closed the connection]
despai has quit [Quit: This computer has gone to sleep]
<Rinzlit>
Well...
<Rinzlit>
I am going to look for a different one
bohallor has joined #ruby
scripore has joined #ruby
sp1rs has quit [Ping timeout: 240 seconds]
Tritone has quit [Remote host closed the connection]
ruby128 has quit [Ping timeout: 246 seconds]
ItSANgo has quit [Quit: Leaving...]
sarkyniin has quit [Ping timeout: 244 seconds]
flughafen has joined #ruby
montyboy_ has joined #ruby
rikkipitt has joined #ruby
riotjones has quit [Ping timeout: 256 seconds]
<shevy>
never give up!
hornairs has joined #ruby
<Rinzlit>
Nah, I really need to get this website done in the next 4 hours
<Rinzlit>
I can't spend anymore time "trying" to get that one working
<[k-_>
all this for a script :/
<Rinzlit>
I need some sort of script like that one .-.
kb3ien has joined #ruby
<kb3ien>
Why does searchquery = searchquery.gsub('%28','(').gsub('%3A',':').gsub('%29',')').gsub('%23',',')
fabrice31 has joined #ruby
<kb3ien>
only change the FIRST instance of '%28' to "(" not all ?
<Rinzlit>
Any chance I could pay someone to set it up for me .-.
psy_ has joined #ruby
<Rinzlit>
Turns out I already tried every other script...
Violentr has quit [Ping timeout: 265 seconds]
schaerli has quit [Remote host closed the connection]
despai has joined #ruby
<sevenseacat>
o.O
<sevenseacat>
ooh, script kiddies having fun?
pengin has quit [Remote host closed the connection]
despai has quit [Client Quit]
<kb3ien>
I thought gsub was intended to swap all occurances.
DoubleMalt has joined #ruby
<sevenseacat>
kb3ien: code, input and expected output?
sharpmachine has joined #ruby
chouhoulis has joined #ruby
mary5030 has joined #ruby
bumbar_ has joined #ruby
<bumbar_>
what do ? and = at the end of methods means?
schaerli has joined #ruby
<yorickpeterse>
? is a predicate method, they often return booleans
<yorickpeterse>
= is used for setter methods
<sevenseacat>
they're part of the method name.
<bumbar_>
kind of like overloading?
<sevenseacat>
no.
<kb3ien>
hahaha never mind the guy before more didn't seem to know his ascii very well, or i totally missed the point of his code.
despai has joined #ruby
<yorickpeterse>
bumbar_: "?" can just be part of the name if it comes at the end
<yorickpeterse>
"=" comes with some syntax sugar
<esantiago>
Rinzlit, oh no, when you did your ruby configuration you were root
<yorickpeterse>
that is, foo.bar = 10 is basically foo.bar=(10)
<bumbar_>
so i have an object and would like to get methods that have disable in their names. i've tried: (u.methods - Object.methods).index{|s| s.include?("disable")} but doesn't work
tvw has quit [Remote host closed the connection]
<sevenseacat>
why index? why not select?
<sevenseacat>
index will not do what you want
jerius has joined #ruby
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Rinzlit>
esantiago, let me figure out how to setup accounts...
aryaching has joined #ruby
<bumbar_>
sevenseacat, first time i'm using ruby, was just look at 1st SO answer :P
<sevenseacat>
well that was your first mistake
nateberkopec has joined #ruby
imperator has left #ruby ["Leaving"]
Iskarlar has joined #ruby
scpike has joined #ruby
fabrice31 has quit [Remote host closed the connection]
werelivinginthef has quit [Remote host closed the connection]
hahuang65 has quit [Ping timeout: 244 seconds]
<Rinzlit>
I use one of jhass's commands
chipotle has joined #ruby
<Rinzlit>
Suddenly everything works
<Rinzlit>
I don't fking even
msgodf has quit [Ping timeout: 240 seconds]
desigx has joined #ruby
Xzanron has quit [Read error: Connection reset by peer]
<adaedra>
Rinzlit: once this is done, you'll get some sleep, then read a guide on basic linux administration, right?
<Rinzlit>
Yeah, well once this is done I've got to go set it up the way these guys want it
<Rinzlit>
Then I'm passing out
<olas>
ljarvis: my god as i wrote it out i realized that the code for the range and normal indexing into my data structure looked exactly the same haha
chipotle has quit [Client Quit]
<olas>
i just wasn't think of the a..b range as a range object
<Rinzlit>
Where is there even a guide on basic linux administration?
<adaedra>
Google can find you that.
araujo has quit [Quit: Leaving]
jessu has joined #ruby
<Rinzlit>
$ source ~/.bash_profile
<Rinzlit>
-sh: 51: source: not found
<adaedra>
-sh
<Rinzlit>
Whats that mean?
<adaedra>
it means you're not using bash
<Rinzlit>
How do I use bash?
rubie has joined #ruby
quimrstorres has joined #ruby
bruno- has quit [Ping timeout: 255 seconds]
werelivinginthef has joined #ruby
<ljarvis>
olas: :)
livathinos has quit []
dgutierrez1287 has quit [Ping timeout: 264 seconds]
hobodave has joined #ruby
<havenwood>
Rinzlit: Check your current shell: echo $SHELL
thang has quit [Ping timeout: 255 seconds]
coffeejunk has quit [Ping timeout: 255 seconds]
Igorshp has joined #ruby
<jhass>
Rinzlit: chsh /bin/bash
desigx has quit [Ping timeout: 250 seconds]
<Rinzlit>
I had typed in bash and it started working
<Rinzlit>
Is that bad?
<jhass>
ah no, chsh -s /bin/bash
thang has joined #ruby
<jhass>
no
<jhass>
just tedious to do everytime you login
<jhass>
chsh changes your login shell
<Rinzlit>
oh okay
<Rinzlit>
1 sec closing my window
<havenwood>
Rinzlit: Type `bash` to use bash. See: man bash
tkuchiki has quit [Remote host closed the connection]
<jhass>
then rerun gem install bundler and the command
aryaching has quit [Read error: Connection reset by peer]
seansith has joined #ruby
eminencehc has joined #ruby
<Arnold_>
I update it with the output
<Rinzlit>
jhas I had version 2.2.1 like 20 mins ago
jhack has joined #ruby
Ilyas has joined #ruby
senayar has quit [Remote host closed the connection]
dimasg has quit [Ping timeout: 244 seconds]
jpfuentes2 has joined #ruby
Silex has joined #ruby
<cndiv>
Hey #ruby, quick question. I'm about to learn, and I'm about to read "The Well-Grounded Rubyist" by David Black. My edition covers 1.9.1, and was published in 2009. This is a very serious thing for me, do I need to replace the book with the new one?
senayar has joined #ruby
<jhass>
Arnold_: that's not possible, a hash can only have one value for a particular key
ruurd has quit [Quit: ZZZzzz…]
<jhass>
cndiv: 2009 is getting a bit too old, yeah
ruurd has joined #ruby
Channel6 has quit [Quit: Leaving]
<jhass>
the basics are the same but there are some new things you want to pick up
<cndiv>
jhass: I don't want to "un" or "re-" learn something in the end.
<jhass>
it is mostly new things, but still
<cndiv>
jhass: Right now learning is about to become the most important thing I'm doing. Can't have that. Do you know that book? Or anyone?
<jhass>
I don't
<cndiv>
I tried using codeacademy and learned it's style was the biggest problem.
snockerton has quit [Quit: Leaving.]
<Arnold_>
thats not exactly my problem. the problem is that I want the value to be: ["key": "value" ] and not ["key: value"]
tmtwd has joined #ruby
<Rinzlit>
E: Sub-process /usr/bin/dpkg returned an error code (1)
<Arnold_>
when i call to_h on ["key:value"] it sends me an error called no to_h for string
kawaii-imouto has quit [Quit: fix config]
<Ox0dea>
Rinzlit: Damn, dude. I hope you've got coffee.
<Ox0dea>
Or whatever stimulant takes your fancy.
<jhass>
Arnold_: let me rewrite what you just wrote in canonical syntax: [{:"key" => "value"}], are you sure about that?
<Rinzlit>
Ox0dea I don't do anything like that
<jhass>
also sure this isn't just a huge XY problem?
<Rinzlit>
I simply live off protien drinks, and water
<Rinzlit>
Lots of water.
<Ox0dea>
Yes, you've said as much.
<Arnold_>
<jhass> thats what i would like
<cndiv>
Does anyone have a strong opinion on book, then? Ruby the hard way is the other option.
aryaching has joined #ruby
<Rinzlit>
Yeah, I don't drink or eat anything else xD
kawaii-imouto has joined #ruby
<jhass>
Arnold_: I'm asking because it's a very odd datastructure
PaulCape_ has joined #ruby
<Ox0dea>
cndiv: The Well-Grounded Rubyist.
mdcox has joined #ruby
shevy has quit [Ping timeout: 252 seconds]
<cndiv>
Ox0dea: That's what I'm considering. I like it but I have the old version. You recommend that one, did you use it? Do this professionally now?
<Arnold_>
i see what you mean. this is more like what I need [{"key" => "value"}]
ddarkpassenger has joined #ruby
<jhass>
cndiv: well, LRTHW's style is worse than codeacademy's ;D
<Rinzlit>
I'll pay someone to get rubby running on my server properly...
Yiota has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<cndiv>
jhass: Sorry, who's LRTHW?
<jhass>
learn ruby the hard way
cpruitt has joined #ruby
<Ox0dea>
cndiv: I did read TWGR when I was learning Ruby, and I do write code for a living, but not Ruby. :/
marcoamo1 has quit [Ping timeout: 240 seconds]
snockerton has joined #ruby
<cndiv>
Ox0dea: OK, that means a lot. Thank you.
<Ox0dea>
Rinzlit: Isn't that the "black magic" approach which you so adamantly scorned not long ago?
<Ox0dea>
cndiv: It's a very good book.
<cndiv>
jhass: Great, that's wonderful to hear. For years that's what I've struggled with.
<Rinzlit>
I said that whats my friend calls it
<Arnold_>
I'm currently reading eloquent ruby
shevy has joined #ruby
<Rinzlit>
And since I have multiple servers
PaulCapestany has quit [Ping timeout: 255 seconds]
<Rinzlit>
I only need one to work
<cndiv>
Arnold_: Is that your first book?
<Arnold_>
is it worth it to also read twgr
<Ox0dea>
Rinzlit: "Just make it work" is really the first ingredient of black magic.
<havenwood>
over 9000 today...?
bronson has joined #ruby
<Rinzlit>
Ah ha ha, yeah but I'm having no luck with ruby for some reason
<Arnold_>
i read AWD 4 and Beginning ruby and learning to program
<Rinzlit>
I don't know why ruby hates me so much xD
<Rinzlit>
Probably b/c I treat it like shyt
<adaedra>
Because you don't know the basics
<Ox0dea>
havenwood: >9000 PRIVMSGs?
Kully3xf_ has quit [Ping timeout: 264 seconds]
<havenwood>
Ox0dea: JRuby \o/
RegulationD has quit [Remote host closed the connection]
<Ox0dea>
Derp.
<Rinzlit>
Yeah...
<jhass>
Rinzlit: you could try not sharing only the part of the error message that said "something went wrong" but the part which says what did
<adaedra>
9_6
dopie has joined #ruby
<Ox0dea>
Is the release code-named Vegeta?
<Rinzlit>
Wait cpanel comes with ruby preinstalled right?
helpa has quit [Remote host closed the connection]
esantiago has quit [Ping timeout: 246 seconds]
Igorshp has joined #ruby
<Rinzlit>
wow
<Rinzlit>
I followed the solution
<Rinzlit>
went to reinstall
Igorshp has quit [Remote host closed the connection]
<Rinzlit>
still same error -____-
Igorshp has joined #ruby
troulouliou_div2 has quit [Remote host closed the connection]
<Rinzlit>
I think somethings conflicting with it
<ElSif>
sure, not terribly surprising
<ElSif>
this is a fresh install right?
<ElSif>
no previous mysql?
<Rinzlit>
Well ubuntu 14.0.4
<Rinzlit>
For server
<Rinzlit>
Since I'm very tired...
<Rinzlit>
full install
galeido has quit [Remote host closed the connection]
<Rinzlit>
I semi mindlessly followed the guides
casadei_ has joined #ruby
n008f4g_ has joined #ruby
usershell has quit [Read error: Connection reset by peer]
Lucky_ has joined #ruby
<ElSif>
do you have a /var/log/mysql/error.log?
drowe has joined #ruby
usershell has joined #ruby
Zai00 has quit [Client Quit]
<arup_r>
i am getting strings which could be either "11" or "11.11" ... how to check if string is Integer or Float .. `Integer("100.22") rescue $!; $! ? "integer" : "float" .. but always getting false.`
<ruboto>
Lord-Kamina, I don't know anything about json_object
<jhass>
meh, what was it
<jhass>
?jsonobject
<ruboto>
there is no such thing as a JSON object. You either have a String containing serialized JSON, or you have ruby objects (usually Hashes/Arrays/Strings). Which is it?
<jhass>
ah
<jhass>
Lord-Kamina: ^
|\|370 has quit [Client Quit]
Trynemjoel has quit [Ping timeout: 256 seconds]
dangerousdave has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Trynemjoel has joined #ruby
hemanth has joined #ruby
lannonbr has quit [Ping timeout: 260 seconds]
phoo1234567 has joined #ruby
blaines has joined #ruby
<jhass>
Lord-Kamina: the valid usecases for eval in Ruby are pretty much just templating languages, so there's most certainly a better solution
RegulationD has joined #ruby
khando has quit [Quit: Lost terminal]
hobodave has quit [Quit: Computer has gone to sleep.]
mikecmpbll has joined #ruby
dmolina has quit [Quit: Leaving.]
howdoicomputer has joined #ruby
bronson has quit [Remote host closed the connection]
Hobogrammer has joined #ruby
Trynemjoel has quit [Ping timeout: 240 seconds]
wallerdev has joined #ruby
yqt has joined #ruby
wallerdev has quit [Client Quit]
RegulationD has quit [Ping timeout: 244 seconds]
RegulationD has joined #ruby
DEA7TH has quit [Quit: DEA7TH]
<Ox0dea>
jhass: I was going to use eval to retrofit selective imports. :/
lannonbr has joined #ruby
hanmac has quit [Quit: Leaving.]
<jhass>
Ox0dea: none of your stuff counts ;P
phoo1234567 has quit [Max SendQ exceeded]
hanmac has joined #ruby
Trynemjoel has joined #ruby
phoo1234567 has joined #ruby
InternetFriend has joined #ruby
<Ox0dea>
You know you want selective imports.
white_bear has quit [Quit: leaving]
dorei has joined #ruby
wallerdev has joined #ruby
scripore has quit [Quit: This computer has gone to sleep]
<Ox0dea>
It seems like it would've been much easier for Crystal to have them; I wonder why they went in the exact opposite direction.
scripore has joined #ruby
scripore has quit [Client Quit]
<jhass>
well, crystal has an open class model too
stamina has quit [Remote host closed the connection]
<Lord-Kamina>
Sorry, I meant ruby objects gotten from serialized json strings.
araujo has joined #ruby
prettiestPony11 has quit [Ping timeout: 240 seconds]
bodgix has quit [Quit: Leaving.]
simplyianm has joined #ruby
pengin has quit [Remote host closed the connection]
serivich has quit [Ping timeout: 244 seconds]
aphprentice has joined #ruby
<Ox0dea>
jhass: Can has better lighting for the interactive Crystal crystal?
<Ox0dea>
Only two faces are ever illuminated, and usually quite harshly.
Trynemjoel has quit [Ping timeout: 256 seconds]
<jhass>
Ox0dea: it's open source, send a PR to the gh-pages branch
<jhass>
Lord-Kamina: so you're asking how to foo.each do |bar| bar.each do |baz| ?
aaeron has quit [Quit: Leaving.]
<Lord-Kamina>
eval (object)["pointer"] works.
darkf has quit [Quit: Leaving]
<jhass>
Lord-Kamina: nope
<jhass>
don't do this
<Lord-Kamina>
Why?
<jhass>
just forget it even is possible. right now
<jhass>
it's wrong, it's just soo wrong
<Lord-Kamina>
I know it is.
<Lord-Kamina>
Hence why I opened saying "Badwrong question:"
Trynemjoel has joined #ruby
<Lord-Kamina>
But it's a one-time script
<Ox0dea>
Famous last words.
<jhass>
what does works even mean? what does it do?
<jhass>
or do you mean eval(object)["pointer"]?
Anthony__ has joined #ruby
lannonbr has quit [Quit: WeeChat 1.2]
NeverDie has joined #ruby
<Lord-Kamina>
It correctly references the contents of the object I want it to.
<Lord-Kamina>
Here's what's going on, I have a ridiculous xcode project (which I swear is not my fault)
dented42 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Ox0dea>
>> n = 50000; t = []; s = Time.now; n.times { 1 + 1 }; t << Time.now - s; s = Time.now; n.times { eval "1 + 1" }; t + [Time.now - s]
<Lord-Kamina>
And I needed to have so many targets that xcode literally decided to "Nope." on me.
Hien has quit [Quit: leaving]
dubkoidragon has quit [Ping timeout: 246 seconds]
Hien has joined #ruby
Anthony__ is now known as _blizzy_
<Lord-Kamina>
I realized I could probably dump them all in just one giant target instead. But it's such a ridiculous amount of cherry-picked source files in a ridiculous nested folder structure...
<eam>
Ox0dea: well, compare apples to apples - parsing json is kinda slow too
<Lord-Kamina>
That I got all the files into these JSON strings by using regex on a build log.
<Ox0dea>
eam: Is it?
<eam>
compared to adding two fixnums? yeah
dsaint-pierre has joined #ruby
<Lord-Kamina>
The whole point of this is to add all these files to my target and never look back on the horrible thing I'm doing.
dgutierrez1287 has quit [Ping timeout: 250 seconds]
baweaver has joined #ruby
rdark has joined #ruby
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
michaeldeol has joined #ruby
dmolina has quit [Client Quit]
roolo has joined #ruby
werelivinginthef has joined #ruby
choke has joined #ruby
ModusPwnens has joined #ruby
jackjackdripper has quit [Quit: Leaving.]
jackjackdripper has joined #ruby
ruurd has joined #ruby
lobmys has quit [Quit: WeeChat 1.1]
<ModusPwnens>
I have a class that extends another class. I want this subclass to call a method in the parent class that returns an instance of that parent class and then I want to construct an instance of the child class from that. How can I do that from a class method on the child class?
bossheisenberg has joined #ruby
<ModusPwnens>
For some reason, I'm having a very difficult time thinking about this, but maybe that's because I'm coming from javaland
synthroid has left #ruby [#ruby]
_ixti_ has quit [Ping timeout: 255 seconds]
<centrx>
What is this for?
Pyrotecnix has joined #ruby
<centrx>
What are you really trying to do?
<ModusPwnens>
I just want to create an instance of my child class with all the fields that the parent class has already initialized properly
_ixti_ has joined #ruby
Synthead has quit [Remote host closed the connection]
<ModusPwnens>
I'm mimicking the ActiveRecord interface for these classes, so in my child class' self.find method I am calling the parent class' self.find method, but I want to create/return an instance of the child class from that
rubie has joined #ruby
kies^ has joined #ruby
SCHAAP137 has joined #ruby
<ljarvis>
ModusPwnens: superclass: https://eval.in/403511 -- but yeah I would agree this is generally an odd thing to do. You might want to provide some more context/code
yb_drowe has quit [Quit: Zzzzzzz....]
bossheisenberg has left #ruby [#ruby]
baroquebobcat has quit [Quit: baroquebobcat]
jpfuentes2 has joined #ruby
baroquebobcat has joined #ruby
graft has joined #ruby
dmolina has joined #ruby
uber has quit [Ping timeout: 265 seconds]
<ModusPwnens>
basically, I want to be able to create a 'Dog' instance from the result of a call to Animal.find(id).
lessless has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<jhack>
question, so I want to build a cmd line blackjack game, would it be smart if I i designed it like: array for cards outside, Player class (will get name), and Blackjack class (where the functions of the game/options belong in)?
<graft>
hey, anyone good with String#unpack? I have a many-byte character string i'd like to turn into a ruby array-of-arrays
baweaver has quit [Remote host closed the connection]
<eam>
it's because Range firsts compares endpoints before iterating
aaeron has quit [Quit: Leaving.]
diegoviola has quit [Quit: WeeChat 1.2]
Trynemjoel has quit [Ping timeout: 240 seconds]
mleung has joined #ruby
Synthead has joined #ruby
d10n-work has joined #ruby
<mdcox>
So something fun...I
<mdcox>
woops, hit enter too early...too close to shift
davedev24 has quit [Ping timeout: 244 seconds]
<wasamasa>
I hate ansi keyboards for that reason
Trynemjoel has joined #ruby
choke has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
davedev24 has joined #ruby
<mdcox>
I'm getting a "Something went wrong" err page in production, but it's not logging any error in the logs. Any ideas on where to look next or figure out why it's not logging errors but all the INFOs?
aaeron has joined #ruby
choke has joined #ruby
<mdcox>
Oh woops, this is #ruby not #rails. I'm failing at IRC today.
shadoi has quit [Read error: Connection reset by peer]
<ljarvis>
ModusPwnens: ok, my code should allow you to do that, but basically they're static methods so you could just use the class directly (i.e Foo.find(...))
uber has joined #ruby
<ModusPwnens>
ljarvis: Oh. But how do I create an instance of the child class from the call to SuperClass.find(...)?
dsaint-pierre has quit [Remote host closed the connection]
<ModusPwnens>
ljarvis: or does that not even really make sense to do in a class method
<ModusPwnens>
Can you call .new with an instance of a parent class as an argument?
<ljarvis>
you can call new with whatever you want..
simplyianm has quit [Read error: Connection reset by peer]
simplyianm has joined #ruby
shadoi has joined #ruby
Trynemjoel has joined #ruby
sdrew has joined #ruby
lannonbr has joined #ruby
bmurt has joined #ruby
aaeron has quit [Quit: Leaving.]
sgambino has joined #ruby
msgodf has quit [Remote host closed the connection]
mjuszczak has quit []
DEA7TH_ has joined #ruby
kb3ien has joined #ruby
allomov has quit [Remote host closed the connection]
<kb3ien>
"if query_has_qstr? " errors with "no implicit conversion of String into Integer" its defined thusly [http://pastebin.ca/3071528], should that not be boolean (enough) to run `if` with ?
mleung has joined #ruby
<ljarvis>
kb3ien: one of those things in an array and you're treating them like a hash
<ljarvis>
I don't know which, because there's 13 million levels of nesting
<ljarvis>
but I would argue that [:results]["SearchRequestGet"] seems odd
mikeric has joined #ruby
safeforge has quit []
jerius has quit [Ping timeout: 260 seconds]
<kb3ien>
Lifted it from a related function. I'll look at that first....
<ljarvis>
also, that pastie is almost as bad as pastebin.com
aaeron has joined #ruby
Alex-_ has joined #ruby
AlxAltea has joined #ruby
<kb3ien>
Que
<kb3ien>
riesWithAction is an array....
<ljarvis>
who'd have thunk
quimrsto_ has quit [Remote host closed the connection]
<ruboto>
Corndawg, this seems to be off-topic. Please move your discussion to #ruby-offtopic, to keep this channel free for Ruby related problems. Thanks!
<Corndawg>
okay sorry
<Corndawg>
let's be on topic guys
<jhass>
?guys Corndawg
<ruboto>
Corndawg, we're not all guys - while you probably don't meant to be exclusive, not everybody feels that way. Maybe consider using "folks", "y'all" or "everyone" instead?
<ljarvis>
:D
<Corndawg>
omg
Trynemjoel has joined #ruby
<ljarvis>
?omg
<ruboto>
I don't know anything about omg
<Corndawg>
-_-
<ljarvis>
damn
<havenwood>
?ruboto Corndawg
<ruboto>
Corndawg, I'm the channel bot, linker of the rules, adept of the facts, wielder of the banhammer.
user1138_ has quit [Excess Flood]
<ljarvis>
?cookie ruboto
<ruboto>
ruboto, here's your cookie:
cornerman has quit [Ping timeout: 244 seconds]
<Corndawg>
ban me pls ruboto
cornerma1 is now known as cornerman
<ljarvis>
.. you shouldn't say that
bungoman has joined #ruby
<Corndawg>
wow that's neat ljarvis
user1138 has quit [Ping timeout: 246 seconds]
simplyianm has quit [Read error: Connection reset by peer]
desigx has joined #ruby
<ljarvis>
anyway, back to Ruby
user1138_ has joined #ruby
simplyianm has joined #ruby
bruno- has quit [Ping timeout: 264 seconds]
desigx has quit [Ping timeout: 252 seconds]
Alex-_ has quit [Quit: Alex-_]
InternetFriend has joined #ruby
rubie has quit [Remote host closed the connection]
j4cknewt has joined #ruby
DEA7TH_ has quit [Quit: DEA7TH_]
eminencehc has quit [Remote host closed the connection]
fullofcaffeine has quit [Remote host closed the connection]
sdwrage has quit [Quit: Leaving]
eggoez has quit [Ping timeout: 244 seconds]
kraljev11 has quit [Read error: Connection reset by peer]
Papierkorb_ has joined #ruby
yqt has joined #ruby
ironsay has quit [Remote host closed the connection]
juanpaucar has quit [Remote host closed the connection]
_ixti_ has quit [Ping timeout: 240 seconds]
maletor has joined #ruby
kraljev11 has joined #ruby
dangerousdave has joined #ruby
dangerousdave has quit [Client Quit]
Papierkorb has quit [Ping timeout: 246 seconds]
phutchins has quit [Ping timeout: 256 seconds]
rubie has joined #ruby
nitenq has joined #ruby
_djbkd has joined #ruby
Trynemjoel has quit [Ping timeout: 240 seconds]
eggoez has joined #ruby
bigbadbear has quit [Ping timeout: 250 seconds]
Rinzlit1 has joined #ruby
Trynemjoel has joined #ruby
eindoofus has joined #ruby
<eindoofus>
hi, hoping someone here uses Rally. if so, do you happen to know how to multitask in it? is it possible to switch between incompleted tasks?
Rinzlit has quit [Ping timeout: 246 seconds]
Cust0sLim3n has joined #ruby
ndrei has quit [Ping timeout: 264 seconds]
bronson has quit [Remote host closed the connection]
ixti has joined #ruby
CustosLimen has quit [Ping timeout: 240 seconds]
Musashi007 has joined #ruby
ruurd has joined #ruby
peter_paule has quit [Ping timeout: 256 seconds]
baweaver has joined #ruby
sharpmachine has quit [Remote host closed the connection]
jgpawletko has quit [Quit: jgpawletko]
gorums has quit [Ping timeout: 240 seconds]
juanpaucar has joined #ruby
shinnya has joined #ruby
sshuff is now known as sshuff|gone
lordkryss has quit [Quit: Connection closed for inactivity]
sharpmachine has joined #ruby
gambl0re has quit [Ping timeout: 240 seconds]
dfockler has quit [Remote host closed the connection]
baweaver has quit [Remote host closed the connection]
baweaver has joined #ruby
grubernaut has joined #ruby
hobodave has quit [Quit: Computer has gone to sleep.]
gambl0re has joined #ruby
yardenbar has quit [Quit: Leaving]
miwood has joined #ruby
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
yardenbar has joined #ruby
eminencehc has joined #ruby
sdrew has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
_blizzy_ has joined #ruby
sshuff|gone is now known as sshuff
atesec has quit [Ping timeout: 256 seconds]
Trynemjoel has quit [Ping timeout: 256 seconds]
Trynemjoel has joined #ruby
ruby-lang759 has joined #ruby
<ruby-lang759>
hello
isavage has joined #ruby
Rinzlit1 is now known as Rinzlit
<centrx>
?hi
<ruboto>
I don't know anything about hi
<centrx>
?hello
<ruboto>
I don't know anything about hello
hans_ has joined #ruby
isavage has left #ruby [#ruby]
xkickflip has quit [Quit: xkickflip]
usershell has quit [Remote host closed the connection]
benlovell has joined #ruby
Corndawg has quit [Ping timeout: 246 seconds]
gorums has joined #ruby
giuseppesolinas has quit [Quit: This computer has gone to sleep]
ruby-lang759 has quit [Ping timeout: 246 seconds]
JoshL has quit []
DEA7TH_ has joined #ruby
vimz has quit [Quit: leaving]
benlovell has quit [Ping timeout: 256 seconds]
devbug has joined #ruby
freerobby has quit [Quit: Leaving.]
blackmesa has quit [Ping timeout: 260 seconds]
k3asd` has joined #ruby
freerobby has joined #ruby
Encapsulation has quit [Read error: Connection reset by peer]
Arnold_ has quit [Ping timeout: 246 seconds]
atesec has joined #ruby
quimrstorres has joined #ruby
baweaver has quit [Remote host closed the connection]
sharpmachine has quit [Remote host closed the connection]
sharpmachine has joined #ruby
jgpawletko has joined #ruby
hobodave has joined #ruby
mike___1234 has joined #ruby
choke has joined #ruby
michaeldeol has joined #ruby
lkba has joined #ruby
rehat has quit [Remote host closed the connection]
Lucky_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Silox| has quit [Quit: Connection closed for inactivity]
<Mendenhall>
no i mean like, algorithms as in the abstract thing
<Sypheren>
:<
<Mendenhall>
there's a single euclidean algorithm and different implementations of that algorithm, like how there's a single linked list and different implementations of linked lists
_djbkd has quit [Remote host closed the connection]
<Sypheren>
I see
<Sypheren>
:D
<Mendenhall>
that projects git thing is fantastic wow
<Ox0dea>
Sypheren: ^
<Ox0dea>
Go nuts.
<Sypheren>
I'm going to, I need to get this down so I can do rails :3
<Mendenhall>
programming before google must have been a lot harder
tno has joined #ruby
Trynemjoel has quit [Ping timeout: 240 seconds]
<Mendenhall>
"calculate pi to the Nth digit" first thought: "I am going to have to google how to calculate pi"
<Ox0dea>
Books have been a thing for millennia.
<prefixed>
how would I install net-ssh from source? https://github.com/net-ssh/net-ssh I need to use this on a machine that does not have a network connection
<Aria>
It was definitely more deliberate and slow-paced.
<Ox0dea>
And yet here we are.
<Aria>
And definitely more focused on the task at hand; working together at a distance is the biggest change.
baweaver has joined #ruby
Lucky_ has joined #ruby
CaryInVictoria has quit [Remote host closed the connection]
Trynemjoel has joined #ruby
simplyianm has quit [Remote host closed the connection]
InternetFriend has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Lucky_ has quit [Client Quit]
tjohnson has quit [Quit: Connection closed for inactivity]
<acovrig>
I have a string that seems to have a space at the end, yet .strip doesn’t remove it, how can I tell the utf code for the character that is there?
<adaedra>
>> a = [3, 4]; def foo(z); z.push(5); end; foo a; p a
<adaedra>
_blizzy_ ^ default is to pass by reference
<_blizzy_>
hmm, ok
griffindy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<_blizzy_>
thanks, adaedra
<Ox0dea>
acovrig: foo[-1].ord
bigbadbear has quit [Client Quit]
<_blizzy_>
also, acovrig, you could just str.gsub(/[^A-z0-9]/,'')
giuseppesolinas has quit [Quit: Leaving]
<Ox0dea>
That's hardly the same thing.
<Ox0dea>
_blizzy_: Also, [A-z] isn't what you think it is.
<adaedra>
^
<_blizzy_>
Ox0dea, oh.
<adaedra>
wouldn't \s match all space characters?
<_blizzy_>
I thought he was trying to get rid of it
<Ox0dea>
_blizzy_: But you don't know the contents of his string.
nahtnam has quit [Quit: Connection closed for inactivity]
benlieb has joined #ruby
<_blizzy_>
Ox0dea, true.
kraljev11 has joined #ruby
<adaedra>
_blizzy_: get rid of trailing spaces, not everything that is not A-z0-9
pandaant has joined #ruby
<_blizzy_>
adaedra, oh ok.
<_blizzy_>
wouldn't str.delete(" ") work
jazz_ has joined #ruby
dgutierrez1287 has joined #ruby
<Ox0dea>
_blizzy_: Not if it's not actually 0x20.
<adaedra>
that would delete all spaces
jazz_ is now known as vimz
<adaedra>
not just trailin
<Ox0dea>
adaedra: \p{space} catches all the Unicode "space" characters, but not \s.
<_blizzy_>
I'm messing up today
<adaedra>
trailing*
bronson has joined #ruby
<adaedra>
Ox0dea: ok
<adaedra>
didn't know about \p
<Ox0dea>
It's pretty nifty.
<Ox0dea>
\p{Hiragana} is also a thing.
dopie has quit [Quit: This computer has gone to sleep]
<Ox0dea>
acovrig: The suspense is killing us; what's foo[-1].ord?
<acovrig>
Ox0dea: sorry, was AFK, back now; pending
<Ox0dea>
Standing by.
blackmesa has quit [Ping timeout: 244 seconds]
<adaedra>
Ox0dea: spoiler: It's between 0x0 and 0xFFFFFFFF
paulcsmith has joined #ruby
<acovrig>
interesting, I’m running .to_sym on it (it’s the keys of a has) seems to fix it…
<acovrig>
adaedra: lol
<adaedra>
wat
<Ox0dea>
acovrig: Then you had an XY problem.
<adaedra>
?xy
<ruboto>
it seems like you are asking for a specific solution to a problem, instead of asking about your problem. This often leads to bad solutions and increases frustration for you and those trying to help you. More: http://meta.stackexchange.com/a/66378
<Ox0dea>
String#to_sym doesn't modify the string, it just interns it.
sharpmachine has quit [Remote host closed the connection]
<acovrig>
Ox0dea: 160
dgutierrez1287 has quit [Ping timeout: 244 seconds]
<Ox0dea>
acovrig: Yeah, #strip wouldn't get rid of that one.
xkickflip has joined #ruby
InternetFriend has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
kraljev11 has quit [Quit: kraljev11]
<prefixed>
Hey. I need to run a ruby method on an external host (from a local host). I believe I can use net/ssh to do this. However, how do I go about running the command and returning data?
<Ox0dea>
acovrig: Are you getting this string from some HTML?
kraljev11 has joined #ruby
<acovrig>
Ox0dea: yup
<Ox0dea>
acovrig: Makes sense; 160 is .
hornairs has quit [Quit: hornairs]
scripore has joined #ruby
sumark has quit [Remote host closed the connection]
frem has joined #ruby
DEA7TH_ has quit [Quit: DEA7TH_]
<deepu>
can someone please tell me how I can achieve this? https://dpaste.de/7cvc haven't used ERB yet
<Mon_Ouie>
just yield array if you need the block to be able to access the array
baweaver has quit [Remote host closed the connection]
choke has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<acovrig>
Ox0dea: to sub that, this doesn’t do anything, what is wrong? t.sub(/\u0160/,’’)
A_ron has joined #ruby
<vimz>
Mon_Quie yield array? what does that mean? and yes all I need is for the block to access the array. example? thanks
<prefixed>
Hey. I need to run a ruby method on an external host (from a local host). I believe I can use net/ssh to do this. However, how do I go about running the command and returning data?
<Mon_Ouie>
vimz: yield array means you literally type 'yield array' in your code
kraljev11 has quit [Ping timeout: 246 seconds]
hanmac has joined #ruby
DEA7TH_ has joined #ruby
choke has joined #ruby
<deepu>
can someone please tell me how I can achieve this? https://dpaste.de/7cvc haven't used ERB yet
<adaedra>
acovrig: like Ox0dea said above, you can use \p{space} to catch all spaces. Also, suffix with $ to take trailing space (+$ for trailing space/s/)
christiandsg has quit [Ping timeout: 265 seconds]
crdpink2 has quit [Quit: q term]
<Mon_Ouie>
To pass an argument to the block, which can then be accessed as in { |x| … do stuff with x … }
<acovrig>
adaedra, Ox0dea: ah, I see, thanks
<vimz>
Mon_Ouie cool. oooohh. So if we were to type | yield array, foo, bar, biz | array, foo, bar and biz variables would all be available inside the proc that's executed by yield?
skavez has joined #ruby
kraljev11 has joined #ruby
<Ox0dea>
adaedra: It turns out 0xA0 isn't in \p{space}. :/
<adaedra>
&ri ERB
<`derpy>
I'm sorry, I don't know anything about ERB.
<prefixed>
does net/ssh allow for ruby code execution?
<prefixed>
probably not, huh?
<adaedra>
grmbl
<Ox0dea>
acovrig: Do you want to #strip or #sub?
<adaedra>
prefixed: no, ruby you can ruby ruby binary
<jhass>
wat
<prefixed>
adaedra what
<jhass>
try again :D
<Mon_Ouie>
They would all be passed as arguments. Inside the block, you'd retrieve such arguments by using |…| notation at the beginning of the block.
<Ox0dea>
Is it not the case that in Ruby you can Ruby Ruby binary?
<adaedra>
wow
<adaedra>
I don't know what happend
<adaedra>
<<<< rewind
Wolland has joined #ruby
crdpink has joined #ruby
<adaedra>
prefixed: no, but you can run ruby binary
<prefixed>
ok. so if i wanted to run some code, it'd have to be on the remote host?
skavez has quit [Remote host closed the connection]
skavez has joined #ruby
<snockerton>
why does using !!@ or !!! in pry not actually exit the program when I'm in a loop?
skavez has left #ruby [#ruby]
<prefixed>
I need to list a bunch of files and directories on a remote server
baroquebobcat has quit [Quit: baroquebobcat]
<adaedra>
sftp exists for that
baroquebobcat has joined #ruby
paulcsmith has quit [Ping timeout: 265 seconds]
Agoldfish has joined #ruby
<Mon_Ouie>
snockerton: What do you mean? Typing 'loop {' on one line then '!!@' on the next does exit here
<ljarvis>
Net::SFTP#dir.entries(...)
kraljev11 has quit [Ping timeout: 244 seconds]
<snockerton>
Mon_Ouie: I want to completely kill my ruby execution
<prefixed>
I need to get a specific list of directories (recursively) on a remote server. I also need to be able to ignore certain directories. I have a ruby script that does this
<Ox0dea>
snockerton: exit!
DroidBurgundy has quit []
<snockerton>
and not finish running the rest of the objects in an array for instance
lkba_ has joined #ruby
<snockerton>
Ox0dea: why do you know everything
<adaedra>
prefixed: using sftp would make you able to browse remote directory like you do in local.
<Ox0dea>
snockerton: Do I?
Agoldfish has quit [Client Quit]
<snockerton>
well you just used a question mark so apparently not
Agoldfish has joined #ruby
<snockerton>
thx
<Ox0dea>
Sure thing.
umo has joined #ruby
<adaedra>
Ox0dea: next step is becoming ruby god
<bricker>
that's deep.
<bricker>
How do I know if I know everything?
<Ox0dea>
bricker: The question is its own refutation.
Eiam_ has joined #ruby
<adaedra>
nicely said
<bricker>
Ox0dea: you caught me!
<Eiam_>
clever girl
sshuff is now known as sshuff|gone
jgpawletko has quit [Quit: jgpawletko]
<Ox0dea>
Eiam_: What is the significance of your nick?
<Eiam_>
Ox0dea: its the initials of my wife & kids
<Ox0dea>
Hey, mine's initials too!
<prefixed>
adaedra so, does that mean i'd be able to use methods like Find.prune and File.directory?()
<Ox0dea>
prefixed: Yep.
<adaedra>
Eiam_: what can of name begins by _
chipotle has quit [Quit: cheerio]
Papierkorb_ is now known as Papierkorb
<adaedra>
sorry but
lkba has quit [Ping timeout: 240 seconds]
<adaedra>
prefixed: RTFM
<Eiam_>
adaedra: thats because I don't use a bouncer for this nick so that jerk Eiam is here on my other machine ;)
<Ox0dea>
Feckin' Eiam.
<prefixed>
impressive. very impressive.
<Ox0dea>
Eiam_: Hey, you just exposed a bug in WeeChat.
<Eiam>
=(
<Eiam>
Happy to help
<Ox0dea>
The underscore in your nick didn't get highlighted in the nicks column.
ht__ has quit [Quit: Konversation terminated!]
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<adaedra>
Ox0dea: only for Eiam ?
<prefixed>
also sorry. no time. I just started learning ruby this week boss wants a solution two days ago. (don't get me started). thanks for you help though
<Ox0dea>
The bug is more likely in colorize_nicks.py, now that I think about it.
<prefixed>
*last week
sharpmachine has joined #ruby
<Ox0dea>
adaedra: Aye, only for Eiam.
<Ox0dea>
Eiam_, rather.
<Eiam_>
weird
<Ox0dea>
But only if you mention Eiam.
tomphp has joined #ruby
n1lo has quit [Quit: n1lo]
<Ox0dea>
It is weird, though, because _ is \w.
<adaedra>
prefixed: just have to look at sftp documentation to see what is available. But for a remote directory browsing, you should have what you need. Also, it allows you not to run code on the remote machine.
<prefixed>
ok. I am going to play with it now
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
umo has left #ruby [#ruby]
duggiefresh has quit [Remote host closed the connection]
duggiefresh has joined #ruby
eggoez has quit [Ping timeout: 252 seconds]
bayed has quit [Quit: Connection closed for inactivity]
Zai00 has joined #ruby
charliesome has quit [Read error: Connection reset by peer]
dagda1_ has joined #ruby
charliesome has joined #ruby
apfeluser has quit [Ping timeout: 252 seconds]
Papierkorb_ has joined #ruby
yfeldblum has joined #ruby
duggiefresh has quit [Client Quit]
krz has quit [Quit: WeeChat 1.2]
sshuff|gone is now known as sshuff
eggoez has joined #ruby
jackjackdripper1 has joined #ruby
Papierkorb has quit [Disconnected by services]
Papierkorb_ is now known as Papierkorb
hobodave has quit [Quit: Computer has gone to sleep.]
jackjackdripper1 has quit [Client Quit]
pengin has quit [Remote host closed the connection]
user1138 is now known as bob3243242
jackjackdripper1 has joined #ruby
bob3243242 has quit [Quit: Leaving]
jackjackdripper has quit [Ping timeout: 240 seconds]
<Eiam_>
Ox0dea: sorry to cause you trouble =0
user1138 has joined #ruby
<Ox0dea>
No worries; visible bugs are better than invisible ones.
stantonnet has quit [Ping timeout: 260 seconds]
<dfockler>
^ no doubt!
<adaedra>
Eiam_: push it a bit further, make Ox0dea's client crash now.
dimasg has joined #ruby
noname has quit [Quit: WeeChat 1.0.1]
freeUmo has joined #ruby
eminencehc has joined #ruby
freeUmo has quit [Client Quit]
johnMcLain has joined #ruby
pengin has joined #ruby
<jhass>
yeah, join as Eam__ and mention Eam_ and Eam
<jhass>
eh, I can't type
<adaedra>
ruby ruby ruby
<Eiam_>
Ox0dea: لُلُصّبُلُلصّبُررً ॣ ॣh ॣ ॣ 冗
despai has quit [Quit: Leaving]
<Eiam_>
Ox0dea: still with us? ;)
<adaedra>
wow
noname has joined #ruby
<adaedra>
selection works weird with that
xcesariox has joined #ruby
<Eiam_>
just a treasure trove of bugs I am.. I should have never left QA =p
<adaedra>
File://
<eam>
file://con/con
<Eiam_>
no relation to eam. they are smarter than i for sure
CaryInVictoria has joined #ruby
polpak has quit [Quit: Lost terminal]
janno90 is now known as janno
<adaedra>
:(){:|:&};:
dimasg has quit [Ping timeout: 255 seconds]
vdamewood has joined #ruby
<dfockler>
fork lamb
<dfockler>
fork bomb
ldnunes has quit [Quit: Leaving]
<Ox0dea>
adaedra: st handled it just fine. :)
<adaedra>
?
<Ox0dea>
st, the simple terminal emulator.
<adaedra>
what are you replying to?
<adaedra>
why do you all people have terminal emulators I never heard of
<Ox0dea>
adaedra: You had trouble selecting Arabic?
Sypheren_ has joined #ruby
scripore has quit [Quit: This computer has gone to sleep]
<jhass>
adaedra: as said, because they all suck
<adaedra>
well, selection is not linear, but I think it's ok
<Ox0dea>
jhass: Some just suckless.
<adaedra>
also, I'm not in a terminal here
<Ox0dea>
adaedra: Then your client needs to be flogged.
<adaedra>
flogged?
<Ox0dea>
Well, punished however software can be.
<Ox0dea>
Remove one of its dependencies.
Sypheren has quit [Ping timeout: 240 seconds]
<adaedra>
my client is all fine
<adaedra>
and arabic selection looks file to me here, from right to left in a left to right sequence
dopie has joined #ruby
<adaedra>
just surprising
<Ox0dea>
adaedra: It's surely because you started selecting from outside the Arabic.
<adaedra>
yep
nfk has quit [Remote host closed the connection]
miwood_ has joined #ruby
<prefixed>
so, I just installed "net/ssh" but ruby is telling me that I cannot load net/ssh
A_ron has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Ox0dea>
prefixed: Go shopping.
Aswebb_ has quit []
ruurd has joined #ruby
nitenq has joined #ruby
iamjarvo_ has joined #ruby
gamename has quit [Remote host closed the connection]
ruby-lang422 has quit [Ping timeout: 246 seconds]
iamjarvo_ has joined #ruby
gamename has joined #ruby
miwood has quit [Ping timeout: 240 seconds]
simplyianm has quit [Read error: Connection reset by peer]
scripore has joined #ruby
<prefixed>
also, Gems::... says it is installed
hobodave has joined #ruby
simplyianm has joined #ruby
<shevy>
dfockler hmm... fork lambda would almost be valid syntax
bosma_ has joined #ruby
A_ron has joined #ruby
tvw has joined #ruby
mhf has quit [Ping timeout: 240 seconds]
NeverDie has joined #ruby
yqt has quit [Ping timeout: 246 seconds]
code1o6 has joined #ruby
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
eindoofus has quit [Ping timeout: 240 seconds]
lkba_ has quit [Ping timeout: 240 seconds]
dubkoidragon has joined #ruby
GBrawl has joined #ruby
<Ox0dea>
shevy: `fork lambda` isn't a syntax error.
acke has quit [Remote host closed the connection]
<shevy>
you use backticks
Eiam_ has quit [Read error: Connection reset by peer]
<prefixed>
what's the best way to determine whether if a gem isn't supported by my version of ruby
Zai00 has quit [Quit: Zai00]
Eiam_ has joined #ruby
blaines has joined #ruby
gamename has quit [Ping timeout: 244 seconds]
<Antiarc>
Try to install it and see if it can't find a match
<Mon_Ouie>
Probably just to try it considering many gemspecs won't actually tell you what versions of Ruby are supported
<Antiarc>
Or read the gemspec
<prefixed>
i have 1.9.3. net/ssh says that 2.9.x works with 1.9.x. this shouldn't be a problem
Channel6 has joined #ruby
<prefixed>
This means that the gem isn't installed, right? `require': cannot load such file -- net/ssh (LoadError)
<Ox0dea>
prefixed: Your paths must not be configured properly.
lkba has joined #ruby
<adaedra>
this can mean a lot of things
bronson has quit [Remote host closed the connection]
janno is now known as Janno
iamjarvo_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mary5030 has quit [Remote host closed the connection]
mhf has joined #ruby
icebourg has joined #ruby
mary5030 has joined #ruby
bosma_ is now known as bosma
bmurt has quit []
duoi has joined #ruby
Janno has quit [Quit: Lost terminal]
paulcsmith has joined #ruby
duoi has quit [Changing host]
duoi has joined #ruby
<adaedra>
anyway, time to sleep, see y'all
<prefixed>
looks like my path might not be correct
frem is now known as Guest38521
bigbadbear has joined #ruby
phutchins has joined #ruby
blackmesa has joined #ruby
mary5030 has quit [Ping timeout: 260 seconds]
bb010g has quit [Quit: Connection closed for inactivity]
failshell has joined #ruby
Janno has joined #ruby
scripore has quit [Quit: This computer has gone to sleep]
simplyianm has quit [Read error: Connection reset by peer]
swgillespie has joined #ruby
simplyianm has joined #ruby
jpfuentes2 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
blackmes1 has joined #ruby
Eiam_ has quit [Read error: Connection reset by peer]
bb010g has joined #ruby
RobertBirnie has quit [Ping timeout: 246 seconds]
helpa has quit [Remote host closed the connection]
baweaver has joined #ruby
blackmesa has quit [Ping timeout: 265 seconds]
helpa has joined #ruby
failshell has quit []
jpfuentes2 has joined #ruby
sdrew has joined #ruby
RobertBirnie has joined #ruby
treehug88 has quit [Ping timeout: 260 seconds]
yqt has joined #ruby
bigbadbear has quit [Ping timeout: 252 seconds]
neoseeker191 has joined #ruby
lalalaaa has joined #ruby
dagda1_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Radar is now known as NotRadar
mweshi has joined #ruby
scripore has joined #ruby
miwood_ has quit [Remote host closed the connection]
NotRadar is now known as Radar
miwood has joined #ruby
<lalalaaa>
Hi! How would one split `self.to_s.downcase.gsub(/['`]/, "").parameterize` into two lines? Ie. `self.to_s.downcase.parameterize` + `self.to_s.gsub(/['`]/, "")`?
centrx has quit [Quit: 'Get out, you and all the people who follow you!' Then he went out from Pharaoh in hot anger.]
<drbrain>
I would probably: parameters = self.to_s.downcase; parameters.gsub(…).parameterize
<lalalaaa>
When I do it like that, the first line doesn't seem to matter.
<drbrain>
but I'm not sure if "parameters" is the best name
baweaver has quit [Ping timeout: 244 seconds]
dagda1 has joined #ruby
<lalalaaa>
drbrain: Ideally I'd like to put the gsub on a separate line so I can explain that I'm trying to eliminate apostrophes
<lalalaaa>
ooh
__main__ has quit [Read error: Connection reset by peer]
<lalalaaa>
awesome
bungoman has quit [Remote host closed the connection]
<drbrain>
three lines is probably better than two then
<lalalaaa>
thanks man looks really good:)
<drbrain>
by picking a good variable name for the gsub result you won't need a comment saying "this removes apostrophes"
freeUmo has quit [Remote host closed the connection]
havenwood has quit [Read error: Connection reset by peer]
<drbrain>
also, you can use String#delete instead of gsub, which is a little more intention-revealing
<apeiros>
(delete has the same character semantics as tr)
<drbrain>
I've used #tr to implement a hangman
<shevy>
now it is "dirty secrets" time again!
<apeiros>
drbrain: you can play hangman over in #ruby-offtopic…
bungoman has joined #ruby
choke has quit [Ping timeout: 240 seconds]
<drbrain>
the template had 0, 1, 2, … for each stage of the game arranged appropriately
blackoperat has quit [Client Quit]
benlovell has joined #ruby
<drbrain>
then you'd either replace it with the proper, err, body part, or whitespace
fantazo has quit [Ping timeout: 252 seconds]
<drbrain>
(what a grim game to play, if you don't guess this word then YOU DIE)
<lalalaaa>
lol
thoraxe_ is now known as thoraxe
<lalalaaa>
thanks again guys, i love it how you always present not just the solution but tons of other ways to go about it
ruurd has quit [Quit: ZZZzzz…]
s00pcan has quit [Ping timeout: 240 seconds]
neoseeker191 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Eiam_ has joined #ruby
<miah>
not all guys either
<Radar>
?guys
<ruboto>
we're not all guys - while you probably don't meant to be exclusive, not everybody feels that way. Maybe consider using "folks", "y'all" or "everyone" instead?
<Ox0dea>
Hey, [k-, what happens if you require 'socket.so' on OS X?
s00pcan has quit [Ping timeout: 250 seconds]
bungoman has quit [Remote host closed the connection]
<[k->
I'll add it to the lists of things to do when I get back
simplyianm has quit [Read error: Connection reset by peer]
s00pcan has joined #ruby
<shevy>
lol
simplyianm has joined #ruby
<drbrain>
Ox0dea: ruby doesn't care about platform-specific C extensions*
a346 has quit [Quit: a346]
<drbrain>
* except for .dll, unless you've built ruby to enable it, IIRC windows-only
<prefixed>
adaedra it doees not look possible to use Find.find() with SFTP objects
<drbrain>
Ox0dea: so if you've got a .bundle you can require the .so and it'll work
<Ox0dea>
drbrain: But the reverse isn't true.
<Ox0dea>
I can only require .so on Linux.
Ilyas has quit [Read error: Connection reset by peer]
freerobby has quit [Quit: Leaving.]
arooni-mobile has quit [Ping timeout: 244 seconds]
<Ox0dea>
For what it's worth, I'm only interested in the behavior you've described, but is .so guaranteed to resolve on all platforms?
werelivinginthef has joined #ruby
jenrzzz has quit [Ping timeout: 246 seconds]
<Ox0dea>
To add to that, do you know if the path gets canonicalized to .so for $LOADED_FEATURES?
nveselinov has quit [Quit: Connection closed for inactivity]
Log1x has quit [Ping timeout: 255 seconds]
<drbrain>
ah, right, I think RbConfig::CONFIG['DLEXT'] and DLEXT2 are what control this
xcesariox has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Ox0dea>
Yes, that's right.
jenrzzz has joined #ruby
<drbrain>
without checking, I think .so is hard-coded as something that will always work, and adding DLEXT and DLEXT let ruby try extra things
elia has joined #ruby
<Ox0dea>
Only they're not really accessible at runtime, at least not before require does its thing.
sshuff is now known as sshuff|gone
<drbrain>
which aren't?
<Ox0dea>
DLEXT{,2}
MisterRusty has quit [Ping timeout: 264 seconds]
<Ox0dea>
They're manifest constants at build time.
aryaching has quit [Ping timeout: 250 seconds]
<drbrain>
rubygems fetches (and uses) them when overriding require
<Ox0dea>
Hmm.
duoi has quit [Remote host closed the connection]
freerobby has joined #ruby
Log1x has joined #ruby
werelivinginthef has quit [Remote host closed the connection]
MisterRusty has joined #ruby
<Ox0dea>
drbrain: Nah, doesn't seem to permit requiring .dll files on Linux.
<Ox0dea>
Neither RbConfig::CONFIG['DLEXT'] nor 'DLEXT2'.
<drbrain>
oh, you mean getting plain ruby require to load a .dll as a compiled extension library?
<Ox0dea>
Well, no, RubyGems' require would be fine?
<drbrain>
I think DLEXT and DLEXT2 are reflections of what is compiled-in to ruby, so changing them won't change that behavior
icebourg has joined #ruby
<Ox0dea>
I alluded to that regrettable truth a few minutes ago.
[k- has quit [Ping timeout: 246 seconds]
lalalaaa has quit [Quit: leaving]
gamename has quit [Remote host closed the connection]
<drbrain>
I may have missed that bit, sorry
jenrzzz has quit [Ping timeout: 272 seconds]
<Ox0dea>
"Manifest constants" and whatnot.
<drbrain>
you can discover what ruby will look for, but not change this behavior without recompiling
baweaver has joined #ruby
<Ox0dea>
Right.
<Ox0dea>
I was hoping to respond differently depending on the extension used to require me, but .so working on all platforms would suffice.
<Ox0dea>
I still need a way to determine that .so was explicitly used, though.
PaulCape_ has quit [Quit: .]
MrWharfsnort has joined #ruby
RegulationD has quit [Remote host closed the connection]
<Ox0dea>
The best I've got so far was walking ObjectSpace.each_object(String), remembering the last time we saw "loading_table", and giving the okay if "foo.so" occurs soon enough after.
<drbrain>
what do you need to determine that for?
<Ox0dea>
Silly reasons.
<drbrain>
several libraries have a .rb with the same name which requires the .so
<Ox0dea>
drbrain: I, uh... want requiring the .rb to fail. ^_^
<Senjai>
Uhm
<Senjai>
Do exceptions propogate if used with send?
<Ox0dea>
drbrain: Sorry, I should have been more exact; I'm setting a non-capitalized constant from C, and then requiring the .rb from C as well; the .rb dies if the constant isn't set.
<Ox0dea>
And since non-capitalized constants can't be defined from Ruby land, I can ensure that I was required as .so, at least on Linux.
j4cknewt has quit [Remote host closed the connection]
unsymbol has quit [Ping timeout: 244 seconds]
j4cknewt has joined #ruby
jenrzzz has joined #ruby
<Ox0dea>
drbrain: I know it sounds strange, and I confess it's mostly for a laugh, but I know it must be feasible.
<drbrain>
yeah, I think NameError has a lowercase constant on it, but that's part of the core library
<ght>
Question: I have a JSON string that is built dynamically and then parsed using JSON.parse. Normally it works fine, but it appears some of the data...
GBrawl has quit [Quit: (null)]
<ght>
being retrieved contains chars that are invalid to JSON.
<prefixed>
nope
<ght>
Anyone have any tips on finding and detecing / escaping chars that would be invalid
duoi has joined #ruby
<prefixed>
i had to reimplement everything
<prefixed>
you know why?
<prefixed>
because yolo
<ght>
In a string that was to be parsed via JSON.parse?
j4cknewt has quit [Ping timeout: 252 seconds]
<jhass>
ght: sounds like a broken approach. Can't you build the hash directly? if not why not?
msnyon has joined #ruby
<ght>
Nope, approach is completely logical, just looking for tips regarding detecting and escaping chars that would be invalid to JSON.
<ght>
Anyone?
yb_drowe has joined #ruby
eggoez has quit [Ping timeout: 244 seconds]
<Ox0dea>
ght: Are you not able to read the error message to determine exactly which characters are being considered invalid?
FernandoBasso has joined #ruby
<ght>
Yes, I can read the string, but it contains several entries, and it's dynamic anyway, so, again, I need to be able to detect and escape chars invalid to JSON.
FernandoBasso has quit [Remote host closed the connection]
Fernando-Basso has joined #ruby
<ght>
So no one has any tips there?
roolo_ has quit [Remote host closed the connection]
<jhass>
could you elaborate a bit on why it's logical?
<ght>
I'll continue researching, thanks just the same.
<jhass>
well, you can obtain valid json by calling to_json
AlphaAtom has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<jhass>
>> require "json"; 'foo"bar'.to_json
casadei_ has quit [Remote host closed the connection]