<al2o3-cr>
That indicated it's going back into the scope of the class
<needhelpwithfunk>
hey folks. I got a funky problem that I need coding help on
<Ox0dea>
needhelpwithfunk: Go for it.
dgutierrez1287 has joined #ruby
[k- has joined #ruby
<needhelpwithfunk>
imagine a tic tac toe board. if I asked you what the space inside the board was, you could reasonably point out the 9 different blocks of empty space
Billias_ has joined #ruby
tris- has joined #ruby
linc01n_ has joined #ruby
sfr^^ has joined #ruby
scottyme- has joined #ruby
Musashi007 has joined #ruby
<needhelpwithfunk>
okay, now you know the 9 blocks in the tic tac toe board have white space, check. okay, how do you differentiate the blocks now?
Papierko- has joined #ruby
waxjar_ has joined #ruby
braincrash has joined #ruby
bf4 has joined #ruby
<Ox0dea>
Wat.
Olipro- has joined #ruby
bf4 is now known as Guest65722
nomadic has joined #ruby
No_One has joined #ruby
skakri` has joined #ruby
cschneid- has joined #ruby
wookiehangover_ has joined #ruby
<needhelpwithfunk>
exactly
<shevy>
a webchat user :)
Olipro- is now known as Guest987
northfurr has joined #ruby
Plas has joined #ruby
<Ox0dea>
needhelpwithfunk: You're not explaining yourself very well.
dymk_ has joined #ruby
<Ox0dea>
Each square can have exactly one of three states.
<pontiki>
you can do it in a single dimensional array, a two-dimensional array, or L-space with Ook
bigredbo_ has joined #ruby
<needhelpwithfunk>
okay, hold up.
universaL has joined #ruby
<needhelpwithfunk>
let me draw a schematic
<Ox0dea>
needhelpwithfunk: You could make them ' ', 'X', and 'O', or even use the ternary number system to pack everything in nice and tight.
iooner- has joined #ruby
<pontiki>
mmmmmmm ternary
TheMoonMaster_ has joined #ruby
znz_jp0 has joined #ruby
jimeh_ has joined #ruby
JDiPierro has quit [*.net *.split]
Klumben has quit [*.net *.split]
johnhamelink has quit [*.net *.split]
tobiasvl has quit [*.net *.split]
cornerman has quit [*.net *.split]
lolmaus has quit [*.net *.split]
Fire1o6 has quit [*.net *.split]
code1o6 has quit [*.net *.split]
kriskropd has quit [*.net *.split]
sparr has quit [*.net *.split]
qiukun has quit [*.net *.split]
braincra- has quit [*.net *.split]
mistergibson has quit [*.net *.split]
wookiehangover has quit [*.net *.split]
bubbys has quit [*.net *.split]
ZeeNoodleyGamer has quit [*.net *.split]
segmond has quit [*.net *.split]
sfr^ has quit [*.net *.split]
linc01n has quit [*.net *.split]
universa1 has quit [*.net *.split]
PaulePanter has quit [*.net *.split]
stnly_ has quit [*.net *.split]
PlasmaStar has quit [*.net *.split]
TheMoonMaster has quit [*.net *.split]
znz_jp has quit [*.net *.split]
waxjar has quit [*.net *.split]
Guest20718 has quit [*.net *.split]
dymk has quit [*.net *.split]
jimeh has quit [*.net *.split]
crdpink has quit [*.net *.split]
zack6849 has quit [*.net *.split]
cball has quit [*.net *.split]
blackjid has quit [*.net *.split]
go|dfish has quit [*.net *.split]
bubuntu has quit [*.net *.split]
Billias has quit [*.net *.split]
scottymeuk has quit [*.net *.split]
jordanm has quit [*.net *.split]
tris has quit [*.net *.split]
nomadic_ has quit [*.net *.split]
sross_work|2 has quit [*.net *.split]
asi_ has quit [*.net *.split]
hostess has quit [*.net *.split]
chihhsin has quit [*.net *.split]
eam has quit [*.net *.split]
nullwarp has quit [*.net *.split]
mjmac has quit [*.net *.split]
cschneid has quit [*.net *.split]
Guest74353 has quit [*.net *.split]
trampi has quit [*.net *.split]
Seich has quit [*.net *.split]
QKO has quit [*.net *.split]
lupine has quit [*.net *.split]
terrellt has quit [*.net *.split]
j416 has quit [*.net *.split]
harryk has quit [*.net *.split]
iooner has quit [*.net *.split]
skarn has quit [*.net *.split]
Dwarf has quit [*.net *.split]
DarkBushido has quit [*.net *.split]
epochwolf has quit [*.net *.split]
colstrom has quit [*.net *.split]
verdoc has quit [*.net *.split]
jamo_ has quit [*.net *.split]
Papierkorb has quit [*.net *.split]
lotherk has quit [*.net *.split]
skakri has quit [*.net *.split]
devn has quit [*.net *.split]
eregon has quit [*.net *.split]
julie_harshaw has quit [*.net *.split]
jokke- is now known as jokke
scottyme- is now known as scottymeuk
cornerma1 is now known as cornerman
qiukun_ is now known as qiukun
wookiehangover_ is now known as wookiehangover
universaL is now known as universa1
Billias_ is now known as Billias
<al2o3-cr>
ternary is goooooddd...
bigredboots has quit [Ping timeout: 240 seconds]
<Ox0dea>
needhelpwithfunk: Each square can have state 0, 1, or 2, and you've got nine squares.
<al2o3-cr>
but your belts on
tris- is now known as tris
<pontiki>
pal of mine is designing a tri-state computer :)
<needhelpwithfunk>
give me a second. I'll draw thisu p.
lupine has joined #ruby
<Ox0dea>
needhelpwithfunk: We're all familiar with Tic-Tac-Toe?
Plas is now known as PlasmaStar
Xiti has quit [Read error: Connection reset by peer]
<pontiki>
maybe it's not tic-tac-toe, but something *like* a tic-tac-toe board
mesamoo has joined #ruby
Xiti has joined #ruby
ghr has quit [Ping timeout: 268 seconds]
dgutierrez1287 has quit [Ping timeout: 258 seconds]
<needhelpwithfunk>
black tiles are walls (collision)
<needhelpwithfunk>
tiles with pink dots are accepted as white space.
<needhelpwithfunk>
scanning through a basic array can basically give me pink dots as white space. I got that part down
<needhelpwithfunk>
the part I need help with is, what do I have to say/program to get the computer to understand that the purply color surrounding the white space needs to be categorized as a block
<needhelpwithfunk>
the first nine blocks that have pink dots should be block 1
DarkBushido has joined #ruby
DarkBushido has joined #ruby
<needhelpwithfunk>
one collider over, there's another nine blocks that should be block 2
nullwarp has joined #ruby
<Ox0dea>
needhelpwithfunk: How many white squares in your image?
devoldmx has quit [Ping timeout: 265 seconds]
cball has joined #ruby
s00pcan has joined #ruby
kriskropd has joined #ruby
segmond has joined #ruby
<al2o3-cr>
needhelpwithfunk: start simple with something like #=> Array.new(3) { Array.new(3, 32.chr) }
<needhelpwithfunk>
64 black squares (seperator/collidor) , 36 white squares ( pink dot), and 4 blocks
<Ox0dea>
Feel free to make that 36 any multiple of 9.
rvchangu- has joined #ruby
tenseiten has joined #ruby
duracrisis has joined #ruby
Rakunh0 has joined #ruby
rikai_ has joined #ruby
duracrisis is now known as Guest64649
KnownSyntax_ has joined #ruby
<qwebirc1010559>
okay. that works for this instance.
<qwebirc1010559>
But what if the borders aren't so clean as in the example? what if they're jagged?
jxie_ has joined #ruby
<al2o3-cr>
qwebirc1010559: is this ascii or gui?
ekleog_ has joined #ruby
<qwebirc1010559>
gui.
danshultz_ has joined #ruby
Lildirt|SomeoneT has joined #ruby
unsymbol_ has joined #ruby
<al2o3-cr>
Well, that piece of code is nion useless for jaggedness
<Ox0dea>
> nion
<qwebirc1010559>
nion?
<Ox0dea>
He wanted "nigh on".
integralequation has joined #ruby
<al2o3-cr>
slang dudes
<qwebirc1010559>
i'm not familiar with the phrase, sorry.
<qwebirc1010559>
so he's saying it is usless?
cgfbee has quit [Excess Flood]
Tempesta has quit [Read error: Connection reset by peer]
perry has quit [Ping timeout: 272 seconds]
hfp has quit [Ping timeout: 272 seconds]
rvchangue has quit [Ping timeout: 272 seconds]
Lildirt has quit [Ping timeout: 272 seconds]
Mon_Ouie has quit [Ping timeout: 272 seconds]
tokik has quit [Ping timeout: 272 seconds]
nlsun has quit [Ping timeout: 272 seconds]
seitensei has quit [Quit: No Ping reply in 180 seconds.]
ekleog has quit [Ping timeout: 272 seconds]
DmitryBochkarev has quit [Ping timeout: 272 seconds]
rikai has quit [Ping timeout: 272 seconds]
cfloare has quit [Ping timeout: 272 seconds]
russt has quit [Ping timeout: 272 seconds]
jxie has quit [Ping timeout: 272 seconds]
Blaguvest has quit [Ping timeout: 272 seconds]
webhat has quit [Ping timeout: 272 seconds]
Platini has quit [Ping timeout: 272 seconds]
RazorX has quit [Ping timeout: 272 seconds]
segy has quit [Ping timeout: 272 seconds]
Keltia has quit [Ping timeout: 272 seconds]
KnownSyntax has quit [Ping timeout: 272 seconds]
Guest158 has quit [Ping timeout: 272 seconds]
warreng has quit [Ping timeout: 272 seconds]
unsymbol has quit [Ping timeout: 272 seconds]
M-mistake has quit [Ping timeout: 272 seconds]
jeaye has quit [Ping timeout: 272 seconds]
fold has quit [Ping timeout: 272 seconds]
Lucky__ has quit [Ping timeout: 272 seconds]
kgirthofer has quit [Ping timeout: 272 seconds]
cgrieger^away has quit [Ping timeout: 272 seconds]
Gadgetoid has quit [Ping timeout: 272 seconds]
danshultz has quit [Ping timeout: 272 seconds]
inteq has quit [Ping timeout: 272 seconds]
jeadre has quit [Ping timeout: 272 seconds]
nisstyre has quit [Ping timeout: 272 seconds]
oddalot has quit [Ping timeout: 272 seconds]
entropie has quit [Ping timeout: 272 seconds]
mozzarella has quit [Ping timeout: 272 seconds]
Gadgetoid has joined #ruby
hfp_ is now known as hfp
perryh is now known as perry
rvchangu- is now known as rvchangue
ehth77 has quit [Ping timeout: 250 seconds]
danshultz_ is now known as danshultz
ChoiKyuSang is now known as Tempesta
veloutin has quit [Ping timeout: 272 seconds]
<Ox0dea>
Using simple modular arithmetic for irregular geometry isn't of much utility, but you're stringing us along here.
RazorX has joined #ruby
segy has joined #ruby
warreng has joined #ruby
cgrieger^away has joined #ruby
<Ox0dea>
What was the point of using a Tic-Tac-Toe board as an example if it doesn't actually relate to the problem you want to solve?
ehth77 has joined #ruby
jeaye has joined #ruby
hydrozen has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<qwebirc1010559>
i'm sorry. i'm not that great of an explainer.
<qwebirc1010559>
here's a better example:
fold1 has joined #ruby
weemsledeux has joined #ruby
cgfbee has joined #ruby
<qwebirc1010559>
imagine the floor plans of a house. there's grooves, indentations in some rooms. some rooms are nice squares. how would you get a program to differentiate the different rooms in the house?
<Ox0dea>
It would be nice if Proc invocation could be indistinguishable from method calls.
baroquebobcat has joined #ruby
<[k->
:((((
EllisTAA has joined #ruby
<Ox0dea>
inorite
EllisTAA has joined #ruby
<sevenseacat>
*sees parse.y and runs screaming*
<[k->
this was 9 years ago
scripore has quit [Quit: This computer has gone to sleep]
<EllisTAA>
the liskov substitution principle states “objects in a program should be replaceable with instances of their subtypes without altering the correctness of that program.” — does this mean that the method i write should not depend on a specific instance of an object but any instance of that class?
evillution has joined #ruby
<Ox0dea>
[k-: 1.9.3 is kill for a reason.
shred45 has joined #ruby
<Ox0dea>
EllisTAA: LSP is why #each is so damned useful.
integralequation has joined #ruby
<EllisTAA>
i don’t understand the ‘…instances of their subtypes ...'
<EllisTAA>
is lsp releated to each because we can use each on hashes and arrays or bc each can be used on any array?
<Ox0dea>
The former.
jidar has joined #ruby
existensil has joined #ruby
Encapsulation has joined #ruby
baroquebobcat has quit [Client Quit]
hydrozen has joined #ruby
bmurt has joined #ruby
<al2o3-cr>
Encapsulation: where've you been hiding?
<EllisTAA>
so is the LSP saying that a method should work with an object and everything that inherits from it?
bubbys has joined #ruby
nisstyre has joined #ruby
<Ox0dea>
EllisTAA: Yes, but it doesn't preclude the subclasses from providing their own definitions where appropriate.
<EllisTAA>
in the case that a subclass provided their own definition of a method would that be an example of Open Closed Principle
weemsledeux has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sepp2k has quit [Read error: Connection reset by peer]
Kellin has joined #ruby
<Newtonianb>
I have a hash I'm trying to write to file but it keeps wrapping it in [{...}] how can I just dumpt out the hash without the enclosed square brackets
<Newtonianb>
I'm merging all JSON files in a directory then I want to write hash back out
Antiarc has joined #ruby
<sevenseacat>
flatten in this case doesnt do what you think it does
<shevy>
Newtonianb you have a hash in an array there
VeryBewitching has quit [Quit: Konversation terminated!]
<Newtonianb>
It seems like it yup, I don't want the array though, how do I dump the hash I just index first element of the array? Its starting to feel I'm not doing this json merge properly?
dopie has quit [Quit: This computer has gone to sleep]
auzty has joined #ruby
MasterPiece has joined #ruby
<Newtonianb>
Is there a way to hook on to rube execution so I can display in my console some automatic logger saying 'running method xxx' without polluting my code with puts everywhere
<Newtonianb>
something along the lines of __call in php
skade has quit [Read error: Connection reset by peer]
dhjondoh has joined #ruby
<shevy>
so vhesy
<shevy>
this is a mickey mouse picture right?
<shevy>
or it is a skater
* [k-
leaves shevy to think about it alone
drbrain has joined #ruby
bruno-_ has joined #ruby
UtkarshRay has quit [Ping timeout: 244 seconds]
bruno- has quit [Read error: Connection reset by peer]
sevenseacat has joined #ruby
doddok has joined #ruby
bruno-_ has quit [Ping timeout: 272 seconds]
skade has joined #ruby
bruno- has joined #ruby
skade has quit [Client Quit]
platzhirsch has quit [Ping timeout: 250 seconds]
astrobu__ has quit [Remote host closed the connection]
devoldmx has joined #ruby
qiukun has quit [Ping timeout: 256 seconds]
bruno- has quit [Ping timeout: 256 seconds]
bruno- has joined #ruby
workmad3 has joined #ruby
ndrei has quit [Read error: Connection reset by peer]
<shevy>
hmmmmm
<shevy>
.end_with? == '&'
devoldmx has quit [Ping timeout: 256 seconds]
sevenseacat has quit [Quit: .]
AxonetBE has joined #ruby
<[k->
.end_with? ?&
<[k->
returns a bool
bruno- has quit [Ping timeout: 264 seconds]
<AxonetBE>
I have a router who can receive sms, now I want to thread them via a ruby application but I was wondering how to get sms list as fast as possible when there is a new sms arriving.
bruno- has joined #ruby
jeadre has joined #ruby
<AxonetBE>
Do I have to cronjob? The bad thing about cronjobs is that the smallest interval is only 1 second
workmad3 has quit [Ping timeout: 264 seconds]
bigkevmcd has quit [Remote host closed the connection]
<AxonetBE>
1 minute *
workmad3 has joined #ruby
Porfa has quit [Quit: Porfa]
Trynemjoel has quit [Ping timeout: 264 seconds]
platzhirsch has joined #ruby
otherj has joined #ruby
bruno- has quit [Ping timeout: 260 seconds]
bruno- has joined #ruby
stamina has joined #ruby
bruno- has quit [Ping timeout: 252 seconds]
G has quit [Quit: leaving]
bruno- has joined #ruby
yu1in has joined #ruby
mclee_ has joined #ruby
bonhoeffer_ has joined #ruby
morenoh153 has quit [Ping timeout: 246 seconds]
konsolebox has joined #ruby
Trynemjoel has joined #ruby
astrobun_ has joined #ruby
bruno- has quit [Ping timeout: 252 seconds]
platzhirsch has quit [Ping timeout: 250 seconds]
timonv has quit [Ping timeout: 268 seconds]
bruno- has joined #ruby
eGGsha has quit [Ping timeout: 240 seconds]
bradland has quit [Ping timeout: 240 seconds]
bonhoeffer_ has quit [Client Quit]
bradland has joined #ruby
ndrei has joined #ruby
Brando753 has quit [Ping timeout: 250 seconds]
roxtrongo has joined #ruby
arup_r has quit [Remote host closed the connection]
rocknrollmarc has joined #ruby
arup_r has joined #ruby
bruno- has quit [Ping timeout: 252 seconds]
bweston92 has joined #ruby
Brando753 has joined #ruby
bruno- has joined #ruby
bweston has quit [Ping timeout: 240 seconds]
Stalkr^ has quit [Quit: Leaving...]
roxtrongo has quit [Ping timeout: 250 seconds]
Porfa has joined #ruby
astrobun_ has quit [Remote host closed the connection]
bruno- has quit [Ping timeout: 256 seconds]
tkuchiki has quit [Remote host closed the connection]
pandaant has quit [Remote host closed the connection]
eregon_ is now known as eregon
Rollabunna has joined #ruby
bruno- has joined #ruby
platzhirsch has joined #ruby
codecop has joined #ruby
PaulePan1er is now known as PaulePanter
Salehi has quit [Quit: Leaving]
<darix>
AxonetBE: it depends on the tool receiving the sms
<darix>
if it can call your ruby script directly
<darix>
or write the sms to a pipe/socket where the ruby script is listening
bruno- has quit [Ping timeout: 252 seconds]
k3asd` has joined #ruby
Rollabunna has quit [Ping timeout: 252 seconds]
chthon has quit [Ping timeout: 244 seconds]
bruno- has joined #ruby
dhjondoh has quit [Quit: dhjondoh]
faces has quit [Ping timeout: 240 seconds]
face has joined #ruby
eightfold has joined #ruby
<AxonetBE>
darix: I is just a cgi bin script that I can call an get a list of the sms messages, I have to parse them after
<darix>
so cronjob it is
claw has quit [Ping timeout: 240 seconds]
dhjondoh has joined #ruby
bruno- has quit [Ping timeout: 240 seconds]
emba has quit [Remote host closed the connection]
<yorickpeterse>
well
<yorickpeterse>
Today I got fucked over by eval + proc + Binding
<yorickpeterse>
or so it seems
<yorickpeterse>
yay for Ruby not having the ability to fully isolate procs from their enclosing scopes
<yorickpeterse>
other than defining a dummy class and using its binding
jgt has joined #ruby
bruno- has joined #ruby
workmad3 has quit [Ping timeout: 240 seconds]
eGGsha has joined #ruby
<[k->
example?
Mendenhall has quit [Ping timeout: 244 seconds]
astrobun_ has joined #ruby
<yorickpeterse>
I'll have a commit in a few minutes
emba has joined #ruby
yu1in has left #ruby [#ruby]
ZenYung has joined #ruby
<ZenYung>
Hey :)
jgt has quit [Ping timeout: 264 seconds]
<ZenYung>
Is it possible to invoke a method on an object dynamically based on a string?
claw has joined #ruby
chthon has joined #ruby
<yorickpeterse>
ZenYung: yes
<yorickpeterse>
ZenYung: look into the "send" / "__send__" method
<yorickpeterse>
public_send would be better, but sometimes one does actually want to call a private method
<ZenYung>
ah ok
<yorickpeterse>
even considering all the risks that might bring
<ZenYung>
What's the risk of calling a private method?
[k-_ has joined #ruby
<yorickpeterse>
It could be removed at some point
<yorickpeterse>
since it's a private method it's usually not considered part of the public/stable API
<ZenYung>
I am not writing an API
<yorickpeterse>
Thus an author might decide to rename it, remove it, etc, without telling users
<[k->
and, violating encapsulation is bad
<yorickpeterse>
API is just a term, it's not limited to web APIs
lopin has quit [Read error: Connection reset by peer]
<yorickpeterse>
Now to see how the hell I'm going to test this race condition
<[k->
spin up a million instances to test it
<ZenYung>
ah I see
<yorickpeterse>
[k-: Yeah euh that's not how race conditions work
<shevy>
is .send or .public_send faster?
<yorickpeterse>
It will reproduce it, since I can reproduce it using 4 threads, but it's not a reliable manner
Asher has quit [Quit: Leaving.]
Asher has joined #ruby
sdothum has joined #ruby
joonty has quit [Quit: joonty]
<ZenYung>
yorickpeterse: maybe you can do something with injecting sleep at the right point
Rurik has quit [Read error: Connection reset by peer]
<yorickpeterse>
That doesn't make it more reliable, it only introduces more factors
Asher has quit [Read error: No route to host]
dorei has joined #ruby
<yorickpeterse>
e.g. it might as well only occur when the stars are aligned
<yorickpeterse>
If that were actually the case the only way to test it would be to actually align the stars
<ZenYung>
I would say find a number of threads which increases the chance of the race condition to show up to about 99%, but I don't think it's a good unit test if it's based on probability
<yorickpeterse>
Sure, it's a way of testing if it's there
<yorickpeterse>
But you can't use it to prove/disprove anything
<yorickpeterse>
Since it's based on probability, not fact
Asher has joined #ruby
<yorickpeterse>
I know why it happens, but translating that to a test is really hard
Rurik has joined #ruby
<[k-_>
* the expert shares his wisdom *
<yorickpeterse>
A test that doesn't just bombard the code with threads that is
devoldmx has joined #ruby
<ZenYung>
You could do some theoritically stuff and prove it with something like Hoare calculus
khebbie has quit [Remote host closed the connection]
shredding has quit [Ping timeout: 264 seconds]
<yorickpeterse>
Hm, I _can_ grab a Binding from a Proc
<ZenYung>
Thread interleavings can be manupulated, no?
<yorickpeterse>
so I can at least assert it's not re-using the binding from the method that generated it
<ZenYung>
mhm
ponga has joined #ruby
<yorickpeterse>
Hm interesting, a Proc always seems to have its own Binding
<yorickpeterse>
it probably inherits it, instead of taking it over directly
<yorickpeterse>
bah
tkuchiki has joined #ruby
<ZenYung>
yorickpeterse: Can't you use your hideous XML parser to unit test the race condition?
havenwood has joined #ruby
<yorickpeterse>
"hideous"?
Gnomethrower has joined #ruby
<yorickpeterse>
It's not that bad
<yorickpeterse>
also, this _is_ a race condition in said library :P
stnly has quit [Ping timeout: 255 seconds]
devoldmx has quit [Ping timeout: 255 seconds]
chthon has quit [Ping timeout: 244 seconds]
last_staff has quit [Quit: vrooom]
<ZenYung>
Well okay then
<yorickpeterse>
I'll explain all this in my commit in a few minutes :P
<yorickpeterse>
oh great
<ZenYung>
:)
<yorickpeterse>
Ruby 2.2 defines Binding#receiver
<yorickpeterse>
but Rubinius only defines Binding#self
<yorickpeterse>
meh
timonv has joined #ruby
iamninja has joined #ruby
<ZenYung>
Rubinious?
<ZenYung>
You got a to be kidding me
<yorickpeterse>
and jruby 1.7 defines neither
<yorickpeterse>
It's Rubinius
<yorickpeterse>
I don't get why people use "Rubinious"
<ZenYung>
Aren't that the MRI is dead people?
eGGsha is now known as eGGshke
eGGshke is now known as eGGsha
<yorickpeterse>
Not that I know of
eGGsha is now known as eGGshke
eGGshke is now known as eGGsha
eGGsha is now known as eGGshke
khebbie has joined #ruby
ranchodev has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<yorickpeterse>
Hm, JRuby 9k at least has Binding#receiver
centrx has quit [Remote host closed the connection]
centrx has joined #ruby
claw has joined #ruby
failshell has joined #ruby
<aiRness>
Hello. Is it possible tp move the "Rendered" logs to new relic for processing with the ruby agent? I'm planning to use lograge for the actual log files but I would like to have the "Rendeded" information to New Relic
mike___1234 has joined #ruby
zenguy_pc has joined #ruby
khebbie has joined #ruby
<yorickpeterse>
Rendered logs?
Cust0sLim3n has joined #ruby
terlar has joined #ruby
mrityunjay has quit [Ping timeout: 256 seconds]
failshell has quit [Ping timeout: 264 seconds]
benlovell has joined #ruby
<shevy>
if one loads several gems, some of which are somewhat big aka more than 100.000kb size as a .gem file, should one use require 'name_of_gem', or autoload() instead?
<jhass>
don't autoload, the hassles are not worth it in 90% of the cases
CloCkWeRX has joined #ruby
maloik has joined #ruby
rushed has joined #ruby
<aiRness>
yorickpeterse: "Rendered layouts/_assets.html.erb (2.0ms)" that kind of entries
<yorickpeterse>
The Rails channel is probably better for Rails questions
<yorickpeterse>
?rails
<ruboto>
Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
Zggb has joined #ruby
pandaant has joined #ruby
blueOxigen has quit []
jgt has quit [Ping timeout: 265 seconds]
krisquigley has quit [Remote host closed the connection]
rushed has quit [Ping timeout: 264 seconds]
Rokko_11 has joined #ruby
<Rokko_11>
hi! I've got a question about Ruby Syntax.
<Rokko_11>
work, but my IDE shows me syntax-errors?
rocknrollmarc has quit [Read error: Connection reset by peer]
<centrx>
bad IDE?
<jhass>
because your IDE is stupid and/or ancient
devoldmx has joined #ruby
<jhass>
that syntax got introduced in Ruby 1.9, which is by now not even in security maintenance anymore, that old is it
<Rokko_11>
it's IntelliJ
<centrx>
Rokko_11, Does it tell you what it thinks the syntax errors are?
tkuchiki has joined #ruby
<jhass>
newer versions of RubyMine definitely recognize it, I'd have heard the complains before otherwise
<benlovell>
Rokko_11: that's a vagrant file right? you need to turn on ruby syntax for that file
<Rokko_11>
ok, thank you.
akemrir has joined #ruby
workmad3 has joined #ruby
joonty has joined #ruby
claw has quit [Ping timeout: 272 seconds]
devoldmx has quit [Ping timeout: 265 seconds]
joonty has quit [Client Quit]
morenoh153 has joined #ruby
tkuchiki has quit [Remote host closed the connection]
Rokko_11 has quit [Quit: Page closed]
claw has joined #ruby
ruurd has quit [Read error: Connection reset by peer]
ruurd has joined #ruby
morenoh153 has quit [Ping timeout: 255 seconds]
moss has joined #ruby
f4cl3y has joined #ruby
benlovell has quit [Ping timeout: 265 seconds]
krisquigley has joined #ruby
scripore has joined #ruby
<aiRness>
yorickpeterse: ok
aiRness has left #ruby [#ruby]
joonty has joined #ruby
GreyHands has joined #ruby
sonOfRa has quit [Quit: Bye!]
sonOfRa has joined #ruby
oo_ has quit [Remote host closed the connection]
victortyau has joined #ruby
bonhoeffer_ has joined #ruby
Siyfion has quit [Ping timeout: 240 seconds]
tkuchiki has joined #ruby
Eiam has quit [Read error: Connection reset by peer]
bonhoeffer_ has quit [Read error: Connection reset by peer]
bonhoeffer has joined #ruby
Igorshp has quit [Remote host closed the connection]
vmatiyko has joined #ruby
workmad3 has quit [Ping timeout: 264 seconds]
Porfa has joined #ruby
Rollabunna has joined #ruby
znz_jp0 has quit [Quit: kill -QUIT $$]
znz_jp has joined #ruby
<sonOfRa>
Does anyone know of a kerberos interface that is actually updated? https://github.com/domcleal/rkerberos seems abandoned for the last 2 years
<sonOfRa>
I don't really want to resort to having to call kpasswd via exec (especially since kpasswd is interactive and doesn't have a non-interactive mode)
<sonOfRa>
sorry if that showed up twice, my VPN was acting up.
prettiestPony11 has joined #ruby
tkuchiki has quit [Remote host closed the connection]
Konstruktionist has joined #ruby
tkuchiki has joined #ruby
khebbie has quit [Remote host closed the connection]
dionysus69 has quit [Remote host closed the connection]
khebbie has joined #ruby
Ropeney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dionysus69 has joined #ruby
Rollabunna has quit [Ping timeout: 260 seconds]
<sonOfRa>
And, in case I do have to fall back to calling kpasswd manually, what is a good way to work with interactive commands via ruby? Open3?
<abyss>
I'd like to write some tool with receive some parameteres and do something with this params... Anyone knows any nice gem/library to ruby to handle it?
bonhoeffer has joined #ruby
bonhoeffer has quit [Client Quit]
devoldmx has quit [Ping timeout: 240 seconds]
roxtrongo has joined #ruby
khebbie has quit [Remote host closed the connection]
<livcd>
abyss: command line parameters?
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
iamninja has joined #ruby
juanpablo____ has joined #ruby
<shevy>
abyss optgetlong, and optionparser in stdlib; addons as in slop ... I think thor... and some others. And of course there is good old ARGV parsing yourself :)
<abyss>
livcd: I think yes, but I am open to any ideas (how to make prof or so;)), can be even rest api, but yes, basicly command line parameters.
<pontiki>
i am still missing the one for these new emoji
northfurr has quit [Client Quit]
bazbing80 has quit [Ping timeout: 255 seconds]
tmtwd has quit [Ping timeout: 240 seconds]
<shevy>
4chan implants ready!
phutchins has quit [Ping timeout: 244 seconds]
ruurd has quit [Quit: ZZZzzz…]
moeabdol has quit [Read error: Connection reset by peer]
mistnim has joined #ruby
<platzhirsch>
Noooo
charliesome has joined #ruby
<arup_r>
shevy: Do your cat make friendship with rats ?
rbennacer has joined #ruby
bazbing80 has joined #ruby
roxtrongo has quit [Remote host closed the connection]
chills42_ has joined #ruby
aganov has quit [Remote host closed the connection]
<mistnim>
hello, let's say that at some spot in my program I need to check multiples if the objects in an array are all the same. Should I make a method (all_same? array) or extend Enumerable with that method? What is reccomended?
IrishGringo has quit [Ping timeout: 246 seconds]
moeabdol has joined #ruby
failshell has joined #ruby
<pontiki>
could use all?
saddad has joined #ruby
s00pcan has joined #ruby
<shevy>
arup_r nope, it's fight to death. nearby there are no rats though, mostly just small mice (save for the sewers but the cat can not go there)
<mistnim>
pontiki all? needs a block
<pontiki>
array.all?{|i| i == array[0]} or some monstrousity
blackjid has quit [Max SendQ exceeded]
<pontiki>
and? that's the wonderfulness of it
scripore has quit [Quit: This computer has gone to sleep]
<shevy>
mistnim if you have to re-use this then you should put it into a method
<mistnim>
pontiki yes that I would use in the method
scripore has joined #ruby
blackjid has joined #ruby
<mistnim>
ok, but should the method be in Enumerable or by itself?
<shevy>
by itself
<pontiki>
how many different object types do you need to use it on?
<mistnim>
just Array
<pontiki>
all Arrays?
<mistnim>
yes
<pontiki>
then extend Array
<mistnim>
ok
tkuchiki has quit [Remote host closed the connection]
daum has joined #ruby
failshell has quit [Ping timeout: 250 seconds]
acke has quit [Remote host closed the connection]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
havenwood has quit [Ping timeout: 240 seconds]
skullcrasher has joined #ruby
noethics has joined #ruby
tkuchiki has joined #ruby
rodfersou has joined #ruby
Musashi007 has joined #ruby
decoponio has quit [Quit: Leaving...]
<mistnim>
I have some problems to figure out how to organize a program. Where should I put the code to extend Array? It's just required by a class
noethics has quit [Client Quit]
<shevy>
simplest way is to load the file where it is required
<shevy>
now you can either put that code into the same file, or you put it into a separate .rb and load that .rb file then
startupality has quit [Quit: startupality]
<mistnim>
shevy, but still that extension is going to be avialable to all the program after it's loaded right?
akemrir has quit [Quit: WeeChat 1.3]
phutchins has joined #ruby
<pontiki>
yes, mistnim
Musashi007 has quit [Quit: Musashi007]
morenoh153 has joined #ruby
<pontiki>
the question is will it be needed someplace before that specific class; if so, you should probably put it in it's own file, and make sure it gets loaded early
<mistnim>
well it's not needed, but I guess it won't hurt, I suppose there is no way to isolate it only for the class in any case
I has joined #ruby
<pontiki>
when i asked "all Arrays" what did you think I meant?
I is now known as Guest97466
<ljarvis>
fuck off Rails' collection #take
hydra___ has joined #ruby
Guest97466 has quit [Client Quit]
acke has joined #ruby
<hydra___>
hi
rushed has joined #ruby
dopie has joined #ruby
arup_r has quit []
<hydra___>
How should I pin a package to specific version using gem?
<shevy>
mistnim if you extend a core class then yes, if you load the code into other .rb files
<hydra___>
(before installing it)
morenoh153 has quit [Ping timeout: 250 seconds]
rushed has quit [Client Quit]
krz has quit [Ping timeout: 246 seconds]
yozier has joined #ruby
<yozier>
how an I match "foo_hi" but not"foo_hi$" ?
<centrx>
/foo_hi[^$]/ ?
pontiki has quit [Quit: "Poets have been mysteriously silent on the subject of cheese." -- G.K.Chesterson]
hydra___ has quit [Quit: leaving]
khebbie has joined #ruby
charliesome has joined #ruby
David27 has joined #ruby
oo_ has joined #ruby
<mistnim>
in any case if a class needs a simple generic method, that is clearly not part of the class itself, I can put it on the class.rb file, or require it from there. But I still don't like it that these methods leaks through other parts of the program.
<leitz>
The simple way would be to test for file length. However, I'm using JSON a bit and need to figure out a good test for "is this file in JSON format" and what to do if it is not.
phutchins has quit [Ping timeout: 264 seconds]
yqt has joined #ruby
khebbie has joined #ruby
<centrx>
leitz, Isn't "file" a string representing the filename?
<ljarvis>
leitz: the second question is the important one imo. Also, if it doesn't exist you just create an empty one, which seems not ideal. Why not dump an empty JSON hash in so you know it's ready to be valid for input?
<ljarvis>
also good eye centrx
<centrx>
thanks lj
ranchodev has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dagda1 has joined #ruby
charliesome has joined #ruby
UtkarshRay has joined #ruby
maceto has joined #ruby
Rollabunna has quit [Ping timeout: 265 seconds]
s00pcan has quit [Remote host closed the connection]
Igorshp has joined #ruby
JDiPierro has quit [Remote host closed the connection]
JDiPierro has joined #ruby
last_staff has joined #ruby
howdoi has quit [Quit: Connection closed for inactivity]
maceto has quit [Remote host closed the connection]
charliesome has quit [Client Quit]
Stany is now known as Tamae
charliesome has joined #ruby
Renich has joined #ruby
tkuchiki has quit [Remote host closed the connection]
tmtwd has joined #ruby
JDiPierro has quit [Ping timeout: 255 seconds]
chills42_ has quit [Remote host closed the connection]
Porfa has quit [Quit: Porfa]
tejasmanohar has joined #ruby
havenwood has joined #ruby
s00pcan has joined #ruby
maceto has joined #ruby
grenierm has quit [Quit: grenierm]
maceto has quit [Remote host closed the connection]
failshell has joined #ruby
Musashi007 has quit [Quit: Musashi007]
tkuchiki has joined #ruby
pushpak has joined #ruby
pushpak has quit [Client Quit]
jtirila has quit [Remote host closed the connection]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dionysus69 has quit [Ping timeout: 246 seconds]
s00pcan has quit [Remote host closed the connection]
Pisuke has joined #ruby
Papierko- is now known as Papierkorb
The_Phoenix has joined #ruby
tvon has joined #ruby
<leitz>
Ah, I'm coyping lines from something else I wrote and missed that line.
MyMind has quit [Ping timeout: 252 seconds]
failshell has quit [Ping timeout: 264 seconds]
sepp2k has joined #ruby
ndrei has joined #ruby
charliesome has joined #ruby
andikr has quit [Remote host closed the connection]
Papabear has quit [Remote host closed the connection]
<shevy>
copy/pasting is harder than it looks like!
<leitz>
Hehe...actually, I'm typing by hand. Helps me learn.
rbennacer has quit [Remote host closed the connection]
devoldmx has quit [Ping timeout: 246 seconds]
poguez_ has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
JDiPierro has joined #ruby
iamninja has joined #ruby
oo_ has quit [Remote host closed the connection]
Jardayn has joined #ruby
Pisuke has quit [Read error: Connection reset by peer]
dmr8 has joined #ruby
s00pcan has joined #ruby
juanpablo____ has quit [Ping timeout: 244 seconds]
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
JDiPierro has quit [Ping timeout: 250 seconds]
n008f4g_ has joined #ruby
morenoh153 has joined #ruby
iamninja has quit [Ping timeout: 256 seconds]
houhoulis has joined #ruby
sdothum has joined #ruby
s00pcan has quit [Remote host closed the connection]
stamina has quit [Quit: WeeChat 1.3]
centrx has quit [Quit: "You cannot fix a machine by just power-cycling it with no understanding of what is going wrong."]
jgt has quit [Ping timeout: 264 seconds]
<eosinx>
Does it makes sense to run an open source ERP to run your personal household?
David27 has quit [Quit: Going offline, see ya! (www.adiirc.com)]
<eosinx>
Oops, wrong channel
greenarrow has quit [Quit: 500]
krz has quit [Ping timeout: 255 seconds]
mkosaki has joined #ruby
Hounddog has quit [Read error: Connection reset by peer]
ascarter has joined #ruby
prettiestPony11 has joined #ruby
<darix>
eosinx: if you have to ask, of course it makes sense. because there is no such thing as overkill.
chills42 has quit [Remote host closed the connection]
joonty has quit [Quit: joonty]
wpp has quit [Quit: ZZZzzz…]
ekleog has quit [Remote host closed the connection]
ekleog has joined #ruby
riotjones has joined #ruby
tkuchiki has quit [Remote host closed the connection]
<Papierkorb>
eosinx: I agree with darix. Using a complete ERP suite will make sure that while you scale your household, your solution will scale with you effortless. This way, you can keep focusing on what matters, and not on learning new tools all the time
dmr8 has quit [Read error: Connection reset by peer]
Rakunh0 has joined #ruby
prettiestPony11 has quit [Client Quit]
<shevy>
we need more kickass stuff written in ruby
<darix>
shevy: like a replacement for roundcube mail
<darix>
or tt-rss
prasselpikachu has quit [Ping timeout: 260 seconds]
<eosinx>
darix, Papierkorb: thx guys, do you use one?
s00pcan has joined #ruby
<Papierkorb>
eosinx: While my second name is Overkill, no, I'm not insane :)
<Papierkorb>
in fact, I had to google ERP
otherj has quit [Quit: .]
<darix>
eosinx: when you visit your doctor the next time. please let them check your sarcasm detector
SCHAAP137 has joined #ruby
SCHAAP137 has joined #ruby
<darix>
:p
<shevy>
darix I don't even... oh... is that a mail thing in the browser?
rbennacer has joined #ruby
davedev24 has joined #ruby
<darix>
eosinx: you want just some simple calendar/contact sharing between devices?
<Papierkorb>
shevy: yeah, roundcube is actually a quite good webmail client
riotjones has quit [Ping timeout: 240 seconds]
<shevy>
oh damn
<darix>
look at things like balaika
<darix>
shevy: it is one of the better opensource web mail tools
<adaedra>
havenwood: mmh, I thought macruby was discontinued, it's still shipped?
maletor has quit [Quit: Computer has gone to sleep.]
workmad3 has quit [Ping timeout: 246 seconds]
ht__ has quit [Quit: Konversation terminated!]
apt-get has joined #ruby
stuartb has joined #ruby
Soda has quit [Ping timeout: 265 seconds]
platzhirsch has left #ruby [#ruby]
saddad has quit [Ping timeout: 244 seconds]
<havenwood>
adaedra: Yeah, just checked on another machine and it doesn't seem to be default installed any longer. That makes sense with RubyMotion replacing it and Laurent not working at Apple.
ht__ has joined #ruby
<havenwood>
adaedra: I thought it still was but you're right.
rehat has joined #ruby
jgt has quit [Ping timeout: 272 seconds]
eosinx has joined #ruby
hmsimha_ has quit [Ping timeout: 265 seconds]
krz has quit [Ping timeout: 250 seconds]
vmatiyko has joined #ruby
arooni-mobile has quit [Quit: Leaving]
fantazo has joined #ruby
TheHodge has quit [Quit: Connection closed for inactivity]
<ruboto>
pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
fantazo has quit [Ping timeout: 250 seconds]
<saransh__>
any idea how to render footer outside of body?
bootstrappm has joined #ruby
Umeaboy has quit [Quit: Leaving]
Umeaboy has joined #ruby
<jhass>
there's a #jekyll
pontiki has joined #ruby
pranny has joined #ruby
<jhass>
btw afaik the only valid descendants from <html> are <head> and <body>
<jhass>
so that doesn't make a whole lot of sense either way
<pipework>
saransh__: Why do you think you want the footer outside of the body?
<saransh__>
<pipework>: I have a lot of pages, some does not use 100% height
<saransh__>
so, i need footer outside of body
<pipework>
saransh__: That's the concern of stylesheets, not the structure of your document.
<jhass>
so #css ;P
felixr has joined #ruby
<saransh__>
<pipework>: I also want to know, how can we do it?
felixrsmith has joined #ruby
<pipework>
saransh__: Usually by googling, "css footer bottom"
<saransh__>
<pipework>: in jekyll theme, how to get footer outside of body?
<pontiki>
in particular, "sticky footer"
chouhoul_ has joined #ruby
<pipework>
saransh__: Google "css footer bottom"
platzhirsch has joined #ruby
pglombardo has joined #ruby
<pipework>
There is no "outside of the body" you only have the body.
<saransh__>
thanks :)
<pipework>
saransh__: You may need to end up changing your stylesheet if styles are applied to the body element or overriding the attributes the footer inherits from the body if you can't change the stylesheet entirely.
<flaf>
Hi, I have a hash variable h1 where keys are strings and values are array of strings or hashes of strings (for keys and values). With h2 = h1.clone, can I be sure that h1 and h2 are completely “independant”?
leafybasil has joined #ruby
Pupeno has joined #ruby
esauOp_ has joined #ruby
<toretore>
the clone will only apply to the hash itself, not its keys and values
<toretore>
so if you go h1.keys[0].upcase!, that will affect both h1 and h2
<toretore>
or h1['array'] << value
<toretore>
the array is the same
<flaf>
Ah. So I'm not sure to understand the sense of h1.clone.
<toretore>
it makes a copy of h1
<toretore>
simple as that
<pipework>
flaf: deep_clone/deep_dup/deep_copy are things.
Torrieri has joined #ruby
Rollabunna has joined #ruby
<pipework>
Might wanna look them up in the googlenets.
failshell has joined #ruby
Vile` has quit [Ping timeout: 252 seconds]
<flaf>
Is it possible in my case to have h2 a copy completely independent of h1?
konsolebox has quit [Remote host closed the connection]
devbug has joined #ruby
<toretore>
flaf: and what's the reason you want to "deep clone" it?
Rickmasta has quit [Ping timeout: 246 seconds]
<flaf>
I have to have a “clone” of this hash (h2) and be able to change a value in h2 (not the structure, just a “final” value like the macaddress or an option etc. without change the state of h1.
roxtrongo has quit [Remote host closed the connection]
radgeRayden has quit [Ping timeout: 244 seconds]
chipotle has joined #ruby
<flaf>
Oh, I will try to be more precise with this example...
iszak has quit [Remote host closed the connection]
<toretore>
Ox0dea: in the sense that you'd have to rehash anyway, yeah
khebbie has joined #ruby
<Ox0dea>
toretore: Mm-hmm. I tried to do something clever with #replace in order to generalize the thing, but yours is about as good as it'll get.
Torrieri has quit [Quit: Be back later ...]
tejasmanohar has joined #ruby
Torrieri has joined #ruby
<Ox0dea>
I realize BasicObject is supposed to be just that, but it seems a little odd that instances can't be hashed.
zachk has joined #ruby
tejasmanohar has quit [Client Quit]
khebbie has quit [Ping timeout: 246 seconds]
mike___1234 has quit [Ping timeout: 246 seconds]
Alina-malina has joined #ruby
Torrieri has quit [Ping timeout: 244 seconds]
kamal2222ahmed has joined #ruby
Mendenhall has joined #ruby
n0xff has joined #ruby
yasha0x80 has quit [Quit: My Brain has gone to sleep. ZZZzzz…]
<flaf>
toretore: thx again. I think I have well understood your function and it's perfect for my usage. As Ox0dea said, I think I can replace “h[deep_dup(k)] = deep_dup(v)” by just “h[k.dup] = deep_dup(v)” because, in my case, keys in hashes are always strings.
timonv has quit [Ping timeout: 252 seconds]
workmad3 has joined #ruby
<toretore>
you can probably skip the dup altogether
<toretore>
deep_dup(str) will just do str.dup anyway
stevednd has joined #ruby
<flaf>
Yes indeed.
<Ox0dea>
>> h = {'foo'=>1, 'bar'=>2}; foo.keys.all?(&:frozen?) # flaf
<ruboto>
Ox0dea # => undefined local variable or method `foo' for main:Object (NameError) ...check link for more (https://eval.in/429604)
<Ox0dea>
>> h = {'foo'=>1, 'bar'=>2}; h.keys.all?(&:frozen?) # flaf
<Ox0dea>
flaf: Well, I trust you know what Hash#keys returns?
<flaf>
Ah, yes, it's just to show me that keys in hashes are frozen, correct?
<Ox0dea>
Nailed it.
acke has quit [Remote host closed the connection]
segfalt has joined #ruby
<flaf>
;)
startupality has joined #ruby
acke has joined #ruby
futilegames_ has joined #ruby
Torrieri has joined #ruby
Torrieri has joined #ruby
futilegames_ has quit [Client Quit]
AlphaAtom has quit [Read error: Connection reset by peer]
Alina-malina has quit [Read error: Connection reset by peer]
yasha0x80 has joined #ruby
saddad has quit [Ping timeout: 268 seconds]
Mon_Ouie has quit [Remote host closed the connection]
hololeap has joined #ruby
rbennacer has quit [Remote host closed the connection]
northfurr_ has joined #ruby
futilegames has quit [Ping timeout: 264 seconds]
eightfold has quit [Quit: eightfold]
northfurr has quit [Quit: northfurr]
northfurr_ is now known as northfurr
yfeldblum has joined #ruby
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Torrieri has quit [Quit: Be back later ...]
Torrieri has joined #ruby
Lycanii has quit [Quit: Konversation terminated!]
dotix has quit [Quit: Leaving]
Alina-malina has joined #ruby
ruurd has joined #ruby
tmtwd has quit [Ping timeout: 256 seconds]
decoponio has quit [Quit: Leaving...]
mike___1234 has joined #ruby
solars has quit [Ping timeout: 256 seconds]
Porfa has joined #ruby
iloverubynoob is now known as pecpec
naftilos76 has quit [Ping timeout: 240 seconds]
garethrees has joined #ruby
Torrieri has quit [Ping timeout: 268 seconds]
iamninja has joined #ruby
ghr has quit [Ping timeout: 250 seconds]
Porfa has quit [Client Quit]
segfalt has quit [Quit: segfalt]
Porfa has joined #ruby
Rickmasta has joined #ruby
bonhoeffer has joined #ruby
leitz has joined #ruby
northfurr_ has joined #ruby
chipotle has quit [Quit: cheerio]
leitz has quit [Client Quit]
ndrei has joined #ruby
chipotle has joined #ruby
jhack has joined #ruby
iamninja has quit [Ping timeout: 246 seconds]
krisquigley has joined #ruby
northfurr_ has quit [Quit: northfurr_]
leat has joined #ruby
aaeron has quit [Quit: Leaving.]
gambl0re has quit [Ping timeout: 260 seconds]
aaeron has joined #ruby
northfurr_ has joined #ruby
krisquigley has quit [Ping timeout: 240 seconds]
Rickmasta has quit [Read error: No route to host]
morenoh153 has joined #ruby
northfurr_ has left #ruby [#ruby]
<Ox0dea>
[1,2,3].pack('?*') => 'ABC'
cball has quit [Ping timeout: 246 seconds]
<Ox0dea>
Should the ? be K or Y?
<Ox0dea>
I need both cases, and those are the only options as of 2.3.
Rickmasta has joined #ruby
Limix has joined #ruby
last_staff has quit [Quit: nite y'all]
acke has quit [Remote host closed the connection]
otherj has joined #ruby
otherj has quit [Max SendQ exceeded]
otherj has joined #ruby
otherj has quit [Max SendQ exceeded]
ht__ has quit [Quit: Konversation terminated!]
otherj has joined #ruby
otherj has quit [Max SendQ exceeded]
codecop has quit [Quit: Išeinu]
otherj has joined #ruby
otherj has quit [Max SendQ exceeded]
otherj has joined #ruby
saddad has joined #ruby
tejasmanohar has joined #ruby
felixr has quit [Quit: Konversation terminated!]
DLSteve has quit [Ping timeout: 255 seconds]
bonhoeffer has quit [Quit: bonhoeffer]
Torrieri has joined #ruby
Xiti has quit [Quit: Xiti]
pranny has quit [Remote host closed the connection]
warreng has quit [Ping timeout: 246 seconds]
Voker57 has quit [Remote host closed the connection]
dgutierrez1287 has joined #ruby
warreng has joined #ruby
ruurd has quit [Quit: ZZZzzz…]
Guest24 is now known as lele
Blaguvest has quit []
sphex has quit [Ping timeout: 268 seconds]
TomyLobo has quit [Ping timeout: 244 seconds]
dgutierrez1287 has quit [Ping timeout: 255 seconds]
c355E3B has quit [Quit: Connection closed for inactivity]
s00pcan has quit [Ping timeout: 256 seconds]
Rollabunna has joined #ruby
ordepdev has joined #ruby
Xiti has joined #ruby
kjones_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
s00pcan has joined #ruby
yasha0x80 has quit [Quit: My Brain has gone to sleep. ZZZzzz…]
Pumukel has quit [Quit: ChatZilla 0.9.92 [Firefox 40.0.3/20150826023504]]
Torrieri has quit [Quit: Be back later ...]
sepp2k has quit [Quit: Leaving.]
AxonetBE has joined #ruby
lele has quit [Quit: Coyote finally caught me]
Rollabunna has quit [Ping timeout: 256 seconds]
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ordepdev has quit [Remote host closed the connection]
blackmesa has joined #ruby
Porfa has quit [Quit: Porfa]
Rakunh0 has joined #ruby
Rickmasta has joined #ruby
<dorei>
what are the implications of defining a class inside another class ?
<dorei>
i have a class X::A (class X under module A) and i want to create a class X::A::Conf and it seems the only way to do it is to define a class Conf inside class X::A
ferz_ has joined #ruby
bruno- has quit [Quit: Lost terminal]
sphex has joined #ruby
bruno- has joined #ruby
Newtonianb has joined #ruby
<morenoh153>
is there a ruby way of getting all elements in an array from an index to the end?
<Ox0dea>
dorei: If X and A exist, you can just open class X::A::Conf.
yasha0x80 has quit [Quit: My Brain has gone to sleep. ZZZzzz…]
<morenoh153>
Ox0dea: very nice
yasha0x80 has joined #ruby
workmad3 has joined #ruby
jgt has quit [Ping timeout: 265 seconds]
ordepdev has quit [Remote host closed the connection]
omgtora has joined #ruby
<omgtora>
?guys
<ruboto>
Though inclusion was probably intended, not everyone relates to being "one of the guys". Maybe consider using "folks", "all", "y'all", or "everyone" instead?
<ruboto>
I don't know anything about genderequality
yasha0x80 has quit [Client Quit]
<omgtora>
equality doesnt mean you can claim a word is offensive because it's not "gender neutral" simply because of it's spelling
<omgtora>
?guys
<ruboto>
Though inclusion was probably intended, not everyone relates to being "one of the guys". Maybe consider using "folks", "all", "y'all", or "everyone" instead?
<baweaver>
!mute omgtora
<baweaver>
shoo
<Jardayn>
dem pesky trolls
<Jardayn>
fucking with our channel
Rakunh0 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<baweaver>
keep the meta in offtopic.
workmad3 has quit [Ping timeout: 260 seconds]
roxtrongo has quit [Remote host closed the connection]
<chrisseaton>
is there a way to run eval without creating a new lexical environment? so that variables bound in the eval are created in caller's environment?
roxtrongo has joined #ruby
<baweaver>
class_eval and module_eval I believe
<chrisseaton>
eg I want to do binding.eval("x = 14"); x and to have that work
A124 has quit [Remote host closed the connection]
<Ox0dea>
chrisseaton: Even binding_of_caller can't introduce new locals, so no.
<baweaver>
So why do you want to?
<baweaver>
just use a hash
<chrisseaton>
baweaver: it's not for a real program, it's an experiment
<baweaver>
class and module evals are as close as you'll probably get.
<Ox0dea>
chrisseaton: Are you aware that you can pass a Binding into #eval?
<Ox0dea>
>> b = binding; eval 'x = 14', b; eval 'x', b
<chrisseaton>
of course I can't reference the local statically - I have to use eval to read it - but actually that's fine for what I want to do - thanks very much!
<chrisseaton>
Ox0dea: thanks very much - I'm seeing what happens to performance if I replace every statement in a benchmark with the same thing but in #eval
allcentury has joined #ruby
<Ox0dea>
chrisseaton: Expect dramatic impact.
otherj has quit [Quit: .]
rodfersou has quit [Quit: leaving]
Musashi007 has quit [Client Quit]
<chrisseaton>
Ox0dea: right, but I'm hoping to have a technique to remove that impact :)
startupality has quit [Quit: startupality]
aaeron has quit [Quit: Leaving.]
pecpec has quit [Quit: Leaving...]
<Ox0dea>
morenoh153: Is this C?
tejasmanohar has quit [Quit: tejasmanohar]
<mblagden_>
morenoh153: I believe you have some other code affecting this.. as written, I believe it would work fine
hmsimha_ has joined #ruby
<mblagden_>
i.e. sorted [1, 5, 3, 3, 7] would produce false
<Ox0dea>
Your code is indeed fine, but it really needs to eat a sandwich or something.
Porfa has joined #ruby
Rakunh0 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
<Ox0dea>
Could also use some standard library love.
bonhoeffer has quit [Quit: bonhoeffer]
blue_deref has quit [Quit: Taking myself out of hear.]
Rakunh0 has joined #ruby
jonr22 has joined #ruby
sdothum has joined #ruby
tno has quit [Ping timeout: 246 seconds]
hydrozen has joined #ruby
morenoh153 has left #ruby [#ruby]
morenoh149 has joined #ruby
havenwood has joined #ruby
<morenoh149>
Ox0dea: right. I'm not understanding ruby breaking out of if blocks. I want to, if temp is nil to set it and break out of the if to the next iteration of array.each
grenierm has quit [Quit: grenierm]
Spami has joined #ruby
k3asd` has joined #ruby
<Ox0dea>
morenoh149: Is Ruby your first language?
segfalt has joined #ruby
<morenoh149>
no I mostly do javascript
VeryBewitching has quit [Quit: Konversation terminated!]
<Ox0dea>
morenoh149: In any case, your method does do what it's supposed to, so you must be mutating the array somewhere.
arooni-mobile has quit [Ping timeout: 244 seconds]
<Ox0dea>
For what it's worth, a much more idiomatic definition of #sorted might look something like this: `def sorted a; a.each_cons(2).all? { |x, y| x < y }; end`.
kirun has quit [Quit: Client exiting]
<Ox0dea>
Make that <=, of course.
ch0ke has joined #ruby
tno has joined #ruby
firstdayonthejob has quit [Quit: WeeChat 1.4-dev]
allcentury has quit [Ping timeout: 244 seconds]
Pupeno has quit [Remote host closed the connection]
ham has joined #ruby
firstdayonthejob has joined #ruby
Jardayn has quit [Quit: Leaving]
ham is now known as Guest50461
firstdayonthejob has quit [Client Quit]
Guest50461 has quit [Client Quit]
<baweaver>
Ox0dea: might make it take an optional block for arbitrary sort types
firstdayonthejob has joined #ruby
aaeron has joined #ruby
shmilan has joined #ruby
chipotle has quit [Quit: cheerio]
firstdayonthejob has quit [Client Quit]
<Ox0dea>
It'd be nice if comparisons could be chained.
<al2o3-cr>
deop this minute
<Ox0dea>
Then #sorted? could just be an alias for #reduce.
stardiviner has joined #ruby
duoi has quit [Max SendQ exceeded]
duoi has joined #ruby
firstdayonthejob has joined #ruby
zachk has quit [Quit: WeeChat 0.4.2]
firstdayonthejob has quit [Client Quit]
kjones_ has joined #ruby
firstdayonthejob has joined #ruby
dopie has quit [Quit: This computer has gone to sleep]