<pipework>
Returns true if obj is between the begin and end of the range.\n This tests begin <= obj <= end when exclude_end? is false and begin <= obj < end when exclude_end? is true.
ramfjord has quit [Quit: Lost terminal]
<pipework>
Ox0dea: I'd have to look into the actual implementation to see whether #include? would be safe for extremely large ranges.
<pipework>
I think for integers, it's optimized.
<pipework>
But in general, I prefer cover? for ranges that might not have optimized codepaths for certain objects.
<BraddPitt>
w 4
devoldmx has quit [Remote host closed the connection]
<Ox0dea>
BraddPitt: What's so special about Window 4?
lurkmast_ has joined #ruby
bmurt has joined #ruby
iamjarvo_ has joined #ruby
EllisTAA has quit [Quit: EllisTAA]
<pipework>
Maybe it's an optimization of thumb and index finger switching if they had keyboard shortcuts.
<Ox0dea>
pipework: You posted Array's #include? documentation, not Range's, mind.
casadei has quit [Remote host closed the connection]
<pipework>
Ah you're right, Dash forgot that I was scoped to Range the first time I looked.
cassioscabral has quit [Quit: cassioscabral]
<pipework>
Returns true if obj is an element of the range, false otherwise. If begin and end are numeric, comparison is done according to the magnitude of the values.
<BraddPitt>
can't tell you that, Ox0dea ;)
<Ox0dea>
BraddPitt: Gross.
<Ox0dea>
pipework: In any case, case equality is defined in terms of #include? for Ranges.
lurkmast_ has left #ruby [#ruby]
skweek has quit [Read error: Connection reset by peer]
<Ox0dea>
ght: You asked if you could do `x == 1..3`; you can get pretty close:
sdwrage has quit [Quit: This computer has gone to sleep]
mjago has joined #ruby
bmurt has joined #ruby
tenzan has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
poguez_ has quit [Quit: Connection closed for inactivity]
cmoel has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bmurt has quit []
zotherstupidguy has quit [Ping timeout: 246 seconds]
blackmesa has joined #ruby
michaeldeol has joined #ruby
zotherstupidguy has joined #ruby
<Guest50518>
is there nothing like module_function for a class?
<Ox0dea>
Guest50518: Classes are modules.
blackmesa has quit [Ping timeout: 240 seconds]
Musashi007 has joined #ruby
<Guest50518>
yes but apparently module_function not available in classes
diego1 has joined #ruby
diego1 has quit [Changing host]
diego1 has joined #ruby
diegoviola is now known as Guest91123
diego1 is now known as diegoviola
<Ox0dea>
Guest50518: Could you clarify why you think you need "class_function"?
<Guest50518>
well I'm just playing around but stead of `def self.meth` for all the methods or having to use `class << self; ...` to wrap the whole thing I was curious if there is something like module_function
<Ox0dea>
Fair enough. There isn't such a thing, to my knowledge.
<Ox0dea>
`module_function': module_function must be called for modules (TypeError)
ejnahc has quit [Remote host closed the connection]
<Ox0dea>
They knew we'd try that.
ejnahc has joined #ruby
workmad3 has joined #ruby
<Guest50518>
heh trying to find the implementation fo it
tjbiddle has joined #ruby
<Guest50518>
rb_mod_modfunc
diego1 has joined #ruby
<Ox0dea>
It's not as simple as you might've expected.
pawnbox has joined #ruby
diego1 has quit [Changing host]
diego1 has joined #ruby
diegoviola is now known as Guest20437
<Ox0dea>
Well, in the nonary case, it just invokes rb_scope_module_func_set(), so that's the function you'll want to look into.
lubarch has quit [Ping timeout: 252 seconds]
diego1 is now known as diegoviola
[k- has joined #ruby
<Ox0dea>
Still, it's setting members of an internal struct, so you won't be able to perfectly emulate it from Ruby.
<Guest50518>
maybe there is a callback to listen for a method being defined and you could simply then copy it into the class
<Ox0dea>
Ew.
<Guest50518>
:]
psy_ has joined #ruby
Guest20437 has quit [Ping timeout: 268 seconds]
<Guest50518>
i guess you could delete the instance method at that point too if that makes you feel better?
pawnbox_ has joined #ruby
lubarch has joined #ruby
pawnbox has quit [Read error: Connection reset by peer]
<Ox0dea>
There is Class#method_added if you really want to go to such extremes.
workmad3 has quit [Ping timeout: 272 seconds]
bronson has joined #ruby
<[k->
Ox0dea! I missed you!
<Ox0dea>
[k-! I missed you too.
<[k->
where did you go?
tmtwd has joined #ruby
<Ox0dea>
Saudi Arabia.
<[k->
:o
<[k->
that's pretty far from where you live
<Ox0dea>
In more ways than one.
pawnbox has joined #ruby
<[k->
i see what you did there
<Guest50518>
Ox0dea: stack level too deep which makes sense :]
<Ox0dea>
Guest50518: Nah, you explicitly opened the singleton class, I think?
vdamewood has joined #ruby
havenwood has joined #ruby
<Ox0dea>
`def self.foo` doesn't open a new "scope gate", so to speak, whereas `class << self` does.
bronson has quit [Ping timeout: 250 seconds]
pawnbox_ has quit [Ping timeout: 240 seconds]
<Ox0dea>
Guest50518: I can't think how to do it without defining the class methods in terms of the instance methods, which means they can't be removed. :/
srruby has quit [Ping timeout: 265 seconds]
<Guest50518>
yea I'm having issues trying to use method_added, define_method, instance_method
<Guest50518>
Ox0dea: so i changed your define_singleton_method to just define_method and it works too? part of me was thinking that it would be equivalent anyway?
diegoviola has quit [Ping timeout: 240 seconds]
<Ox0dea>
Guest50518: Which? There are two.
tmtwd has quit [Ping timeout: 246 seconds]
<Guest50518>
just the outer one
<Guest50518>
oh wait now it says undefined not private
<ruboto>
Ox0dea # => #<TypeError: bind argument must be an instance of Hash> (https://eval.in/442641)
Thr3d_ has quit [Read error: Connection reset by peer]
<Ox0dea>
Instances of Hash can sensibly respond to #keys, but Hash itself cannot.
TvL2386 has joined #ruby
ruurd has joined #ruby
<Ox0dea>
Ruby doesn't even let you bind such nonsensicalities, let alone invoke them.
<[k->
that's because of the instance variable required, the methods required, and the jungle and bananas needed
<Guest50518>
so it's failing trying to analyze the content of the method given the bind target?
pawnbox has quit [Ping timeout: 240 seconds]
<Guest50518>
like i didn't expect it to be that smart?
<Ox0dea>
Guest50518: #define_singleton_method with an UnboundMethod attempts to bind the latter.
<Guest50518>
hm but our simple example method isn't calling any instance vars or anything else...
<Ox0dea>
[k- was being adorably unhelpful.
<Guest50518>
heh
<Guest50518>
confused by what you mean by, "attempts to bind the latter"
<Ox0dea>
Guest50518: What do you think `Hash.keys` would return if it existed?
<Guest50518>
Can't change the value of self self = class << self; self; end
<Guest50518>
heh it was worth a short
<Guest50518>
shot*
<Ox0dea>
But `class << self` does change the value of `self` (to the caller's singleton class).
<Guest50518>
well i don't think Hash.keys matters because it's a dynamic / interpreted (even byte code wise) language so I imagine that methods are invoked with `self` pointing to a given object and if it fails at runtime it fails...
<Guest50518>
yea i was trying to grab the singleton and redefine the current self
pyon has quit [Quit: fix config]
tjbiddle has joined #ruby
<Ox0dea>
I give you heaps of credit for being an explorer, but you might've been better off staying on the trail a bit longer. :x
Anti-Pizza has joined #ruby
tejasmanohar has quit [Ping timeout: 246 seconds]
tejasmanohar has joined #ruby
tjbiddle has quit [Read error: Connection reset by peer]
<Guest50518>
lol? well I have been using ruby go on 10 years now... this is just something that annoyed me at various points in past
minimalism has quit [Quit: leaving]
tejasmanohar has quit [Remote host closed the connection]
shadoi has quit [Quit: Leaving.]
<Ox0dea>
I wouldn't've said that had you not demonstrated a fundamental misunderstanding of `self` in Ruby.
<Ox0dea>
I apologize for any offense taken, in any case.
<Guest50518>
like in js for instance i can easily just o.send(meth,args) right... `this` gets bound while it executes and there isn't much else to it I thought
<Guest50518>
well i mean you can use a language for a long time and now try to pry it apart like this :]
dhjondoh has joined #ruby
<Ox0dea>
Guest50518: You used #send with an explicit receiver there, in which case `self` is largely irrelevant.
freerobby has quit [Quit: Leaving.]
<Ox0dea>
JavaScript's `this` is much less sane than Ruby's `self`.
EllisTAA has joined #ruby
<Ox0dea>
Method dispatch in Ruby is almost completely regular, which is no small feat given the depth of its object system.
<baweaver>
I always want to say this is garbage, but I can never remember what this is
wldcordeiro has joined #ruby
opensource_ninja has quit [Quit: opensource_ninja]
<Guest50518>
I guess it's apply() been a while... (function(){ return this.x; }).apply({ x: 5 }) // 5
iamjarvo_ has quit [Quit: Computer has gone to sleep.]
blackmesa has joined #ruby
wottam has joined #ruby
<Ox0dea>
Right, we have to more explicitly bind in Ruby, but that's arguably for the better.
<Guest50518>
Ox0dea: your just saying that ruby actually analyze the function body to try and link the method calls and other details?
arup_r has quit [Quit: Leaving]
<Ox0dea>
Guest50518: Yes, some bookkeeping takes place immediately at the invocation of, say, #define_singleton_method.
<Guest50518>
yea but in the example I had my method literally just returned 5... it's not doing anything that couldn't work
Gnomethrower has joined #ruby
Gnomethrower has joined #ruby
wldcordeiro has quit [Ping timeout: 264 seconds]
<[k->
unless the property x didn't exist
<Ox0dea>
Ruby doesn't need to look into the method body to determine that you're doing something wonky.
phutchins1 has quit [Ping timeout: 244 seconds]
blackmesa has quit [Ping timeout: 240 seconds]
<Ox0dea>
It would be very strange if it did.
<Ox0dea>
Outside of some weird Platonic ideal, a class is not its instances.
RegulationD has joined #ruby
<Ox0dea>
I realize that's sort of what we're trying to finagle Ruby into believing for wanting #class_function, but the point remains.
Ryzokuken has quit [Quit: Connection closed for inactivity]
jenrzzz has quit [Ping timeout: 240 seconds]
boshhead has joined #ruby
<[k->
you can't pluck a gorilla out of a jungle without bringing the jungle and bananas too
blueOxigen has joined #ruby
bluOxigen has quit [Ping timeout: 250 seconds]
ruurd has quit [Quit: ZZZzzz…]
<Guest50518>
yea happens if I try to use that technique to copy a method from one class to another
<Ox0dea>
Guest50518: And for the very same reason.
<Guest50518>
I guess you could use one of those decompile/recompile tricks
<Guest50518>
yea i was just testing
<Guest50518>
to prove that would happen
<Ox0dea>
Guest50518: RubyVM::InstructionSequence#load is disabled at present. :(
RegulationD has quit [Ping timeout: 252 seconds]
pyon has joined #ruby
<Ox0dea>
They'd just have to uncomment the line.
sdwrage has joined #ruby
<Guest50518>
hm strange?
<Ox0dea>
"No verifier".
tagrudev has joined #ruby
<Ox0dea>
This language used to let us play with scissors.
<Guest50518>
i thought there was those sexpression dump/loaders
<Ox0dea>
Aye, there's RubyVM::InstructionSequence#to_a for dumping.
roxtrongo has quit [Remote host closed the connection]
<certainty>
it used to be the first compiler that actually used that technique
tuor has quit [Ping timeout: 265 seconds]
havenwood has quit [Ping timeout: 260 seconds]
charliesome_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
deg_ has quit [Ping timeout: 250 seconds]
<certainty>
shevy: felix (the creator of CHICKEN) had a plastic toy of Feathers McGraw on his desk when he thought of a working title for the compiler.
<certainty>
so :)
firstdayonthejob has quit [Ping timeout: 240 seconds]
jun_ has quit [Remote host closed the connection]
<Ox0dea>
Guile is just a pun on "scheme", but it's not terrible.
<Ox0dea>
Not as good as Racket, admittedly.
deg_ has joined #ruby
aganov has joined #ruby
Couch has joined #ruby
piotrj has quit [Read error: Connection reset by peer]
piotrj has joined #ruby
<shevy>
those all caps freaks me out
<shevy>
someone tell FELIX this
<Ox0dea>
It's disgusting.
<shevy>
lol
jenrzzz has quit [Ping timeout: 246 seconds]
<shevy>
certainty hah I heard that explanation before
<Ox0dea>
Common Lisp symbols are case-insensitive!
<Couch>
What's a good library for calling rest style json api's ?
<shevy>
someone picked a nick after toothpaste
<shevy>
because it was nearby at the time of when a name had to be picked
<spotted>
the first part of the ternary is the condition
patchedmonkey has quit [Client Quit]
<Ox0dea>
spotted: Because it is printing in either case.
patchedmonkey has joined #ruby
<Ox0dea>
If the conditional is true, it's printing the balance, and if it's not, the string in `pin_error` is displayed instead.
maletor has quit [Quit: Computer has gone to sleep.]
<Ox0dea>
The way you've rewritten it, `pin_error` is being called, but you're not printing its return value.
<spotted>
Ox0dea, doesn't the return in the function print the result when the function is called, in this case a string with an error?
<Ox0dea>
spotted: No, not unless you explicitly tell it to do so.
<spotted>
Ok so it just returns a value that I have to either print or store in a variable eventually
<Ox0dea>
That's right.
<spotted>
Now I got it clear, thanks. :)
<Ox0dea>
Happy to help.
<spotted>
I am gonna stay on Ruby until everything is clear before to go to ROR which is what I need
<Ox0dea>
> everything is clear
<Ox0dea>
Tall order, that.
Xeago has joined #ruby
<spotted>
Well, at least the basics... :))
pawnbox has quit [Remote host closed the connection]
<Ox0dea>
Aye, I took your point. :) It certainly makes sense to learn to walk before you run.
pawnbox has joined #ruby
spotted is now known as Deviad
drptbl has joined #ruby
piotrj has quit [Remote host closed the connection]
<Ox0dea>
Deviad: I've said it before, but this is what happens if you try to learn Rails before you've got a solid Ruby foundation: https://www.youtube.com/watch?v=TRqGmmCy8aU
ta has joined #ruby
<Deviad>
Ox0dea, maybe instead of redoing all the course on Codecademy I should make the exercises on "Learn Ruby the hard way"
<Deviad>
A book with exercises
dikaio has quit [Quit: ........]
piotrj has joined #ruby
robbyoconnor has quit [Read error: Connection reset by peer]
roxtrongo has quit [Remote host closed the connection]
<Ox0dea>
I think it's lacking in a few places, but if you take the time to really understand why you got the okay instead of racing to the top of the mountain, you'll come out primed to start piling on the details.
beast has joined #ruby
TheHodge has joined #ruby
sjums has left #ruby [#ruby]
Xeago has quit [Remote host closed the connection]
robbyoconnor has joined #ruby
Anti-Pizza has quit [Read error: Connection reset by peer]
<Deviad>
Ox0dea, thanks, I will install it on my VM with Ubuntu
joonty has joined #ruby
<Ox0dea>
Deviad: There's an online facsimile, if you'd prefer: http://rubykoans.com/
<Ox0dea>
But you shouldn't.
<Ox0dea>
Running it locally is more likely to get you addicted to red-green-refactor.
<Deviad>
Ox0dea, it's funny that here in Romania I did not find any programmer that wants to switch from PHP to Ruby for some projects (I'm Italian).
<Deviad>
Ox0dea, as answers I got: Ruby is insecure, Ruy is slow...
charliesome has joined #ruby
mikecmpbll has joined #ruby
<Deviad>
So I went to exploit repositories and it came out that PHP actually has a few bugs discovered in 2015 and actually it has a few refactoring tools
<Deviad>
and Ruby has*
<adaedra>
Hi
<Ox0dea>
Deviad: It's true enough that PHP has gotten "better", for some definition.
<Deviad>
Ox0dea, I cannot either disagree or agree on that given my knowledge of PHP, but if then I have to learn also Laravel and have twice the code I have with Ruby for the same app
<Ox0dea>
That diatribe should help you make up your mind. :P
<Deviad>
me I prefer Ruby then... the more you have to write the more mistake you are likely to make
drptbl has quit [Quit: My MAC has gone to sleep. zZz..]
<Deviad>
mistakes*
<Ox0dea>
A perfectly sensible view of the thing.
<Deviad>
Otherwise they would have not devised C once they devised Assembly...
<Ox0dea>
Well, you're talking about abstraction more than lines of code.
devoldmx has joined #ruby
drptbl has joined #ruby
<Deviad>
Also, ruby has keywords like unless that everyone can understand and it improves your readability so far I would not think about learning something else
<Ox0dea>
Deviad: There are many such features which make Ruby a pleasant language to program in, but mind you don't become a Blub programmer. http://c2.com/cgi/wiki?BlubParadox
Hounddog has joined #ruby
krisquigley has joined #ruby
<yorickpeterse>
morning
<Ox0dea>
That said, Ruby is objectively the greatest programming language ever devised.
devoldmx has quit [Ping timeout: 246 seconds]
<Deviad>
Ox0dea, once my 10' is over, I am instaling koans. :))
Nego_Fua has joined #ruby
<Ox0dea>
Yay!
htmldrum has quit [Ping timeout: 240 seconds]
emilkarl has joined #ruby
qba73 has joined #ruby
tsujp has joined #ruby
Hounddog has quit [Ping timeout: 272 seconds]
Hounddog has joined #ruby
moeabdol has quit [Ping timeout: 250 seconds]
jenrzzz has quit [Ping timeout: 265 seconds]
felixr has joined #ruby
karapetyan has quit [Remote host closed the connection]
workmad3 has joined #ruby
yfeldblum has joined #ruby
piotrj has quit [Remote host closed the connection]
Xeago has joined #ruby
tesuji has joined #ruby
workmad3 has quit [Ping timeout: 240 seconds]
karapetyan has joined #ruby
zotherstupidguy has quit [Ping timeout: 246 seconds]
Xeago has quit [Remote host closed the connection]
Kendos-Kenlen has joined #ruby
cih has joined #ruby
dhjondoh has quit [Quit: dhjondoh]
zotherstupidguy has joined #ruby
karapetyan has quit [Ping timeout: 246 seconds]
marr has joined #ruby
dhjondoh has joined #ruby
karapetyan has joined #ruby
<agent_white>
Ox0dea: +1 for Blub. Never seen that before!
Ox0dea has quit [Read error: Connection reset by peer]
Cyther has joined #ruby
<certainty>
agent_white: check out paul graham on that topic
<agent_white>
certainty: Ah no worries! You knowing it reinforces the fact it's a fairly important read :D
Pupeno has joined #ruby
roxtrongo has joined #ruby
ReK2 has joined #ruby
Balzrael has joined #ruby
Cyther_ has quit [Ping timeout: 268 seconds]
<certainty>
agent_white: it has some good points but of course is quite biased
jwang has joined #ruby
ndrei has quit [Ping timeout: 264 seconds]
bronson has joined #ruby
Kendos-Kenlen has quit [Quit: Konversation terminated!]
blackmesa has joined #ruby
Voker57 has joined #ruby
dmolina has joined #ruby
karapetyan has quit [Ping timeout: 264 seconds]
anisha has joined #ruby
Kendos-Kenlen has joined #ruby
UtkarshRay has joined #ruby
blaxter has joined #ruby
spotted has joined #ruby
cih has quit [Remote host closed the connection]
rfv_ is now known as rfv
bronson has quit [Ping timeout: 244 seconds]
<spotted>
I just realized that in codecademy there is no mention to try catch kind of syntax
<adaedra>
there's no "try" keyword, it's done with "begin ... rescue ... end" in ruby
cih has joined #ruby
tsujp has quit [Quit: tsujp is snoozing]
workmad3 has joined #ruby
sheperson has joined #ruby
piotrj has joined #ruby
zlogan has joined #ruby
blackmesa has quit [Ping timeout: 268 seconds]
<bnagy>
ruby has do, or do not. There is no try.
<adaedra>
ssh, no try, only raise now.
karapetyan has joined #ruby
Porfa has joined #ruby
<certainty>
spotted: probably throw and catch?
<certainty>
that exists
<certainty>
it allows you to have non local exits. Much like invoking continuations
workmad3 has quit [Ping timeout: 252 seconds]
karapetyan has quit [Remote host closed the connection]
rdark has quit [Changing host]
rdark has joined #ruby
karapetyan has joined #ruby
karapetyan has quit [Remote host closed the connection]
subshad has joined #ruby
SylarRuby has quit [Remote host closed the connection]
sheperson_ has joined #ruby
rdark has quit [Quit: leaving]
sheperson has quit [Ping timeout: 250 seconds]
sheperson_ is now known as sheperson
rdark has joined #ruby
rdark has quit [Changing host]
rdark has joined #ruby
j___ has quit [Ping timeout: 265 seconds]
Porfa has quit [Remote host closed the connection]
Porfa has joined #ruby
<certainty>
shevy: matz mentions a quote from dave thomas that programming is the process of designing your own dsl. Turns out that's a core idea of lisp. Adding utilities that enrich the language so that you can express what you want to express in order to solve your problem
<spotted>
adaedra: I was thinking about other exceptions, for example a user types a phone number in the wrong format
piotrj has quit [Remote host closed the connection]
Macaveli has quit [Ping timeout: 264 seconds]
Macaveli_ has joined #ruby
piotrj has joined #ruby
<spotted>
I had a look at throw and catch, it's like when a compiler finds an error, in an exam I was supposed to create a parser that did not stop at the first error
<adaedra>
If it raises an exception, you catch it with rescue
<spotted>
adaedra: OK, so begin and rescue are the tools in that case
<adaedra>
You can restrict the exception you catch in rescue, i.e. `rescue MyApplication::FuckingUserIsNotCapableOfEnteringASimpleTelephoneNumber`
AlexRussia has quit [Ping timeout: 244 seconds]
piotrj has quit [Read error: Connection reset by peer]
piotrj_ has joined #ruby
Mia has quit [Read error: Connection reset by peer]
<zenspider>
colorisco: the file doesn't exist. either make it exist or load the file that does
lkba has quit [Remote host closed the connection]
<colorisco>
which file?
<zenspider>
colorisco: what does the error say?
<colorisco>
i installed ruby and padrino and didn't change
mxrguspxrt has joined #ruby
<colorisco>
any file
Pupeno has quit [Remote host closed the connection]
<zenspider>
question for the channel: do you consider yourself a hacker (old school definition, not media def) and why?
Pupeno has joined #ruby
<zenspider>
colorisco: no, the error doesn't say that
<herbst>
zenspider: i do, because pretty much my whole free time is spent on geeky random technical projects
<atmosx>
zenspider: absolutely not.
<bnagy>
zenspider: yes
<zenspider>
herbst: examples of said projects and motivations pls
devoldmx has quit [Ping timeout: 255 seconds]
<zenspider>
bnagy: go on
<zenspider>
atmosx: absolutely not what? and why?
<bnagy>
because my full time job for the last X years has been software vulnerability research
<bnagy>
so pretty squarely in the definition :P
<zenspider>
mmmm... maybe I should start over with "what is your definition of hacker"?
sheperson has quit [Quit: sheperson]
<certainty>
zenspider: yes. I'm constantly looking to expand my knowledge and working with people to actively share it. I'm striving for excellence. (i'm considering somewhat akin to the MIT hacker culture here)
<herbst>
zenspider: from websites/services to "drivers" whatever comes to my mind. Like i found a LED strip cheap, so i bought it, wrote a custom driver in ruby and now have my custom led strip
<herbst>
if thats not hacking, i have no idea what is
<bnagy>
it's funny, the 90s definition was more or less either way
FrankD has joined #ruby
<bnagy>
unexpected programming / actual (what's now called) hacking
<zenspider>
certainty: MIT is the basis of my definition too.
<bnagy>
the people writing breathless defences of the term gave up like 25 years ago
<bnagy>
there's also quite a lot of hacking involved in hacking, as it were
mikecmpbll has quit [Read error: Connection reset by peer]
<atmosx>
zenspider: Yeah, I know. But that's what I call a hacker :-)
<zenspider>
fair
<bnagy>
for researchers, anyway. Lots of gnarly code to write to do weird stuff.
<zenspider>
*nod*
<agent_white>
I've heard "hacking" as "scrapping shit together" lately... I still think it means 'modifying something to do unintended things'.
<certainty>
zenspider: may I know why you ask?
<zenspider>
working on a talk
<certainty>
what will it be about?
<zenspider>
that's a damn good question.
<zenspider>
the title is "mind of a hacker"... the actual outline? fuck if I know at this point
<certainty>
:)
<adaedra>
agent_white: lately?
<agent_white>
Sounds like you had a goal in mind if you're asking the audience if they think they're a hacker.
<certainty>
zenspider: but that's a central point. being a hacker is a mindset. It's most of the time associated with tech stuff but it needs not, as you know
blackmesa has joined #ruby
<agent_white>
adaedra: As in the past few years or so. 'Weekend hack' or 'hacked together' are the phrases I've heard.
<certainty>
that's why i don't like those "you're a hacker if you know x,y" stuff
<funkenstrahlen>
jhass: /close
funkenstrahlen has left #ruby ["WeeChat 1.1.1"]
<adaedra>
ok
<zenspider>
bnagy: hah! that's... well that's horrible. :) I guess mov is the nand/nor of the compiler world
<certainty>
i guess many of the early hackers beside making hacks for the first computers had visions. They recognized what's lacking and found a way to provide it in a smart way
<certainty>
rms for example
<bnagy>
I think they followed up with compilers for XOR and SUB
<certainty>
or wozniak
<zenspider>
"The M/o/Vfuscator contains a complete mov-only floating point emulator." jesus ... wow
<bnagy>
loaaads of hax in early unix
<bnagy>
resource constraints will do that when you're inventing compilers
<certainty>
rms also notes that being playful with your solutions to difficult tasks is somewhat characteristic
<certainty>
anyway back to work :)
<bnagy>
it might be reasonable to say that hacking is about making something do something it's not really supposed to do
<zenspider>
certainty: thanks
<certainty>
bnagy: yeah that's a good point
<certainty>
zenspider: yw
<bnagy>
which works just as well for hacking in the security sense
<zenspider>
bnagy: yeah. I like that
<agent_white>
certainty: I dunno. Is that being a 'hacker'? Filling a need?
<agent_white>
Or is that just programming?
<zenspider>
also: understanding systems you're not meant to understand... etc
<agent_white>
Or... /shrug
<Deviad>
Is it possible to use retry after rescue a defined number of times, let's say 3?
<bnagy>
Deviad: just use a counter in the rescue block
<atmosx>
zenspider: if I may ask, what kind of audience do you expect to face in this talk?
<atmosx>
zenspider: ruby conf?
<zenspider>
Deviad: don't understand your question... "defined" a number of times?
nfk|laptop has quit [Ping timeout: 240 seconds]
<zenspider>
atmosx: LA ruby conf
<Deviad>
zenspider, I read that retry loops infinitely
workmad3 has joined #ruby
<Deviad>
until the user takes proper action
<agent_white>
Aye, that's what I said. Modifying/manipulating a system to produce unintended results... aka, the de-facto example of the cap'n crunch whistle.
<certainty>
agent_white: nope, i was unclear about that. It's about seeing that something doesn't provide what you want and make it possible
subshad has quit [Read error: No route to host]
<Deviad>
but let's say I want to use this to let the user input his credit card number, normally he has got 3 tries
<bnagy>
atmosx: for some definition of "know" yeah
<atmosx>
bnagy: really? heh
<Deviad>
atmosx, thank you!
<atmosx>
Deviad: :-)
<zenspider>
ah ah ah... right. thanks.
<zenspider>
my dad supposedly went to college with someone of the same caliber. timeframes match up pretty well too
<agent_white>
Blow a cereal box whistle into a phone, initiate a new trunk... cool stuff.
<bnagy>
opinions of his technical haxxing abilities (apart from the whistle) vary
<bnagy>
but then again he was a contemporary (and once at least acquaintance) of woz
<atmosx>
zenspider: but anyway, don't go *there* IMHO, since we're talking mainly about programmers, they will have a definition of hacker much closer to ESR (know more than 2 programming paradigms, invovled with open source, technically flawless on some fields, etc.).
<agent_white>
Aye I bet. Like I said, he said he learned about it from 'the blind kids'. So he probably just ended up being the face of it all for whatever reason.
<certainty>
the reversing community is a good example of hackers
<certainty>
reverers
<bnagy>
I don't think I can get behind a definition of hacking / hacker that is based on what you know
<certainty>
ok i need to become a hacker at english
zeroDivisible has joined #ruby
<certainty>
reversers
<marahin>
;-)
<bnagy>
but I certainly think 'hackers' have things in common about approach / attitude etc
<bnagy>
it's certainly not book larnin
<agent_white>
Or the BGP hack... shit, definition of 'hacking'. They used the BGP protocol as programmed, without modifications, to encur undesired consequences.
<agent_white>
s/programmed/defined/
<atmosx>
IMHO it's a kind of "honor" that others should give t you. Going around saying "I'm a hacker" is ridiculous IMHO.
lxsameer has joined #ruby
<agent_white>
^
<certainty>
i don't think that's necessarily true. But it certainly doesn't make you a hacker just by saying you are
<bnagy>
I self identify as a hacker. Your argument is invalid.
<agent_white>
_why's freakyfreaky sandbox also was a badass 'hack'. Redefining ruby internals/symtables/etc to make a sandbox? Kewl stuff.
<bnagy>
it's >20 years to late to untangle 'hacking' from a security connotation
<atmosx>
bnagy: well, you might be one. I don't know, I'm not familiar with your resume.
j___ has joined #ruby
<zenspider>
atmosx: there seems little H about your IMHO declarations
phutchins1 has joined #ruby
<bnagy>
I don't feel like it's _limited_ to security stuff, by any means
<zenspider>
bnagy: of course not. but there is probably selection bias in that subfield
<bnagy>
but I also don't feel like choosing the flight that has the most miles make you a travel hacker or whatever
<agent_white>
bnagy: Aye. Very rhetorical.
<zenspider>
haha
<zenspider>
I'm the worst travel hacker ever then
jas02 has joined #ruby
<agent_white>
zenspider: What's the aim for your talk, anyways?
c0m0 has joined #ruby
<zenspider>
bnagy: I am trying to come at this from the "approach / attitude" perspective. at least mine. not the history of or notable hackers or whatnot.
<zenspider>
agent_white: to educate and/or entertain for 30-45 minutes
colorisco has quit [Remote host closed the connection]
<agent_white>
zenspider: Haha fair enough!
<atmosx>
zenspider: can you identify 5 ppl that would you call 'hackers'? WIthout taking any kind of pointer for this discussion. Actually before this talk?
<bnagy>
hackers I know of either stripe are self-directed, tend towards individualism, often maybe a bit obsessive, and favour results over form
phutchins1 has quit [Ping timeout: 246 seconds]
RegulationD has joined #ruby
bronson has joined #ruby
Seich has quit [Ping timeout: 246 seconds]
<herbst>
RMS, Torvalds, early Gates, Jobs & Woznark. Those are classic hackers IMHO
colorisco has joined #ruby
<zenspider>
atmosx: I believe we're done. I don't find any of your dialog to be constructive and you've already said you don't have a dog in this fight, so I don't see the point of it.
<certainty>
jobs?
<certainty>
i don't know
<agent_white>
Jobs no way.
<atmosx>
zenspider: ok
<herbst>
notice the "early". He wasnt a code hacker tho, but for sure a mind hacker
<herbst>
i am no fan of apple myself
<bnagy>
I don't think iconic programmers are the best examples of hackers.
<zenspider>
mind. hacker. so... david copperfield ?
<bnagy>
I mean writing an OS for fun is not _not_ hacking, sure
<herbst>
with mind i rather ment: marketing, design, feelings. he was good at that shit
<certainty>
hmm i somewhat associate ethic with hackers
<certainty>
i know that term is very fuzzy
<certainty>
but jobs, well
tvw has joined #ruby
RegulationD has quit [Ping timeout: 246 seconds]
bronson has quit [Ping timeout: 264 seconds]
ruurd has quit [Quit: Bye]
colorisco has quit [Ping timeout: 250 seconds]
<bnagy>
probably a certain degree of anti-authoritarianism has been fairly central to 'hacking / hackers' in all sense
<bnagy>
s
<agent_white>
^
rubybeginner has joined #ruby
<zenspider>
F.A.Q: Q: Why did you make this? A: I thought it would be funny.
<zenspider>
from movfuscator
<agent_white>
In the simplest forms... http://www.cultdeadcow.com/cDc_files/cDc-0334.html -- "how to be an anarchist at 7-11" -- "... stir your slurpee... you'll notice a cylindrical hole in the slurpee... core out the center multiple times and refill for max slurpee potential"
<certainty>
agent_white: haha haven't heard of them in a while. What was is back orifice?
<agent_white>
certainty: Yup, same dudes who did back orifice :)
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<certainty>
i loved that when i was young
Jameser has joined #ruby
Cyther_ has joined #ruby
piotrj_ has quit [Remote host closed the connection]
Jameser has quit [Remote host closed the connection]
<certainty>
that's also when i was doing crackmes all night
Jameser has joined #ruby
piotrj has joined #ruby
<Porfa>
i have a problem in a loop… my loop creates an element, and fills in data from array, but these elements are named in a sequence (f04_0001, f04_0002, f04_0003 and so on..)
Cyther has quit [Ping timeout: 255 seconds]
<Porfa>
the thing is, my loop can't fil the data to the element f04_0010, because my loop is saying to fill it to "f04_00010"
<zenspider>
Porfa: lemme guess... you're STILL doing strings and abusing eval?
<Porfa>
no no zenspider, i found the light
<zenspider>
prove it. show some code
<Porfa>
ok
<shevy>
hah :)
<shevy>
Porfa remember the [TIME STAMP] above? :>
<agent_white>
certainty: I was a hackthissite kid myself :P
<Porfa>
shevy: ahha ofcourse
<shevy>
<Porfa> and everything is working now as expected
<shevy>
<shevy> [TIME STAMP]
<shevy>
tada!
blackmesa has quit [Ping timeout: 272 seconds]
Jameser` has joined #ruby
<shevy>
Porfa you need to start to use methods
<shevy>
ensure that the method returns the desired result
<shevy>
such as the incrementing string "f04_0010" "f04_0011" and like starting one "f04_0001"
<shevy>
once you put the stuff into a method, it will be easier, since all you have to do is change your method if you need a change in the generating-pattern
<zenspider>
none of that makes any sense to me. all sorts of things that are confusing as fuck
blackmesa has joined #ruby
<Porfa>
i guess i'll just limit the loop to 10 then
<[k->
* sighs *
<shevy>
lol
<[k->
do you not read?
<shevy>
Porfa quit being a noob man, ACCEPT THE CHALLENGES, IMPROVE THE CODE
<[k->
the problem is, f04_000 is hardcoded
<[k->
when ruby increments it, it just tacks it to the end
<zenspider>
making an array of numbers from 1 to N, enumerating w/ each_with_index so you can ALSO have 0 to N-1. generating strings of code using index+1 ... what. the. fuck.
egrm has joined #ruby
<shevy>
Porfa btw, if you want to use #{} in a string, you have to use "" not ''
<[k->
f04_000 + 1 = f04_0001
egrm has left #ruby [#ruby]
<zenspider>
guys. the variable names don't matter
K1MOS has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
<[k->
f04_000 + 10 = f04_00010
<zenspider>
the lack of clarity of goal here does
<adaedra>
[k-: it's a shame String#%'s documentation doesn't explain much.
<Porfa>
k- yeah
<[k->
yeah, so we have to check two links :(
<zenspider>
adaedra: sarcasm?
<Porfa>
zenspider: met, i was doing hello world 2 months ago, EVER.
<Porfa>
i was forced to learn how to use ruby to help my family company
<Porfa>
and i have been learning as i go, I'm a total newb but i am being able to help them out
<Porfa>
so I'm happy with that
skade has joined #ruby
<adaedra>
zenspider: no. You have to go to Kernel::sprintf to have flags. So when you link to String#% doc, there's not too much.
nw1 is now known as nw
<zenspider>
adaedra: except explicit instruction pointing you at sprintf
blackmesa has quit [Ping timeout: 260 seconds]
<zenspider>
seems like the bases are covered
<adaedra>
zenspider: I know
Xeago has joined #ruby
<adaedra>
But that's another step!
<adaedra>
Such a waste of time!
lubarch has joined #ruby
dhjondoh has joined #ruby
<zenspider>
I'm going to pretend there's sarcasm
skade has quit [Client Quit]
<Porfa>
they have been wasting massive amounts of time to manually open a product page from the supplier, copy paste every little info into our business back office, and then taking the images, resizing them, and uploading.. thanks to ruby i am able to do all of that in 2 minutes now, running "script.rb "url to site" from my terminal. i create products pretty fast this way.
<adaedra>
In the last ones, yes, there is.
UtkarshRay has quit [Ping timeout: 240 seconds]
piotrj has quit [Remote host closed the connection]
<[k->
Porfa, see String#succ (workmad3)
<Porfa>
ok
<Porfa>
i will google that hopefully i will get there
<adaedra>
zenspider: note that I completely understand why it's done this way and have no problem with the documentation itself. Just the two steps which are minor annoyances. No offences intended.
<Porfa>
just to read you saying that send shivers down my spine, wth is a method
<Porfa>
i shoulda have learned ruby with the masters when i was in GNAA 10 years ago
terlar has joined #ruby
agentmeerkat has quit [Ping timeout: 264 seconds]
piotrj has joined #ruby
<adaedra>
"wth is a method"
<adaedra>
this is ruby basics
eGGsha has joined #ruby
<shevy>
Porfa methods/functions are everywhere, it won't matter from where you pick it up so you need to start doing so
<shevy>
"installing `ruby2.0` results in ruby 1.9.3-p484 as default version"
<shevy>
hmmmm
giuseppesolinas has joined #ruby
<Porfa>
if i read Learn to Program by Chris Pine, will i be better? i will read it 5 times in a row before touching any other book
Azure has joined #ruby
giuseppesolinas_ has joined #ruby
tkuchiki has quit [Remote host closed the connection]
<Porfa>
i only got that ruby book, i got it like two weeks ago, but i've been so filled with this stupid scripts that i haven't got the time to pick it up
dhjondoh1 has joined #ruby
<workmad3>
Porfa: have you considered that if you took the time to read that book, you'd probably be able to sort out your script in a tiny fraction of the time you've already taken?
<Porfa>
i know, but if i stop the business gets hit, I'm running out time to do my own stuff, and that own stuff isn't playing video games or drinking
<Porfa>
but i guess i have to find a way
dhjondoh has quit [Ping timeout: 260 seconds]
<workmad3>
Porfa: the business is getting hit anyway if you're spending way too long because you don't know the foundations
dhjondoh has joined #ruby
agentmeerkat has joined #ruby
karapetyan has joined #ruby
c3phalex1n has quit [Ping timeout: 272 seconds]
ndrei has joined #ruby
dhjondoh1 has quit [Ping timeout: 250 seconds]
Flying_Squirrel has joined #ruby
jenrzzz has joined #ruby
Prominent has joined #ruby
<shevy>
you need to learn the basics
<shevy>
then you'll be allowed to grow a beard like workmad3
<shevy>
which will dignify you as a mighty hacker
<workmad3>
shevy: my beard isn't @ mighty hacker lengths yet
<workmad3>
more unix acolyte neckbeoard
<workmad3>
*neckbeard
gener1c_ has joined #ruby
eGGsha has joined #ruby
<tuor>
hi, what gem would you use for managing keepass databases? (I know there are multiple but which one do you recomend?)
<jhass>
adadada: that wouldn't work in regular code either
<adadada>
I don´t know what that means
unshadow has joined #ruby
<jhass>
[k-: turn a step down, we're at basics of how the syntax for blocks looks like
<[k->
doesn't adaedra know?!
<jhass>
adadada: ".each |f|" do you write that in your regular code exactly like this too?
jalnt has joined #ruby
<adadada>
no
<[k->
you need a do
<adaedra>
know what ?
<[k->
.each do |f|
<jhass>
adadada: so don't in erb
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<[k->
who is adadada
<adadada>
sure, yes
charliesome has joined #ruby
<adadada>
I understand this
<[k->
what
<[k->
what
<[k->
adaedra adadada?!
charliesome has quit [Client Quit]
<adaedra>
What
<[k->
im confused
<adadada>
however it gets already a synax error in the code that is like the ruby code
felixr has joined #ruby
<certainty>
[k-: two different nicks
<[k->
i thought adadada was adaedea
<[k->
adaedra*
iceyec has joined #ruby
<adaedra>
[k-: look at the hosts. I'm not in NL.
<[k->
no, i took mental shortcuts
<jhass>
adaedra: we can't see your screen
<jhass>
bah
<jhass>
adadada: ^
<[k->
i saw many as and many ds
<adaedra>
:D
<certainty>
told you it's going to be confusing
Jameser` has joined #ruby
<jhass>
you two are fucking up weechat's LRU
[k- is now known as adaedada
<adaedada>
hello
tkuchiki has quit [Remote host closed the connection]
<certainty>
;)
<adaedada>
XD
<adadada>
omg lol
<adaedra>
.
<jhass>
I'll just kick two I guess
<adaedra>
maybe we can go back to ruby, instead of making fun of our nicks?
AlexRussia has joined #ruby
<adadada>
ok wait a minute, I will show the ruby code I try to use in the template
<adadada>
or, maybe I can just write a method to retrieve my data and iterate over the output of hte method?
cih has joined #ruby
<adadada>
maybe is better
<jhass>
it probably is
<jhass>
depends a bit on the context of all this
<adadada>
yesh it is capistrano deployment stuff
<`derpy>
I think it's better to keep operations in the erb at a minimum
<jhass>
no idea how to structure these cleanly then
adaedada is now known as [k-
<adadada>
anyway, I will try what I just said I guess
sankaber has joined #ruby
sdwrage has quit [Quit: Leaving]
<`derpy>
[k-: don't you have colors in your IRC client to differentiate people?
Lycanii has quit [Remote host closed the connection]
janno_ has quit [Quit: leaving]
tkuchiki has joined #ruby
tkuchiki has quit [Remote host closed the connection]
<adadada>
thanks for hte help anyway!
monoprotic has joined #ruby
zlogan has quit [Ping timeout: 260 seconds]
cina has quit [Remote host closed the connection]
p0wn3d has joined #ruby
Sembei has joined #ruby
auzty has quit [Quit: Leaving]
zlogan has joined #ruby
Pisuke has quit [Ping timeout: 260 seconds]
Porfa has left #ruby [#ruby]
roger_rabbit has quit [Ping timeout: 264 seconds]
janno has joined #ruby
frmendes has quit [Ping timeout: 246 seconds]
tagrudev has quit [Remote host closed the connection]
tagrudev has joined #ruby
huddy has quit [Quit: Connection closed for inactivity]
krisquigley has joined #ruby
allomov has quit [Remote host closed the connection]
stamina has quit [Quit: WeeChat 1.3]
<[k->
i do, that's why i was confused when there was another colour
DLSteve has joined #ruby
<[k->
that was how i found out adadada wasnt adaedra
krisquigley has quit [Ping timeout: 268 seconds]
tkuchiki has joined #ruby
Prominent has quit [Quit: Leaving]
allomov has joined #ruby
DoubleMalt has quit [Remote host closed the connection]
DoubleMalt has joined #ruby
p0wn3d has quit [Ping timeout: 255 seconds]
devoldmx has joined #ruby
blackmesa has joined #ruby
phutchins1 has joined #ruby
hs366 has joined #ruby
frmendes has joined #ruby
blackmesa has quit [Ping timeout: 240 seconds]
Flying_Squirrel has quit [Ping timeout: 250 seconds]
karapetyan has joined #ruby
KinderSpiel has quit [Ping timeout: 246 seconds]
krisquigley has joined #ruby
SylarRuby has joined #ruby
skweek has joined #ruby
stamina has joined #ruby
davedev24 has joined #ruby
p0wn3d has joined #ruby
cassioscabral_ has joined #ruby
devoldmx has quit [Remote host closed the connection]
k3asd` has quit [Ping timeout: 250 seconds]
lubarch has joined #ruby
apt-get has quit [Read error: Connection reset by peer]
phutchins1 has quit [Ping timeout: 240 seconds]
dmolina has quit [Quit: Leaving.]
jalnt has quit [Read error: Connection reset by peer]
<odigity>
I just added bookmarks directly to all core and stdlib docs I might want to use in my broswer for convenience. Many, there is a ton of crap in there. I feel bad for the maintainers. I kind of wish they had used ruby 2 as an opportunity to kick out half of it (at least from core to stdlib).
ruurd has quit [Quit: ZZZzzz…]
atomical has joined #ruby
<odigity>
It was both eye-opening an educational. For example, did you know 3/2 == 1? But when you require 'mathn' (which I didn't know existed before this), then 2/3 == 3/2?
roxtrongo has quit [Ping timeout: 240 seconds]
<shevy>
[k- damn it, I thought it was adaedra
zlogan has quit [Ping timeout: 250 seconds]
roxtrongo has joined #ruby
Nego_Fua has quit [Ping timeout: 240 seconds]
KinderSpiel has joined #ruby
skweek has quit [Remote host closed the connection]
<zomgbie>
I would love to chat with anybody trying to shoot for a microservice architecture who wants to be dependent on as few gems as possible. Is Sinatra still a good way to go about this or does a Rack based application really suffice?
pepperbreath1 has joined #ruby
allomov has quit [Remote host closed the connection]
Gnomethrower has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<zomgbie>
By suffice I mean still being practical... There is so much going on grape, volt (the whole opal stack is interesting from a UI perspective - i.e. building an API for a mobile app while still delivering a HTML based frontend)
roxtrong_ has joined #ruby
<zomgbie>
React.rb... too many choices.
<zomgbie>
(First world problems!:D)
sanjayu has quit [Ping timeout: 252 seconds]
prestorium has joined #ruby
pepperbreath has quit [Ping timeout: 240 seconds]
ericjphillips has quit [Quit: Leaving.]
<zomgbie>
E.g. I always liked Rails :format json/html in controllers so that is something which speaks for Sinatra in my book... but I'm still undecided, supposedly you can (and should?) run Sinatra alongside grape (for REST api only)...
<johnzorn>
I'm writing a method for a class and would like to do something like this: collection.select(self.even?) is this possible or do I have to create a block?
<adaedra>
What are you trying to do, select even numbers in your collection?
<adaedra>
collection.select(&:even?) # may be what you look for
vondruch has quit [Ping timeout: 268 seconds]
`tim` has joined #ruby
<johnzorn>
no it's more like: possible_neighbours(cell).select(alive?)
mghaig has joined #ruby
<johnzorn>
alive? being a method on the class
<zomgbie>
haha
InternetFriend has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dhjondoh has joined #ruby
<adaedra>
johnzorn: so, as a block, .select { |e| e.alive? } ?
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<[k->
hmmmm
<Ox0dea>
johnzorn: For what it's worth, "possible_neighbours" is a wordy misnomer; they're all neighbors.
<Ox0dea>
Conway's Game of Life is secretly a graveyard.
<Ox0dea>
Cheap profundity is best profundity.
Azure has quit [Remote host closed the connection]
symbol_ has joined #ruby
<[k->
i bet i could repurpose grid to conway's game of life after i finish it
zomgbie has quit [Read error: Connection reset by peer]
whippythellama has joined #ruby
yardenbar has quit [Read error: Connection reset by peer]
JaReAx has quit [Ping timeout: 240 seconds]
yardenbar has joined #ruby
allcentury has joined #ruby
apt-get has joined #ruby
JaReAx has joined #ruby
Jackneill has joined #ruby
dopamean_ has quit [Ping timeout: 265 seconds]
NeverDie has joined #ruby
<johnzorn>
Ox0dea: well the implementation I'm doing is a sparse implementation. So Board is just a set subclass with [x,y] pairs for the 'alive' cells and nothing more. possible_neighbours is given an x,y and returns all the [x,y]s around it not actually checking the board. I was using that in my neighbours method which actually did check those possible_neighbors if they where alive
roxtrong_ has quit [Remote host closed the connection]
moeabdol has quit [Quit: WeeChat 1.3]
shredding has quit [Remote host closed the connection]
zomgbie has joined #ruby
<Ox0dea>
johnzorn: But how can a cell "possibly" neighbor another cell?
devdazed has joined #ruby
InternetFriend has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
piotrj has quit [Remote host closed the connection]
<Darkwater>
easily
<Darkwater>
the 'possibly' is just redundant
<Ox0dea>
Mind we're discussing a cellular automaton.
malconis has joined #ruby
Flying_Squirrel has quit [Ping timeout: 240 seconds]
dhjondoh has quit [Quit: dhjondoh]
TvL2386 has quit [Quit: Ex-Chat]
last_staff has quit [Quit: last_staff]
<Ox0dea>
Darkwater: Which information is being unnecessarily duplicated?
<johnzorn>
ok so possibly_alive_neighbours was what I meant
malconis has quit [Remote host closed the connection]
zomgbie has quit [Client Quit]
amystephen has joined #ruby
<johnzorn>
ok surrounding_cells then
malconis has joined #ruby
<Ox0dea>
So... neighbors?
piotrj has joined #ruby
DLSteve has quit [Ping timeout: 244 seconds]
spcmastertim has joined #ruby
jgpawletko has joined #ruby
bigkevmcd has joined #ruby
tesuji has quit [Ping timeout: 246 seconds]
<johnzorn>
Ox0dea: in my head neighbours are the surrounding cells that are alive. I guess I'm thinking in terms of something is there or isn't and that's causing confusion
<Ox0dea>
johnzorn: Yes, that does seem to be the case.
<Ox0dea>
Refer to my graveyard joke from earlier.
ruby-lang123 has joined #ruby
<Ox0dea>
It's sensible enough to use "dead" and "alive" to disambiguate.
<ruby-lang123>
register passwd
ndrei has quit [Ping timeout: 265 seconds]
<Ox0dea>
Well done.
<jhass>
ruby-lang123: poor choice
ruby-lang123 has left #ruby [#ruby]
<Ox0dea>
johnzorn: If I understand correctly, you're using an O(n) approach to determine live neighbors where an O(1) is available.
RegulationD has joined #ruby
JDiPierro has quit [Remote host closed the connection]
felixr has quit [Ping timeout: 255 seconds]
<Ox0dea>
Iterating over every single pair to find live neighbors is a little silly. :x
ruby-lang123 has joined #ruby
<Ox0dea>
Sure, you've got a sparse representation, but at what cost?
InternetFriend has joined #ruby
centipedefarmer has joined #ruby
moeabdol has joined #ruby
bronson has joined #ruby
<Ox0dea>
Use Hash with a default to get the best of both worlds.
<[k->
at least it is better than O(n^2) :(
dopie has joined #ruby
ndrei has joined #ruby
RegulationD has quit [Ping timeout: 264 seconds]
platzhirsch has joined #ruby
bronson has quit [Ping timeout: 240 seconds]
frmendes has quit [Remote host closed the connection]
tagrudev has quit [Remote host closed the connection]
aganov has quit [Remote host closed the connection]
SylarRuby has quit [Remote host closed the connection]
JDiPierro has joined #ruby
ngscheur1 has joined #ruby
KinderSpiel has joined #ruby
evanjs has quit [Remote host closed the connection]
InternetFriend has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
agent_white has quit [Remote host closed the connection]
zomgbie has joined #ruby
Deviad has quit [Ping timeout: 246 seconds]
spotted has quit [Ping timeout: 268 seconds]
fly1 has quit [Quit: WeeChat 1.1.1]
minimalism has joined #ruby
spotted has joined #ruby
spotted1 has joined #ruby
neanderslob has quit [Remote host closed the connection]
luksaur has joined #ruby
casadei has quit [Remote host closed the connection]
piotrj has quit [Remote host closed the connection]
victortyau has joined #ruby
blackjid has quit [Max SendQ exceeded]
blackjid has joined #ruby
allomov has joined #ruby
bronson has joined #ruby
allomov has quit [Remote host closed the connection]
baroquebobcat has quit [Quit: baroquebobcat]
allomov has joined #ruby
Cyther has quit [Read error: Connection reset by peer]
KinderSpiel has left #ruby [#ruby]
allomov has quit [Remote host closed the connection]
pwnd_nsfw has quit [Remote host closed the connection]
evanjs has quit [Ping timeout: 244 seconds]
simplyianm has joined #ruby
centipedefarmer has quit [Remote host closed the connection]
yeticry has quit [Ping timeout: 246 seconds]
allomov has joined #ruby
ndrei has quit [Ping timeout: 246 seconds]
<[k->
?ot karapetyan
<ruboto>
karapetyan, this seems to be off-topic. Please move your discussion to #ruby-offtopic, to keep this channel free for Ruby related topics. Thanks!
yeticry has joined #ruby
charliesome has joined #ruby
karapetyan has quit [Remote host closed the connection]
pwnd_nsfw has joined #ruby
charliesome has quit [Client Quit]
<Ox0dea>
He doesn't usually spam.
stardiviner has joined #ruby
inteq has quit [Remote host closed the connection]
dopamean_ has joined #ruby
qba73_ has joined #ruby
qba73 has quit [Read error: Connection reset by peer]
apt-get has quit [Ping timeout: 246 seconds]
InternetFriend has joined #ruby
InternetFriend has quit [Max SendQ exceeded]
jxv has joined #ruby
<[k->
i wouldn't have directed him to ?ot otherwise
stardiviner has quit [Ping timeout: 264 seconds]
bronson has quit [Remote host closed the connection]
<shevy>
certainty one thing I like about the matz talk was that he explained why the "did you mean this" gem was added
centrx has joined #ruby
ruby-lang123 has quit [Quit: Page closed]
<Ox0dea>
Because Ruby is severely lacking in the discoverability department.
SylarRuby has quit [Remote host closed the connection]
zomgbie has quit [Ping timeout: 264 seconds]
<shevy>
it's the man-machine interface as matz explained!
SylarRuby has joined #ruby
zomgbie has joined #ruby
umgrosscol has joined #ruby
jas02 has quit [Quit: jas02]
unshadow has quit [Ping timeout: 250 seconds]
iateadonut has joined #ruby
kobain has joined #ruby
dhollinger has joined #ruby
UtkarshRay has joined #ruby
unshadow has joined #ruby
SylarRuby has quit [Ping timeout: 264 seconds]
pawnbox has quit [Remote host closed the connection]
<shevy>
do you people sometimes approach your own code as being able to evolve on its own?
qba73_ has quit [Ping timeout: 256 seconds]
apt-get has joined #ruby
qba73 has joined #ruby
KinderSpiel has joined #ruby
ruby-lang744 has joined #ruby
<KinderSpiel>
hey ruby-lang744
<KinderSpiel>
word
constantinexvi has joined #ruby
<ruby-lang744>
Hi KinderSpiel
<shevy>
german nicks!
<KinderSpiel>
lol
<KinderSpiel>
I used it a long time ago, maybe I’ll get back to it
sundhell has quit [Ping timeout: 268 seconds]
<KinderSpiel>
you in germany shevy?
n008f4g_ has joined #ruby
fullofcaffeine has joined #ruby
<ruby-lang744>
What I'm asking is probably trivial. I'm fetching JSON and putting them into an array of hashes. The hashes have a key "type" and a selection of values. How can I filter, before I'm putting anything in the array, for the "type" value?
tkuchiki has quit [Remote host closed the connection]
karapetyan has joined #ruby
<ruby-lang744>
let's say there are four key values that should pass, all the others should fail and not be put into the array
pawnbox has joined #ruby
<shevy>
KinderSpiel austria
BrazenBraden has joined #ruby
terlar has quit [Ping timeout: 250 seconds]
<shevy>
but #ruby is full of german nicks... Papierkorb ... flughafen (ok he is not here right now) ... platzhirsch ... in the past also brotspinne
<adaedra>
Aren't KinderSpiel forbidden in the US now?
otacon- has joined #ruby
<phreakocious>
does it seem reasonable that spawning 200 ruby processes is faster than 200 threads for doing the same work? the only mutex locked activity is pushing items into an array..
favadi has quit [Max SendQ exceeded]
<jhass>
phreakocious: on MRI if your operations are not IO bound, yes
<jhass>
consider JRuby perhaps
banister has quit [Read error: Connection reset by peer]
arup_r has joined #ruby
<phreakocious>
it's all just sending/receiving UDP packets
arup_r has quit [Max SendQ exceeded]
<jhass>
well, the sending never blocks I guess
<KinderSpiel>
adaedra that was something else i think
arup_r has joined #ruby
<KinderSpiel>
some child candy
<KinderSpiel>
off to the rails room, see ya
KinderSpiel has left #ruby [#ruby]
zomgbie has quit [Ping timeout: 260 seconds]
<Ox0dea>
adaedra: Did you mean "KinderSurprise"?
ruurd has joined #ruby
mghaig has left #ruby [#ruby]
<adaedra>
Ox0dea: well, iirc it was the toy that was problematic.
shmilan has joined #ruby
piotrj has joined #ruby
zomgbie has joined #ruby
<Ox0dea>
What a world.
freerobby has joined #ruby
noethics has joined #ruby
mwlang has joined #ruby
ndrei has joined #ruby
dfockler has joined #ruby
gregf has quit [Quit: WeeChat 1.3]
evanjs has joined #ruby
havenwood has joined #ruby
AlexRussia has joined #ruby
Contigi has quit [Read error: Connection reset by peer]
dionysus69 has quit [Ping timeout: 240 seconds]
gregf has joined #ruby
evanjs has quit [Remote host closed the connection]
<ruby-lang744>
hm. Is there a ruby help channel, by any chance?
<adaedra>
just here
<ruby-lang744>
I see. Then here it is again:
<ruby-lang744>
What I'm asking is probably trivial. I'm fetching JSON and putting them into an array of hashes. The hashes have a key "type" and a selection of values. How can I filter, before I'm putting anything in the array, for the "type" value?
<shevy>
man
<adaedra>
shevy: ?
stryek_ has quit [Quit: leaving]
mary5030 has joined #ruby
<adaedra>
ruby-lang744: use Enumerable#select on your hash
* ruby-lang744
whistles "the long and winding road"
<Ox0dea>
ruby-lang744: I've brought you a delicious snack.
y_gick has quit [Quit: WeeChat 1.1]
arup_r has joined #ruby
<ruby-lang744>
those are nice libraries, though entirely unneccessary... I could code a JSON parser in Fortran alright. It's the HTTP/HTTPS connectivity that I've never done
trautwein has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<ruby-lang744>
and I read somewhere that ruby can be learned in 30 minutes. So far I'm clocking 31 hours...
<Ox0dea>
I'll get the violin.
<adaedra>
can != will
yardenbar has quit [Ping timeout: 272 seconds]
<adaedra>
And I don't think a language can be learned in 30 minutes.
<shevy>
ruby-lang744 hey can I look at your github page?
<Ox0dea>
loincloth: Where'd you catch it?
<loincloth>
some assumptions are made of course... that 'temp' is some JSON as a string... that 'array' is an array :D
<ruby-lang744>
well, should I make one, shevy?
<shevy>
ruby-lang744 come on, I want to peek at your stuff
<loincloth>
Ox0dea: where'd i catch whut
<ruby-lang744>
now that's just 18+...
<Ox0dea>
loincloth: That fish you gave ruby-lang744.
<loincloth>
i see what you did there
teslax has joined #ruby
<teslax>
What is an "assertion"?
<shevy>
a gateway attack
<jhass>
teslax: any context? minitest?
<Ox0dea>
teslax: A testament to the truth or falsity of some statement.
<loincloth>
i guess i decided a few lines showing some new stuff would be easier on everyone than a more abstract lesson
<teslax>
jhass: Yeah in unit testing.
<loincloth>
i'm all for teaching in the big picture, tho
<loincloth>
but you can learn through snippets, too
<jhass>
teslax: a test that some expression is (usually) truthy
<Ox0dea>
loincloth: But then whence the time-honored adage in the first place?
<loincloth>
i started by just saying 'whitelist' tho... which only implied some things, etc.
inteq has joined #ruby
<shmilan>
teslax: check out the ruby doc for Test::Unit:Assertions
<shmilan>
They're pretty easy to understand
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<jhass>
teslax: say you want to test that 1 + 2 is 2, assert 1+1 == 2, "1+1 wasn't 2"
hydrozen has joined #ruby
<Ox0dea>
Needs more confusing.
<jhass>
and then see ^ for less boilerplate and convenience wrappers around that
bronson has joined #ruby
<teslax>
And I was wondering...I am just starting to learn about unit testing... how do the tests get executed automatically when a class inherits from Test::Unit::TestCase ?
<Ox0dea>
teslax: at_exit.
<jhass>
and def self.inherited I supposed
<jhass>
in short Ruby provides some hooks that makes it possible
hs366 has quit [Read error: Connection reset by peer]
karapetyan has quit []
<teslax>
where is test/unit normall stored? I want to look at the code
rippa has joined #ruby
<teslax>
normally*
<ruby-lang744>
c:\Users\<username>\Documents\<ruby script folder> is where it is stored
<jhass>
teslax: run gem which test/unit on your shell
tvw has quit [Remote host closed the connection]
<loincloth>
ooh fancy
KinderSpiel has quit [Quit: Audi. 5000.]
bronson has quit [Ping timeout: 250 seconds]
teslax has left #ruby [#ruby]
favadi has joined #ruby
jeadre has quit [Remote host closed the connection]
favadi has quit [Max SendQ exceeded]
Silicium has joined #ruby
<Silicium>
hi there
<Ox0dea>
Heya.
jeadre has joined #ruby
null_ref has joined #ruby
barhum2013 has quit [Read error: Connection reset by peer]
<Silicium>
i have a strange problem, i pass env vars vor heap configuration to passenger (successfully, i verified that) but ruby (2.0) still initially allocates 1500 heaps. i set the min_slots to 2000000, our app needs 1800000 objects, so it seems that ruby ignores the env vars. can i somehow verify the GC/Heap Settings?
<Silicium>
Ox0dea: stat does not show me the used configuration!
<Silicium>
it does show me the current state but not the configuration :(
podman has joined #ruby
herbst has quit [Remote host closed the connection]
barhum2013 has joined #ruby
<Silicium>
`derpy: :(
cjbottaro has joined #ruby
thebastl has joined #ruby
rcvalle has joined #ruby
<adaedra>
Silicium: `derpy is only a bot.
teslax has joined #ruby
<teslax>
what's the difference between a postive assertion and a negative assertion?
<Ox0dea>
Prove it.
<Silicium>
herp. derp.
SCHAAP137 has quit [Read error: Connection reset by peer]
<shevy>
hahaha
darkf has quit [Quit: Leaving]
<shevy>
adaedra oh is this a factoid about `derpy?
Prominent has joined #ruby
eGGsha has joined #ruby
<jhass>
teslax: a negative assertion is inverting the outcome of the condition prior evaluation, so assert_not foo == assert !foo
<adaedra>
shevy: would that make me a bot ?
Xeago has quit [Remote host closed the connection]
<shevy>
adaedra I just want to trigger it!
Xeago has joined #ruby
<shevy>
?adaedra
<ruboto>
don't be mean to adaedra
<Silicium>
Ox0dea: prove what?
teslax has left #ruby [#ruby]
<Ox0dea>
Prove that proving proves anything.
Blaze_Boy has quit [Quit: Page closed]
<shevy>
Prove your existance!
<Silicium>
i proved the prove
<Silicium>
everything is probed until GC!
<Silicium>
s/probed/proved
<shevy>
GC is the big mighty cleaver
tkuchiki has joined #ruby
evanjs has joined #ruby
lokulin has quit [Ping timeout: 240 seconds]
dravine has quit [Quit: dravine]
<Silicium>
however, since do i have to attach strace to the ruby process to identify the GC settings or is there a "normal" way? can i somehow read the actual used settings from my application?
drptbl has quit [Quit: My MAC has gone to sleep. zZz..]
slackbotgz has joined #ruby
<apeiros>
any troubles with osx 10.11 (el capitan) and rvm/brew?
<apeiros>
derp
* apeiros
googles :D
Prominent has quit [Quit: Leaving]
dravine has joined #ruby
<Ox0dea>
TIL apeiros doesn't read HN.
<adaedra>
apeiros: software can't write in /usr (except /usr/local) anymore.
<shevy>
come to linux man
<apeiros>
Ox0dea: indeed, I don't
m8 has joined #ruby
<Todd>
Brew didn't work when I first installed El Capitan (for things other than Ruby).
<apeiros>
adaedra: yeah, I guess SIP will cause trouble with brew wanting to chown /usr/local
Kendos-Kenlen has quit [Quit: Konversation terminated!]
<Todd>
They didn't officially support it at the time.
<shevy>
as far as I know it can be re-enabled
<adaedra>
apeiros: iirc, this is not a problem.
<Todd>
Not sure if it's officially supported now, but it's working for what I need it for.
tkuchiki has quit [Ping timeout: 246 seconds]
<ruby-lang744>
how do I check if a key has a non-nil value in a hash? if hash["key"].nil?.! is the way to go?
eminencehc has quit [Remote host closed the connection]
Jardayn has joined #ruby
<apeiros>
ruby-lang744: note that non-nil value for key and key not existing are two different things
LBRapid has quit [Remote host closed the connection]
<ruby-lang744>
yes well, there are cases when the key doesn't exist, or cases when it exists with a nil value, also cases when it exists but has a zero value. I want to exclude all three
<ruby-lang744>
that's three ifs in each other
Hounddog has quit [Remote host closed the connection]
eminencehc has joined #ruby
<Todd>
that doesn't sound like fun
<apeiros>
that sounds like it could use some rethinking ;-)
<Todd>
if he has control over the data.. sometimes you don't
<ruby-lang744>
why, doesn't Ruby short circuit eval?
<shevy>
people, ruby-lang744 has no problem. he also never showed any real code either.
<ruby-lang744>
shevy, why are you so desperate in seeing the actual code?
<shevy>
ruby-lang744 cuz you are so fake
sjums has joined #ruby
<ruby-lang744>
what does being fake mean here?
<shevy>
ruby-lang744 show code
JDiPierro has quit [Remote host closed the connection]
<apeiros>
come on shevy, stay gentle
<Ox0dea>
>> false && burn it down # ruby-lang744: Yes, it does.
<ruboto>
Ox0dea # => /tmp/execpad-0edac8e4c72e/source-0edac8e4c72e:2: syntax error, unexpected tIDENTIFIER, expecting key ...check link for more (https://eval.in/443068)
Silicium has left #ruby [#ruby]
<Ox0dea>
Dammit.
HotGirl89 has joined #ruby
<HotGirl89>
hi guys
<Ox0dea>
I don't see why that shouldn't've worked.
favadi has joined #ruby
treehug88 has joined #ruby
<Ox0dea>
apeiros: Act now!
<shevy>
:D
<HotGirl89>
i have a very strange problem, withruby
<Ox0dea>
Liar.
<shevy>
lol
<shevy>
wait... perhaps code will be shown
<apeiros>
what?
<Ox0dea>
apeiros: A wild troll has appeared.
<Todd>
omg.. I can't
<HotGirl89>
can i somehow see the actual used heap/gc settings?
<shevy>
oh dear
<Ox0dea>
Poor thing.
<shevy>
what is the "strange problem"?
favadi has quit [Max SendQ exceeded]
thebastl has quit [Remote host closed the connection]
<HotGirl89>
stranger problem
<shevy>
yeah, it's very strange
<Todd>
HotGirl89: ##java :D
<Ox0dea>
HotGirl89 is Silicium from earlier attempting to employ the (regrettably effective) "girls get help" strategy.
<HotGirl89>
Todd: i can tell you how to do in java, but not in ruby!
ruurd has quit [Quit: ZZZzzz…]
<Todd>
I made that assumption thus my reverse troll.
<shevy>
lol
<Ox0dea>
ruby-lang744: Ruby does short-circuit, but conditional trees are unpleasant.
<apeiros>
Ox0dea: good to know. but not actually against any rules.
<HotGirl89>
Ox0dea: jesus, how did you noticed that!
<shevy>
Ox0dea has an advanced inbuilt troll detector... I would not have figured out that it was Silicium
<apeiros>
unless silicium was trolling
slawrence00 has joined #ruby
<shevy>
you have too much faith in the good of humanity apeiros!
<Ox0dea>
ruby-lang744: In this particular case, it's much more sensibe to filter on what you want than what you don't.
<Ox0dea>
`if hash["type"].present?`, perhaps.
HotGirl89 is now known as Silicium
karapetyan has joined #ruby
<apeiros>
shevy: well, if silicium didn't get help but hotgirl89 does, then it's not them being wrong but the people who didn't help before
<ruby-lang744>
Ox0dea, I think they aren't that bad. I can generally sight-read them to 3 levels' depth or so. Let's see this present?
<Ox0dea>
It's from ActiveSupport.
<Ox0dea>
It considers the empty string to be "falsy", which I assume is your zero value in this case.
anisha has quit [Quit: Leaving]
<shevy>
apeiros yeah, I did not know that HotGirl89 was Silicium before though :)
<ruby-lang744>
I worked as a cobol programmer for half a year, that was actually very fun
<centrx>
TIOBE is junk
<havenwood>
shevy: better to check the chicken bones
decoponio has quit [Ping timeout: 250 seconds]
JDiPierro has joined #ruby
cornerman has quit [Ping timeout: 240 seconds]
cornerma1 is now known as cornerman
<Todd>
I moved to a devops roll right before we switched our CMS to Java. Sad days those. :(
riotjones has joined #ruby
<Todd>
Told my boss I "refuse to learn anything unnecessary for my job assignment" in relation to Java and he didn't disagree.
<ruby-lang744>
and if you were so hungry for code, shevy, then: if whitelist.include? hash["type"] # puts hash if hash["suffix_item_id"].present? puts hash if hash["suffix_item_id"]>0 item_data << hash puts hash end end elsif ["employee"].include? hash["type"] item_data << hash puts hash end
decoponio has joined #ruby
<havenwood>
?gist ruby-lang744
<ruboto>
ruby-lang744, https://gist.github.com - Multiple files, syntax highlighting, even automatically with matching filenames, can be edited
<Ox0dea>
I like the part where #include? was called on a single-element Array.
amclain has joined #ruby
Xeago has quit [Remote host closed the connection]
<Todd>
ruby-lang744: the body message would throw an exception.. so, yeah
<jhass>
I don't think http throws any exception beyond the IO ones?
teslax has joined #ruby
barhum2013 has joined #ruby
<Todd>
body would throw an exception for non-200 responses
lubarch has quit [Quit: leaving]
<ruby-lang744>
well, that's just fine then
<Todd>
Net::HTTP doesn't follow redirects by default
lubarch has joined #ruby
symbol_ has quit [Ping timeout: 264 seconds]
<ruby-lang744>
and I need no redirects either
evanjs has quit [Ping timeout: 244 seconds]
Marsupermammal has joined #ruby
piotrj has joined #ruby
Uranio-235 has joined #ruby
ruurd_ has joined #ruby
<ruby-lang744>
now I was told to load this active-support thing, but the program crashes on it with LoadError... another package to install, I take?
slackbotgz has quit [Remote host closed the connection]
ruurd has quit [Ping timeout: 244 seconds]
<Todd>
gem install would install all dependencies required in the active_support gemspec
<teslax>
When running the following test: "ruby -I path/to/app/lib path/to/app/test/test_roman.rb" what does the "-I" option do? http://ctrlv.it/id/2404/3838671279
Soulcutter is now known as Sou|cutter
<Ox0dea>
teslax: It adds that directory to the load path.
<Todd>
so.. you should never have to install any other gem unless the original gem's gemspec has a bug in it
<teslax>
0x0dea: It adds it inside test_roman.rb ?
<Todd>
native gems are special cases.. they are compiled and require libs
finisherr has joined #ruby
<Todd>
I need a smoke. brb
<Ox0dea>
teslax: The -I flag is supposed to be given a directory argument, not a file.
<odigity>
How can I print a list of all packages that have been 'require'-ed?
nateberkopec has joined #ruby
The_Phoenix has joined #ruby
The_Phoenix has quit [Changing host]
The_Phoenix has joined #ruby
evanjs has joined #ruby
<Ox0dea>
odigity: $LOADED_FEATURES should do.
shmilan has joined #ruby
<teslax>
0x0dea: So it adds the lib directory to the load path so that it can be accessed from within test_roman.rb?
<odigity>
Ox0dea, wow, that's a lot of output. :) Thanks!
<Ox0dea>
teslax: Oh, sorry; I did misread your command line there.
<Ox0dea>
teslax: The load path is the set of directories Ruby looks for 'foo' in when you require 'foo'.
skade has quit [Quit: Computer has gone to sleep.]
beast has quit [Quit: Leaving]
Uranio-235 has quit [Quit: Page closed]
pawnbox_ has quit [Remote host closed the connection]
<teslax>
0x0dea: So if I have a ruby script that requires 'foo.rb' which is inside path/app/, I can just run it using ruby -I path/app script.rb ? Correct?
<Ox0dea>
odigity: Aye, it's quite a bit, and it's not all gems; you'll have to pare it down considerably.
barhum2013 has quit [Quit: barhum2013]
<odigity>
Ox0dea, that's ok, I got what I needed from it.
<ruby-lang744>
well, it doesn't seem to work with .present? at the moment....
Soda has joined #ruby
<Ox0dea>
teslax: No, the command line doesn't interact with the load path.
p0wn3d has quit [Ping timeout: 252 seconds]
evanjs has quit [Remote host closed the connection]
<Ox0dea>
ruby-lang744: #present? is overkill for this particular case; apologies for having you chase that goose.
otacon- has quit [Ping timeout: 240 seconds]
<ruby-lang744>
naw, I just want it to finally work (somehow.)
Xeago has joined #ruby
<Ox0dea>
teslax: Gah, sorry, I keep misreading you; yes, I think you've grokked the thing.
shmilan has quit [Quit: Leaving]
<teslax>
0x0dea: No problem!
<Ox0dea>
teslax: For what it's worth, it's usually better to append to the load path directly from within Ruby.
<Ox0dea>
It's not like you *can't* hit the network from Fortran.
<ruby-lang744>
perhaps... let's see, can you pass parameters to a ruby in command line?
<ruby-lang744>
to a ruby program*
<Ox0dea>
I have no idea.
<jhass>
this sounds like they plan to reimplement curl in Ruby
baroquebobcat has quit [Quit: baroquebobcat]
<ruby-lang744>
well, if I had any single way to fetch an arbitrary HTTPS page, and get the response back without any further frills, I could of course program the rest in Fortran
evanjs has quit [Remote host closed the connection]
pawnbox has joined #ruby
diegoviola has quit [Quit: WeeChat 1.3]
<ruby-lang744>
but I still don't know about the overhead that it'd mean for the reason that you need to start up the external program likely hundreds of thousands of times
<ruby-lang744>
which is why I went for a language that can fetch HTTPS on its own, and at the same time (supposedly) quick to learn
zomgbie has quit [Ping timeout: 260 seconds]
diegoviola has joined #ruby
<Ox0dea>
#! is the only unary operator that can be invoked like a regular method; why is that?
cjbottaro has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<ruby-lang744>
maybe because people didn't think it safe to include anything more complicated
<ruby-lang744>
SIN() is a unary operator. I don't know what a method means, though.
<Ox0dea>
It's just a syntactic constraint, then.
<ruby-lang744>
well, what is a method, anyhow?
<shevy>
:)
<adaedra>
that's basics
<ruby-lang744>
you mean it's a subroutine?
<workmad3>
Ox0dea: is it possible that ! is the only unary operator where the method isn't suffixed with @ ?
<Ox0dea>
ruby-lang744: Methods are "subroutines" applied to specific objects, more or less.
<Ox0dea>
workmad3: ~ isn't either.
lubarch has joined #ruby
<Ox0dea>
But it can't be invoked without parentheses like #! can.
thebastl has joined #ruby
renderful has quit []
<adaedra>
workmad3: well, the only one where there's no ambiguity with the binary operator
eminencehc has quit [Remote host closed the connection]
<adaedra>
maybe
<Ox0dea>
Yeah, that seems right.
eminencehc has joined #ruby
<workmad3>
it'll be something like that
patchedmonkey has quit [Ping timeout: 246 seconds]
<ruby-lang744>
well, in fortran it's called with CALL SUBROUTINE(A,B,C....). And the subroutine has its own variable declarations, so you can call the incoming values C, B and A if you wish, it doesn't quite matter for the caller program
pandaant has quit [Remote host closed the connection]
<Ox0dea>
adaedra: Wait, what's binary ~?
<workmad3>
I think ! was quite a recent addition to the available operator overrides too... so it could be that the parsing around it is cleaner and more 'correct'
zotherstupidguy has quit [Ping timeout: 246 seconds]
<adaedra>
wow that's weird
<adaedra>
ah no ok
<adaedra>
well, seems it doesn't work with ~
verdoc has quit [K-Lined]
<adaedra>
the exception to confirm the rule?
<ruby-lang744>
and Ox0dea, what is an object? I mean, I can apply a subroutine to variables and/or constants. Is an object meaning "variable or constant"?
Xeago has quit [Remote host closed the connection]
<mwlang>
yeah, right you are…might as well take it all the way!
<Ox0dea>
mwlang: Parsing Ruby strings requires a Ruby parser. :P
ndrei has joined #ruby
KinderSpiel has quit [Quit: Audi. 5000.]
<mwlang>
Ox0dea: that example worked just fine for me.
shadoi has joined #ruby
<Ox0dea>
Aye, it'll do for simple Hashes, which are the only kind that ought to exist.
_djbkd has quit [Ping timeout: 264 seconds]
Alina-malina has quit [Read error: Connection reset by peer]
<mwlang>
I’m not really interested in parsing Ruby…just highlight a block of code that has my 1.8 styled hashes and hit ^=
<Ox0dea>
Don't wanna `sed -i *.rb`, you say?
eminencehc has quit [Remote host closed the connection]
<mwlang>
yeah, I’m generally not going to be mucking with complex ones, or if I do, it’s simple enough highlighting simple portions at a time.
ruby-lang352 has joined #ruby
<mwlang>
Ox0dea: :-S That way lies insanity
<Ox0dea>
`-i` takes a backup extension, for what that's worth.
skade has joined #ruby
p0wn3d has joined #ruby
blackmesa has joined #ruby
_djbkd has joined #ruby
banjara has joined #ruby
Alina-malina has joined #ruby
cjbottaro has joined #ruby
moeabdol has quit [Quit: WeeChat 1.3]
rindolf has joined #ruby
<rindolf>
Hi all.
iateadonut has quit [Quit: Leaving.]
blackmesa has quit [Client Quit]
<Coraline>
Hi rindolf
<rindolf>
Coraline: how are you?
kobain has quit [Ping timeout: 240 seconds]
Eiam_ has quit [Quit: ╯°□°)╯︵ǝpouǝǝɹɟ]
<Coraline>
Hanging in there.
ta has joined #ruby
Stalkr_ has joined #ruby
<mwlang>
Ox0dea: hmmm..yeah, I just don’t like to change tons of files trivially, esp. those that have no test coverage.
wallerdev has quit [Quit: wallerdev]
moeabdol has joined #ruby
<Ox0dea>
mwlang: Makes perfect sense.
ghr has quit [Read error: No route to host]
<mwlang>
I write the tests, pass ‘em, then refactor and get back to green.
ghr has joined #ruby
ruurd has joined #ruby
Flying_Squirrel has quit [Ping timeout: 268 seconds]
banjara has quit [Quit: Leaving.]
v4n has joined #ruby
pwnd_nsfw has joined #ruby
Marsupermammal has quit [Ping timeout: 255 seconds]
<mwlang>
Had to add one more piece to that regexp..sometimes the => is jammed against the identifier…only other scenario is “one” => and ‘two’ => but I don’t generally symbolize and switch these to 1.9 syntax, so YAGNI scenario there.
Flyy7 has quit [Ping timeout: 264 seconds]
Jameser` has joined #ruby
colorisco has quit [Quit: colorisco]
evanjs has quit [Remote host closed the connection]
<mwlang>
so this is the final regexp: str.gsub /\:(\S|[^\=]+)d(\s*?\=\>\s?)/, '\1: '
cjbottaro has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
RegulationD has quit [Remote host closed the connection]
Pupeno has quit [Quit: Leaving...]
podman has quit [Quit: Connection closed for inactivity]
prestorium_ has joined #ruby
<rindolf>
mwlang: why do you use \= instead of =?
mjago has quit [Ping timeout: 250 seconds]
<mwlang>
just didn’t look it up to see if = has meaning in regexps…if I’m ever not sure I prefix with \ and then later, remove the \ once I have a regexp working…forgot to in this case.
wallerdev has joined #ruby
FrankD has quit [Ping timeout: 244 seconds]
mghaig has quit [Remote host closed the connection]
Jameser` has quit [Ping timeout: 272 seconds]
<Ox0dea>
mwlang: \w > \S|[^\=]
<Ox0dea>
For this particular purpose.
krisquigley has joined #ruby
prestorium has quit [Ping timeout: 246 seconds]
<mwlang>
Ox0dea: does \w include digits dashes, underscores, periods?
<autojack>
I've used rbenv for years, but on one of my systems it seems to be in a broken state, but I can't figure out why or how to fix it. my path is correct, I'm definitely hitting the rbenv shims, but when I try to 'gem install' something I get 'You don't have write permissions into the /usr/local directory.'
<Ox0dea>
And hey, those are almost all of the valid identifier characters.
rgb-one has joined #ruby
mxrguspxrt has quit [Remote host closed the connection]
<autojack>
it should be installing the gems under the .rbenv directory though.
<rgb-one>
Hey
teslax has joined #ruby
<Ox0dea>
autojack: Might be El Capitan?
<autojack>
Ox0dea: no, this is Ubuntu.
<teslax>
What's the benefit of using rspec over just say, Test::Unit ?
<Ox0dea>
teslax: It's largely a personal thing.
moos3 has quit [Read error: Connection reset by peer]
<Antiarc>
I like the syntax better, personally
<autojack>
*oh* I might know what's up.
pwnd_nsfw has quit [Ping timeout: 246 seconds]
<autojack>
yep. this system has a .gemrc.
<autojack>
which is overriding gem_home.
krisquigley has quit [Ping timeout: 264 seconds]
<teslax>
I don't know rspec. Should I learn it or can I just go by with using Test::Unit?
<autojack>
that was it. damn.
<mwlang>
teslax: rspec uses BDD’s vocabulary whereas Test::Unit uses TDD’s vocabulary and I do like rspec’s matchers a lot more, esp. when used with rspec-its. I also like the let and subject constructs rspec offers.
autojack has left #ruby [#ruby]
bronson has joined #ruby
<teslax>
mwlang: What's used with Rails?
baweaver has quit [Remote host closed the connection]
Xeago_ has quit [Remote host closed the connection]
Rohanezio has joined #ruby
cantaberry has joined #ruby
<mwlang>
teslax: I actually don’t know any more. First thing I always do is set up rspec-rails on the project and delete the test folder. Somebody else here knows definitively.
kobain has joined #ruby
ElSif has quit [Read error: Connection reset by peer]
_aeris_ has quit [Remote host closed the connection]
<glider>
What testing framework is used with Rails
baweaver has joined #ruby
Pumukel has quit [Ping timeout: 246 seconds]
<havenwood>
glider: Minitest ships with Ruby and is the Rails default.
<glider>
havenwood: Alright.
pwnd_nsfw has joined #ruby
krz has joined #ruby
<havenwood>
glider: The Rails channel is #RubyOnRails, you just have to register to talk.
skade has quit [Ping timeout: 268 seconds]
centrx has quit [Quit: "You cannot fix a machine by just power-cycling it with no understanding of what is going wrong."]
Xiti has joined #ruby
firstdayonthejob has joined #ruby
shadeslayer has quit [Ping timeout: 240 seconds]
glider has left #ruby [#ruby]
shadeslayer has joined #ruby
freerobby has quit [Quit: Leaving.]
baweaver has quit [Remote host closed the connection]
dfockler has quit [Remote host closed the connection]
dfockler has joined #ruby
symm- has joined #ruby
DoubleMalt has quit [Remote host closed the connection]
ta has quit [Remote host closed the connection]
pwnd_nsfw has quit [Ping timeout: 246 seconds]
yfeldblum has quit [Ping timeout: 246 seconds]
gusTester has joined #ruby
drptbl has quit [Quit: My MAC has gone to sleep. zZz..]
kidoz has quit [Quit: Ухожу я от вас]
Macaveli has joined #ruby
skade has joined #ruby
dikaio has joined #ruby
Anti-Pizza has quit [Quit: Quit]
shinnya has quit [Ping timeout: 246 seconds]
Macaveli has quit [Client Quit]
DexterLB has quit [Read error: Connection reset by peer]
spotted has quit [Ping timeout: 246 seconds]
spotted1 has quit [Ping timeout: 255 seconds]
BrazenBraden has quit [Quit: Leaving]
verdoc has joined #ruby
mjuszczak has joined #ruby
mjuszczak has quit [Max SendQ exceeded]
mjuszczak has joined #ruby
eminencehc has joined #ruby
richburroughs has joined #ruby
DexterLB has joined #ruby
yfeldblum has joined #ruby
podman has joined #ruby
qba73 has joined #ruby
ta has joined #ruby
jenrzzz has joined #ruby
pwnd_nsfw has joined #ruby
kadoppe has quit [Ping timeout: 252 seconds]
devoldmx has joined #ruby
cjbottaro has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
kadoppe has joined #ruby
devoldmx has quit [Read error: Connection reset by peer]
BrazenBraden has joined #ruby
devoldmx has joined #ruby
freerobby has joined #ruby
blaxter has quit [Quit: foo]
<BrazenBraden>
i am having major difficulties trying to bundle install. Getting errors "Gem::Ext::BuildError: ERROR: Failed to build gem native extension." | https://gist.github.com/brazenbraden/31371b65d535b546e023 . what am I missing?
<Ox0dea>
rgb-one: Hey! I'm glad to see the program came to fruition.
<Ox0dea>
rgb-one: Some of this code is very sexy. :P
jwaldrip has joined #ruby
v4n has quit []
freerobby has quit [Client Quit]
<Ox0dea>
BrazenBraden: You're missing GMP, the multiple precision library Ruby uses for Bignum support and whatnot.
<havenwood>
BrazenBraden: That should do the trick. If you've got the time you might consider reporting to Travis's githubs if it is't already. I've been meaning to but haven't had a chance (waaaay to much to do, gah!).
davedev24 has joined #ruby
ta has joined #ruby
<BrazenBraden>
havenwood, havent done such things before lol
<shevy>
what does this mean? "proc.c (proc_mark): block.ep of Proc from Symbol is now NULL."
RegulationD has joined #ruby
howdoi has quit [Quit: Connection closed for inactivity]
xxneolithicxx has quit [Ping timeout: 255 seconds]
sargas has joined #ruby
sargas has quit [Max SendQ exceeded]
<rgb-one>
Ox0dea: :)
<Ox0dea>
shevy: `ep` is "environment pointer" there, for starters.
dikaio has quit [Quit: ........]
sargas has joined #ruby
<Ox0dea>
The Patch Monster has been optimizing Symbol#to_proc as of late.
RegulationD has quit [Ping timeout: 268 seconds]
<Ox0dea>
rgb-one: I have a few minor nitpicks if you'd like them.
dikaio has joined #ruby
man_on_couch has joined #ruby
SylarRuby has quit [Remote host closed the connection]
<rgb-one>
Ox0dea: I would
<drbrain>
I imagine the "environment pointer" ordinarily points to the closure if you created a do/end block
<Ox0dea>
That sounds right.
<shevy>
hmm
<drbrain>
a proc created from a symbol doesn't need an environment pointer, though
<man_on_couch>
is there documentation for the Object class' private methods? I can't find any on Omniref or RubyDoc, but I'm trying to learn about the methods in Object.new.private_methods
<shevy>
Ox0dea lol at "Patch Monster"
v4n has quit []
<drbrain>
since it can't pull any information from the closure
<drbrain>
man_on_couch: most of them come from Kernel
arooni has joined #ruby
<Ox0dea>
shevy: I believe that's Nakada-san's official title.
<drbrain>
it is
mary5030 has quit [Remote host closed the connection]
<BrazenBraden>
havenwood, if you feel like debunking one more mystery, perhaps you could help me figure out why I get the error "libruby.so.2.2: cannot open shared object file: No such file or directory" | https://gist.github.com/brazenbraden/b4ef6839ac81fdd42a4a
banister has quit [Read error: Connection reset by peer]
<BrazenBraden>
havenwood, yes (well, i should update that gist.. i switched to postgres and do have libpq-dev added in the dockerfile).. if i remove pg / mysql, it fails with the same error on another gem (saw redcarpet fail too)
nordskald has joined #ruby
<Ox0dea>
rgb-one: My quibbles were mostly stylistic, but #to_acronym was made much cleaner, and your exit codes were the wrong way round.
baweaver has joined #ruby
<shevy>
you and your nibbles
banister has joined #ruby
zomgbie has joined #ruby
<Ox0dea>
Printing usage and version strings aren't abnormal exit conditions.
toretore has joined #ruby
<Ox0dea>
rgb-one: I'm curious how you intended to work MD5 into this.
<BrazenBraden>
havenwood, always libruby.so
vdamewood is now known as vinleod
Uranio-235 has joined #ruby
<banister>
wassup peeps
<havenwood>
banister: hallooo
<Ox0dea>
rgb-one: Uh-oh! It's just dawned on me: this is for generating "secure" passwords, isn't it?
<mbff>
You can clearly see the mina command exists.
k3asd` has joined #ruby
patchedmonkey has joined #ruby
Macaveli has joined #ruby
evanjs has quit [Ping timeout: 244 seconds]
<adaedra>
mbff: Are you gems installed with bundle install --path vendor/bundle?
<Ox0dea>
A real-live person from Fargo?!
<mwlang>
speaking of xkcd #936 — I hate websites that make me make up complicated passcodes that have to include capitalization, at least one number, at least one symbol, etc. and worse, limit the length to anything less than 10 — keeps one from using a nice long passphrase.
baweaver has joined #ruby
pocketprotector has quit [Ping timeout: 240 seconds]
TheNet has quit [Remote host closed the connection]
Coldblackice has joined #ruby
vdamewood has quit [Quit: Life beckons.]
ponga has quit [Quit: Connection closed for inactivity]
<mbff>
adaedra, no bundle --deployment ... i am using the mina bundler task if that helps
naftilos76 has joined #ruby
<havenwood>
mbff: Check what if any Bundler config is set?: bundle config
TheNet has joined #ruby
<shevy>
mwlang hah - I failed with the latest fedora installation because of password
<adaedra>
mbff: so maybe bundler is not aware of your additional directory.
<Ox0dea>
mwlang: And is indicative of a service which almost certainly stores passwords in the clear.
<mbff>
does it matter where I run the bundle config from?
<mwlang>
Ox0dea: well, latest one was MailChimp the other day.
<havenwood>
mbff: yes
KensoDev has joined #ruby
skade has joined #ruby
<mwlang>
I didn’t bother with a passphrase because it’s password requirements were so strict. So now that one’s written down somewhere because I surely cannot memorize it.
patchedmonkey has quit [Ping timeout: 240 seconds]
<BrazenBraden>
I have verified that the files which it "cannot find" do indeed exist. i know this involves a docker container but it seems to be a ruby issue...?
opensource_ninja has joined #ruby
tvw has joined #ruby
Oka has joined #ruby
karapetyan has joined #ruby
xxneolithicxx has joined #ruby
xxneolithicxx has quit [Max SendQ exceeded]
Jameser` has quit [Ping timeout: 255 seconds]
Ox0dea has joined #ruby
hectortrope has quit [Remote host closed the connection]
PlasmaStar has joined #ruby
stamina has joined #ruby
<havenwood>
BrazenBraden: Try: libmysql-dev
<eam>
BrazenBraden: the shared objects need to be in the path used by the linker
TheNet has joined #ruby
bl0ndie has joined #ruby
mjuszczak has joined #ruby
<BrazenBraden>
havenwood, updated the gist to reflect current config. no mysql, just postgres, and I have libpq-dev included in build
JDiPierro has quit [Remote host closed the connection]
cih has quit [Ping timeout: 260 seconds]
<eam>
BrazenBraden: dpkg -L libpq, where are the shared objects? Are they in /usr/lib?
<eam>
the package may have put them elsewhere
sargas has joined #ruby
<havenwood>
BrazenBraden: Ah, I was still looking at the old gist. I see.
<BrazenBraden>
eam, i cannot check as I cannot start the container to see
karapetyan has quit [Remote host closed the connection]
hectortrope has joined #ruby
Jackneill has quit [Ping timeout: 246 seconds]
<BrazenBraden>
eam, the path it specifies in the error is the correct path though
krisquigley has joined #ruby
karapetyan has joined #ruby
fullofcaffeine has quit [Remote host closed the connection]
TheNet has quit [Client Quit]
<BrazenBraden>
as mentioned earlier, if i remove the pg gem, it fails with basically the same error on a different gem
<eam>
it doesn't specify a path
<eam>
BrazenBraden: the way the linker works is kind of like how the shell works
EXID123 has joined #ruby
Macaveli has joined #ruby
<eam>
you run `foo` and it searches through every directory in $PATH until it fines "foo" in one of them, right?
jwaldrip_ has joined #ruby
<eam>
same thing with ld.so - there's a search path, and it's looking for "libruby.so.2.2" and it can't find it
<BrazenBraden>
eam, so what is "No such file or directory - /app/vendor/bundle/ruby/2.2.0/gems/pg-0.18.3/lib/pg_ext.so" ?
<eam>
right, that's a little confusing. "/app/vendor/bundle/ruby/2.2.0/gems/pg-0.18.3/lib/pg_ext.so" exists, but the shared object dependencies it has do not
snapcase has quit [Ping timeout: 246 seconds]
<eam>
the error in this case is "no such file or directory" but it's not talking about that file
dikaio has quit [Ping timeout: 250 seconds]
IceDragon has quit [Ping timeout: 240 seconds]
<eam>
it's talking about the dependencies of that file, which might be anywhere in the linker paths
<BrazenBraden>
hmmm ok?
<eam>
blame unix for having a confusing standard error on this :)
krisquigley has quit [Ping timeout: 240 seconds]
SebastianThorn has quit [Ping timeout: 268 seconds]
duddik has quit [Remote host closed the connection]
<BrazenBraden>
oh i have been cursing unix for 2 days now :P
RobertBirnie has joined #ruby
<eam>
BrazenBraden: so, double check your stuff to make sure it's putting "libruby.so.2.2" into, say, /usr/lib or similar
jwaldrip has quit [Ping timeout: 250 seconds]
tkuchiki has joined #ruby
<BrazenBraden>
i'll see if i can get that info out of the container by jimmying it. one sec
<eam>
grab an ubuntu system that works and find it, and find out the package that owns it
Cyther has joined #ruby
blackmesa has joined #ruby
PlasmaStar has quit [Ping timeout: 246 seconds]
<BrazenBraden>
well, im on ubuntu so that shouldnt be too much of a problem
shinnya has joined #ruby
mghaig has joined #ruby
<eam>
I have seen people go crazy over this error before, because it also happens for executables
<eam>
so you can ls -l /bin/foo and it's there, and it's +x, but you run it and "no such file or directory"
<eam>
hilarious ;)
Rohanezio has quit [Ping timeout: 250 seconds]
<eam>
tends to mostly happen when building chroots and the like
futilegames has joined #ruby
blackjid has quit [Max SendQ exceeded]
mary5030 has joined #ruby
blackjid has joined #ruby
<BrazenBraden>
eam, i thought the whole point of having these containers was to not have all these issues lol. i wonder if it has something to do with doing a bundle install --path
mghaig has quit [Read error: Connection reset by peer]
<eam>
nah, the point is to isolate all this crap you're doing so you can easily repeat it while debugging :)
mghaig has joined #ruby
<eam>
and not dedicate some horrible machine to run builds which you set up once over a period of time and now can no longer recreate
<BrazenBraden>
that for sure
tangentstorm has quit [Ping timeout: 250 seconds]
<BrazenBraden>
weird thing is that i have a container environment set up for another project and dont have any problems -.-
_djbkd has quit [Remote host closed the connection]
tkuchiki has quit [Ping timeout: 250 seconds]
uri_ has joined #ruby
BaNzounet has joined #ruby
moeabdol1 has joined #ruby
unshadow_ has joined #ruby
<BrazenBraden>
eam, so, my libruby.so on my host machine is in my user folder .rvm as I use rvm to manage my rubies.. but the docker image my dockerfile is pulling builds it
poguez_ has quit [Quit: Connection closed for inactivity]
dfockler has quit [Remote host closed the connection]
unshadow has quit [Ping timeout: 250 seconds]
`tim` has joined #ruby
moeabdol has quit [Ping timeout: 244 seconds]
dikaio has joined #ruby
Uranio-235 has quit [Quit: Page closed]
mbff has joined #ruby
Xeago has quit [Remote host closed the connection]
<mbff>
havenwood, I am not a smart man. I solved my problem
<mbff>
I run a script that makes all files 0644 and folders 0755.
syath has quit [Quit: WeeChat 1.2]
<mbff>
It must have been setting the bins as non executables.
Musashi007 has joined #ruby
<havenwood>
mbff: Oops, glad you solved that mystery!
_djbkd has joined #ruby
<BrazenBraden>
eam, i am able to ls the files in the container but no clue where libruby.so is stored
<eam>
you've gotta find that file
baweaver has joined #ruby
tier has joined #ruby
sdwrage has joined #ruby
<eam>
BrazenBraden: you said you have an ubuntu system? Run `ldd $(which ruby)` and it will show you the libruby it uses
<eam>
BrazenBraden: then I believe it's dpkg --search /path/to/libruby.whatever.so.2.2.0
bashrw has joined #ruby
<eam>
to find the package that owns it
<eam>
I'm not super great with debian
bl0ndie has quit [Ping timeout: 264 seconds]
<BrazenBraden>
eam, umm.. when i run that in my container, I get "No such file or directory" O.o
claw has quit [Read error: Connection reset by peer]
ta has quit [Remote host closed the connection]
sepp2k has quit [Quit: Leaving.]
<eam>
which?
mghaig has quit [Read error: Connection reset by peer]
<eam>
the ldd?
drptbl has joined #ruby
<BrazenBraden>
eam, yea the ldd
<eam>
so then, do you even have ruby installed in there?
<BrazenBraden>
yea, its a docker ruby image
<eam>
libruby isn't found in the linker path, and ruby itself isn't found in $PATH
<BrazenBraden>
FROM ruby:2.2.3
Trynemjoel has quit [Ping timeout: 264 seconds]
<eam>
well, it seems it isn't installed
karapetyan has quit [Remote host closed the connection]
<eam>
from here it looks like docker debugging
<BrazenBraden>
that would be awfully strange for a ruby image lol
futilegames has quit [Quit: futilegames]
<eam>
I agree, but I've seen stranger
mjuszczak has quit []
tangentstorm has joined #ruby
<eam>
you can't run "ruby" at all in there right?
rushed has quit [Quit: rushed]
Trynemjoel has joined #ruby
superrorc has quit [Ping timeout: 240 seconds]
<BrazenBraden>
eam, i can run ruby -v and I get ruby 2.2.3p173 (2015-08-18 revision 51636) [x86_64-linux]
Macaveli has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<eam>
well then, where is that ruby file you ran? run ldd on it
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
<eam>
very odd that "which ruby" isn't working
dfockler has joined #ruby
<BrazenBraden>
eam, the ldd didnt work.. but "which ruby" shows me /usr/local/bin/ruby
karapetyan has joined #ruby
<eam>
oh, you don't have "ldd"?
<BrazenBraden>
might be the case. these images supposed to be light weight
<eam>
man, this image is missing some basic stuff, that ships with glibc
davedev24 has quit []
superrorc has joined #ruby
mbff has quit [Quit: Leaving]
zlogan has joined #ruby
mjago has joined #ruby
<BrazenBraden>
and its not even the slim version lol
PlasmaStar has joined #ruby
<eam>
BrazenBraden: install binutils (or whatever ubuntu calls it) and run readelf -d
<eam>
on ruby
<eam>
actually that won't do it
<BrazenBraden>
will try.. dont know if the container will stay alive long enough
<eam>
BrazenBraden: ldd is a shell script, try copying it over
<eam>
I believe the actual executable it uses is the dynamic linker itself
unshadow_ has quit [Ping timeout: 240 seconds]
webopsx has joined #ruby
<BrazenBraden>
eam, easier than that, will just re-provision the containers including binutils in the build. anything else i should include while im at it?
fullofcaffeine has joined #ruby
allcentury has quit [Ping timeout: 240 seconds]
bmurt has joined #ruby
jeffreylevesque has quit [Ping timeout: 268 seconds]
unshadow has joined #ruby
zlogan has quit [Ping timeout: 268 seconds]
webopsx has quit [Client Quit]
baweaver has quit [Remote host closed the connection]
Macaveli has joined #ruby
c1v0 has joined #ruby
bb010g has quit [Quit: Connection closed for inactivity]
baweaver has joined #ruby
p0wn3d has quit [Ping timeout: 255 seconds]
apt-get has quit [Remote host closed the connection]
Macaveli has quit [Client Quit]
snapcase has joined #ruby
ndrei has joined #ruby
SebastianThorn has joined #ruby
lokulin has quit [Ping timeout: 246 seconds]
ekinmur_ has joined #ruby
elperdut_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
agent_white has joined #ruby
devoldmx has joined #ruby
baroquebobcat has joined #ruby
p0wn3d has joined #ruby
sepp2k has joined #ruby
ngscheurich has joined #ruby
davedev24 has joined #ruby
Xiti has quit [Quit: Xiti]
bmurt has quit []
Xiti has joined #ruby
davedev24 has quit [Client Quit]
ndrei has quit [Ping timeout: 264 seconds]
IceDragon has joined #ruby
adadada has quit [Ping timeout: 255 seconds]
IceDragon is now known as Guest55921
devoldmx has quit [Ping timeout: 246 seconds]
JDiPierro has joined #ruby
prestorium has joined #ruby
sargas has quit [Quit: Leaving]
<BrazenBraden>
eam, i got the container up and running.. looks like doing bundle install --path my/path was the problem :S
bmurt has joined #ruby
eminencehc has quit [Remote host closed the connection]
jenrzzz has quit [Ping timeout: 264 seconds]
p0wn3d__ has joined #ruby
krisquigley has joined #ruby
KensoDev has quit [Remote host closed the connection]
p0wn3d has quit [Ping timeout: 240 seconds]
tier has quit [Remote host closed the connection]
karapetyan has quit [Remote host closed the connection]
lokulin has joined #ruby
karapetyan has joined #ruby
KensoDev has joined #ruby
Guest55921 is now known as IceDragon
David27 has joined #ruby
eminencehc has joined #ruby
<shevy>
ruby is sexy
krisquigley has quit [Ping timeout: 268 seconds]
last_staff has quit [Quit: last_staff]
simplyianm has quit [Remote host closed the connection]
evanjs_ has quit [Remote host closed the connection]
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bmurt has quit []
`tim` has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
havenwood has joined #ruby
p0wn3d__ has quit [Ping timeout: 264 seconds]
elperdut has joined #ruby
K1MOS has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
elperdut has quit [Max SendQ exceeded]
elperdut has joined #ruby
barhum2013 has joined #ruby
spcmastertim has quit [Quit: Leaving]
elperdut has quit [Max SendQ exceeded]
KensoDev has quit [Remote host closed the connection]
elperdut has joined #ruby
KensoDev has joined #ruby
robh71 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ruby-lang195 has quit [Ping timeout: 246 seconds]
sankaber has joined #ruby
robh71 has joined #ruby
jgt has joined #ruby
__main__ has joined #ruby
karapetyan has quit [Remote host closed the connection]
EllisTAA has joined #ruby
ngscheurich has quit [Ping timeout: 264 seconds]
nfk has quit [Quit: Try memory.free_dirty_pages=true in about:config]
naftilos76 has quit [Quit: Αποχώρησε]
__main__ has quit [Ping timeout: 256 seconds]
sepp2k1 has joined #ruby
opensource_ninja has quit [Ping timeout: 264 seconds]
sepp2k has quit [Ping timeout: 240 seconds]
Ilyes512 has joined #ruby
spotted has joined #ruby
umgrosscol has quit [Remote host closed the connection]
devdazed has quit [Ping timeout: 272 seconds]
<shevy>
Ox0dea have you finally welcomed immutable strings in your heart?
uri_ has quit [Ping timeout: 252 seconds]
yardenbar has joined #ruby
<Ox0dea>
No, of course not.
prestorium has quit [Quit: Leaving]
spotted1 has joined #ruby
iamninja has quit [Quit: WeeChat 1.3]
<shevy>
you grumpy old man!
<shevy>
you'll never wear a santa claus costume
Ox0dea has quit [Read error: Connection reset by peer]
Ox0dea has joined #ruby
<Ox0dea>
shevy: You remembered I'm old! <3
cih has joined #ruby
reprazent has quit [Ping timeout: 252 seconds]
mghaig has joined #ruby
robh71 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
reprazent has joined #ruby
moredhel has quit [Ping timeout: 256 seconds]
nettoweb has joined #ruby
mghaig has quit [Client Quit]
<Ox0dea>
DATA is an elegant way to get hold of the current file as a File, but it only exists if there's an __END__; is there some way to overcome that limitation?
Rohanezio has joined #ruby
jwaldrip_ has quit [Quit: Be back later ...]
baweaver has quit [Remote host closed the connection]
moredhel has joined #ruby
mxrguspxrt has quit [Remote host closed the connection]
arup_r has quit [Ping timeout: 268 seconds]
eminencehc has quit [Remote host closed the connection]
<shevy>
that bugs me as well
elperdut has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Xeago has quit [Read error: Connection reset by peer]
opensource_ninja has joined #ruby
mjago has quit [Read error: Connection reset by peer]
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mjago has joined #ruby
<dfockler>
No, otherwise there would be an infinite loop!
<dfockler>
It would keep grabbing the file until the end of time....
<Ox0dea>
Wat.
<dfockler>
I don't know what I'm talking about
ldnunes has quit [Quit: Leaving]
jwaldrip_ has joined #ruby
<dfockler>
But I just learned about DATA and __END__, thanks ;)
psy_ has quit [Ping timeout: 260 seconds]
ramfjord has joined #ruby
Oog has joined #ruby
drptbl has quit [Quit: My MAC has gone to sleep. zZz..]
devoldmx has joined #ruby
Oog has quit [Max SendQ exceeded]
freerobby has quit [Quit: Leaving.]
drptbl has joined #ruby
_djbkd has quit [Remote host closed the connection]
eminencehc has joined #ruby
Rohanezio has quit [Ping timeout: 260 seconds]
tvw has quit [Ping timeout: 256 seconds]
jwaldrip__ has joined #ruby
bronson has quit [Remote host closed the connection]
<shevy>
it's nice to store configuration stuff on a per file basis
andikr has quit [Remote host closed the connection]
fuinho has joined #ruby
psy_ has joined #ruby
<shevy>
I have no idea how to grab DATA from multiple different .rb files
nordskald has quit [Quit: Nettalk6 - www.ntalk.de]
jeffreylevesque has joined #ruby
s00pcan has joined #ruby
ta has joined #ruby
<shevy>
you are missing the fun stuff
<shevy>
pointers!
inoperable_ has quit [Quit: the many sings to us]
<phreakocious>
I would like to make a nice thread-safe increment method that takes a class instance or global variable as a parameter.. is there a nice way to do this since you can't pass a reference to the variable?
<Ox0dea>
diegoviola: What does `5[foo]` do and why?
baweaver has quit [Remote host closed the connection]
RegulationD has quit [Remote host closed the connection]
<phreakocious>
something like .. def foo(var) ; $mutex.synchronize { var += 1 } ....
__main__ has joined #ruby
otacon- has joined #ruby
<diegoviola>
Ox0dea: what do you mean
<Ox0dea>
diegoviola: In C.
<Ox0dea>
> anyone can write C
<diegoviola>
Ox0dea: I don't know
<Ox0dea>
phreakocious: It'd be easier not to use a primitive.
<phreakocious>
how so?
blaxter has joined #ruby
<Ox0dea>
phreakocious: Well, you can't get a "reference", so to speak, to a Fixnum.
<phreakocious>
could it be done with (ick) eval?
<phreakocious>
or some ruby equivalent
[k- has quit [Ping timeout: 250 seconds]
<diegoviola>
Ox0dea: explain what it does
Xeago has quit [Remote host closed the connection]
eminencehc has quit [Remote host closed the connection]
<Ox0dea>
diegoviola: In C, `foo[5]` is the sixth element of `foo`, just like in Ruby.
know has joined #ruby
<diegoviola>
Ox0dea: ok ty
<jhass>
phreakocious: do a thread safe Counter class instead
<Ox0dea>
diegoviola: But `array[index]` in C is actually just syntactic sugar for `*(array + index)`.
<jhass>
var = Counter.new(0); var.increment
<Ox0dea>
Since addition is commutative, `array[index]` == `index[array]`.
<diegoviola>
Ox0dea: why are you trying to test my skills or something?
<phreakocious>
ahh jhass I see'
segmond has joined #ruby
<Ox0dea>
diegoviola: Please calm down.
<diegoviola>
Ox0dea: ok sorry
<Ox0dea>
This is a learning experience.
eminencehc has joined #ruby
<diegoviola>
ok
<phreakocious>
I'm still stuck in a very functional way of thinking. :D thanks Ox0dea and jhass
<Ox0dea>
phreakocious: Functional "mutation" is pretty nifty.
zlogan has joined #ruby
Rohanezio has joined #ruby
yardenbar has quit [Ping timeout: 264 seconds]
<Ox0dea>
I'm looking at some C code where I did `(__compar_fn_t) strcmp` and it worked.