<Ox0dea>
Paste that into your address bar and hit Enter.
<Ox0dea>
Then go nuts.
<samnaples>
can you please be helpful... trolling is not nice
<Ox0dea>
samnaples: You're in the wrong channel, bud.
dorei has quit []
<Ox0dea>
I think you ought to count it fortuitous that you were shown a new trick and not the door.
samnaples has left #ruby [#ruby]
JDiPierro has quit [Remote host closed the connection]
<mistym>
Ox0dea: Seriously, be polite. It's not the right channel but you don't have to be rude.
phutchins has quit [Ping timeout: 246 seconds]
<Ox0dea>
mistym: Virtually anybody else would've done an ?ot and that would've been the end of it.
Guest16641 has joined #ruby
<Ox0dea>
Data URIs are remarkably useful in the right circumstances. Perhaps he'll need one someday and our exchange will set his search in the right direction.
morenoh149 has joined #ruby
karapetyan has joined #ruby
JDiPierro has joined #ruby
sonofflynn has left #ruby [#ruby]
sepp2k has quit [Read error: Connection reset by peer]
juanpablo_ has joined #ruby
BlackCoyote has joined #ruby
JDiPierro has quit [Remote host closed the connection]
dopiee has joined #ruby
karapetyan has quit [Ping timeout: 250 seconds]
dgutierrez1287 has joined #ruby
Guest16641 has quit [Ping timeout: 246 seconds]
I has joined #ruby
I is now known as Guest28285
psy_ has quit [Ping timeout: 255 seconds]
saddad has joined #ruby
juanpablo_ has quit [Ping timeout: 265 seconds]
dgutierrez1287 has quit [Ping timeout: 240 seconds]
psy_ has joined #ruby
dopiee has quit [Quit: Leaving]
slayerjain has joined #ruby
Guest28285 has quit [Quit: This computer has gone to sleep]
<pontiki>
not my night tonite
pontiki has quit [Quit: "Poets have been mysteriously silent on the subject of cheese." -- G.K.Chesterson]
psy_ has quit [Max SendQ exceeded]
psy_ has joined #ruby
ReK2 has joined #ruby
rehat has joined #ruby
JDiPierro has joined #ruby
lampshades has joined #ruby
grenierm has joined #ruby
keen__________18 has quit [Read error: Connection reset by peer]
keen__________18 has joined #ruby
Guest28285 has joined #ruby
FrankD has quit [Changing host]
FrankD has joined #ruby
MichaelSmith has quit [Quit: Connection closed for inactivity]
JDiPierro has quit [Remote host closed the connection]
rbennacer has quit [Remote host closed the connection]
ramfjord has joined #ruby
devoldmx_ has quit [Remote host closed the connection]
bb010g has joined #ruby
bruno- has quit [Ping timeout: 264 seconds]
leafybasil has quit [Remote host closed the connection]
NeverDie_ has joined #ruby
leafybasil has joined #ruby
[spoiler] has quit [Ping timeout: 268 seconds]
rodfersou has joined #ruby
diego1 has joined #ruby
[spoiler] has joined #ruby
diego1 has quit [Changing host]
diego1 has joined #ruby
s00pcan has joined #ruby
Neverdie has quit [Ping timeout: 255 seconds]
diego1 has quit [Read error: Connection reset by peer]
diegoviola has quit [Ping timeout: 246 seconds]
umgrosscol has joined #ruby
diego1 has joined #ruby
leafybasil has quit [Ping timeout: 240 seconds]
snow has joined #ruby
diego1 has quit [Changing host]
diego1 has joined #ruby
diego1 is now known as diegoviola
Pupeno has joined #ruby
snow has quit []
slayerjain has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
oo_ has quit [Remote host closed the connection]
Guest28285 has quit [Quit: Leaving]
umgrosscol has quit [Remote host closed the connection]
<nofxx>
Both ruby, nice. Wish there was same for android. Such a monkey job upload stuff to play.
allomov has quit [Remote host closed the connection]
codenapper has joined #ruby
aganov has joined #ruby
dhjondoh1 has joined #ruby
ledestin has quit [Ping timeout: 240 seconds]
dhjondoh has quit [Ping timeout: 246 seconds]
dhjondoh1 is now known as dhjondoh
claw has quit [Ping timeout: 256 seconds]
astrobunny has quit [Remote host closed the connection]
claw has joined #ruby
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
codecop has joined #ruby
tagrudev has joined #ruby
pawnbox has quit [Remote host closed the connection]
astrobunny has joined #ruby
renderfu_ has joined #ruby
renderful has quit [Ping timeout: 272 seconds]
chouhoulis has joined #ruby
lampshades has quit []
alexUaN has joined #ruby
lampshades has joined #ruby
iateadonut has quit [Quit: Leaving.]
last_staff has joined #ruby
pawnbox has joined #ruby
Salehi has joined #ruby
CloCkWeRX has quit [Ping timeout: 264 seconds]
chouhoulis has quit [Ping timeout: 246 seconds]
michael_mbp has quit [Excess Flood]
michael_mbp has joined #ruby
astrobunny has quit [Remote host closed the connection]
Rickmasta has joined #ruby
naftilos76 has joined #ruby
lkba_ has quit [Ping timeout: 264 seconds]
n008f4g_ has joined #ruby
JDiPierro has joined #ruby
astrobunny has joined #ruby
nhhagen has joined #ruby
JDiPierro has quit [Ping timeout: 265 seconds]
yottanami has joined #ruby
Rollabunna has joined #ruby
solars has joined #ruby
CloCkWeRX has joined #ruby
<yottanami>
I used Net::HTTP::Post to request and I got #<Net::HTTPFound 302 Found readbody=true> What does it means? the body different with page that I submitet in HTML
<bitfurry>
Hey , I Just started reading about contribution to ruby . Can somebody provide some info about where to start and where I can find reported bugs ?
riotjones has joined #ruby
acke has joined #ruby
acke has quit [Remote host closed the connection]
karapetyan has joined #ruby
<shevy>
bitfurry do you mean bugs in default ruby, or addons?
Meow-J has quit [Quit: Connection closed for inactivity]
chouhoulis has joined #ruby
vdamewood has quit [Read error: Connection reset by peer]
lsmola has joined #ruby
<shevy>
haha
<shevy>
matz living in matz city
devoldmx_ has quit [Remote host closed the connection]
Pupeno_ has joined #ruby
Pupeno has quit [Read error: Connection reset by peer]
callumacrae has quit [Ping timeout: 264 seconds]
CloCkWeRX has quit [Ping timeout: 246 seconds]
chouhoulis has quit [Ping timeout: 260 seconds]
pawnbox has quit [Remote host closed the connection]
allenn has joined #ruby
andikr has joined #ruby
oo_ has quit [Read error: Connection reset by peer]
Balzrael has joined #ruby
oo_ has joined #ruby
<shevy>
San Franciso is a dam good town for a beaver
Salehi has quit [Ping timeout: 250 seconds]
Salehi has joined #ruby
dionysus69 has quit [Ping timeout: 260 seconds]
<certainty>
moin
callumacrae has joined #ruby
pawnbox has joined #ruby
<shevy>
look, python confuses me. they have a tarball... Python-3.5.0.tar.xz
bitfurry has joined #ruby
<shevy>
why do they use first letter capitalized
<shevy>
perl is not doing this... php is not doing this... lua is not doing this ... ruby is not doing this ...
<shevy>
their logo uses downcased "python" too :D
Balzrael has quit [Read error: No route to host]
Salehi has quit [Max SendQ exceeded]
pawnbox has quit [Remote host closed the connection]
Oka has quit [Quit: o/]
Salehi has joined #ruby
Blaguvest has joined #ruby
pawnbox has joined #ruby
vdamewood has joined #ruby
Balzrael has joined #ruby
pontiki has joined #ruby
pawnbox has quit [Ping timeout: 255 seconds]
acke has joined #ruby
jimms has joined #ruby
UtkarshRay has joined #ruby
jmarrec has joined #ruby
unclouded has joined #ruby
nhhagen has quit [Read error: Connection reset by peer]
jmarrec has quit [Client Quit]
nhhagen_ has joined #ruby
JohnnyTao has joined #ruby
pontiki has quit [Ping timeout: 255 seconds]
dede has joined #ruby
athinggoingon has quit [Ping timeout: 252 seconds]
Hrorek has quit [Ping timeout: 246 seconds]
monod has joined #ruby
shoutsid has quit []
JohnnyTao has quit [Max SendQ exceeded]
JohnnyTao has joined #ruby
pawnbox has joined #ruby
JohnnyTao has quit [Max SendQ exceeded]
Hrorek has joined #ruby
JohnnyTao has joined #ruby
firstdayonthejob has quit [Ping timeout: 260 seconds]
bayed has joined #ruby
mlipienski has joined #ruby
greenarrow has joined #ruby
VeryBewitching has quit [Quit: Konversation terminated!]
JohnnyTao has quit [Max SendQ exceeded]
<maloik>
oh hi
JohnnyTao has joined #ruby
zeroDivisible has quit [Quit: WeeChat 1.3]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
howdoi has joined #ruby
edwinvdgraaf has joined #ruby
bruno- has joined #ruby
edwinvdgraaf has quit [Client Quit]
<nofxx>
shevy, /j #python; python sucks! /part
Salehi has quit [Quit: Leaving]
<nofxx>
please someone recommend me a terminal for osx that have at least split screen. yeah, I never remember tmux commands
<matti>
nofxx: iTerm2?
<apeiros>
Terminal.app has splitscreen?
JohnnyTao has quit [Quit: Leaving]
bruno- has quit [Ping timeout: 268 seconds]
JohnnyTao has joined #ruby
<baweaver>
learn tmux
TDJACR has quit [Ping timeout: 272 seconds]
vondruch has joined #ruby
monod has quit [Ping timeout: 255 seconds]
skullcrasher_ has joined #ruby
TDJACR has joined #ruby
ghostlines has joined #ruby
charliesome has joined #ruby
ghostlines has quit [Client Quit]
Juanchito has joined #ruby
drptbl has joined #ruby
blackmesa has joined #ruby
drptbl is now known as drptbl[away]
michael_mbp has quit [Excess Flood]
<maloik>
nofxx: whats the difference between learning whatever terminal supports split screens vs learning tmux?
<maloik>
just learn tmux, it's a nearly universal tool for people that use vim/emacs
drptbl[away] is now known as drptbl
<maloik>
the most basic of features should take no longer than a day of use to learn
Axy has joined #ruby
Axy has quit [Changing host]
Axy has joined #ruby
<baweaver>
having a healthy knowledge of the terminal will serve you extremely well
<baweaver>
If you have the time for it, read Unix Power Tools as well.
anisha has joined #ruby
Mia has quit [Ping timeout: 255 seconds]
<nofxx>
totally true. Will do. Egg chicken scenario anyways here. that least non cat update f* brew. No tmux anyways heh
<nofxx>
that last*
<nofxx>
yosemite*
michael_mbp has joined #ruby
<maloik>
that sentence made 0 sense
* baweaver
scratches head
sepp2k has joined #ruby
chouhoulis has joined #ruby
<nofxx>
ok, all fixed. brew would't install tmux because errors with yosemite, after update now.
<baweaver>
read through that pragmatic programmers book on TMUX, it'll help/
mordocai has quit [Remote host closed the connection]
<nofxx>
reinstalled brew, installed tmux. And remember what I dislike. The C-b thing. And moving config files around. But better than C-b. At least arrow to change windows
devoldmx has joined #ruby
sdwrage has quit [Quit: This computer has gone to sleep]
<baweaver>
config it to a and map C to caps lock
<baweaver>
works for me.
senayar has joined #ruby
tno has quit [Ping timeout: 246 seconds]
<baweaver>
well, bed for me.
<baweaver>
'night
<nofxx>
baweaver, as in caps turns 'work mode' than just hit letters? that's sounds nice
<baweaver>
you can remap caps lock to be another control key
baweaver has quit [Remote host closed the connection]
<nofxx>
didn't knew that. with the caps functionality? mean.. sticky
michael_mbp has quit [Excess Flood]
Hounddog has joined #ruby
CustosL1m3n has quit [Ping timeout: 246 seconds]
chouhoulis has quit [Ping timeout: 250 seconds]
doublemalt_ has quit [Ping timeout: 244 seconds]
devoldmx has quit [Ping timeout: 250 seconds]
bweston92 has joined #ruby
Pupeno_ has quit [Remote host closed the connection]
michael_mbp has joined #ruby
banister has quit [Ping timeout: 250 seconds]
Hounddog has quit [Ping timeout: 255 seconds]
tkuchiki has quit [Remote host closed the connection]
arup_r_ has joined #ruby
Hounddog has joined #ruby
Pupeno has joined #ruby
jgt has joined #ruby
pawnbox has quit [Remote host closed the connection]
arup_r has quit [Ping timeout: 252 seconds]
krisquigley has joined #ruby
houhoulis has quit [Remote host closed the connection]
sebyx07 has joined #ruby
lampshades has quit [Remote host closed the connection]
dumdedum has joined #ruby
leafybasil has joined #ruby
tno has joined #ruby
Rollabunna has joined #ruby
<maloik>
anyone happen to know any good and relatively objective articles on when using mongo is a good idea? I don't know the first thing about it other than hearing some horror stories
terlar has joined #ruby
juanpablo_ has joined #ruby
<nofxx>
maloik, dont wrote an article but could testimony in favor, using for years, running as we speak
<nofxx>
and it's anyways very, very easy to bootstrap an app and use PG or something for a model or another
<maloik>
well I'm sure thousands of people are happy with it, I'm asking when is it a good idea to use it
<nofxx>
to bootstrap in mongo* , w/o stupid schemas
<maloik>
cause using it because you get to be lazy in terms of schema doesn't sound like a good plan to me
<apeiros>
no schema is only good if you don't care about the structure of the data in your db. which is IMO quite rare.
corpsicle has quit [Ping timeout: 246 seconds]
<apeiros>
if you do rely on the structure of your data, you're just bound to reinvent schemas with your schemaless db.
<maloik>
was talking to a startup last week, they had a single person prototype their app and then another person take over from there... from what I could tell it was a really simple crud app in its early stages, and their using mongo sort of threw a red flag for me
stevednd has quit [Ping timeout: 250 seconds]
pawnbox has joined #ruby
dhjondoh1 has joined #ruby
leafybasil has quit [Ping timeout: 246 seconds]
dhjondoh has quit [Ping timeout: 244 seconds]
dhjondoh1 is now known as dhjondoh
<nofxx>
apeiros, I fail to see why of that. And the schema must follow the app anyways, so every app you wrote you got it perfect from migration 0?
corpsicle has joined #ruby
platzhirsch has left #ruby [#ruby]
Rollabunna has quit [Ping timeout: 255 seconds]
<apeiros>
nofxx: are you kidding? your own project just shows that
oldbay has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<nofxx>
maloik, for instance app here we're using mongo pg and couch... getting the forté of each one
<apeiros>
from your readme "Schema is defined in code" <- you just reinvented schemas.
juanpablo_ has quit [Ping timeout: 246 seconds]
ledestin has joined #ruby
<maloik>
:D
oldbay has joined #ruby
JohnnyTao has quit [Ping timeout: 240 seconds]
<nofxx>
but it should be
oo_ has quit [Remote host closed the connection]
lampshades has joined #ruby
leat has quit [Remote host closed the connection]
<apeiros>
nofxx: you lose: constraints, indexing, enforcing.
JohnnyTao has joined #ruby
<apeiros>
there's probably half a dozen of things I forget which you also lose by that approach.
sebyx07 has quit [Quit: Leaving.]
<apeiros>
oh, right. performance, space.
leat has joined #ruby
<nofxx>
not true, you define field :foo, type. Indexes are created too, and enforcing is up to db not me
<mlipienski>
I have a class that uses objects that sould be created the first time a method representing that new object is called. what should I look to in ruby's docs to achieve it? I wen't to method_missing and eval, but as I get the class name from method_missing, it comes as a symbol, and eval won't be able to create the object. I've posted an example of the code at https://gist.github.com/marcelo-lipienski/c16d2f903b5184e6f7c1
<nofxx>
not sure FKs
JohnnyTao has quit [Max SendQ exceeded]
sebyx07 has joined #ruby
<nofxx>
don't care about em so I problably ommited. Validation should be on code too
mikecmpbll has joined #ruby
<apeiros>
nofxx: in other words - you're rebuilding in code what an RDBM already gives you
<apeiros>
i.e. all the stuff you claim "not lost" is stuff you reinvent.
<apeiros>
and make your thing no longer schemaless.
<apeiros>
validation on code - good idea. tell me how your uniqueness validation works f.ex.
<maloik>
mlipienski: you're basically asking for a solution based on your code, rather than based on the actual problem. could you describe the problem?
<apeiros>
and how you ensure FK integrity
<nofxx>
apeiros, you totally didn't understand it
stevednd has joined #ruby
<apeiros>
ok. if you say so.
jas02 has quit [Quit: jas02]
<nofxx>
or how it works. There's schema, with all you said. It's just building it for you
osmansekerlen has joined #ruby
jas02 has joined #ruby
<nofxx>
actually the safe mode is suppose to create the migrations, the wild mode it just runs migrations w/o creating the files
oldbay has quit [Ping timeout: 260 seconds]
jgt1 has joined #ruby
<nofxx>
apeiros, I'm not serializing or using pghash or something like that
<nofxx>
let's say the correct name is schemaworryless
<apeiros>
I probably should have read the first line - I see your gem is for PostgreSQL, not for Mongo
<apeiros>
which at least just makes it a misnomer :-p
JohnnyTao has joined #ruby
osmansekerlen has quit [Client Quit]
jgt has quit [Ping timeout: 250 seconds]
anisha has quit [Quit: Leaving]
JohnnyTao has quit [Read error: Connection reset by peer]
toomanytims has quit [Quit: WeeChat 1.2]
_blizzy_ has joined #ruby
<apeiros>
nofxx: what I say is - if you use mongodb - or another schemaless db - you will in >90% of all cases reinvent schemas. and usually poorly so. what I said above applies to that scenario (which your schemaless-gem apparently doesn't fall into)
<mlipienski>
maloik: really struggling to elaborate. what wasn't clear from my question?
JohnnyTao has joined #ruby
moeabdol has joined #ruby
agent_white has quit [Quit: gnight]
<nofxx>
apeiros, yeah, we were arguing different themes. Both we agree ;) what I was saying about that is that mongo and (true)schemaless rdms makes it easy to bootstrap/start an app. After all that changes we know are going to happen in the first days/weeks, just move it to a better tool for the job.
araujo has joined #ruby
<certainty>
mlipienski: just think about how you can the name of the constant from a string. You might want to have a look at Object#const_get
<nofxx>
I like that approach cuz I like BDD and release early/often...
<certainty>
+derive
<nofxx>
dbms*
araujo has quit [Max SendQ exceeded]
<nofxx>
apeiros, everybody is activemodel now days
<certainty>
switching to a db with an entirely different paradigm might present you with some challenge
<nofxx>
not at that stage of an app
<certainty>
one that you probably didn't anticipate when you started out
<certainty>
been there, done that
CustosL1men has joined #ruby
araujo has joined #ruby
<mlipienski>
certainty: thanks, I just looked at it, it's exactly what I needed ^^
araujo has quit [Max SendQ exceeded]
<nofxx>
I mean MVP stage
<certainty>
nofxx: also consider that most decent RDBMSs are actually pretty good at storing schemaless data
<certainty>
so you get the best of both worlds
<certainty>
i'm thinking about Postgres
<nofxx>
certainty, yeah, also true
rdark has joined #ruby
oo_ has joined #ruby
<certainty>
most of the time postgres just did it for our cases. We have only one case where we employed a document database and that was elasticsearch then
<nofxx>
ES is everywhere here too... just don't like to mention it =D
<certainty>
and we often thought: "huh yeah we need mongo" or "oh yeah for that we need couchbase"
<nofxx>
fulltext search ftw
<nofxx>
there's rethink too
<nofxx>
their focus looks like pub/sub thing
<nofxx>
there's ROMA ;)
<atmosx>
hello
<certainty>
o/
<shevy>
yo atmosx
stevednd has quit [Ping timeout: 240 seconds]
c0m0 has joined #ruby
platzhirsch has joined #ruby
chthon has joined #ruby
bitfurry has quit [Quit: Page closed]
stevednd has joined #ruby
Voker57 has quit [Read error: Connection reset by peer]
Ropeney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<yorickpeterse>
aww yiss
arup_r has joined #ruby
M-mistake has joined #ruby
M-prosodyContext has joined #ruby
ishahnaz has joined #ruby
xcesariox has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<[k->
that's nice
<yorickpeterse>
I feel so loved
alex88 has joined #ruby
tesuji has joined #ruby
bruno- has joined #ruby
solocshaw has quit [Ping timeout: 244 seconds]
gener1c_ has joined #ruby
tesuji has quit [Read error: Connection reset by peer]
zotherstupidguy has quit [Ping timeout: 256 seconds]
tesuji has joined #ruby
gener1c has quit [Ping timeout: 265 seconds]
pawnbox has quit [Remote host closed the connection]
bnizzle has joined #ruby
stamina has joined #ruby
charliesome has joined #ruby
chipotle has quit [Quit: cheerio]
allomov has quit [Read error: Connection reset by peer]
allomov has joined #ruby
astrobunny has quit [Remote host closed the connection]
<[k->
an exaggeration?
<[k->
or a true statement?
<bhaak>
everything in ruby is true unless nil or false
<[k->
yes, that is correct
karapetyan has joined #ruby
Mazhug has joined #ruby
<shevy>
we have a yes-bot again!
codenapp_ has joined #ruby
Hans67521 has joined #ruby
Alina-malina has joined #ruby
codenapper has quit [Ping timeout: 252 seconds]
leat has quit [Remote host closed the connection]
leat has joined #ruby
nofxx has quit [Ping timeout: 240 seconds]
karapetyan has quit [Ping timeout: 272 seconds]
Ilyes512 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
MichaelSmith has quit [Quit: Connection closed for inactivity]
karapetyan has joined #ruby
Igorshp has joined #ruby
mlipienski has quit [Quit: Going offline, see ya! (www.adiirc.com)]
jimms has quit []
Ilyes512 has joined #ruby
leat has quit [Ping timeout: 240 seconds]
pawnbox has joined #ruby
chouhoulis has joined #ruby
devoldmx has joined #ruby
juanpablo_ has joined #ruby
leat has joined #ruby
grenierm has quit [Quit: grenierm]
chouhoulis has quit [Ping timeout: 250 seconds]
Hrorek has quit [Ping timeout: 256 seconds]
zotherstupidguy has joined #ruby
devbug has quit [Read error: Connection reset by peer]
osmansekerlen has joined #ruby
devoldmx has quit [Ping timeout: 260 seconds]
oo_ has quit [Remote host closed the connection]
iateadonut has joined #ruby
DmitryBochkarev has joined #ruby
oo_ has joined #ruby
juanpablo_ has quit [Ping timeout: 265 seconds]
oo_ has quit [Remote host closed the connection]
oo_ has joined #ruby
oo_ has quit [Remote host closed the connection]
oo_ has joined #ruby
osmansekerlen has quit [Quit: osmansekerlen]
futilegames has joined #ruby
Hans67521 has quit [Remote host closed the connection]
Rollabunna has joined #ruby
Hans67521 has joined #ruby
r_baron has joined #ruby
Ilyes512 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jmarrec has joined #ruby
Rurik has joined #ruby
Rurik has quit [Max SendQ exceeded]
suchness has joined #ruby
Rurik has joined #ruby
<jmarrec>
Hi, Is there a way to run line by line a ruby file in irb so I can keep playing with all the variables defined?
Rurik has quit [Max SendQ exceeded]
Rollabunna has quit [Ping timeout: 264 seconds]
Rurik has joined #ruby
Rurik has quit [Max SendQ exceeded]
<ytti>
jmarrec, look into 'pry'
<oz>
_/go mex
<oz>
*miss*
Rurik has joined #ruby
Rurik has quit [Max SendQ exceeded]
<bhaak>
jmarrec: also 'pry-byebug' which builds an interactive debugger on top of pry
<jmarrec>
thanks ytti. So there's no way to do that in irb right away?
CloCkWeRX has joined #ruby
osmansekerlen has joined #ruby
<jmarrec>
thanks bhaak
<ytti>
jmarrec, probably not, but really, if you're debugging ruby, you need pry :)
yfeldblum has quit [Ping timeout: 246 seconds]
<jmarrec>
I was trying to install IRuby for windows (i'm really used to IPython) but it's broken right now
blackmesa has quit [Ping timeout: 250 seconds]
<jmarrec>
ytti: do you launch pry directly or launch irb and do "require 'pry'"?
Rickmasta has joined #ruby
blik71 has joined #ruby
Rurik has joined #ruby
moeabdol has quit [Quit: WeeChat 1.3]
<blik71>
hi, all real quick how could i use the sort! method on an array of user defined objects to sort by a property of that collection of object instances
sdothum has joined #ruby
osmansekerlen has quit [Quit: osmansekerlen]
blackmesa has joined #ruby
pyon has quit [Quit: F...ix you, Emacs!]
nanoz has joined #ruby
<jhass>
blik71: yes, but it's easier with sort_by!
bampersand has joined #ruby
workmad3 has joined #ruby
pyon has joined #ruby
sebyx07 has quit [Remote host closed the connection]
osmansekerlen has joined #ruby
TheHodge has joined #ruby
leat has quit [Ping timeout: 256 seconds]
<blik71>
how would i use it the documentation doesnt really give a good example
krz has quit [Quit: WeeChat 1.2]
yfeldblum has joined #ruby
godfat has quit [Quit: Leaving.]
<jhass>
blik71: look at the name and the signature, what can you imagine? try a few variants in your local irb or pry
osmansekerlen has quit [Quit: osmansekerlen]
dhjondoh has quit [Ping timeout: 272 seconds]
blackmesa has quit [Ping timeout: 264 seconds]
<jhass>
jmarrec: pry directly. seeing_is_believing might also be interesting for you
<jhass>
jmarrec: or to launch pry from somewhere inside your program, insert require "pry"; binding.pry where you want to break
fella6s is now known as fella5s
osmansekerlen has joined #ruby
<jmarrec>
thanks jhass
nhhagen_ has quit [Ping timeout: 246 seconds]
ishahnaz has quit []
JDiPierro has joined #ruby
bruno- has quit [Ping timeout: 240 seconds]
osmansekerlen has quit [Client Quit]
Ilyes512 has joined #ruby
rodfersou has joined #ruby
Ilyes512 has quit [Client Quit]
nettoweb has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
JDiPierro has quit [Ping timeout: 255 seconds]
jgt1 has quit [Ping timeout: 264 seconds]
charliesome has joined #ruby
charliesome has quit [Client Quit]
Rollabunna has joined #ruby
leat has joined #ruby
Soda has quit [Remote host closed the connection]
<arup_r>
jhass: I raised a bug to Github .. :D
<arup_r>
The commit messages sort order is wrong ,, I found
<jhass>
and that concerns me why?
<arup_r>
seems like you are right.. I should go for QA
<arup_r>
remember you said ?
ghormoon has joined #ruby
<jhass>
I don't follow but I'm pretty sure the answer is no
<arup_r>
ok. I remember .. anyway
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
xcesariox has joined #ruby
cvtsx has joined #ruby
haxrbyte_ has joined #ruby
Hounddog has quit [Remote host closed the connection]
futilegames has quit [Quit: futilegames]
tcopeland has quit [Quit: Leaving.]
chouhoulis has joined #ruby
nhhagen has joined #ruby
CloCkWeRX has quit [Ping timeout: 240 seconds]
haxrbyte has quit [Ping timeout: 264 seconds]
Contigi has quit [Read error: Connection reset by peer]
blik71 has quit [Remote host closed the connection]
Ropeney has joined #ruby
ocx has joined #ruby
greenarrow has joined #ruby
ocx has quit [Ping timeout: 240 seconds]
goodcodeguy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
[k- has quit [Ping timeout: 250 seconds]
oo_ has joined #ruby
nowhereFast has left #ruby [#ruby]
[k- has joined #ruby
syath has joined #ruby
ocx has joined #ruby
oo_ has quit [Remote host closed the connection]
but3k4 has joined #ruby
krisquigley has quit [Remote host closed the connection]
haxrbyte_ has quit [Remote host closed the connection]
chills42 has joined #ruby
haxrbyte has joined #ruby
tesuji has quit [Ping timeout: 240 seconds]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
karapetyan has quit [Remote host closed the connection]
chills42 has quit [Remote host closed the connection]
chills42 has joined #ruby
Tempesta has quit [Quit: Going offline, see ya! (( www.adiirc.com )]
senayar has quit [Remote host closed the connection]
senayar has joined #ruby
dgutierrez1287 has joined #ruby
JDiPierro has joined #ruby
charliesome has joined #ruby
ocx has quit [Ping timeout: 256 seconds]
devoldmx has joined #ruby
JoshuaPaling has joined #ruby
ishahnaz has joined #ruby
iateadonut has quit [Quit: Leaving.]
Rurik has quit [Ping timeout: 255 seconds]
karapetyan has joined #ruby
karapetyan has quit [Remote host closed the connection]
JohnnyTao has quit [Read error: Connection reset by peer]
Igorshp has quit [Remote host closed the connection]
karapetyan has joined #ruby
ldnunes has joined #ruby
JohnnyTao has joined #ruby
sousvide has joined #ruby
devoldmx has quit [Ping timeout: 240 seconds]
<sousvide>
good morning. ruby nuby here - i think i'm having trouble with line endings when trying to compare 2 strings - either that or "string" versus "object" is not showing as equal
kirun has joined #ruby
hellerbarde2 has joined #ruby
ishahnaz has quit [Client Quit]
<sousvide>
i have a text file with a single line - a "version" file - I want to compare that string to a string that I set manually elsewhere in the code - if strings are equal, then versions match
<yorickpeterse>
we'll need some code samples to have a better understanding of what you're trying to do
<sousvide>
I am using File.foreach(path\to\file).first to store the text file line into a variable
CloCkWeRX has left #ruby [#ruby]
pontiki has quit [Quit: "Poets have been mysteriously silent on the subject of cheese." -- G.K.Chesterson]
pawnbox has quit [Remote host closed the connection]
juanpablo_ has joined #ruby
<sousvide>
then comparing the vars, and they're not equal, even though printing them to screen with puts shows they look identical
<sousvide>
ok yorick: one second, thank you
<apeiros>
?gist sousvide
<ruboto>
sousvide, https://gist.github.com - Multiple files, syntax highlighting, even automatically with matching filenames, can be edited
Rurik has joined #ruby
<apeiros>
preferred way to show code, input, expected output and actual output
pontiki has joined #ruby
dhjondoh has quit [Quit: dhjondoh]
pawnbox has joined #ruby
senayar has quit [Remote host closed the connection]
senayar has joined #ruby
Neverdie has joined #ruby
<yorickpeterse>
also, 2,5 weeks until new jeb ᕕ(ᐛ)ᕗ
<ruboto>
pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
Coldblackice has quit [Ping timeout: 240 seconds]
<yorickpeterse>
well, 13 working days to be exact
<sousvide>
DOH!
platosha has quit [Quit: This computer has gone to sleep]
<yorickpeterse>
counting down really slows things down :<
platosha has joined #ruby
<sousvide>
noted: good to know, thanks for the gist
<JoshuaPaling>
In a rack middleware, should it be possible to set a cookie BEFORE doing @app.call(env) - ie, passing on the cookie before the request is processed, rather than setting it after the request is processed?
rbennacer has joined #ruby
juanpablo_ has quit [Ping timeout: 246 seconds]
<yorickpeterse>
sousvide: few things
<yorickpeterse>
sousvide: the quotes aren't needed for the if statement
Tempesta has joined #ruby
Hans67521 has quit [Read error: Connection reset by peer]
<yorickpeterse>
since both variables are already strings
<yorickpeterse>
Also, File.foreach() includes line endings
<sousvide>
ok. i added both of those in case it needed an implicit cast from a str_obj vs str
Hans67521 has joined #ruby
<yorickpeterse>
So you probably want File.foreach(...).first.strip
[k- has quit [Ping timeout: 252 seconds]
<yorickpeterse>
There's no casting implicit casting in Ruby
<sousvide>
i do suspect that is what's tripping me up.
<sousvide>
ooohhhhh....strip....good to know, thank you very much and let me try that
Igorshp has joined #ruby
<apeiros>
.chomp > .strip if all you care is line endings
<apeiros>
otherwise " foo ".strip == "foo"
<yorickpeterse>
apeiros: true, though doesn't chomp only remove a single line ending?
<yorickpeterse>
So if there's a space at the end of the line it will take care of it as well
elperdut has joined #ruby
osmansekerlen has joined #ruby
<sousvide>
good point - certainly could be a sneaky space trailing...tyvm again, let me test this
kith has quit [Quit: kith]
moeabdol has joined #ruby
Kallis has joined #ruby
Rurik has joined #ruby
Kallis has quit [Max SendQ exceeded]
rbennacer has quit [Ping timeout: 272 seconds]
Igorshp has quit [Ping timeout: 252 seconds]
ishahnaz has joined #ruby
JohnnyTao has quit [Ping timeout: 255 seconds]
emilkarl has joined #ruby
nfk has joined #ruby
beast has joined #ruby
Rurik has quit [Ping timeout: 264 seconds]
leat has quit [Ping timeout: 240 seconds]
aces1up has joined #ruby
phutchins has joined #ruby
<aces1up>
anyone know a decent proxy server gem that can handle http and https, I would also like to have hooks if possible to modify content on the fly
JDiPierro has quit [Remote host closed the connection]
ramfjord has quit [Ping timeout: 272 seconds]
nanoz has quit [Quit: <3]
Rurik has joined #ruby
khebbie has joined #ruby
Rurik has quit [Max SendQ exceeded]
kith has joined #ruby
exadeci has joined #ruby
last_staff has quit [Quit: last_staff]
Rurik has joined #ruby
hinbody has joined #ruby
Rurik has quit [Max SendQ exceeded]
Rurik has joined #ruby
hostess_ is now known as hostess
victortyau has joined #ruby
TDJACR has quit [Ping timeout: 260 seconds]
Rurik has quit [Max SendQ exceeded]
pyon has quit [Ping timeout: 264 seconds]
pyon has joined #ruby
bruno- has joined #ruby
<jhass>
is this for debugging/introspection or something else?
<jhass>
aces1up: ^
karapetyan has quit [Remote host closed the connection]
nfk has quit [Ping timeout: 256 seconds]
voltalio has joined #ruby
pandaant has joined #ruby
<sonOfRa>
When I retrieve a C-String via StringValueCStr, do I have to free the result myself, or is the underlying data freed by the ruby vm?
ramfjord has joined #ruby
<aces1up>
jhass just want to have stats on an app i am debugging yes
ferhaty has joined #ruby
Gnomethrower has joined #ruby
<aces1up>
i want to build in some custom stats count requests, types of requests, where they are going etc.
<aces1up>
change data based on stats
<jhass>
so nothing interactive, then I'm out sorry
<yorickpeterse>
sonOfRa: StringValueCStr just pulls the char* from a Ruby string
<yorickpeterse>
sonOfRa: you don't need to free anything, Ruby does this for you
<yorickpeterse>
You just have to make sure the char* doesn't stick around longer than the Ruby string IIRC
Gnomethrower has quit [Changing host]
Gnomethrower has joined #ruby
cameronmalek has joined #ruby
<aces1up>
jhass what do you mean interactive?
Voker57 has joined #ruby
goodcodeguy has joined #ruby
godfat has joined #ruby
godfat has quit [Client Quit]
godfat has joined #ruby
Igorshp has joined #ruby
nanoz has joined #ruby
nanoz] has joined #ruby
towski_ has joined #ruby
towski_ has quit [Remote host closed the connection]
drptbl is now known as drptbl[away]
<jhass>
mitmproxy is a great tool to introspect and modify requests as they happen, but nothing you'd use for things you described
lkba_ has joined #ruby
krisquigley has joined #ruby
blackmesa has joined #ruby
<sonOfRa>
yorickpeterse: alright, that's what I expected. Thanks!
lkba has quit [Ping timeout: 260 seconds]
bampersand has quit [Ping timeout: 244 seconds]
meatherly has joined #ruby
pontiki has quit [Quit: "Poets have been mysteriously silent on the subject of cheese." -- G.K.Chesterson]
keen__________18 has quit [Read error: Connection reset by peer]
blackmesa has quit [Ping timeout: 264 seconds]
mary5030 has joined #ruby
keen__________18 has joined #ruby
haxrbyte has quit [Read error: Connection reset by peer]
haxrbyte has joined #ruby
drptbl[away] is now known as drptbl
nanoz] has quit [Quit: <3]
osmansekerlen has quit [Quit: osmansekerlen]
beast has quit [Read error: No route to host]
jhooker has joined #ruby
Rurik has joined #ruby
monod has joined #ruby
kgirthofer has joined #ruby
michael_mbp has quit [Excess Flood]
bruno- has quit [Ping timeout: 260 seconds]
karapetyan has joined #ruby
tcopeland has joined #ruby
lkba_ has quit [Ping timeout: 268 seconds]
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
yalue has joined #ruby
voltalio has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
kgirthofer has quit [Ping timeout: 240 seconds]
michael_mbp has joined #ruby
naftilos76 has quit [Ping timeout: 256 seconds]
chouhoulis has joined #ruby
[k-_ has joined #ruby
devoldmx has joined #ruby
Pumukel has joined #ruby
allenn has quit [Remote host closed the connection]
beast has joined #ruby
<sousvide>
yorick: .split worked like a champ, thank you again.
bb010g has quit [Ping timeout: 244 seconds]
blackmesa has joined #ruby
bb010g has joined #ruby
haxrbyte_ has joined #ruby
chouhoulis has quit [Ping timeout: 260 seconds]
mary5030 has quit [Remote host closed the connection]
devoldmx has quit [Ping timeout: 252 seconds]
<yorickpeterse>
np
<yorickpeterse>
errr split?
<yorickpeterse>
You mean strip?
mary5030 has joined #ruby
<apeiros>
net.split
<sousvide>
wow yeah, early morning typo
<sousvide>
i usually don't .strip this early in the day
<sousvide>
*usually
<apeiros>
nice typo. it's only a levenshtein distance of 3 ;-p
shredding has joined #ruby
haxrbyte has quit [Ping timeout: 255 seconds]
Hrorek has joined #ruby
shredding has quit [Client Quit]
Rurik has quit [Read error: Connection reset by peer]
karapetyan has quit [Remote host closed the connection]
[k- has joined #ruby
sdwrage has joined #ruby
<yorickpeterse>
sousvide: (͡° ͜ʖ ͡°)
bruno- has joined #ruby
karapetyan has joined #ruby
dravine has quit [Ping timeout: 240 seconds]
Soda has joined #ruby
mary5030 has quit [Ping timeout: 240 seconds]
dravine has joined #ruby
shredding has joined #ruby
s00pcan_ has joined #ruby
voltalio has joined #ruby
danieli has joined #ruby
decoponio has joined #ruby
auzty has quit [Quit: Leaving]
voltalio has quit [Client Quit]
karapetyan has quit [Ping timeout: 252 seconds]
dhjondoh has joined #ruby
JDiPierro has joined #ruby
s00pcan_ has quit [Ping timeout: 244 seconds]
yfeldblum has quit [Ping timeout: 246 seconds]
cameronmalek has quit [Ping timeout: 260 seconds]
riffraff has joined #ruby
cameronmalek has joined #ruby
dasher00 has quit [Ping timeout: 250 seconds]
hellerbarde has quit [Ping timeout: 252 seconds]
Xiti has quit [Quit: Xiti]
Igorshp has quit [Remote host closed the connection]
zotherstupidguy has quit [Ping timeout: 264 seconds]
karapetyan has joined #ruby
aces1up has quit []
atomical has joined #ruby
pawnbox has quit [Remote host closed the connection]
sankaber has joined #ruby
dasher00 has joined #ruby
urbanmonk has joined #ruby
osmansekerlen has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
pawnbox has joined #ruby
cameronmalek has left #ruby [#ruby]
jdawgaz has joined #ruby
willywos has joined #ruby
Jardayn has joined #ruby
absolutejam has quit [Ping timeout: 246 seconds]
dgutierrez1287 has quit [Remote host closed the connection]
drptbl is now known as drptbl[away]
Flipez has quit [Disconnected by services]
absolutejam has joined #ruby
Flipez has joined #ruby
krz has joined #ruby
nanoz has joined #ruby
juanpablo_ has joined #ruby
juanpablo_ has quit [Client Quit]
lavros has joined #ruby
juanpablo_ has joined #ruby
khebbie has quit [Remote host closed the connection]
poli has joined #ruby
gambl0re has quit [Ping timeout: 244 seconds]
elfuego has joined #ruby
Flipez has quit [Client Quit]
bmurt has joined #ruby
MiW has joined #ruby
beast has quit [Remote host closed the connection]
JoshL has joined #ruby
<MiW>
Hiya, is it possible to get ruby to send a TLSv1 ClientHello? Im seeing SSLv3 ClientHellos from a ruby client and the server is resetting straight after the ClientHello
juanpablo_ has quit [Ping timeout: 244 seconds]
arup_r has quit []
nettoweb has joined #ruby
lkba has joined #ruby
yottanami has quit [Remote host closed the connection]
bruno- has quit [Ping timeout: 272 seconds]
urbanmonk has quit [Quit: urbanmonk]
djcp has joined #ruby
sanguisdex has quit [Quit: Leaving.]
malconis has joined #ruby
dhjondoh has quit [Quit: dhjondoh]
Xiti has joined #ruby
drptbl[away] is now known as drptbl
hellerbarde2 has joined #ruby
<Ox0dea>
Is there a method to hook `using`?
hellerbarde2 is now known as hellerbarde
<Ox0dea>
Like how there's Module#included and #extended.
ramfjord has quit [Ping timeout: 246 seconds]
sanguisdex has joined #ruby
osmansekerlen has quit [Quit: osmansekerlen]
ckinniburgh has joined #ruby
n1lo has joined #ruby
khebbie has joined #ruby
khebbie has quit [Remote host closed the connection]
rbennacer has joined #ruby
<shevy>
perhaps it was forgotten to add one
<Ox0dea>
That does seem to be the case.
<Ox0dea>
Bit of a weird oversight.
khebbie has joined #ruby
khebbie has quit [Remote host closed the connection]
chouhoulis has quit [Remote host closed the connection]
khebbie has quit [Remote host closed the connection]
<shevy>
they didn't expect anyone to use using!
<Ox0dea>
Nonsense.
<Ox0dea>
What's the best name for it, Module#used?
bodie_ has joined #ruby
Tamae has quit [Ping timeout: 250 seconds]
osmansekerlen has joined #ruby
jgt1 has quit [Ping timeout: 255 seconds]
khebbie has joined #ruby
whippythellama has joined #ruby
jhooker has quit [Ping timeout: 252 seconds]
<shevy>
I don't know
<shevy>
I found the choice of the name weird :\
<shevy>
perhaps Module#refinement?
<[k-_>
nah, refined
<[k-_>
Module#used can be ambiguous
<adaedra>
hi [k-_
mic_e has joined #ruby
statusfailed has joined #ruby
khebbie has quit [Ping timeout: 264 seconds]
<adaedra>
Bonjour #ruby
jdawgaz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
pawnbox_ has joined #ruby
Swappticon has joined #ruby
<statusfailed>
I'm trying to gem install pg, but I have postgres in a non-standard location. I added --with-pg-config, but it still can't find libpq-fe.h
<Ox0dea>
[k-_: But the Module is being used, not refined.
<shevy>
le baguette le fromage
<shevy>
statusfailed you could try to temporarily copy that .h file to standard header, then remove it again lateron :D
<shevy>
it sounds like a bug though
<[k-_>
hm
<statusfailed>
Trouble is I have no standard header, 'cos i'm using NixOS...
pawnbox has quit [Ping timeout: 268 seconds]
Swappticon has quit [Client Quit]
<shevy>
oh
<statusfailed>
oh. I was doing --with-pg-config <path> instead of --with-pg-config=path
<Ox0dea>
It'd be nice to only enable the tracing after being explicitly using'd.
farn has joined #ruby
chills42 has quit [Remote host closed the connection]
devdazed has joined #ruby
bigmac has joined #ruby
chills42 has joined #ruby
babysnoop has joined #ruby
<echojaybird>
Disregard last url. This is the url I'm trying to parse: "http://localhost:port/test-me/test.json". When I call URI.pase(url, 'http'), it is returning "http://localhost:"
tagrudev has quit [Remote host closed the connection]
aganov has quit [Remote host closed the connection]
<Ox0dea>
echojaybird: Do you actually have "port" where a port number should go?
<maloik>
I'm guessing that's the case. The problem should be kind of obvious :/
<echojaybird>
I do, but because this is going to be different for each case, I'm putting "port" there as a placeholder. I'm assuming I'll need some sort of regex
<echojaybird>
It's definitely obvious :). I was asking for help on how I could get it to parse.
<Ox0dea>
echojaybird: Well, it's not a valid URI, so it's unclear what you're asking.
catcher has joined #ruby
<Ox0dea>
Why not pick an awesome placeholder like 1337?
<echojaybird>
So I'm assuming that I can't use URI. Would I need to build out my own regex then?
<echojaybird>
It's for documentation stuff.
<maloik>
you're asking to fix your implementation but we don't know the problem you're trying to solve, could you explain that? it'll help us to give a proper suggestion
bigbadbear has joined #ruby
pandaant has quit [Quit: Lost terminal]
<echojaybird>
I think I have my answer. URI only parses valid URIs. Looks like I'm going to have to build out my own regex. Thanks folks
haxrbyte_ has quit [Read error: Connection reset by peer]
haxrbyte has joined #ruby
dionysus69 has quit [Remote host closed the connection]
ferhaty has quit []
pawnbox has quit [Ping timeout: 250 seconds]
<babysnoop>
hi, can someone help me with this gem - https://github.com/dncrht/imgur#usage-and-overview i get an "uninitialized constant Imgurapi (NameError)" when i try to create a session object even though i installed the imgurapi gem
dionysus69 has joined #ruby
<shevy>
well it is getting better, but you forgot some basics karapetyan
<shevy>
for instance: what do you do when the file does not exist?
Neverdie has joined #ruby
<maloik>
babysnoop: did you require it?
<karapetyan>
shevy: raise exception probably
emilkarl has quit [Quit: emilkarl]
<babysnoop>
yes but i might have made a mistake there... i used require Imgurapi
<shevy>
karapetyan what for man
JoshuaPaling has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<shevy>
an exception is already raised anyway
absolutejam has quit [Ping timeout: 260 seconds]
<shevy>
Errno::ENFILE I think
<shevy>
or something similar
jdawgaz has joined #ruby
<karapetyan>
shevy: ok, then i don't understand. If i don't have file i can't ready any value from ther
absolutejam has joined #ruby
ledestin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<babysnoop>
maliok: ok require "imgurapi" work, thanks for making me focus on this point
cameronmalek has joined #ruby
lsmola has quit [Ping timeout: 246 seconds]
jzigmund has quit [Ping timeout: 256 seconds]
<shevy>
karapetyan yes. but I can pass a non-existing file to your class, which you do not handle well at all
vondruch has quit [Ping timeout: 264 seconds]
<certainty>
evil shevy passes non existing files
<shevy>
it can happen
<shevy>
imagine if you start in a directory and then it gets deleted!
<karapetyan>
shevy: and then exception will be raised?) Ahm do you mean i should check file exist before try to open it?
nanoz has quit [Quit: <3]
<shevy>
karapetyan yes and yes
jzigmund has joined #ruby
<sousvide>
easy general n00b question: does "unless" function like any other loop (flow control) pattern? unless (condition && compound condition) "big block of unless logic/code" else "other block of not unless logic" ?
<shevy>
sousvide "unless" is about the same as "if !"
yalue has quit [Ping timeout: 264 seconds]
<sousvide>
i should say it better - can i treat unless as a full "not if" control structure with all the normal bells and whistles?
<sousvide>
yep there ya go, th anks shevy
pagios has quit [Ping timeout: 240 seconds]
<shevy>
from the semantics that is... if you actually use "if !" or "if not", and also parens, then precedence rules may sometimes be weird. such as: "if foo and ! bar && (5 > blablabla) &&! @var
<shevy>
or I forgot to add an "! foo.include? bar"
<karapetyan>
shevy: ok, if file don't exist i should raise my own exception? :) sorry but i don't understand difference between this exceptions? :)
<shevy>
I am half-kidding
<shevy>
karapetyan I am saying that you should handle the possibility that the file does not exist
<sousvide>
yeah, always an issue of logic vs reverse logic, especially when combining/nesting and switching from + to - logic hehe
zotherstupidguy has joined #ruby
<certainty>
you might even want to try to accept the possibility that there exists no program
<shevy>
karapetyan ruby already raises an exception if you try something like File.readlines('non_existing_file_here'), so you don't need to add or raise one on your own
<Ox0dea>
certainty: No OS.
<shevy>
you could either rescue that exception, or you do a "if File.exist?" check
<certainty>
Ox0dea: true!
<Ox0dea>
Hey, gals! How do I check that the universe exists in Ruby?
<ruboto>
Pry, the better IRB. Includes easy object inspection via `ls`, `history`, docs view with `?`, source view with `$` and syntax highlighting, among other features (see `help` for more). It can also be used for easy debugging by putting `binding.pry` directly in your source code. Visit https://pryrepl.org/ or get it now with: gem install pry pry-doc
<catphish>
havenwood: ah, that's it, i was only looking in File, thanks! why would it be in IO? Isn't that file-specific?
<Ox0dea>
catphish: No, IO is generalized quite nicely in Ruby.
dfockler has joined #ruby
<catphish>
the docs literally say "Opens the file..."
<Ox0dea>
Which?
karapetyan has quit [Ping timeout: 268 seconds]
<catphish>
the documentation for IO.write
<catphish>
that havenwood just linked to
<Ox0dea>
> Opens the file, optionally seeks to the given offset, ***writes string***, then returns the length written.
Swappticon has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Ox0dea>
Emphasis mine.
<Ox0dea>
catphish: Find your glasses, bud.
danieli has joined #ruby
danieli has quit [Max SendQ exceeded]
<catphish>
Ox0dea: yeah, i found the method now, thanks to havenwood :) i was just wondering why it's in IO and not File
msankhala has joined #ruby
<Ox0dea>
You're being daft on purpose.
rehat has quit [Remote host closed the connection]
<catphish>
anyway, thanks for pointing out the IO.write method :)
fostertheweb has quit [Client Quit]
fostertheweb has joined #ruby
<shevy>
[k-_ your face is a watermelon!
r_baron has joined #ruby
<[k-_>
are you colour blind? o_O
<Ox0dea>
catphish: I'll grant that the interface isn't perfectly congruent, but convenience > consistency.
hahuang65 has quit [Ping timeout: 268 seconds]
FernandoBasso has quit [Quit: Leaving]
Rickmasta has quit [Ping timeout: 250 seconds]
<catphish>
no worries, I think the answer to my confusion lies in the Kernel#open interface, which IO uses, and can open various kinds of things (files, program streams)
cantaberry has quit []
<catphish>
thanks for the *pointers
yeticry has quit [Read error: Connection reset by peer]
cantaberry has joined #ruby
dgutierrez1287 has joined #ruby
jhooker has joined #ruby
dionysus69 has joined #ruby
moeabdol has quit [Ping timeout: 268 seconds]
rodferso1 has quit [Quit: leaving]
yeticry has joined #ruby
dgutierrez1287 has quit [Ping timeout: 246 seconds]
<Ox0dea>
catphish: Can I use you as a dereference?
JohnnyTao has joined #ruby
zotherstupidguy has quit [Ping timeout: 272 seconds]
<catphish>
:)
splud has joined #ruby
ecnalyr has joined #ruby
lxsameer has joined #ruby
Lucky__ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<splud>
I have an associative array of disk parameters (basically, parsed-out data from ‘df’ on Linux).
bl4ckpajamas has joined #ruby
badbodh has joined #ruby
<splud>
This is contained in an array indexed by the partition name.
<Ox0dea>
splud: Arrays are only indexed numerically in Ruby.
<splud>
Okay, must be a hash.
<Ox0dea>
Ah, sorry, I see you specified "associative array"; yeah, we call that a Hash.
bl4ckpajamas has quit [Client Quit]
<Ox0dea>
splud: Are you trying to group those with matching partition names together?
<splud>
I’d like to have a second hash which is indexed by directory path and REFERS to the appropriate entry in the partitions array.
<bootstrappm>
poll: what do you write APIs in?
<catphish>
splud: you can point the values of 2 hashes to the same object
chouhoul_ has quit [Remote host closed the connection]
<splud>
That is, on one system ‘/usr’ and ‘/var’ might be on the same filesystem, and on another, they may be different (but not inherently unique - as ‘/‘ may be the same as one of those as well).
<catphish>
splud: a is a variable, i used it to hold a reference to the hash of data temporarily before putting it into the hashes
monod has quit [Ping timeout: 272 seconds]
<splud>
Anwyay, that’s sufficiently similar to what I’m doing. However, I’m also manipulating a projected use element.
<catphish>
i don't know what that means
drptbl has quit [Quit: My MAC has gone to sleep. zZz..]
<splud>
The idea is that we can’t simply go “how much free space do you have?”, but need to track it on a directory by directory basis.
MichaelSmith has joined #ruby
<bootstrappm>
ok
absolutejam has joined #ruby
<Ox0dea>
splud: Which flags are you supplying to `df`, if you don't mind my prying?
acke has joined #ruby
<[k-_>
pry: the better IRB
<splud>
And some directories may be in different filesystems. If ‘/etc’ and ‘/bin’ are on the same filesystem, then if I add 200K to etc and 2M to bin, BOTH should modify the same underlying _filesystem_ object.
<catphish>
splud: why would you do this rather than just asking the kernel every time you need to know?
<[k-_>
quinne script zeta
<catphish>
splud: are you aware you can simply execute "df -k /opt" for example
<[k-_>
hmm
<splud>
where mountpoint is the name of a specific directory. I iterate over a handful of known dirs we rely upon.
badbodh has quit [Remote host closed the connection]
<catphish>
splud: and it will find the mountpoint for that directory and give you the data
jhooker has quit [Ping timeout: 250 seconds]
<splud>
I am very aware. Try the command I cited.
<catphish>
splud: oh yeah, you are doing that
tjohnson has joined #ruby
centrx has quit [Quit: "You cannot fix a machine by just power-cycling it with no understanding of what is going wrong."]
<splud>
if /opt isn’t an explicit mount and instad is part of /, then the df output will have ‘/‘ as the directory.
<catphish>
splud: precisely, i assume this is ok for you?
<splud>
df gets me what I need, that’s not the problem.
<catphish>
splud: so, i'd do the following: 1) make one hash containing a mapping of mountpoint to disk 2) make a second hash of disk to usage data
moeabdol has joined #ruby
devoldmx has joined #ruby
<catphish>
splud: so the first hash would look like {"/opt" => "/dev/sda1", "/home" => "sda1"}
<splud>
I iterate though the directories of interest, generate hashes of the resulting data, and want to subsequently say use ‘x’ space in ‘/etc’ and ‘y’ in ‘/usr/bin’ or whatever. Do this for a bunch of things (parsed from elsewhere), and then check for total exstimated consumption as it impacts the different underlying filesystems.
mprelude has quit [Ping timeout: 264 seconds]
fostertheweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<catphish>
then the second hash would be like {"/dev/sda1" => [1000, 950]}
iszak_ has quit [Ping timeout: 272 seconds]
drptbl has joined #ruby
<catphish>
splud: does my comment answer your question at all, what i said would allow you to track the usage in one hash, but then reference it based on directory name
<splud>
catphish: opt and home would both be full path to dev, but yea.
zotherstupidguy has joined #ruby
<Ox0dea>
splud: If you're using `df`, why not `du`?
<catphish>
splud: oh yeah, sorry, i was being lazy
<splud>
du is meaningless pre-install.
<Ox0dea>
> check for total exstimated consumption
<catphish>
du may also be needlessly slow
<Ox0dea>
What does that mean?
<splud>
I’m checking to see that a series of packages for an embedded device will have enough space. This includes computed db conversions, backup files, etc.
<catphish>
anyway, start writing some code, see if it does what you want, shout if you have questions :)
petricore has joined #ruby
<splud>
Basically, I’m dealing with a script that assumed everything was on a monolithic filesystem. I need to wedge in support for multiple partitions.
oo_ has quit [Remote host closed the connection]
<Ox0dea>
splud: Why not use OverlayFS? Try to install all the packages in the overlay and just remove it if you run into space issues. :P
Xiti has quit [Quit: Xiti]
devoldmx has quit [Ping timeout: 265 seconds]
<catphish>
:|
chipotle has joined #ruby
drptbl has quit [Ping timeout: 246 seconds]
grenierm has joined #ruby
JDiPierro has quit [Remote host closed the connection]
drPoggs has joined #ruby
<splud>
I’m aware of OverlayFS. Did I mention this is an _embedded_ device? Also, upgrading older systems, the script needs to run on some disturbingly old ruby and Linux...
<splud>
OverlayFS is really cool in environments where you have an abundance of storage. It’s even more harsh where you don’t have a lot of spare space. Say on a device with 2GB or less total flash, which might be partitioned.
<catphish>
i use overlayfs heavily, but i'm not clear how it would help with an install process
nanoz has joined #ruby
<havenwood>
CustosL1men: Fedora is a good one. Nice modern Ruby with a user local setup. :)
<Ox0dea>
catphish: I was being entirely facetious.
amclain has joined #ruby
<splud>
OverlayFS would be handy for dealing with reversing an abortive install. No inherent need to back up things from before. So long as the overlay was a fresh one.
<catphish>
i'm a fan of ubuntu, but i use third party repositories for ruby
<Ox0dea>
catphish: How come?
riotjones has joined #ruby
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
TomyLobo has joined #ruby
UtkarshRay has quit [Quit: Leaving]
<catphish>
Ox0dea: which part? ubuntu because i have found it extremely reliable and easy to use over several years, i'm sure other distros can claim the same, but i've seen no reason to change, third party repos because it makes installing and updating a decent version of ruby easy
r_baron has quit [Ping timeout: 250 seconds]
voltalio has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bb010g has quit [Quit: Connection closed for inactivity]
<shevy>
why are you not using the ubuntu system ruby
mustmodify has joined #ruby
<catphish>
because ubuntu provide support for 1.9.3 on their current LTS release, and that's simply too old for me, and people here shout at me when i do
r_baron has joined #ruby
iszak_ has joined #ruby
<adaedra>
"1.9.3 is EOL"
shredding has quit [Ping timeout: 240 seconds]
<catphish>
i think they also support ruby 2.0, but the package depends on ruby 1.9.3 and that's a weird arrangement, i don't like it :)
<havenwood>
mustmodify: So that's a gem installed by your system-wide Ruby. And with 2.2.3 selected you've for sure installed the Bundler gem?
last_staff has joined #ruby
Soda has joined #ruby
<jhass>
mustmodify: which -a bundle ?
shadoi has joined #ruby
<mustmodify>
updated the gist.
<jhass>
also gem env to a gist
<havenwood>
mustmodify: If you have installed bundler with 2.2.3 and `which -a bundle` shows it lower on the list... show us your PATH: echo $PATH
<catphish>
"which -a bundle", "which -a gem", and "which -a ruby" would be very useful IMO
<jhass>
wait, command -v goes to /usr/local but which goes to /opt?
<jhass>
oO
<catphish>
sorry, too many cooks, i'll shut up, make a paste with everything people have asked for
voltalio has joined #ruby
<mustmodify>
Here's something weird though. Every time I type `gem install bundler` it says "ok installing that. Done." Also added to the gist.
<jhass>
that's okay
paulcsmith has quit [Quit: Be back later ...]
renderful has joined #ruby
pwnd_nsfw has quit [Ping timeout: 246 seconds]
<mustmodify>
which -a bundle and which -a ruby added. /opt/rubies/ruby-2.2.3/bin/{}
David27 has joined #ruby
<jhass>
bundle exec ruby -v? also gem env would still be great
Igorshp has quit [Remote host closed the connection]
codenapp_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
skullcrasher_ has quit [Remote host closed the connection]
renderfu_ has quit [Ping timeout: 240 seconds]
otacon- has joined #ruby
haxrbyte_ has joined #ruby
voltalio has quit [Client Quit]
<havenwood>
+1 `gem env`, and i'm still curious about `echo $PATH`
<mustmodify>
ok, is anything missing from the gist?
<jhass>
gem env
<jhass>
bundle exec ruby -v
r_baron has quit [Ping timeout: 250 seconds]
JDiPierro has joined #ruby
renderfu_ has joined #ruby
<havenwood>
mustmodify: Looks to me like now that you've installed Bundler on 2.2.3 it should work. :P Try turning it off and back on again (or just restart your shell).
<mustmodify>
jhass: done
renderful has quit [Ping timeout: 252 seconds]
blackjid has quit [Max SendQ exceeded]
<jhass>
mustmodify: are you sure your issue still reproduce? does the issue actually happen on a different shell/environment?
blackjid has joined #ruby
ferhaty has joined #ruby
<mustmodify>
havenwood: ding. I opened a new session and it just worked.(tm)
<havenwood>
mustmodify: :)
haxrbyte has quit [Ping timeout: 260 seconds]
<mustmodify>
jhass, havenwood, et al: Thanks.
Igorshp has joined #ruby
pawnbox has joined #ruby
felixr has quit [Ping timeout: 240 seconds]
felixrsmith has joined #ruby
<mustmodify>
One question: why does it keep installing bundler every time? Or reporting that it does?
<jhass>
it's basically reinstalling it
siaw has joined #ruby
rezzack has joined #ruby
ferhaty has quit [Client Quit]
blackjid has quit [Max SendQ exceeded]
blackjid has joined #ruby
wldcordeiro_ has quit [Remote host closed the connection]
howdoi has quit [Quit: Connection closed for inactivity]
nateberkopec has joined #ruby
arup_r has quit [Ping timeout: 246 seconds]
havenwood has quit [Ping timeout: 256 seconds]
krisquigley has quit [Remote host closed the connection]
alex88 has quit []
anisha has quit [Quit: Leaving]
sepp2k has quit [Quit: Leaving.]
dionysus69 has quit [Ping timeout: 244 seconds]
wldcordeiro_ has joined #ruby
mleung has joined #ruby
rehat_ has joined #ruby
vdamewood has quit [Read error: Connection reset by peer]
senayar has quit []
schaary is now known as schaary|afk
allomov has quit [Remote host closed the connection]
JDiPierro has quit [Remote host closed the connection]
arup_r has joined #ruby
JDiPierro has joined #ruby
JDiPierro has quit [Remote host closed the connection]
<[k->
i still propose join_ as a shorthand for join(? )
<[k->
>> ?
<ruboto>
[k- # => /tmp/execpad-8cd64a02f9f4/source-8cd64a02f9f4:2: warning: invalid character syntax; use ?\n ...check link for more (https://eval.in/433051)
TheRinger has joined #ruby
<[k->
hm, that ought to have worked
<Ox0dea>
>> ?\s
xcesariox has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<gregf_>
siaw: sorry, i know you're learning. just saw your chat. // is for a regex. /s is for space. in your case your splitting it based on a space. i'm doing the same, but am using a regular expression
msankhala has quit [Quit: This computer has gone to sleep]
Rurik has quit [Ping timeout: 265 seconds]
elperdut has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<[k->
\s*
<siaw>
gregf_: thanks a lot
The_Phoenix has joined #ruby
rezzack has quit [Quit: Leaving.]
<gregf_>
>> [ "foo bar baz".split(/\s+/); "foo bar baz".split(" ") ]
<ruboto>
gregf_ # => /tmp/execpad-ef66a6d5ebc1/source-ef66a6d5ebc1:2: syntax error, unexpected ';', expecting ']' ...check link for more (https://eval.in/433058)
The_Phoenix has quit [Client Quit]
<[k->
use a comma
nfk has joined #ruby
<gregf_>
>> [ "foo bar baz".split(/\s+/), "foo bar baz".split(" ") ]
<ruboto>
gregf_ # => /tmp/execpad-a0adc02f08f0/source-a0adc02f08f0:2: `$]' is not allowed as a global variable name ...check link for more (https://eval.in/433065)
<eam>
well, ruby just reuses the same operator with overloading
<eam>
eg + works for String or any numeric type, whereas perl has + or . for numeric / string
<eam>
oh man that's perl6
mleung has quit [Quit: mleung]
<eam>
nevermind what I said perl6 is crazy
<gregf_>
Ox0dea: is that real? as in are those Perl 6 operators?
<[k->
yes
<gregf_>
a new report said php 7 was 10 times faster than Perl 6. dunno how biased that report was. but yeah Perl 5 and Perl 6 are not even 50'th cousins :/
Zai00 has quit [Quit: Zai00]
<[k->
perl 6 took 10 years
msankhala has joined #ruby
<gregf_>
er; s/took/taking/
<eam>
gregf_: they're fairly directly related, seeing as how both are direct descendents of perl
<eam>
descendants even
Hrorek has quit [Ping timeout: 246 seconds]
<gregf_>
eam: honestly dunno how true that is. i know Moose is nearer to Perl 6
<greenbigfrog>
[k-: can you google a guide for me please? so I really read up on the correct thing...
<eam>
perl6 hasn't been productionalized; no one should expect it to be fast
tuxero has quit [Ping timeout: 256 seconds]
<[k->
delegate!(:google, Ox0dea)
<gregf_>
[k-: true that ;)
<Ox0dea>
eam: Perl 6 is dead.
<Ox0dea>
I do like `.=`, though. `some_descriptive_variable .= foo` > `some_descriptive_variable = some_descriptive_variable.foo`.
<[k->
greenbigfrog: you are going to have to learn to google yourself
<[k->
as i said, im not a webdev
DoubleMalt has quit [Ping timeout: 246 seconds]
<greenbigfrog>
...
<greenbigfrog>
ok
<bootstrappm>
greenbigfrog: could you give some more details about your question
DoubleMalt has joined #ruby
<bootstrappm>
what do you mean the status of some code?
mleung has joined #ruby
ishahnaz has quit []
juanpablo_ has quit [Quit: (null)]
howdoicomputer has joined #ruby
elperdut has joined #ruby
Caius has quit [Ping timeout: 256 seconds]
juanpablo_ has joined #ruby
dopamean_ has joined #ruby
hanmac has quit [Ping timeout: 246 seconds]
davedev24 has joined #ruby
leafybasil has quit [Remote host closed the connection]
fostertheweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jmarrec has quit [Quit: Leaving]
leafybasil has quit [Read error: Connection reset by peer]
leafybasil has joined #ruby
mleung has quit [Quit: mleung]
casadei_ has joined #ruby
jenrzzz has joined #ruby
fantazo has quit [Quit: Verlassend]
Neverdie has joined #ruby
mleung has joined #ruby
yfeldblum has quit [Ping timeout: 246 seconds]
bigmac has quit [Ping timeout: 252 seconds]
dopamean1 has joined #ruby
devoldmx has joined #ruby
spider-mario has joined #ruby
poli has quit [Ping timeout: 250 seconds]
symm- has joined #ruby
osmansekerlen has joined #ruby
jamesaxl has joined #ruby
Neverdie has quit [Client Quit]
dopamean_ has quit [Ping timeout: 272 seconds]
<greenbigfrog>
bootstrappmsorry that I respond now... I was afk...
<greenbigfrog>
I basically just have a script that let's say tests something. If test A is completed I somehow want to see that visual... It doesn't have to be webbased but I haven't found out how to display changing stuff with Shoes.rb
<greenbigfrog>
bootstrappm:
fxn has quit [Quit: zZzZzZ...]
fxn has joined #ruby
<Ox0dea>
greenbigfrog: Are you on Windows?
<greenbigfrog>
ubuntu 15.04
<Ox0dea>
greenbigfrog: Is this just a personal thing for yourself?
<Ox0dea>
Like, you're monitoring something, and you just want to be alerted at certain points?
r0x0rZ has joined #ruby
leat1 has quit [Remote host closed the connection]
elperdut has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
leat1 has joined #ruby
<greenbigfrog>
the built in notifications don't work, since they automatically get deleted... And it also might get a bit more stuff that needs to be displayed
devoldmx has quit [Ping timeout: 264 seconds]
<greenbigfrog>
if that is whay you meant
<greenbigfrog>
*what
<bootstrappm>
greenbigfrog is that test on a webapp or somewhere remote? or is it something local that doesn't touch web?
<Ox0dea>
greenbigfrog: You might consider shelling out to something like `notify-send`.
M-mistake has joined #ruby
M-prosodyContext has joined #ruby
<Ox0dea>
Then again, I suspect Shoes' notification mechanism provides a way to make them more permanent.
<greenbigfrog>
bootstrappm: don't know it yet. and the testing thingie was just a example ;)
dorei has joined #ruby
firstdayonthejob has joined #ruby
baweaver has joined #ruby
<Ox0dea>
greenbigfrog: You're looking at an empty editor window, aren't you?
<greenbigfrog>
Ox0dea: I haven't found out how to tell Shoes to update...
<bootstrappm>
eh, to be able to help we really need a more specific use case
<greenbigfrog>
almost empty...
<bootstrappm>
testing a local script is very different from testing something remote greenbigfrog
<greenbigfrog>
OK... gonna be more specific
<Ox0dea>
Probably best to flesh out what it is you intend to do before seeking help with something so nebulous.
JoshL has joined #ruby
<bootstrappm>
yeah, I'd say figure out what you're building first
<greenbigfrog>
It was a gerneral question also... had that on mind for various things...
<Ox0dea>
greenbigfrog: How do I add?
<greenbigfrog>
what?
<bootstrappm>
greenbigfrog learning to ask is a process, Ox0dea's just teasing
<greenbigfrog>
ok ;)
baweaver has quit [Remote host closed the connection]
felixrsmith has joined #ruby
<Ox0dea>
bootstrappm: At the axiomatic level, addition is mutually recursively defined in terms of predecessors and successors, so it was a semi-genuine question. :P
allomov has joined #ruby
<Ox0dea>
In all sincerity, greenbigfrog might do well to see whether or not he could concisely describe how to add two numbers.
choke has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<jhass>
you're missing an end and don't need the return keywords
rdark has quit [Ping timeout: 244 seconds]
<darix>
jhass: i dont like your method, always return a string
<darix>
mixed return types suck
<siaw>
ok. my tests passed now
<jhass>
sure but until then it seemed to be the requirement
M-mistake has joined #ruby
<siaw>
but would it have been bad to use rescue in this?
<jhass>
yes
<darix>
jhass: how so?
<siaw>
why?
jackjackdripper has joined #ruby
ndrei has quit [Ping timeout: 255 seconds]
<jhass>
0 is a valid value of your calculation, it's not exceptionally rare or an error
<jhass>
it's not unexpected, it's not invalid user input
<jhass>
it's easy to check without relying on the exception
aldodelgado has quit [Ping timeout: 240 seconds]
Pumukel has joined #ruby
Swappticon has quit [Ping timeout: 264 seconds]
<jhass>
getting into the habit of using exceptions as control flow will make you less pedantic about considering all possible input cases and properly handling them. Exceptions are not part of method signatures
totimkop1 is now known as totimkopf
totimkopf has quit [Changing host]
totimkopf has joined #ruby
toretore has joined #ruby
Zai00 has joined #ruby
postmodern has quit [Quit: Leaving]
allomov has quit [Remote host closed the connection]
otacon- has quit [Ping timeout: 246 seconds]
zenguy_pc has quit [Ping timeout: 240 seconds]
fostertheweb has joined #ruby
<Ox0dea>
</lesson>
Hijiri has quit [Ping timeout: 256 seconds]
Pumukel has quit [Remote host closed the connection]
Denis_ has quit [Quit: Leaving]
pokmo has joined #ruby
hahuang65 has quit [Ping timeout: 246 seconds]
towski__ has joined #ruby
jackjackdripper has quit [Quit: Leaving.]
hahuang65 has joined #ruby
towski_ has quit [Ping timeout: 246 seconds]
jackjackdripper has joined #ruby
ordepdev has joined #ruby
wookiehangover has quit [Ping timeout: 246 seconds]
hahuang61 has quit [Ping timeout: 256 seconds]
dionysus69 has quit [Ping timeout: 264 seconds]
ishahnaz has joined #ruby
wookiehangover has joined #ruby
acke has quit [Remote host closed the connection]
osmansekerlen has quit [Quit: osmansekerlen]
iszak_ has quit [Ping timeout: 240 seconds]
v4mpii has joined #ruby
n008f4g_ has joined #ruby
iszak has joined #ruby
iszak has joined #ruby
bluOxigen has joined #ruby
ishahnaz has quit [Remote host closed the connection]
prestojunkie93 has joined #ruby
ramfjord has joined #ruby
prestojunkie93 has quit [Client Quit]
jobewan has joined #ruby
momomomomo_ has joined #ruby
jsuth has joined #ruby
based_pdev_ has quit [Ping timeout: 246 seconds]
momomomomo has quit [Ping timeout: 255 seconds]
momomomomo_ is now known as momomomomo
juanpablo_ has joined #ruby
phutchins has quit [Ping timeout: 272 seconds]
choke has joined #ruby
juanpablo_ has quit [Read error: Connection reset by peer]
juanpablo_ has joined #ruby
Guest5 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
kidoz has joined #ruby
howdoicomputer has joined #ruby
mary5030 has quit [Remote host closed the connection]
mary5030 has joined #ruby
bungoman has joined #ruby
mjuszczak has joined #ruby
Hijiri has joined #ruby
djbkd has joined #ruby
lucyinthesky has joined #ruby
mary5030 has quit [Ping timeout: 244 seconds]
graydot has joined #ruby
dfockler has quit [Remote host closed the connection]
lucyinthesky has left #ruby ["Leaving"]
djbkd has quit [Ping timeout: 244 seconds]
ordepdev_ has joined #ruby
linuxboy_ has joined #ruby
krisquigley has joined #ruby
ordepdev has quit [Ping timeout: 255 seconds]
xaxisx has quit [Quit: xaxisx]
lucyinthesky has joined #ruby
linuxboytoo has quit [Ping timeout: 246 seconds]
siemprefresco has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<cschneid_>
I'm well aware of how ancient and unsupported ruby 1.8.7 is, but does anybody know how to get rvm to install it? I need to get some unmigrated code to run so I can look at bringing it up. RVM just bails and is unable to find a download url
ghoti has quit [Remote host closed the connection]
godfat1 has joined #ruby
<miah>
`ruby-install ruby 1.8.7` works just fine
<miah>
(its not rvm though)
baweaver has joined #ruby
<Ox0dea>
cschneid_: Does RVM not accept tarballs?
<cschneid_>
miah: that may be good enough for my purposes. hmm.
<Ox0dea>
siaw: For all intensive porpoises, `&:foo` is functionally equivalent to `{ |x| x.foo }`, syntactically speaking.
<cschneid_>
Ox0dea: I did it like that previously and I got it in a super odd state where ruby was there, but gem was horrifically misconfigured so it wans't all that useful
<Ox0dea>
cschneid_: Lovely. Consider using a different version manager. :P
devoldmx has joined #ruby
<cschneid_>
heh. they all seem to have their own gotchas. I do end up rotating between em...
godfat has quit [Ping timeout: 256 seconds]
baweaver has quit [Remote host closed the connection]
casadei_ has quit [Ping timeout: 264 seconds]
<Ox0dea>
cschneid_: What deficiency have you found with chruby?
casadei_ has joined #ruby
<cschneid_>
I actually have not tried that one.
<cschneid_>
wonder how much effort it'd be to give it a go
<Ox0dea>
Virtually none.
<Ox0dea>
chruby + ruby-install = sanity and <3.
<havenwood>
\o/
casadei_ has quit [Remote host closed the connection]
lucyinthesky has left #ruby ["Leaving"]
leat1 has joined #ruby
<Ox0dea>
postmodern for president.
p0wn3d_ has quit [Quit: WeeChat 1.3]
rdark has joined #ruby
tomchapin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
devoldmx has quit [Ping timeout: 246 seconds]
p0wn3d_ has joined #ruby
<havenwood>
Ox0dea: I look forward to merging the cache branch in ruby-install. Icing!
<havenwood>
I think postmodern's idea to separate metadata out to its own ruby-versions repo is swell.
<havenwood>
diegoviola: Right now from time to time I sync it over to ruby-install. If you want to update it without updating ruby-install you need to run a make task, that is really meant for release purposes.
<diegoviola>
oh ok
<havenwood>
diegoviola: In the cache branch ruby-install will check timestamps and update various branches intelligently.
fantazo has joined #ruby
<cschneid_>
thanks guys. I'll need to check out chruby when I'm not under time pressure :)
<havenwood>
diegoviola: So new Rubies just appear as you try to install them.
Musashi007 has quit [Client Quit]
<diegoviola>
cool
<havenwood>
cschneid_: The brew 1.8 would be the easiest route. If you'd like to get it working with ruby-install or rvm I'd be happy to help in #chruby or #rvm.
rdark has quit [Quit: leaving]
<cschneid_>
later, I'm punting on it for now in favor of a slightly different approach. I am using 1.9, which isn't what they're using, but hoping that the issue crops up on that too
<cschneid_>
we shall see.
siemprefresco has joined #ruby
haxrbyte has joined #ruby
rdark has joined #ruby
haxrbyte_ has joined #ruby
deol has joined #ruby
p0wn3d_ has quit [Quit: WeeChat 1.3]
<Illusioneer>
I am running into something rather odd. If I put a string that includes some local env's it prints in IRB but not in a running ruby script.
chills42_ has joined #ruby
mary5030 has joined #ruby
<Illusioneer>
ie: puts "This is a test of #{ENV['ENVIRONMENT']"
<Illusioneer>
this will work correctly in IRB
<Illusioneer>
but if i run it as a ruby script, it does not show the ENV variable value
<eam>
is that variable set?
<bootstrappm>
Illusioneer: is it just certain environment variables or is the whole ENV hash empty?
mary5030 has quit [Remote host closed the connection]
michaeldeol has quit [Ping timeout: 264 seconds]
<Ox0dea>
Illusioneer: Do you have an .irbrc?
p0wn3d_ has joined #ruby
mary5030 has joined #ruby
<Illusioneer>
bootstrappm: i've tried it with several of my ENV's none of them show
<Illusioneer>
Ox0dea: probably not, what's taht?
<Ox0dea>
Illusioneer: Never mind, then.
<Ox0dea>
Illusioneer: $ ruby -e 'p ENV.empty?'
<bootstrappm>
several of "your" envs? how are you setting them?
<Ox0dea>
I highly doubt that prints `true`.
<havenwood>
Illusioneer: Are you exporting the env vars?
yfeldblum has quit [Quit: Leaving...]
nanoz has quit [Quit: <3]
haxrbyte has quit [Ping timeout: 256 seconds]
<Illusioneer>
bootstrappm: They are set in my profile.d shell that sets them, and they are available in my shell
<Illusioneer>
havenwood: no just accessing the values
<bootstrappm>
bingo
zotherstupidguy has joined #ruby
<eam>
Illusioneer: how are you running your ruby script? From an interactive shell? Is sudo involved?
<Ox0dea>
Illusioneer: You'll want to use `export FOO=BAR` in your profile.d.
<Illusioneer>
sudo is involved
<eam>
sudo is clearing them
<havenwood>
Illusioneer: As in try `export ENVIRONMENT` before running your script (just thinking it's a child process that isn't inheriting the env).
<Ox0dea>
Oh.
<havenwood>
Ah, sudo.
<eam>
bootstrappm: it's not export- otherwise irb wouldn't pick them up either
<havenwood>
Ha, env dropped.
<Illusioneer>
Ah
chills42 has quit [Ping timeout: 265 seconds]
<bootstrappm>
eam good call
<Ox0dea>
Illusioneer: You're invoking your Ruby script with `sudo`, then?
<Illusioneer>
yeah sudo's involved because the script runs some things that require root level priv
<havenwood>
Illusioneer: Using a Ruby version manager?
<Illusioneer>
Nope
<eam>
Illusioneer: you can whitelist env in your sudo config (but, probably a bad direction to go)
sepp2k has quit [Read error: Connection reset by peer]
<Illusioneer>
eh, yeah
chills42_ has quit [Ping timeout: 240 seconds]
<eam>
sudo -i will re-run the login stuff for the user you're becoming
<eam>
so if you've added it to /etc/profile.d ...
dfockler has joined #ruby
<Illusioneer>
It is in the profile.d
<eam>
try sudo -i
<bootstrappm>
Illusioneer you could also wrap the call to ruby with a shell script where you set those variables and sudo run the shell script
<Ox0dea>
eam: Not `sudo -E`?
ordepdev_ has quit [Remote host closed the connection]
<Illusioneer>
good idea bootstrappm
<eam>
Ox0dea: -E is config dependent
p0wn3d_ has quit [Client Quit]
<eam>
(I think?)
<Illusioneer>
I've done that in some other situations, it was the fact that it showed up in IRB but not in the script that was tripping me up
<Ox0dea>
But it'll retain the environment he's already got from his profile.d?
<eam>
Ox0dea: if the config gives perms to do so
<Ox0dea>
Ah, right.
<eam>
I really don't like suod
<eam>
sudo
yfeldblum has joined #ruby
<Ox0dea>
Tell us how you feel about `machinectl`.
<eam>
systemd :(
<Ox0dea>
SystemXVI is coming to save us. /s
<eam>
hahaha
<bootstrappm>
what do you use as an alternative to sudo eam?
<eam>
bootstrappm: I prefer to use sshd as the priv escalation mechanism
zotherstupidguy has quit [Ping timeout: 240 seconds]
<eam>
sudo is very password oriented and IMO encourages insecure patterns
<eam>
though there are some good plugins (one of which I wrote!) which let it be used with better mechanisms than a password
<Illusioneer>
eam: kudos, the -i did it
<Ox0dea>
So how did irb manage to get hold of the right environment?
baweaver has joined #ruby
<eam>
he didn't sudo irb
<Illusioneer>
yep
<Ox0dea>
Derp.
<Illusioneer>
my bad I should've been more precise :)
<Ox0dea>
eam: Is one of those better mechanisms using escape sequences to draw my "pass picture" at the terminal?
<Ox0dea>
Because I've thought that should be a thing for some time now.
<Ox0dea>
But then authenticity becomes a heuristic, and that can't be good.
<eam>
recommend not depending on bash startup scripts to set env for services btw - instead I'd use something like djb's envdir
<eam>
(or the runit equiv, though runit's stuff is kinda crap)
<eam>
sending secrets over the wire to the remote system is insanity
<eam>
I'd use pam_ssh_agent_auth
<eam>
but even better, just use sshd as your escalation mechanism
<eam>
remove all setuid binaries from your system!
yardenbar has quit [Ping timeout: 265 seconds]
ordepdev has joined #ruby
<bootstrappm>
how does using sshd as your escalation mechanism work eam? I just googled but didn't find anything usefl
<eam>
(that's how I run my personal servers)
<bootstrappm>
ssh into localhost under another user?
<eam>
bootstrappm: yeah ssh root@localhost cmd
dgs has joined #ruby
<bootstrappm>
what's the benefit of that? commands logged?
<eam>
there are basically two ways you can become root: 1) run a setuid program that brokers access to the subprocess running as root, or 2) connect to an already-running root process (sshd)
<eam>
bootstrappm: the benefit is no setuid binaries (common attack vector), and by not using a password you prevent someone from taking your authentication secrets
<bootstrappm>
ah, okay
<eam>
when you ssh somewhere and type "sudo whatever" you've sent your password to the remote system -- and the remote system can copy it
<eam>
can't be done with ssh-keys
<eam>
since it's challenge-response
<Ox0dea>
Wonder why `umount` is setuid.
<eam>
Ox0dea: to make it friendly for non-root users; there's lots of bad stuff like that common in many distros
<eam>
all unnecessary
krisquigley has joined #ruby
<eam>
though sometimes people get grumpy about not being able to run ping or traceroute
<BraddPitt>
Anyone know how to expect an error with a Minitest spec?
timonv has quit [Ping timeout: 246 seconds]
<bootstrappm>
can you still use standard assertions with minitest spec BraddPitt? If so, assert_raises
<havenwood>
BraddPitt: asset_raises
<havenwood>
assert*
nanoz has joined #ruby
<BraddPitt>
do I chain that to my method call or pass it a block with my method call?
DLSteve_ has quit [Remote host closed the connection]
siemprefresco has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
danieli has quit [Quit: *does an epic backflip into nowhere*]
momomomomo_ has joined #ruby
uri_ has joined #ruby
pastuxso has joined #ruby
momomomomo has quit [Ping timeout: 264 seconds]
momomomomo_ is now known as momomomomo
elperdut has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
JDiPierro has quit [Remote host closed the connection]
Coldblackice has joined #ruby
nanoz has quit [Quit: <3]
n1lo has quit [Remote host closed the connection]
JDiPierro has joined #ruby
<BraddPitt>
ah, I had misconfigured my specs
fostertheweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<BraddPitt>
I was tearing down after every spec, instead of after all specs. So the error I needed caught was caught, but it was re-raised in the subsequent spec
<BraddPitt>
anyways, figured it all out now. Thanks guys
<BraddPitt>
maybe thats a good project for this week
apt-get has quit [Quit: Quit]
<dfockler>
It reads through really well
osmansekerlen has quit [Ping timeout: 240 seconds]
<Ox0dea>
dfockler: Like, there's words?
but3k4 has quit [Ping timeout: 250 seconds]
<dfockler>
Like the author did a good job at making it readable
lucyinthesky has left #ruby ["Leaving"]
<Ox0dea>
By using words?
dr3w has quit [Ping timeout: 246 seconds]
<dfockler>
Sure
BlackCoyote has joined #ruby
<Ox0dea>
Don't most/all authors do that?
centrx has joined #ruby
<dfockler>
If you think all programming books are readable, then sure
al2o3-cr has joined #ruby
goodcodeguy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<splud>
The 90’s were loaded with dev books where they’d just have a few chapters on process, then document much of an API, which was out of date by the time the book went to press.
JoshL has quit []
rbowlby has joined #ruby
allomov has quit [Remote host closed the connection]
<splud>
You know, those 500+ page tomes that were supposed to make you go “yea, that one, it looks like it’s worth the US$60 they’re charging for it!”
<capin>
splud: yeah game done changed
jenrzzz_ has quit [Ping timeout: 272 seconds]
<splud>
Now languages and tools are popping up all over the place, and printed books are entirely out of date before they go to press.
sshuff is now known as sshuff|gone
codecop has quit [Remote host closed the connection]
<capin>
yeah i think another JS framework came out today :P
<splud>
Or, as in the case of a valgrind (debugging/profiling tool, not for Ruby) I ordered recently, was just a typeset and bound copy of the docs which come with the tool.
<splud>
And it’s many revs old.
ledestin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<bricker>
dorei: they both call the same C function. I like length, I don't know why
<bricker>
"size" for array, "length" for String
<nofxx>
bricker, haha same ^
<bricker>
*shrug*
momomomomo has quit [Ping timeout: 244 seconds]
momomomomo_ is now known as momomomomo
<nofxx>
but I'm ok with size for all. Shorter anyways ;)
<Ox0dea>
^
<Ox0dea>
Plus consistency.
Kero has quit [Ping timeout: 246 seconds]
karapetyan has quit [Remote host closed the connection]
<Ox0dea>
String is essentially a collection type, so whatever logic you apply to arrays holds well enough.
maletor has quit [Read error: Connection reset by peer]
mjuszczak has quit []
<dfockler>
Yeah this isn't Java!
<bricker>
This is interesting, String#size and String#length is NOT an alias, however Array#size and Array#length IS an alias
linuxboy_ has quit [Remote host closed the connection]
<bricker>
Array#length is the real deal, "size" is an alias
<Ox0dea>
bricker: String#size and #length are defined by the same C function, so it's effectively the same thing.
<jhass>
not all aliases are properly marked as such
bigbadbear has quit [Ping timeout: 252 seconds]
SCHAAP137 has joined #ruby
Kero has joined #ruby
<dfockler>
ah I was thinking string length had something to do with Unicode codepoints
jhooker has joined #ruby
<dorei>
both String#size and String#length are rb_str_length(VALUE str)
<shevy>
we are the C source readers!
<dorei>
shevy: not me, pry did it for me :p
<bricker>
Ox0dea: I know, but an alias is extra stuff that the program has to do. And I wonder why the inconsistency.
jobewan has quit [Ping timeout: 250 seconds]
nux443 has quit [Read error: Connection reset by peer]
<bricker>
nbd obvz
phutchins has joined #ruby
Jackneill has quit [Ping timeout: 256 seconds]
blueOxigen has joined #ruby
jhooker has quit [Ping timeout: 252 seconds]
shinnya has joined #ruby
allcentury has quit [Ping timeout: 272 seconds]
nux443 has joined #ruby
last_staff has quit [Read error: Connection reset by peer]
Musashi007 has joined #ruby
saddad has quit [Ping timeout: 250 seconds]
bluOxigen has quit [Ping timeout: 265 seconds]
cameronmalek has quit [Ping timeout: 250 seconds]
cameronmalek_ has joined #ruby
paulcsmith has quit [Quit: Be back later ...]
<Ox0dea>
bricker: Whence comes your intuition that aliasing gives the interpreter more work to do than having to track another entry in the method table?
devoldmx has joined #ruby
michaeldeol has quit [Ping timeout: 260 seconds]
shinnya has quit [Ping timeout: 250 seconds]
platosha has quit [Ping timeout: 246 seconds]
codeurge has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<bricker>
Ox0dea: more up-front cost. it's negligible of course, I
<bricker>
just curious
<Ox0dea>
bricker: How did you calculate that?
devoldmx has quit [Ping timeout: 265 seconds]
<bricker>
I'm sure there's a good reason why one is an alias and the other isn't
banister has joined #ruby
<Ox0dea>
No, it's probably completely arbitrary; it's not really a user-visible distinction.
<bricker>
Ox0dea: by counting the number of methods that have to be called to define an alias vs. not defining an alias
<bricker>
"1", "2", etc.
<Ox0dea>
Huh?
arashb has joined #ruby
<bricker>
Ox0dea: by counting the number of methods that have to be called to define an alias vs. not defining an alias
<Ox0dea>
We're still talking about MRI, right?
<bricker>
"1", "2", etc.
<bricker>
sure are
victortyau has quit [Quit: Leaving]
jobewan has joined #ruby
<Ox0dea>
You can't honestly purport to believe that '"1", "2", etc.' clarified your point in any way.
decoponio has quit [Read error: Connection reset by peer]
<bricker>
Ox0dea: and "huh?" is a productive question?
zotherstupidguy has joined #ruby
decoponio has joined #ruby
<Ox0dea>
bricker: Had you taken it at its idiomatic meaning of "please clarify", yes, we could've gotten much further by now.
<bricker>
Ox0dea: For ruby to say ruby method "size" is an alias of ruby method "length", takes more work than to say ruby method "size" should just call "rb_ary_length"
uri_ has quit [Ping timeout: 268 seconds]
<Ox0dea>
bricker: But on what are you basing that conclusion?
morenoh149 has quit [Quit: WeeChat 1.2]
siaw has left #ruby [#ruby]
<Ox0dea>
Did you look at the call chains for rb_define_method() and rb_define_alias()?
<bricker>
Ox0dea: I counted the number of things that ruby has to do in order to define an alias ("1", "2", etc.)
<bricker>
Ox0dea: that's right
<Ox0dea>
bricker: How many things does Ruby have to do to define an alias?
platosha has joined #ruby
linuxboytoo has joined #ruby
Fire1o6 has joined #ruby
code1o6 has joined #ruby
ndrei has joined #ruby
<Ox0dea>
...
<bricker>
Ox0dea: Count them and get back to me :)
nettoweb has joined #ruby
<Ox0dea>
You seem to be butthurt about (inadvertently?) ending up out of your depth, which is really not an admirable approach to such a dilemma. You are advised to stick a bandage on it and grow.
<bricker>
Ox0dea: good advice
Balzrael has quit [Quit: Leaving]
baweaver has joined #ruby
<bricker>
Ox0dea: so what's the answer? which one is more work
<Ox0dea>
bricker: I've not looked into the matter; that's sort of why I asked you?
<shevy>
you people have no answers!
<bricker>
Ox0dea: so you don't know but you're telling me I'm wrong?
benlieb has quit [Quit: benlieb]
<jhass>
shevy: sounds like you want to point away from yourself
<Ox0dea>
bricker: When did I tell you you were wrong? I merely asked you to substantiate your claim.
<jhass>
shevy: how's your crystal going btw?
etvr has quit [Read error: Connection reset by peer]
etvr has joined #ruby
<bricker>
Ox0dea: I guess you never said I was wrong. I guess I don't care enough to find out the actualy answer myself, I made an assumption.
<bricker>
actual*
<Ox0dea>
bricker: And you made an ass of yourself; you were warned about that in grade school.
dgs has quit [Read error: No route to host]
<shevy>
jhass I am not even sure what's going on here, I sort of am half-sleeping already; I dunno, I got side-tracked again, I have one project where I have to understand tcl sufficiently well to help implement some cluster using http://modules.sourceforge.net/ :(
<bricker>
Ox0dea: Did I?
<shevy>
so not really the time for more crystal right now
<bootstrappm>
is it just me or is there more arguing in #ruby than there used to be?
solars has quit [Ping timeout: 252 seconds]
cameronmalek_ has quit [Quit: quit]
<Ox0dea>
bricker: Did you not fail to pretend to have a thorough understanding of MRI's method definition and aliasing costs?
<bricker>
Ox0dea: I don't think so
<Ox0dea>
You did, though.
baweaver has quit [Ping timeout: 250 seconds]
<jhass>
shevy: gosh, you still use sourceforge?
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
malconis has joined #ruby
malconis has quit [Client Quit]
<Ox0dea>
bricker: In any case, rb_define_alias() essentially just sticks a reference in the right place, whereas rb_define_method() creates a completely new entry in the class's method table; it's not hard to intuit which is cheaper.
Hrorek has quit [Ping timeout: 255 seconds]
<Ox0dea>
> For ruby to say ruby method "size" is an alias of ruby method "length", takes more work than to say ruby method "size" should just call "rb_ary_length"
<bricker>
Ox0dea: good to know, thanks for the lesson
otacon- has joined #ruby
kirun has quit [Quit: Client exiting]
<bricker>
Ox0dea: then I wonder why String doesn't define an alias
<shevy>
jhass I didn't pick the project, others picked it, supposedly because module makes it convenient to load up programs along with working environment variables at the same time
<Ox0dea>
bricker: Whimsy.
Hrorek has joined #ruby
<bricker>
Ox0dea: must be
baweaver has joined #ruby
<Ox0dea>
bricker: Let's defer to shevy and blame it on the Japanese.
<shevy>
I don't blame the japanese
<shevy>
I blame Ox0dea
uri_ has joined #ruby
<shevy>
his snowman project lacks documentation
<Ox0dea>
It's not even the right season yet.
<shevy>
coming closer... it's raining every day here
<Ox0dea>
Rain == winter?
<Ox0dea>
> Then I don't need a jacket.
<shevy>
well it's upcoming, just need a bit more cold
<jhass>
in germany? yeah
Pupeno has quit [Remote host closed the connection]
<Ox0dea>
It's binding the result of that call to FIX2LONG(), no?
mjuszczak has joined #ruby
unholycrab has joined #ruby
<Ox0dea>
I don't see how re-assigning the bound variable would affect that.
<am11>
I'm having some difficulty in converting some ruby style regex expressions (gsub subsituations) to an ANSI C lib friendly ones, can anyone help with this regex conversion chore?
symm- has quit [Ping timeout: 260 seconds]
JDiPierro has joined #ruby
mary5030 has quit [Ping timeout: 252 seconds]
catcher has quit [Quit: catcher]
<Ox0dea>
am11: "ANSI C" isn't a regular expression engine.
<zenspider>
am11: consultants can, for a fee
<Ox0dea>
Do you mean PCRE?
* zenspider
is a consultant
<zenspider>
:D
Rover has quit [Read error: Connection reset by peer]
<am11>
SLRE apparently doesn't provide multiline support so /m is off the table, need to figure out some other way.. :)
<Ox0dea>
Sprinkle a few '\n's here and there.
bigmac has quit [Ping timeout: 250 seconds]
<zenspider>
why are you porting that to C????
<eam>
am11: that's not an ANSI RE, that's a custom RE engine written in ANSI C
nateberkopec has joined #ruby
<eam>
I don't think many will be familiar with it
CloCkWeRX has joined #ruby
CloCkWeRX has left #ruby [#ruby]
<am11>
yeah that's the plan. The thing is i am converting this ruby test runner for libsass in pure C. i am done with most part, this is the last obstacle.
<zenspider>
that doesn't mean that the sass-spec needs to be ported, does it?
rakm has joined #ruby
<zenspider>
I'd use pcre, personally
<am11>
nope
Voker57 has quit [Remote host closed the connection]
<am11>
currently libsass rely on this ruby-runner
<am11>
the issue is, there is tons of functionality untested this way.
ledestin has joined #ruby
mwlang has joined #ruby
<BenjiWiebe>
Ox0dea: My guess is that Ruby/SQLite3 creates a brand new SQLite3 object each time you execute?
<am11>
for instance, error handling can't bet tested, source-maps generation, API internal and since so forth.. which is why we are aiming for consuming native test f/w.
devoldmx has joined #ruby
<BenjiWiebe>
So that the bind_param by reference is being emulated by the Ruby?
<BenjiWiebe>
Because it *does* work.
<Ox0dea>
BenjiWiebe: Aye, that follows easily enough.
<am11>
sass-spec will be used as fixtures repo only. only the runner would be native. :)
<BenjiWiebe>
Ox0dea: Actually, I think it is simply that sqlite3_bind_int64 is re-run each time execute is called.
Pupeno has quit [Remote host closed the connection]
<BenjiWiebe>
That's all it would take.
<Ox0dea>
am11: I linked you to a patch that adds multiline to SLRE.
<BenjiWiebe>
Ox0dea: idk...anyways, it works, somehow or another.
<Ox0dea>
BenjiWiebe: To clarify, you've got `foo = 42`, you bind it, and then you `foo = 43`, and the binding reflects the update?
<Ox0dea>
Something's missing out of the middle, I should think.
baweaver has quit [Remote host closed the connection]
<Ox0dea>
That was an oversimplification, of course, but it's essentially what you're suggesting works.
<ruboto>
pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
<BenjiWiebe>
this is intended to be read by someone im teaching, so thats why the comments are as they are.
<BenjiWiebe>
this is NOT my normal commenting style. :)
<zenspider>
drbrain: I have a rake-compiler problem. When I build locally with rake, I wind up with lib/sdl/sdl.bundle, which seems fine. I require "sdl/sdl" to load it. But when I package and install via rubygems I get gems/graphics-1.0.0b4/ext/sdl/sdl.bundle and gems/graphics-1.0.0b4/lib/sdl.bundle and my require fails
<BenjiWiebe>
look at lines 14-17
<BenjiWiebe>
this code is to reformat a timestamp column in a db to iso8601, which it does successfully.
<Ox0dea>
BenjiWiebe: Right, that makes sense. The bound parameter doesn't actually get evaluated until you execute.
<BenjiWiebe>
ok.
zenguy_pc has quit [Ping timeout: 246 seconds]
<Ox0dea>
I was thinking SQLite3 had managed to implement something along the lines of Fixnum#replace.
<BenjiWiebe>
whats that? :)
pwnd_nsfw has joined #ruby
ponga has joined #ruby
mary5030_ has quit [Remote host closed the connection]
<Ox0dea>
Well, String#replace modifies the variable in-place.
<BenjiWiebe>
ah
<Ox0dea>
>> foo = 'yay'; bar = foo; foo.replace 'boo'; bar
<Ox0dea>
Swap the 'yay' and 'boo' depending on how that makes you feel. :P
bigmac has joined #ruby
mary5030 has joined #ruby
<BenjiWiebe>
i see.
<Ox0dea>
You can do the same with Arrays and Hashes, but Fixnums are really just pointers under the hood, so being able to modify them in-place would've been quite a feat.
<BenjiWiebe>
or not.
<BenjiWiebe>
I think I catch on.
zenguy_pc has joined #ruby
<BenjiWiebe>
Well, thanks!
<Ox0dea>
So, to come to an answer to your question: by reference. :P
<BenjiWiebe>
lol, ok.
<BenjiWiebe>
My problem is that I learned SQLite3 in PHP first...
charliesome has joined #ruby
niemcu has quit [Read error: Connection reset by peer]
<am11>
Ox0dea: I just followed the link. Thank you. I have never worked with mercury, but i can def. figure out the code. :)
<Ox0dea>
Well, you've still got prepared statements there, no?
khebbie has quit [Ping timeout: 246 seconds]
<BenjiWiebe>
So I wasn't sure if I could do the same steps in Ruby or not.
<Ox0dea>
am11: The patch might even apply clean.
<Ox0dea>
(Doubtful, though.)
<BenjiWiebe>
Yes, SQLite3 + PHP has prepared statements.
<BenjiWiebe>
And bound parameters can be updated/execute/updated/execute repeatedly.
benlieb has joined #ruby
<BenjiWiebe>
Without re-preparing for each new row.
<BenjiWiebe>
And also without re-binding. Only re-executing.
JDiPierro has quit [Remote host closed the connection]
SuMo_D has joined #ruby
mary5030 has quit [Ping timeout: 272 seconds]
cschneid_ has quit [Remote host closed the connection]
<zenspider>
looks like drbrain isn't available
<zenspider>
anyone else have experience with rake-compiler and extensions? this is odd.
spider-mario has quit [Remote host closed the connection]
<zenspider>
problem: I have a rake-compiler problem. When I build locally with rake, I wind up with lib/sdl/sdl.bundle, which seems fine. I require "sdl/sdl" to load it. But when I package and install via rubygems I get gems/graphics-1.0.0b4/ext/sdl/sdl.bundle and gems/graphics-1.0.0b4/lib/sdl.bundle and my require fails.
<am11>
Ox0dea: These libs (SLRE, PCRE) do not even provide the robust subsituate function OOTB. So far, I am testing the suite with the basic function provided in their unit test: https://github.com/cesanta/slre/blob/ace9f349/unit_test.c#L21-L46 (limitation: one and only one capture is supported)
benlieb has quit [Quit: benlieb]
<zenspider>
am11: your problem isn't really ruby related.
<zenspider>
it's C
<zenspider>
or, specific to those C libraries
nfk has quit [Quit: Try memory.free_dirty_pages=true in about:config]
dopamean_ has quit [Ping timeout: 250 seconds]
robbyoconnor has joined #ruby
dfockler has quit []
rakm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<zenspider>
BenjiWiebe: what's the problem?
casadei_ has quit [Remote host closed the connection]