rehat_ has quit [Remote host closed the connection]
saddad has joined #ruby
charliesome has joined #ruby
iamninja has quit [Ping timeout: 260 seconds]
bayed has quit [Quit: Connection closed for inactivity]
codeurge has joined #ruby
dopamean_ has joined #ruby
choke has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
darwingr has quit [Ping timeout: 272 seconds]
<BenjiWiebe>
Ox0dea: Not "still". But I am back now.
<BenjiWiebe>
zenspider: Problem was that I had a question, asked it, figured it out myself, and then got an answer that (seemingly) contradicted my own findings.
<BraddPitt>
has anyone ever written tests against a Thor project?
<Ox0dea>
BenjiWiebe: I was correct in my assumption that bind_param() copies Strings.
<zenspider>
BenjiWiebe: kk.
<zenspider>
BenjiWiebe: see url above. might be relevant still
jdawgaz has joined #ruby
<BenjiWiebe>
Ox0dea: But in my code it does *not* copy Strings...??
<BenjiWiebe>
zenspider: I don't think it is still relevant. My question is:
<BenjiWiebe>
If I prepare a statement, and do stm.bind_param 1, myvalue
<BenjiWiebe>
And then execute. And then change myvalue, and execute again, what happens in the second execution?
hfp_work has quit [Ping timeout: 272 seconds]
<BenjiWiebe>
Ox0dea: Yup, same results.
saddad has quit [Ping timeout: 240 seconds]
<BenjiWiebe>
As in, same results as you got.
<Ox0dea>
BenjiWiebe: I can't think how to more minimally demonstrate that prepared statements don't do any whacky magic with local bindings or anything like that.
<zenspider>
BenjiWiebe: "change myvalue"... the variable binding or the value it points to? based on Ox0dea's input, I'm guessing the latter
bmurt has joined #ruby
<BenjiWiebe>
zenspider: The latter.
<zenspider>
and the simple answer is: mutating shared values is bad and should be avoided at all costs
<BenjiWiebe>
Ox0dea: So then why did my SQLite-timestamp -> ISO8601 converter WORK?
<zenspider>
you can always call dup yourself, but Ox0dea poked around and said it dups already
<Ox0dea>
zenspider: More precisely, it extracts the C string.
<BenjiWiebe>
zenspider: I don't *want* to dup. Have you ever used PHP with mysqli?
centrx has quit [Quit: "You cannot fix a machine by just power-cycling it with no understanding of what is going wrong."]
<zenspider>
BenjiWiebe: Ox0dea's code implies that you don't have to
<BenjiWiebe>
zenspider: You can bind params, and it binds by reference. You can change the values and re-execute and your value changes are reflected by the result of the execution.
<Ox0dea>
zenspider: I trust that means I'd end up poking raw memory? It seems neither FFI nor Fiddle provide the means to override C functions.
blue_deref has joined #ruby
<zenspider>
mmmm... less my expertise, but... it's not just a matter of poking the raw memory... each dynamic library loaded would re-calculate offsets to used symbols
<zenspider>
but, you want your lib to be pure ruby... you can't use the usual tricks to do on-the-fly patching.
<zenspider>
you'd probably need to write a C shim to call back into ruby for each symbol you want to override, then use the C shim to do all your tricks with
mleung has joined #ruby
<zenspider>
I dunno... at that point I'm talking out my ass. :)
<zenspider>
I'm about as white hat as they come
<Ox0dea>
I think even doing this as a C extension is a no-go, since libfaketime relies on being LD_PRELOADed.
<havenwood>
dorei: Raise in public when you want to be as clear as possible in the vernacular. Fail in private when the subtleties idiolect are appreciated
<havenwood>
dorei: Similar to single versus double quote conventions.
<dorei>
havenwood: in fact, before reading the style guide i didnt know that a #fail exists
mleung has quit [Quit: mleung]
<aldodelgado>
Qustion? I have a ubuntu server 14.04 stup with rbenv and under all users including root they show the same ruby version. However when I run a cron it shows a diffrent ruby version. Any sugestions?
choke has joined #ruby
<blue_deref>
# Thank you, havenwood in #ruby on Freenode for popen2e()!
<blue_deref>
found it
<havenwood>
Ah, yeah that's a bit more particular.
d10n-work has quit [Quit: Connection closed for inactivity]
dopamean_ has quit [Ping timeout: 250 seconds]
<Antiarc>
aldodelgado: cron jobs don't get run in a shell so things like /etc/profile don't apply. Try bash -l -c "your command" to execute it in a login shell
<seitensei>
SAP has all the shiny toys though, like HANA
webguynow has quit [Ping timeout: 264 seconds]
<IceDragon>
seitensei: I like how they sell "NOW WITH A THIRD LAYER!" as a feature...
<IceDragon>
-.-; The third layer has always been present
<seitensei>
IceDragon: Honestly, if you're coding on server runtime, so NodeJS/iojs, you already have all the importan ES2015 features
<IceDragon>
You just couldn't use it
<seitensei>
So transpiling isn't very important
luckyruby has joined #ruby
<seitensei>
Transpiling just makes it so outdated browsers can run your code (*glances at Safari*)
<IceDragon>
JS is a plague server side and needs to die to painful and brutal death.
<IceDragon>
s/to/a/
catcher has joined #ruby
<seitensei>
It does async pretty well.
<IceDragon>
So does Go
<wmoxam>
it already died once
<wmoxam>
ASP Jscript!
<wmoxam>
:p
<seitensei>
Sure, but Go is a systems language
<seitensei>
so you use Go to kill C/C++ instead
<Ox0dea>
wmoxam: I'm not sure you belong in this conversation.
<IceDragon>
Which is why I said JS needs to die "server side"
mleung has quit [Quit: mleung]
<seitensei>
C needs to die.
<wmoxam>
Ox0dea: lol
<IceDragon>
D8< You can't kill C
<IceDragon>
C is like a GOD
<seitensei>
Sure you can.
<Ox0dea>
(That is, you appear to know what the fuck you're talking about.)
<IceDragon>
>_>;
* seitensei
grabs Rust.
<IceDragon>
Shiiit
<Ox0dea>
I've never seen parrots fling shit, but there's a first time for everything.
webguynow has joined #ruby
<seitensei>
Currently, I'd probably pick Rust over Go, over C++
<Ox0dea>
seitensei: Why?
<SpikeMaster>
i'm probably just pick C with valgrind over everything else.
<dorei>
C for systems programming, ruby for everything else :)
<IceDragon>
I look at rust, and my eye twitches, I've been meaning to get into it, but god damn IT WAS UNSTABLE during my attempts
<seitensei>
Coming from Ruby, I like the syntax in Go and Rust a lot more than C
<Ox0dea>
> picking languages for their syntax
<dorei>
yeah, syntax conveys the beauty of a language :)
<IceDragon>
I pick assembly for its syntax
<IceDragon>
>->
<seitensei>
IceDragon: But you also hate yourself
<IceDragon>
yes, yes I do orz
<Ox0dea>
IceDragon: AT&T or Intel?
<seitensei>
I spent a year having to deal with MIPS assembly
<seitensei>
D:
<seitensei>
Not fun at all.
baweaver has joined #ruby
arashb has quit [Ping timeout: 246 seconds]
<IceDragon>
Intel?
<IceDragon>
@ 0x0dea
<Ox0dea>
How come?
<dorei>
which one is the motorola style? at&t or intel?
<IceDragon>
The assembly thing was a joke, the closest I've come to assembly was 8085
<IceDragon>
intel
<seitensei>
One of my profs was horrifically in love with MIPS assembly
<seitensei>
as well as .NET bytecode
devbug has joined #ruby
<seitensei>
lecture would start with topics around MIPS, and then tangent into how much he loves .NET
<IceDragon>
I'm gonna be a cool kid and learn haskell... next year or maybe the year after...
* IceDragon
leaves quietly
<pipework>
IceDragon: Learn ocaml instead!
<seitensei>
Had another professor who would randomly switch between C++ and Java mid lecture
<pipework>
seitensei: Seems pretty reasonable.
<seitensei>
Department put him into teaching the Java classes. He's a C++ guy.
<seitensei>
Made me laugh
mleung has joined #ruby
<seitensei>
Since they have the Java guy teaching theory classes instead
<IceDragon>
Java....
<pipework>
Mmm jvm.
<IceDragon>
So many damn import statements...
diego2 has joined #ruby
<IceDragon>
Has anyone ever tried writing Java outside an IDEA
<IceDragon>
*IDE
<diego2>
IceDragon: yes
<seitensei>
In vim?
diego2 is now known as diegoviola
<seitensei>
Yeah
<diegoviola>
vim
<seitensei>
Unless you want to insist that vim is an ide
<IceDragon>
Its like writing your name 100 times to confirm you want to move a file
<Ox0dea>
seitensei: What makes Vim not an IDE?
<IceDragon>
50% of your time is spent writing import statements
* IceDragon
grinds teeth
<seitensei>
I'd say that vim is an optional IDE
devbug_ has quit [Ping timeout: 256 seconds]
<Ox0dea>
seitensei: A computer is an optional hammer.
<seitensei>
It's up to the user to set vim up to be one or not
<seitensei>
It's a perfectly reasonable plain text editor
<IceDragon>
Mine is a paper weight and heater
bigmac has quit [Ping timeout: 246 seconds]
<IceDragon>
Who needs a home heater or blanket when you got a laptop
<seitensei>
I'm not sure you need a heater
bmurt has quit []
<Ox0dea>
seitensei: Do you use Vim regularly?
mrtomme has quit [Ping timeout: 264 seconds]
xcesariox has joined #ruby
<seitensei>
As a text editor, mainly
<Ox0dea>
What does that mean?
<Ox0dea>
Do you do a lot of visual programming?
<IceDragon>
I use vim for config files, and sublime text for.. everything else
petricore has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<seitensei>
I'm not actively using it to the extent that I have a .vimrc set up with anything
webguynow has quit [Ping timeout: 240 seconds]
mrtomme has joined #ruby
<seitensei>
but I tend to use it to do my gemfiles and gulp files
dorei has quit []
webguynow has joined #ruby
<Ox0dea>
Why wouldn't you just use whatever other editor to which you've become acclimated?
<seitensei>
Because vim runs on the server ^^
<seitensei>
Without having to twiddle with x forwarding
<Ox0dea>
So does sed.
gener1c has joined #ruby
<seitensei>
Yeah, but I have more habits formed with vim
diego2 has joined #ruby
rbowlby has joined #ruby
gener1c_ has quit [Ping timeout: 265 seconds]
diegoviola has quit [Ping timeout: 246 seconds]
diego2 has quit [Read error: Connection reset by peer]
oo_ has quit [Remote host closed the connection]
<seitensei>
I could be like my prof and cat everything but
webguynow has quit [Ping timeout: 260 seconds]
<seitensei>
that's also tedious
webguynow has joined #ruby
braincra- has quit [Quit: bye bye]
oo_ has joined #ruby
rbennacer has quit [Remote host closed the connection]
havenwood has joined #ruby
dgutierrez1287 has joined #ruby
braincras has joined #ruby
juanpablo_ has joined #ruby
robbyoconnor has quit [Ping timeout: 256 seconds]
deol has joined #ruby
SpikeMaster has left #ruby ["ERC (IRC client for Emacs 24.5.1)"]
chouhoulis has quit [Read error: Connection reset by peer]
chouhoulis has joined #ruby
catcher has quit [Quit: catcher]
webguynow has quit [Ping timeout: 250 seconds]
webguynow has joined #ruby
catcher has joined #ruby
juanpablo_ has quit [Ping timeout: 240 seconds]
arescorpio has joined #ruby
aldodelgado has quit [Quit: aldodelgado]
michaeldeol has quit [Ping timeout: 246 seconds]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
minimalism has joined #ruby
grenierm has quit [Quit: grenierm]
deol has quit [Client Quit]
grenierm has joined #ruby
grenierm has quit [Client Quit]
charliesome has joined #ruby
darkf has joined #ruby
darkf has quit [Changing host]
darkf has joined #ruby
<nofxx>
is there a ios channel here on freenode?
michaeldeol has joined #ruby
<nofxx>
#iphonedev looks like, sorry the OT.. thanks =D
rbowlby has quit [Ping timeout: 246 seconds]
<Psi-Jack>
nofxx: Ask alis.
pietr0 has joined #ruby
oo_ has quit [Quit: Leaving...]
mleung has quit [Quit: mleung]
webguynow has quit [Ping timeout: 250 seconds]
baweaver has quit [Read error: Connection reset by peer]
minimalism has quit [Quit: leaving]
webguynow has joined #ruby
baweaver has joined #ruby
wookiehangover has quit [Ping timeout: 246 seconds]
mjmac has quit [Ping timeout: 246 seconds]
minimalism has joined #ruby
dravine_ has joined #ruby
larissa has quit [Ping timeout: 246 seconds]
Nahra has quit [Remote host closed the connection]
devoldmx has joined #ruby
craysiii has quit [Ping timeout: 246 seconds]
Shidash has quit [Ping timeout: 246 seconds]
jtdowney has quit [Ping timeout: 246 seconds]
epochwolf has quit [Ping timeout: 246 seconds]
lokulin has quit [Ping timeout: 246 seconds]
drbrain has quit [Ping timeout: 246 seconds]
dopamean_ has joined #ruby
wldcordeiro_ has joined #ruby
rubie has joined #ruby
veduardo has quit [Ping timeout: 252 seconds]
johnhamelink has quit [Ping timeout: 246 seconds]
cschneid has quit [Ping timeout: 246 seconds]
dravine has quit [Ping timeout: 246 seconds]
DarkBushido has quit [Ping timeout: 246 seconds]
Klumben has quit [Ping timeout: 246 seconds]
jimeh has quit [Ping timeout: 246 seconds]
waxjar has quit [Ping timeout: 246 seconds]
dymk has quit [Ping timeout: 246 seconds]
dravine_ is now known as dravine
universa1 has quit [Ping timeout: 244 seconds]
linc01n has quit [Ping timeout: 244 seconds]
Wolland has quit [Ping timeout: 246 seconds]
blackjid has quit [Ping timeout: 246 seconds]
znz_jp has quit [Ping timeout: 246 seconds]
asi_ has quit [Ping timeout: 246 seconds]
duoi has quit [Ping timeout: 246 seconds]
lacrosse has quit [Ping timeout: 246 seconds]
cball has quit [Ping timeout: 246 seconds]
alem0lars has quit [Ping timeout: 246 seconds]
skarn has quit [Ping timeout: 246 seconds]
terrellt has quit [Ping timeout: 246 seconds]
Guest38256 has quit [Ping timeout: 246 seconds]
elfuego has quit [Quit: elfuego]
voxxit has quit [Ping timeout: 246 seconds]
hostess has quit [Ping timeout: 246 seconds]
oo_ has joined #ruby
larissa has joined #ruby
Shidash has joined #ruby
jtdowney has joined #ruby
jtdowney has quit [Changing host]
jtdowney has joined #ruby
DarkBushido has joined #ruby
epochwolf has joined #ruby
asi_ has joined #ruby
bf4 has joined #ruby
bf4 is now known as Guest63062
waxjar has joined #ruby
cball has joined #ruby
cschneid has joined #ruby
drbrain has joined #ruby
bigmac has joined #ruby
mjmac has joined #ruby
<Ox0dea>
case Alice.height; when 10.feet; ...
hostess has joined #ruby
wldcordeiro has quit [Ping timeout: 246 seconds]
duoi has joined #ruby
linc01n has joined #ruby
dymk has joined #ruby
universa1 has joined #ruby
jimeh has joined #ruby
wookiehangover has joined #ruby
Klumben has joined #ruby
Wolland has joined #ruby
voxxit has joined #ruby
devoldmx has quit [Ping timeout: 264 seconds]
<Ox0dea>
Psi-Jack: I guess yours probably wasn't a Jefferson Airplane reference.
lacrosse has joined #ruby
Wolland has quit [Client Quit]
craysiii has joined #ruby
bdnchr has joined #ruby
alkdsfhj has joined #ruby
bdnchr has left #ruby [#ruby]
tmtwd has joined #ruby
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
terrellt has joined #ruby
michaeldeol has joined #ruby
podman has quit [Quit: Connection closed for inactivity]
rushed has quit [Quit: rushed]
nofxx has quit [Ping timeout: 264 seconds]
nofxx has joined #ruby
mjmac has quit [Ping timeout: 246 seconds]
drbrain has quit [Ping timeout: 246 seconds]
epochwolf has quit [Ping timeout: 246 seconds]
Gnomethrower has joined #ruby
Gnomethrower has quit [Changing host]
Gnomethrower has joined #ruby
gix has quit [Ping timeout: 264 seconds]
jimeh has quit [Ping timeout: 246 seconds]
universa1 has quit [Ping timeout: 246 seconds]
linc01n has quit [Ping timeout: 246 seconds]
craysiii has quit [Ping timeout: 246 seconds]
cschneid has quit [Ping timeout: 246 seconds]
terrellt has quit [Ping timeout: 246 seconds]
Klumben has quit [Ping timeout: 246 seconds]
cball has quit [Ping timeout: 246 seconds]
waxjar has quit [Ping timeout: 246 seconds]
Shidash has quit [Ping timeout: 246 seconds]
larissa has quit [Ping timeout: 246 seconds]
DarkBushido has quit [Ping timeout: 246 seconds]
bdnchr has joined #ruby
voxxit has quit [Ping timeout: 246 seconds]
wookiehangover has quit [Ping timeout: 246 seconds]
dymk has quit [Ping timeout: 246 seconds]
hostess has quit [Ping timeout: 246 seconds]
duoi has quit [Ping timeout: 246 seconds]
asi_ has quit [Ping timeout: 246 seconds]
Guest63062 has quit [Ping timeout: 246 seconds]
bdnchr has quit [Client Quit]
baweaver has quit [Ping timeout: 240 seconds]
f00dMonsta has joined #ruby
<IceDragon>
I've been wondering... Is there a shorter way to do this: File.basename(filename, File.extname(filename)), aka, strip directory and extension from the filename
sfr^ has quit [Ping timeout: 244 seconds]
pwnd_nsfw has quit [Ping timeout: 246 seconds]
rubie has quit [Remote host closed the connection]
rushed has joined #ruby
asi_ has joined #ruby
gix has joined #ruby
s00pcan has quit [Ping timeout: 255 seconds]
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
hostess has joined #ruby
s00pcan has joined #ruby
siemprefresco has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
baweaver has joined #ruby
<mozzarella>
you could use '.*' instead
Rickmasta has joined #ruby
webguynow has quit [Ping timeout: 272 seconds]
<mozzarella>
IceDragon: ^
<Ox0dea>
IceDragon: Are you allergic to regular expressions?
webguynow has joined #ruby
araujo has quit [Ping timeout: 246 seconds]
<IceDragon>
0x0dea: Sorta
ramfjord has quit [Ping timeout: 244 seconds]
<IceDragon>
mozzarella: that could work
<IceDragon>
0x0dea: When you work with mruby you don't have the full luxury of regular expressions, unless you loaded up a gem with it
poli_ has joined #ruby
SuMo_D has quit [Remote host closed the connection]
<baweaver>
wat
prestorium has quit [Ping timeout: 252 seconds]
chipotle has joined #ruby
The_Phoenix has joined #ruby
<Ox0dea>
IceDragon: Whatcha doin' with mruby?
poli has quit [Ping timeout: 240 seconds]
tejasmanohar has quit [Quit: tejasmanohar]
<IceDragon>
baweaver: mruby, by default does not include a Regexp implmentation
dima_ has joined #ruby
<IceDragon>
0x0dea: A game engine :D
<IceDragon>
orz
<IceDragon>
more like a opengl wrapper
<IceDragon>
which just happens to have input...
<Ox0dea>
So you're not actually constrained.
araujo has joined #ruby
shmilan has quit [Ping timeout: 272 seconds]
luckyruby has quit [Quit: Leaving...]
<baweaver>
what are you on about?
<baweaver>
that's straight false.
pepperbreath has left #ruby [#ruby]
mrityunjay has joined #ruby
cball has joined #ruby
fostertheweb has joined #ruby
craysiii has joined #ruby
woodruffw has quit [Ping timeout: 246 seconds]
rushed has quit [Read error: Connection reset by peer]
rushed has joined #ruby
minimalism has quit [Ping timeout: 250 seconds]
The_Phoenix has quit [Quit: Leaving.]
minimalism has joined #ruby
<IceDragon>
baweaver: My state remains true, mruby does not include a Regexp implementation, you have to use a 3rd party gem
dhjondoh has quit [Remote host closed the connection]
<flughafen>
shevy! something took off today!
yfeldblum has joined #ruby
codenapper has joined #ruby
webguynow has quit [Ping timeout: 240 seconds]
webguynow has joined #ruby
astrobunny has joined #ruby
Renich has joined #ruby
SuMo_D has joined #ruby
<BraddPitt>
nice commit squares, IceDragon
minimalism has joined #ruby
tagrudev has joined #ruby
<BraddPitt>
I will never regret having a separate github account for work
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<BraddPitt>
all those squares... gone forever...
graydot has quit [Quit: graydot]
yfeldblu_ has joined #ruby
SuMo_D has quit [Ping timeout: 246 seconds]
mike___1234 has joined #ruby
devoldmx has quit [Remote host closed the connection]
rubie has joined #ruby
yfeldblum has quit [Ping timeout: 252 seconds]
last_staff has joined #ruby
riotjones has joined #ruby
jxv has quit [Quit: Leaving]
<Ox0dea>
BraddPitt: I heard they take one of your fingers every time you muck with GIT_COMMITTER_DATE.
havenwood has joined #ruby
toretore has quit [Quit: This computer has gone to sleep]
<Ox0dea>
Forgiving any potentially insensitive assumptions I might be making, that gives you ten "custom" GitHub squares before you've got to find a new line of work, or at least a top-notch speech-to-text utility.
Renich has quit [Quit: leaving]
Musashi007 has quit [Quit: Musashi007]
codecop has joined #ruby
codecop_ has joined #ruby
codecop_ has quit [Client Quit]
dhjondoh has joined #ruby
DoubleMalt has joined #ruby
agent_white has joined #ruby
mary5030 has joined #ruby
AlexRussia has quit [Ping timeout: 252 seconds]
alexUaN has joined #ruby
iamninja has joined #ruby
Musashi007 has joined #ruby
rubie has quit [Remote host closed the connection]
pawnbox has joined #ruby
grenierm has quit [Quit: grenierm]
n4046 has joined #ruby
acke has joined #ruby
eGGsha has joined #ruby
iamninja has quit [Ping timeout: 264 seconds]
solars has joined #ruby
Musashi007 has quit [Read error: Connection reset by peer]
SuMo_D has joined #ruby
arup_r has joined #ruby
afrianska has quit [Remote host closed the connection]
Oka has quit [Quit: o/]
Musashi007 has joined #ruby
Musashi007 has quit [Client Quit]
riotjones has quit [Remote host closed the connection]
SuMo_D has quit [Ping timeout: 240 seconds]
ndrei has joined #ruby
n4046 has left #ruby [#ruby]
konopka has quit [Ping timeout: 246 seconds]
riotjones has joined #ruby
<certainty>
moin hackers
deg_ has quit [Ping timeout: 260 seconds]
rakm has joined #ruby
konopka has joined #ruby
webguynow has quit [Ping timeout: 250 seconds]
webguynow has joined #ruby
firstdayonthejob has joined #ruby
<agent_white>
\o
<monsieurp>
\o
andikr has joined #ruby
howdoicomputer has joined #ruby
DoubleMalt has quit [Remote host closed the connection]
stan has joined #ruby
xcesariox has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dhjondoh has quit [Quit: dhjondoh]
webguynow has quit [Ping timeout: 268 seconds]
webguynow has joined #ruby
acke has quit [Quit: Leaving...]
deg_ has joined #ruby
<havenwood>
certainty: good mornin'
ndrei has quit [Ping timeout: 268 seconds]
jalcine has quit [Ping timeout: 252 seconds]
amclain has quit [Quit: Leaving]
khebbie has joined #ruby
<certainty>
o/
allomov has joined #ruby
jalcine has joined #ruby
webguynow has quit [Ping timeout: 264 seconds]
deg_ has quit [Ping timeout: 260 seconds]
webguynow has joined #ruby
juanpablo_ has joined #ruby
howdoi has joined #ruby
skullcrasher has joined #ruby
devoldmx has joined #ruby
mike___1234 has quit [Read error: Connection reset by peer]
dgutierrez1287 has joined #ruby
Trynemjoel has quit [Ping timeout: 250 seconds]
haxrbyte has quit [Remote host closed the connection]
haxrbyte has joined #ruby
x-light has joined #ruby
juanpablo_ has quit [Ping timeout: 250 seconds]
alkdsfhj has quit [Quit: WeeChat 1.3]
haxrbyte has quit [Client Quit]
devoldmx has quit [Ping timeout: 268 seconds]
deg_ has joined #ruby
dgutierrez1287 has quit [Ping timeout: 246 seconds]
pawnbox_ has joined #ruby
pawnbox_ has quit [Read error: Connection reset by peer]
pawnbox_ has joined #ruby
jas02 has joined #ruby
greenarrow has joined #ruby
pawnbox has quit [Ping timeout: 250 seconds]
riotjones has quit [Quit: Leaving...]
<flughafen>
shevy: there is a facebook evvent , the oppening of BER airport on the 20.6.2029
aibot has quit [Remote host closed the connection]
aibot has joined #ruby
<shevy>
hmm
<shevy>
he just scopes incorrectly or?
<certainty>
well the thing to realize that it's lexically scoped
<shevy>
I also don't know why he speaks of "child" when he uses modules
jmarrec has joined #ruby
deg_ has joined #ruby
<shevy>
I remember I had weirdness once
<shevy>
something like: module Foo; class Foo
<shevy>
:)
<agent_white>
If I... rewrite my new jobs ecomm site into rails/spree... I can get rid of magento... then do ruby all the time?!
<shevy>
yay!
<certainty>
\o/
<shevy>
what is magento, is this php?
<agent_white>
\o/
<agent_white>
shevy: Yep! I believe PHP and a mix of The Black Speech.
<havenwood>
!unmute havenwood
<havenwood>
Managed to mute myself. >.>
<havenwood>
!unmute havenwood
deg_ has quit [Ping timeout: 240 seconds]
firstdayonthejob has quit [Ping timeout: 250 seconds]
* havenwood
pokes ruboto
<havenwood>
agent_white: Would it be a huge thing to migrate?
BlackCoyote has quit [Remote host closed the connection]
<agent_white>
havenwood: Nope! Looking at... 3 sites, 300 products for two of the sites, and... 6 for the third :)
Johnny_ has joined #ruby
gix has quit [Ping timeout: 250 seconds]
etvr has joined #ruby
skullcrasher has quit [Remote host closed the connection]
<shevy>
havenwood lol
skullcrasher has joined #ruby
<shevy>
you become a scary person without coffee
<havenwood>
shevy: Mmm, coffee.
anisha has joined #ruby
JohnnyTao has quit [Ping timeout: 268 seconds]
JohnnyTao has joined #ruby
x-light has quit [Ping timeout: 250 seconds]
<shevy>
there was some ruby code that showed how to create a zombie
<havenwood>
shevy: zombie process or... zombie?
<shevy>
first a cd, then a fork or something... anyone remembers where zombies can be created in ruby?
<shevy>
all zombies!
bayed has joined #ruby
xcesariox has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Johnny_ has quit [Ping timeout: 250 seconds]
Johnny_ has joined #ruby
jenrzzz has quit [Ping timeout: 260 seconds]
Juanchito has joined #ruby
<shevy>
I remember I looked at the source at ruby doc some months ago
<shevy>
the cd was to "/" if I remember correctly before forking happened
JohnnyTao has quit [Ping timeout: 250 seconds]
Ropeney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
allomov has quit [Read error: Connection reset by peer]
allomov has joined #ruby
chipotle has joined #ruby
petricore has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Pro| has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
naftilos76 has joined #ruby
<Pro|>
is it possible to define a method with dynamic part in its name
<Pro|>
like def for_x_times
Hounddog has joined #ruby
c0def00d has joined #ruby
bigkevmcd has quit [Ping timeout: 256 seconds]
<c0def00d>
Ruby newb here needs a little help. Getting a “NoMethodError: undefined method `pathmap' for #<Pathname:0x007ff2ac2f9fd0>” error in a rakefile. I know that pathmap is an extension method of Pathname provided by Rake, but it should be there. Would could I have done wrong for this not to work?
<c0def00d>
I’m on rake, version 10.4.2
Zai00 has joined #ruby
bigkevmcd has joined #ruby
jgt1 has joined #ruby
ta has joined #ruby
Hounddog has quit [Ping timeout: 260 seconds]
charliesome has joined #ruby
oo_ has quit [Remote host closed the connection]
<shevy>
Pro| yes, you can use the method called: define_method()
senayar has joined #ruby
<shevy>
Pro| so the first step is: generate the name that you wish to use; the second step is, send into define_method()
JohnnyTao has joined #ruby
Hounddog has joined #ruby
<shevy>
you can use .instance_eval or .class_eval in combination with define_method to define on the object in question on the class level or instance/singleton level
<c0def00d>
jhass: the weird thing is I was sure it used to work without that epxlicit require. thanks a lot for helping me out :)
<jhass>
yeah I wouldn't expect it to be needed
SuMo_D has joined #ruby
skade has joined #ruby
khebbie has quit [Remote host closed the connection]
<yorickpeterse>
morning
kostiak has joined #ruby
<havenwood>
good mornin'
SuMo_D has quit [Ping timeout: 246 seconds]
<kostiak>
mornin
xcesariox has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
khebbie has joined #ruby
yottanami has joined #ruby
nofxx has quit [Remote host closed the connection]
<yottanami>
Should I return nil or false when a method have not ok result?
<jhass>
yottanami: what's the ok result?
splud has quit [Quit: splud]
webguynow has quit [Ping timeout: 272 seconds]
<jhass>
and when does the not ok result happen?
webguynow has joined #ruby
ziro` has joined #ruby
TheHodge has joined #ruby
devbug has quit [Read error: Connection reset by peer]
chipotle has quit [Read error: Connection reset by peer]
<yottanami>
jhass, It is Rails code and should check some params if one of them have not expected value return something to say the caller method
webguynow has quit [Read error: Connection reset by peer]
jgt1 has joined #ruby
<jhass>
so true/false seems like a sane reply?
pawnbox has joined #ruby
<jhass>
valid_foo?(param[:foo])
leafybas_ has quit [Remote host closed the connection]
c0def00d has quit [Quit: c0def00d]
leafybasil has joined #ruby
nofxx has joined #ruby
Balzrael has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
c0m0 has joined #ruby
leafybasil has quit [Ping timeout: 255 seconds]
skade has joined #ruby
minimalism has quit [Quit: leaving]
juanpablo_ has joined #ruby
krz has joined #ruby
rushed has quit [Quit: rushed]
astrobunny has quit [Remote host closed the connection]
juanpablo_ has quit [Ping timeout: 268 seconds]
x-light has joined #ruby
rbowlby has quit [Remote host closed the connection]
bampersand has joined #ruby
oo_ has quit [Remote host closed the connection]
oo_ has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
dmolina has joined #ruby
araujo has quit [Ping timeout: 260 seconds]
bampersand has quit [Ping timeout: 265 seconds]
CustosL1men has joined #ruby
araujo has joined #ruby
leafybasil has joined #ruby
<certainty>
i usually use nil only when i want to denote the absence of a value. And even then i'm not always happy because nil is semantically overloaded in many systems already. In this case value of the boolean type seems like a proper fit. It either is valid or it is not. Should be a fairly rigid function that maps to either of these
pandaant has joined #ruby
leafybasil has quit [Read error: Connection reset by peer]
leafybasil has joined #ruby
ramfjord has quit [Ping timeout: 246 seconds]
UtkarshRay has joined #ruby
khebbie has quit [Remote host closed the connection]
chipotle has joined #ruby
blaxter has joined #ruby
karapetyan has quit [Remote host closed the connection]
x-light has quit [Ping timeout: 252 seconds]
ponga has quit [Quit: Connection closed for inactivity]
zapata has joined #ruby
khebbie has joined #ruby
Macaveli has joined #ruby
arup_r has quit [Ping timeout: 256 seconds]
marr has joined #ruby
dara has joined #ruby
dara has left #ruby [#ruby]
dhjondoh has quit [Quit: dhjondoh]
lxsameer has joined #ruby
x-light has joined #ruby
karapetyan has joined #ruby
ziro` has quit [Quit: ziro`]
relix has joined #ruby
dhjondoh has joined #ruby
oo__ has joined #ruby
karapetyan has quit [Remote host closed the connection]
<zenspider>
huh. I've never known of String#pathmap. You learn something new every day (hopefully)
SCHAAP137 has joined #ruby
sameerynho has joined #ruby
Siyfion has joined #ruby
<zenspider>
yottanami: raise an exception
lxsameer has quit [Ping timeout: 240 seconds]
oo_ has quit [Ping timeout: 246 seconds]
Zai00 has quit [Ping timeout: 246 seconds]
DLSteve has joined #ruby
Zai00 has joined #ruby
karapetyan has joined #ruby
A124 has quit [Read error: Connection reset by peer]
A124 has joined #ruby
* zenspider
goes to bed
chipotle has quit [Read error: Connection reset by peer]
frg133 has joined #ruby
karapetyan has quit [Ping timeout: 250 seconds]
Voker57 has joined #ruby
pawnbox has quit [Remote host closed the connection]
karapetyan has joined #ruby
arup_r has joined #ruby
oo__ has quit [Remote host closed the connection]
oo_ has joined #ruby
Billias has quit [Ping timeout: 246 seconds]
arup_r_ has joined #ruby
frg133 has quit [Quit: Leaving]
oo__ has joined #ruby
dotix has joined #ruby
dotix has joined #ruby
pawnbox has joined #ruby
arup_r has quit [Ping timeout: 240 seconds]
rdark has joined #ruby
x-light has quit [Ping timeout: 256 seconds]
oo_ has quit [Ping timeout: 264 seconds]
agent_white has quit [Remote host closed the connection]
<dotix>
what's the best way to make nil out of "" in-place => {"a" => "aa", "b" => "bb", "c" => ""}
<dotix>
=> {"a" => "aa", "b" => "bb", "c" => nil}
lele|w has quit [Ping timeout: 240 seconds]
<certainty>
>> h = {"a" => "aa", "b" => "bb", "c" => ""}; h.delete_if { |_,v| v.empty? }; h
<certainty>
note that this will not work if you need to preserve keys
<alex88>
hi everyone, anyone tried to create a custom sprockets processor? I'm trying to create a custom haml compiler that compiles to html within jst using custom settings (so without using the js haml compiler)
[k- has joined #ruby
havenwood has quit [Ping timeout: 252 seconds]
<certainty>
that is if you use Hash#key? somewhere for example or if you just perceive the nil through a hash lookup in which case a non existing key will return nil as well
<certainty>
bbl
tvw has joined #ruby
kiddorails has quit [Remote host closed the connection]
karapetyan has quit [Remote host closed the connection]
bluOxigen has joined #ruby
dhjondoh has quit [Quit: dhjondoh]
dhjondoh has joined #ruby
jgt1 has quit [Ping timeout: 256 seconds]
devoldmx has joined #ruby
dgutierrez1287 has joined #ruby
blueOxigen has quit [Ping timeout: 252 seconds]
lele|w has joined #ruby
eGGsha has quit [Ping timeout: 246 seconds]
Pupeno_ has joined #ruby
<shevy>
what possibilities exist for a config -rc file in ruby? one would be yaml I assume... is there something simpler than yaml though, for a user?
oo__ has quit [Remote host closed the connection]
<shevy>
like .pryrc or .irbrc
<shevy>
hmm ok the latters are not good examples I assume since they are ruby code; I mean more like .bashrc perhaps... also not a good example ... \
oo_ has joined #ruby
devoldmx has quit [Ping timeout: 255 seconds]
dgutierrez1287 has quit [Ping timeout: 264 seconds]
<gregf_>
er, i think dotix means change foo => "" to foo => nil
Pupeno has quit [Ping timeout: 250 seconds]
<dotix>
yes, wnated to do that because of how forms are submited in rails
khebbie has quit [Remote host closed the connection]
tkuchiki has joined #ruby
sdothum has joined #ruby
sdfgsdfg has quit [Ping timeout: 256 seconds]
tkuchiki has quit [Remote host closed the connection]
dhjondoh has quit [Quit: dhjondoh]
lampshades has quit [Remote host closed the connection]
tkuchiki has joined #ruby
platosha has joined #ruby
ujjain- has quit [Max SendQ exceeded]
chouhoulis has quit [Read error: Connection reset by peer]
ujjain has joined #ruby
ujjain has quit [Changing host]
ujjain has joined #ruby
wldcordeiro_ has quit [Ping timeout: 252 seconds]
r_baron has quit [Ping timeout: 246 seconds]
chouhoulis has joined #ruby
tkuchiki has quit [Remote host closed the connection]
nettoweb has joined #ruby
chills42 has joined #ruby
tkuchiki has joined #ruby
chouhoulis has quit [Remote host closed the connection]
chouhoulis has joined #ruby
phutchins has joined #ruby
Kallis has joined #ruby
khebbie has joined #ruby
chipotle has joined #ruby
tkuchiki has quit [Remote host closed the connection]
freezevee has joined #ruby
<jhass>
shevy: also have a look at TOML for some more formalized ini
dionysus69 has quit [Ping timeout: 246 seconds]
tcopeland has quit [Quit: Leaving.]
tkuchiki has joined #ruby
Trieste has quit [Ping timeout: 268 seconds]
Neverdie has joined #ruby
jgt1 has quit [Ping timeout: 265 seconds]
Trieste has joined #ruby
tkuchiki has quit [Remote host closed the connection]
chthon has joined #ruby
dhjondoh has joined #ruby
chipotle has quit [Ping timeout: 268 seconds]
khebbie has quit [Remote host closed the connection]
moeabdol has joined #ruby
rubie has joined #ruby
charliesome has joined #ruby
symm- has quit [Ping timeout: 260 seconds]
lulzmachine has joined #ruby
Siyfion has joined #ruby
FernandoBasso has joined #ruby
khebbie has joined #ruby
rubie has quit [Ping timeout: 265 seconds]
<shevy>
ok
deg_ has joined #ruby
stamina has joined #ruby
scaceres has joined #ruby
<scaceres>
hello guys, I need help
lampshades has joined #ruby
<scaceres>
I installed all the gems inside a gemfile, but as I try running my application, I get a "Could not find naught-1.0.0 in any of the sources" error
<scaceres>
when I do find naught, I get /var/lib/gems/2.1.0/gems/naught-1.1.0/lib/naught
<scaceres>
so it is there, just that my app is not seeing it
<scaceres>
I can see the /var/lib/gems/2.1.0 direcotry in gem paths when using `gem env`
<scaceres>
any ideas why?
<scaceres>
is it because its the wrong version?
drptbl has joined #ruby
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
unholycrab has quit [Ping timeout: 240 seconds]
unholycrab has joined #ruby
yfeldblu_ has quit [Ping timeout: 246 seconds]
vdamewood has joined #ruby
platosha has quit [Quit: This computer has gone to sleep]
dotix has quit [Ping timeout: 240 seconds]
<adaedra>
How did you install the gems from the Gemfile?
platosha has joined #ruby
choke has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Kallis has quit [Remote host closed the connection]
brendan- has joined #ruby
fxn has quit [Ping timeout: 246 seconds]
zacts has quit [Ping timeout: 256 seconds]
zacts has joined #ruby
<[spoiler]>
Am I the only one who's cracking up at the fact a gem called "naught" can't be found?
<[spoiler]>
This is the best error message ever
<scaceres>
adaedra: bundle install
but3k4 has joined #ruby
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<[spoiler]>
scaceres: how are you running your application?
<[spoiler]>
scaceres: but yes the version mismatch might be the cause of your problems :/
<scaceres>
[spoiler]: it's actually dashing, so just `dashing start`
<[spoiler]>
and depends on how you're including naught, too
lampshades has quit [Remote host closed the connection]
syath has joined #ruby
<[spoiler]>
scaceres: try `bundle exec dashing start` but since it installed the gems globally (I assume) it shouldn't really make a difference
howdoicomputer has joined #ruby
<[spoiler]>
try just in case though
<jhass>
scaceres: which exact command do you run your application with?
mrityunjay has quit [Quit: Leaving]
<jhass>
oh, sorry too slow
<scaceres>
[spoiler]: I'm not including naught, I think is it a dependency on other gems I am using. I can see it on the Gemfile.lock file.
<jhass>
+1, try bundle exec dashing start
<scaceres>
[spoiler]: tried `bunflr exec dashing start`, not working :/
<[spoiler]>
bunflr :D
<izzol>
hmm, there is no way to connect to the IP:port using net/http? I don't have any domain but I need to do some things using HTTP.
<scaceres>
[spoiler]: I meant bundler :D
mary5030 has joined #ruby
<jhass>
scaceres: on the same shell you successfully ran bundle install prior?
<[spoiler]>
izzol: you should be able to pass in the IP
devoldmx has joined #ruby
ldnunes has joined #ruby
<[spoiler]>
scaceres: try `bundle install --path .bundle` and then `bundle exec dashing start`
<scaceres>
[spoiler]: oh duh I just realized my mistake
<scaceres>
I feel like a moron
<scaceres>
basically I wasn't using the gemfile.lock when installing the gems
<[spoiler]>
You weren't? Doesn't bundler use that by default if it's present
<scaceres>
yes it does, but I'm running it on a docker container while building
<scaceres>
so I just copied the gemfile and ran the command
<[spoiler]>
Oh!
<scaceres>
layer 8 issue
krz has joined #ruby
greenarrow has quit [Quit: 500]
<izzol>
[spoiler]: you right, I had a typo.
UtkarshRay has quit [Remote host closed the connection]
ldnunes_ has joined #ruby
devoldmx has quit [Ping timeout: 268 seconds]
Gnomethrower has quit [Read error: Connection reset by peer]
iamninja has joined #ruby
<Pathfinder>
Hey guys, How do I authenticate to a FIX protocol
pawnbox has quit [Remote host closed the connection]
<[spoiler]>
izzol: typos are the source of 80% of my bugs (statistics fake; apeiros will probably say it's higher)
pawnbox has joined #ruby
* apeiros
doesn't know nothing about [spoiler]'s bugs
<[spoiler]>
Pathfinder: first you need to create a BUG, then open an ISSUE and then you can FIX it
Gnomethrower has joined #ruby
Gnomethrower has quit [Changing host]
Gnomethrower has joined #ruby
ldnunes has quit [Ping timeout: 240 seconds]
<Pathfinder>
I have never used this specification before, I am lost on even where to begin having reared some 48page PDF. Being used to REST protocols, this is extremely strange
<[spoiler]>
apeiros: yeah but I remember you having an inquiry about why I'm so inept at typing (I even installed the aspell plugin for weechat to make stuff red so I notice the typos)
krz has quit [Ping timeout: 246 seconds]
<apeiros>
[spoiler]: ah, I remember
<[spoiler]>
:D
<Pathfinder>
I am looking for pointers ... Like a FIX ruby hello world
khebbie has quit [Remote host closed the connection]
UtkarshRay has joined #ruby
<[spoiler]>
Pathfinder: that is FIX?
<[spoiler]>
s/that/what
<scaceres>
anyways, thank you all guys
iamninja_ has joined #ruby
<Pathfinder>
Financial Information Exchange Protocol
<ruboto>
scaceres, Though inclusion was probably intended, not everyone relates to being "one of the guys". Maybe consider using "folks", "all", "y'all", or "everyone" instead?
<Pathfinder>
Its a protocol that is used by trading applications for communications.
<bodgix>
I'm playing with PTY::spawn. I've been struggling with this for some time now.
<bodgix>
I'm using expect to find something in the output, but I don't know how to know that the command has finished. I'm thinking maybe to set the prompt to something I will be looking for?
<Pathfinder>
[spoiler]: To be honest, I have already seen that and I still have no idea what is going on ..... I think I need a good nap first :)
greenarrow has joined #ruby
<[spoiler]>
Pathfinder: there's no documentation for that gem (that I can find) lol
<bodgix>
In other words how do I know that what I'm seeing on the terminal is no longer an interactive command but I'm back in the shell
<[spoiler]>
I have no idea, sorry. :/
timonv has joined #ruby
ndrei has joined #ruby
jenrzzz has joined #ruby
skade has joined #ruby
khebbie has joined #ruby
drptbl_ has joined #ruby
prestorium has joined #ruby
DoubleMalt has quit [Ping timeout: 252 seconds]
pwnd_nsfw has joined #ruby
drptbl has quit [Ping timeout: 250 seconds]
<scaceres>
ruboto: you're right. thank you everyone.
<scaceres>
you're great (everyone)
jkldfhcx has quit [Quit: WeeChat 1.3]
Ropeney has joined #ruby
Ropeney has quit [Remote host closed the connection]
jenrzzz has quit [Ping timeout: 264 seconds]
codenapp_ has joined #ruby
Salehi has quit [Remote host closed the connection]
codenapper has quit [Ping timeout: 255 seconds]
devdazed has joined #ruby
karapetyan has joined #ruby
sepp2k has joined #ruby
infoget has joined #ruby
nateberkopec has joined #ruby
infoget has quit [Quit: Leaving.]
infoget has joined #ruby
Coldblackice has quit [Ping timeout: 265 seconds]
<infoget>
Hi folks, (["1"] && ["1","2","3","4"]).count, I would like to get conformity of the arrays (1) insteed of I get count of last array => 4, how can I achieve it short way?
karapetyan has quit [Ping timeout: 250 seconds]
<Ox0dea>
infoget: One `&`, not 2.
<infoget>
oh man, thanks, my inattention...
<Ox0dea>
Happy to help.
ldnunes_ has quit [Quit: Leaving]
ldnunes has joined #ruby
ndrei has quit [Ping timeout: 264 seconds]
Hounddog has quit [Remote host closed the connection]
JDiPierro has joined #ruby
victortyau has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
<apeiros>
freezevee: you can write the code first too. the point is that you want to load the gem to *test* your change. and that's better done by actually writing a test.
saddad has joined #ruby
youngbaks has quit [Read error: Connection reset by peer]
sw has quit [Quit: Leaving]
Hrorek has joined #ruby
nowhereFast has joined #ruby
<freezevee>
apeiros: thank you
freezevee has quit []
<nowhereFast>
I'd like a count of the same type of object in an array
<nowhereFast>
is there a way to do this in a single step?
drptbl has joined #ruby
p0wn3d_ has quit [Quit: WeeChat 1.3]
<apeiros>
nowhereFast: Array#count
<apeiros>
or actually: yes :-p
<nowhereFast>
took a look at that, but the objects are not text
<apeiros>
nowhereFast: so?
bigbadbear has joined #ruby
p0wn3d_ has joined #ruby
<nowhereFast>
so arr.count(Peanuts) < where Peanuts is the name of the class of the object would work?
monod has quit [Quit: Sto andando via]
<apeiros>
Array#count is not limited to String objects. it actually has absolutely no specialization for Arrays of Strings
<apeiros>
nowhereFast: no
<apeiros>
you'll have to provide a block
<nowhereFast>
and that block will perform some type of iter?
p0wn3d_ has quit [Client Quit]
<apeiros>
nowhereFast: you do know how to access & read documentation?
nateberkopec has quit [Quit: Leaving...]
<apeiros>
nowhereFast: „If a block is given, counts the number of elements for which the block returns a true value.“ - straight from the docs.
kobain has joined #ruby
p0wn3d_ has joined #ruby
eGGsha has joined #ruby
<nowhereFast>
right, but my question was for a single step
<nowhereFast>
I get you can do it with a block
chills42 has quit [Remote host closed the connection]
lsmola has quit [Ping timeout: 240 seconds]
suchness has joined #ruby
<nowhereFast>
but I was more curious about whether ruby has another way
<Papierkorb>
nowhereFast: no. use blocks.
<apeiros>
nowhereFast: then maybe next time define "single step" and show us what you've already done.
tvon has joined #ruby
decoponio has joined #ruby
ramfjord has joined #ruby
tvon has quit [Client Quit]
tatsuo has joined #ruby
Macaveli has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
pyon-dense is now known as pyon-cps
blackmesa has joined #ruby
rbennacer has quit [Read error: Connection reset by peer]
<corpsicle>
yea doesnt say anything specificly about strings does it?
<apeiros>
corpsicle: basically it compares the codepoints
catcher has joined #ruby
<adaedra>
the first one explains how > works basically, the second how <=> works for strings
khebbie has quit [Remote host closed the connection]
p0wn3d_ has quit [Quit: WeeChat 1.3]
<apeiros>
or rather the bytes
hayricicek has quit [Ping timeout: 264 seconds]
<corpsicle>
im just curious because ive been tasked with managing some old scripts and noticed there was a > comparison of two numbers, except the varables compared contained strings
<corpsicle>
converting to int made it work like expected ... but it obviously must have worked before ... maybe just lucky? =P
<apeiros>
corpsicle: well, that'll not do a numerical comparison
<corpsicle>
yea exactly
<apeiros>
just lucky, yes. nothing changed in that regard.
<adaedra>
it's a basic string comparaison like
<adaedra>
s/ like//
stankley has quit [Quit: rcirc on GNU Emacs 24.5.1]
<apeiros>
"10" is < than "2", while 10 is > than 2
X-Jester has joined #ruby
<corpsicle>
heh right, oh well. fixed now =)
<corpsicle>
thanks
<X-Jester>
hi all, hoping someone has experienced this problem and found a solution.. has anyone seen *terrible* scp performance from the net-scp gem using CRuby 1.9.3?
bigmac has quit [Ping timeout: 240 seconds]
<X-Jester>
scp from the command line runs at ~58MB/s, net-scp transfers at ~400KB/s, even with :chunk_size increased to varying powers of 2
wildlander has joined #ruby
<apeiros>
X-Jester: have you tried newer ruby versions too?
<adaedra>
you should update your ruby tho
<X-Jester>
apeiros: i haven't, we're baselined (cough...dod...cough) at 1.9.3
<adaedra>
even if it's maybe not related
<X-Jester>
i am running the latest patchlevel of 1.9.3
<adaedra>
:x
<apeiros>
X-Jester: might still be worth a try just to check whether it might be an issue in that version
infoget has quit [Quit: Leaving.]
hashrocket has joined #ruby
<X-Jester>
apeiros: fair put, i'll give that a try first
drptbl has joined #ruby
drptbl has quit [Client Quit]
nateberkopec has quit [Read error: Connection reset by peer]
nateberkope has joined #ruby
k3asd` has joined #ruby
nateberkope has quit [Read error: Connection reset by peer]
nateberkopec has joined #ruby
leat1 has joined #ruby
bigmac has joined #ruby
Swappticon has joined #ruby
rodfersou has joined #ruby
Pupeno_ has left #ruby [#ruby]
TheNet has joined #ruby
<TheNet>
is there a method to return the first value of an array then rotate the array by 1?
webguynow has quit [Ping timeout: 240 seconds]
<apeiros>
TheNet: I don't think so. but you can do it in two method calls.
webguynow has joined #ruby
roger_rabbit has quit [Ping timeout: 250 seconds]
inteq has joined #ruby
tjohnson has joined #ruby
<X-Jester>
apeiros: no improvement on 2.2.2p95 :\
wca has joined #ruby
<X-Jester>
and, fwiw, it is the latest net-scp gem
jas02 has quit [Quit: jas02]
ytti has left #ruby [#ruby]
ytti has joined #ruby
devoldmx has joined #ruby
jhooker has joined #ruby
<apeiros>
X-Jester: ok, so not a version specific bug. a factor 100 sounds like a bug to me. I'd probably open an issue on the project.
wca has left #ruby [#ruby]
aldodelgado has joined #ruby
wca has joined #ruby
<wca>
hi, is there a way to setup byebug so it can be attached to a process at any point in the future, without requiring an automatic breakpoint? Similar to gdb for C programs?
<TheNet>
apeiros: a.rotate!.first ?
<apeiros>
.last actually
<TheNet>
oh yeah
<apeiros>
otherwise you get the first element after rotating
t0rc has quit [Quit: WeeChat 1.3]
p0wn3d_ has joined #ruby
p0wn3d_ has quit [Client Quit]
lulzmachine has quit [Quit: Connection closed for inactivity]
<shevy>
hmm what was the .map variant with index? was it .map.with_index ?
p0wn3d_ has joined #ruby
law__ has joined #ruby
devoldmx has quit [Ping timeout: 260 seconds]
<havenwood>
shevy: or map_with_index
<shevy>
ah
<apeiros>
that one does not exist havenwood
<apeiros>
only each_with_index does
<havenwood>
apeiros: oh, and that, hahaha
<havenwood>
shevy: ^ I've had *zero* coffee, witness...
DexterLB has quit [Read error: Connection reset by peer]
TheNet has quit [Remote host closed the connection]
r0x0rZ has joined #ruby
Neverdie has joined #ruby
mbff has joined #ruby
timonv has quit [Ping timeout: 240 seconds]
<mbff>
Question: I have a simple rack/sintra app that connects to a postgres database on start. How can I cleanly close the database connection when unicorn or rerun (in development) stops the process?
djbkd has quit [Ping timeout: 265 seconds]
key_ has joined #ruby
jxv has joined #ruby
<mbff>
can I list commands to be run when someone does CTRL-C for instance?
MichaelSmith has joined #ruby
<wasamasa>
you can catch an exception and handle it
<mbff>
wasamasa, good idea
DexterLB has joined #ruby
<wasamasa>
somewhere on the top level ideally
<mbff>
So would I need to wrap my entire app in a begin end block for SystemExit then?
arup_r has joined #ruby
<key_>
ctrl-c is not an exception, i believe you will need to create a signal handler
FernandoBasso has quit [Quit: Leaving]
<mbff>
that seems a little funky
howdoicomputer has quit [Ping timeout: 255 seconds]
<wasamasa>
hm, maybe I was thinking of python then
<wasamasa>
where I did indeed wrap the main function in a try-catch
<Ox0dea>
I do like FrozenCore; I just don't like that nobu has made it ever harder to properly access it.
JDiPierro has joined #ruby
<Ox0dea>
It just doesn't feel in line with "the Ruby way".
<shevy>
yeah well
TheNet has joined #ruby
<shevy>
nobu ain't matz!
<shevy>
hey
<shevy>
nobody ain't matz!!!
<shevy>
who was nobody
<shevy>
?jhass
<ruboto>
jhass is anybody. They're a member of the op staff in #ruby, contributor to ruboto and ruby-community.com
<shevy>
hmm
freerobby has quit [Quit: Leaving.]
pietr0 has joined #ruby
freerobby has joined #ruby
codecop has joined #ruby
d5sx43 has joined #ruby
deg_ has quit [Read error: No route to host]
d5sx43 has quit [Client Quit]
TheNet has quit [Remote host closed the connection]
vickleton has joined #ruby
havenwood has joined #ruby
<shevy>
I have a ruby question... in ruby we can do: x = true; if x; puts 'bar'; end if true ... <-- is there another language in where you can make conditional checks like that? it looks like a 'L' code structure in code... https://gist.github.com/shevegen/6325cd73e9b5a26e901b
dpp has joined #ruby
<nofxx>
shevy, if x && true, also reads better?
<shevy>
yeah sure but this is how it's done everywhere
<shevy>
I want to know why ruby has the additional variant
<Ox0dea>
shevy: Post-conditionals can be attached to any expression in just about every language in which they're supported.
<Ox0dea>
Perl comes to mind.
ramfjord has joined #ruby
<shevy>
perl had this feature?
<Ox0dea>
Indeed.
<Ox0dea>
Still does, of course.
<dpp>
for some generic random ruby script, what is the best way to distribute it within a closed ecosystem? (ie: no github or rubygems.org, etc)?
<shevy>
dpp a .gem file
<Ox0dea>
dpp: You don't have to use rubygems.org to distribute a gem.
TheNet has joined #ruby
<dpp>
and is it generally OK to have that gem produce the link in /usr/bin as well?
<Ox0dea>
dpp: Are you expecting users not to have a Ruby environment, then?
kies^ has quit [Ping timeout: 246 seconds]
<nofxx>
shevy, I'm against if like that, but I'm pro end.map end.reduce etc... (which rubocops doesn't like)
siemprefresco has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<dpp>
no, the objective is just to have a clean way to distibute some command line tools
<dpp>
my other option is to pack them into an RPM file, but that seems wrong.
dopamean_ has joined #ruby
<shevy>
dpp what do you mean with "OK", do you have a problem with it? if not then it's ok of course :D
<nofxx>
dpp, I would say curl ftw!
<Ox0dea>
dpp: Just package $thing as a gem and change the source in the Gemfile.
<nofxx>
dpp, think homebrew install way
siemprefresco has joined #ruby
<shevy>
you could also bundle all other gems into a giant gem that requires all the other ones!
spider-mario has joined #ruby
drewo has joined #ruby
David27 has quit [Quit: Going offline, see ya! (www.adiirc.com)]
mwlang has joined #ruby
ndrei has quit [Ping timeout: 264 seconds]
jenrzzz has joined #ruby
agent_white has joined #ruby
chipotle has quit [Ping timeout: 240 seconds]
<Bish>
can i somehow create tables from an sequel model?
<Bish>
or is this not wanted for some reason / is it only there to do associations
davedev24 has joined #ruby
linux_dr has joined #ruby
infoget has quit [Quit: Leaving.]
bougyman has quit [Ping timeout: 250 seconds]
chipotle has joined #ruby
last_staff has quit [Ping timeout: 265 seconds]
mary5030_ has joined #ruby
bigmac has quit [Ping timeout: 264 seconds]
jenrzzz has quit [Ping timeout: 244 seconds]
agent_white has quit [Client Quit]
<linux_dr>
I am addmittedly a Ruby newbie, but was wondering if a well seasoned Rubyist could look over a Vagrantfile exceprt, and suggest how I might be able to streamline it? https://gist.github.com/loren-osborn/06a6e8a95a235266dcdf
suchness has quit [Remote host closed the connection]
<linux_dr>
shev: thanks… good catch
<shevy>
I assume the code is ok otherwise
<shevy>
if it were my code I'd get rid of the @@ but it's probably not necessary
<linux_dr>
It works… but it’s tying into some Vagrant event-soup that I’d love to make immensely simpler. :-/
polishdub has quit [Quit: Leaving]
d5sx43 has joined #ruby
<linux_dr>
shev: The concern is that I don’t think I have control over the instantiation of either object, so putting the value into a class variable allows me to pass data to an instance that I never see created.
kidoz has quit [Quit: Ухожу я от вас]
ta has joined #ruby
<linux_dr>
(unless I can parameterize the class itself?)
d5sx43 has quit [Client Quit]
fantazo has joined #ruby
agent_white has left #ruby [#ruby]
failshell has joined #ruby
agent_white has joined #ruby
<linux_dr>
I did want to keep the manifest (data) distinct from the rest of the code.
nanoz has joined #ruby
polishdub has joined #ruby
<shevy>
you could set instance variables on the class level; class Foo; @count = 0; def self.count_up; @count += 1; end; def self.count?; @count; end; end
webguynow has quit [Ping timeout: 268 seconds]
webguynow has joined #ruby
<shevy>
but it would actually lead to more code in your case, so probably @@ is better
dionysus69 has joined #ruby
bampersand has joined #ruby
<Ox0dea>
cyberweb-0.0.140 $ grep -R @@ | wc -l
<Ox0dea>
14
<Ox0dea>
Naughty, naughty.
TheNet has joined #ruby
staticat has joined #ruby
ndrei has joined #ruby
<linux_dr>
shevy: I hear you, but I don’t think i’m ever exposed to the instances of either class… They are created out of any context of where this is.
bb010g has joined #ruby
TheNet has quit [Remote host closed the connection]
<linux_dr>
shevy: do you see anything I’m doing that’s overly wasteful or needlessly verbose?
<shevy>
Ox0dea yeah - copy/paste from ruby cgi stdlib
<shevy>
linux_dr dunno, I don't know vagrant. You also have like no docu!
poli_ has quit [Ping timeout: 264 seconds]
<shevy>
oh I know what
TheNet has joined #ruby
<shevy>
exec "vagrant #{ARGV.join(' ')}"
<linux_dr>
I, for instance, don’t like the way I translate between :required, :prohibited / :install, :uninstall / 'Installing’, 'Removing' / 'Installation’, 'Removal'
pawnbox has quit [Remote host closed the connection]
<shevy>
perhaps it's fine for your script but otherwise, it would be better to pass arguments to the method, rather than directly use ARGV
pawnbox has joined #ruby
pawnbox has quit [Remote host closed the connection]
<linux_dr>
exec takes an array of args? That would probably be better… except the whole idea of ripping the carpet out from under the current process with exec makes me nervous.
linuxboytoo has quit [Remote host closed the connection]
<shevy>
unfortunately that one uses at_exit ... I am really not liking at_exit much at all
<eam>
however if ARGV == [] and 'vagrant' is instead a string with shell metachars you may still invoke a shell
<eam>
the above noshell_exec function is the only way to guarantee you don't run a shell
chipotle has joined #ruby
<havenwood>
Demetrio: Have a Ruby question?
cndiv has joined #ruby
<shevy>
lol
<Demetrio>
Sorry, between this and work.
TheNet has quit [Read error: Connection reset by peer]
<Ox0dea>
Don't let it fool ya.
<shevy>
the banhammer is wielded already!
kostiak has quit [Ping timeout: 246 seconds]
<Ox0dea>
The pyre is nice and warm.
<shevy>
and this time he had enough coffee
leat1 has joined #ruby
<Ox0dea>
Go on, havenwood. Show us your boomstick.
<shevy>
otherwise his aim may not be perfect
User458764 has joined #ruby
<cndiv>
Hey all, sort of an abstract Ruby (OO programing in general, I guess) question. How do you all sit down and start writing something? Determine what classes are needed? Decide what goes in what class? I hope that makes sense.
<linux_dr>
eam: I don’t think avoiding the shell is particularly critical, at least in this case…. I’m basically restarting the currently executing process from the begining
Demetrio is now known as Demetrio_
<eam>
all the ruby is scrolling off my screen :(
Zai00 has quit [Quit: Zai00]
Demetrio_ has left #ruby [#ruby]
sousvide has quit [Ping timeout: 246 seconds]
<Ox0dea>
cndiv: Read POODR. ;)
opensource_ninja has joined #ruby
<Ox0dea>
Not being entirely facetious, mind.
<cndiv>
POODR?
<baweaver>
Practical Object Oriented Design in Ruby
SCHAAP137 has quit [Quit: Leaving]
<cndiv>
baweaver: That's a very practical answer, looking that up...
TheNet has joined #ruby
<havenwood>
!ban Lovich !P repeated trolling
<ruboto>
havenwood, could not find a matching user for "Lovich"
kirun has joined #ruby
getDrunk has joined #ruby
<cndiv>
baweaver: Ha, that's exactly what I'm looking for. Is this is a popular title in the Ruby universe?
<shevy>
cndiv that's a rather general question. I think it depends a lot on how big the given project is
<baweaver>
indeed it is
fostertheweb has joined #ruby
<shevy>
for small code, or smaller changes, I usually need to change only one line, or perhaps add one or two new methods
<shevy>
mostly it is for what I need right now; or I write it in a todo file and go through it everyone now and then
getDrunk is now known as Demetrio
<cndiv>
shevy: yeah, I'm new, I'm just starting to recognize where my creation path hiccups will be. Naming things and laying out ahead of time.
Demetrio has left #ruby [#ruby]
Ox0dea has quit [Read error: Connection reset by peer]
<shevy>
I try to name things in a way that would make the most sense to me; secondary goal is to be terse, but often I write more rather than less when it comes to giving things a name
Ox0dea has joined #ruby
sheperson has joined #ruby
<sheperson>
Hi
stamina has quit [Ping timeout: 250 seconds]
<havenwood>
sheperson: hi
<baweaver>
sheperson: alo
<shevy>
lol
<shevy>
the nick
<cndiv>
shevy: That makes total sense, but at the moment I'm working my way through the course, and I'm tempted to add "training wheels" to myself and name things like "Foo_class" and "bar_method" and "a_foo" just to not confuse them.
<cndiv>
*an online course, I mean
<shevy>
no
<cndiv>
why's that
<sheperson>
I am trying to write a class which reads all lines of a file and if valid, it will yield each line (after some parsing) using #each
<shevy>
try to give things a name as to what they can do
<shevy>
you can think of methods as designations what the specific class should do
<shevy>
class BuildDam
<baweaver>
sheperson: Just use IO.readlines
<sheperson>
when the file is valid, I return yield the parsed lines
<shevy>
baweaver uses this class to build a dam
<sheperson>
I wonder what should I do when the file is not valid?
<baweaver>
tag a conditional on the end to check if the file exists
rakm has joined #ruby
<cndiv>
Can I think of classes as verbs?
<baweaver>
raise an error
<baweaver>
cndiv: nouns, you're thinking FP
<shevy>
cndiv well, class House ... class Car ... don't think these be verbs
hayricicek has joined #ruby
<baweaver>
in which you tend to describe something in the terms of the actions you can perform on it.
<cndiv>
baweaver: Sorry, should know, FP?
bigmac has joined #ruby
<eam>
linux_dr: I didn't read too close, but I always worry whenever Hash is used with {}
<eam>
recommend using a method for that probably
<baweaver>
cndiv: ruby is a mix between the two
<sheperson>
baweaver: raise and error?
<shevy>
cndiv I think you start from the wrong way, you should first think "what do I need to achieve specific goal xyz", and once you have that, you can model your methods and classes towards that goal
<baweaver>
OO and FP
dotix has joined #ruby
phutchins has quit [Ping timeout: 272 seconds]
<sheperson>
:-|
TheNet has quit [Remote host closed the connection]
<cndiv>
baweaver: Ah, Ruby is my first language. Functional programming is outside of my mind right now.
<Ox0dea>
cndiv: Too bad. :P
<baweaver>
too many people make it out as some big complicated thing, it's really not.
leat1 has quit [Remote host closed the connection]
<cndiv>
Ox0dea: not forever, just for the moment
<baweaver>
cndiv: you know blocks in ruby?
grenierm has joined #ruby
<Ox0dea>
^
<nofxx>
exactly. You're doing something FP and don't even know cndiv
<cndiv>
baweaver: Not yet, no.
<linux_dr>
eam: I’m pretty unfamiliar with Ruby… I’m not sure what exactly you’re refering to
<baweaver>
and a block is a function. You passed a function, functional programming
* baweaver
ducks in anticipation of pedants
JoshL_ has joined #ruby
valeness has left #ruby [#ruby]
DLSteve has joined #ruby
<linux_dr>
baweaver: pedantics? Like a lambda is, and is not a function? ;-) lol
gix has joined #ruby
<Ox0dea>
linux_dr: How is a lambda not a function?
<baweaver>
like 'ruby is not a functional language in any way' types
<baweaver>
the same which say haskell isn't pure, but anyways, I digress.
SCHAAP137 has joined #ruby
<linux_dr>
Ox0dea: mostly in it’s being anonymous, but most languages have anonymous functions…
dotix has quit [Ping timeout: 264 seconds]
unholycrab has quit [Ping timeout: 264 seconds]
<tubbo>
my program functions. functional programming.
<linux_dr>
tubbo: lol
xfbs has joined #ruby
<tubbo>
as opposed to all this non-functional programming you people are apparently doing
<Ox0dea>
> Words mean what I say they mean.
JoshL__ has joined #ruby
JoshL_ has quit [Read error: Connection reset by peer]
doddok has joined #ruby
tvw has quit [Remote host closed the connection]
JoshL has quit [Ping timeout: 260 seconds]
<shevy>
cndiv don't get confused, keep things simple. it's a good strategy
<sheperson>
@baweaver If I raise an error, how should I write the spec to check for that?
* linux_dr
imagines the amused specter of Lewis Carol wafting into the channel… lol
speakingcode is now known as money2burn
<sheperson>
I know how spec a yield and how to spec an error
<baweaver>
expect { something }.to raise('error')
<sheperson>
but together, I have no idea!
<cndiv>
shevy: Yeah, that's my goal here. If it's reasonable, I'd like to think of classes as "nouns" and methods as "verbs"... but I'm not sure if that's a good way to think.
<sheperson>
but it’s #each and should be passed a block
<Ox0dea>
cndiv: Many methods are arguably "adjectives".
TheNet has quit [Quit: Leaving...]
<Ox0dea>
Array#size, as an example.
<cndiv>
Ox0dea: can anything be characterized as a "verb" then?
<Ox0dea>
cndiv: Array#each, I'd argue.
<cndiv>
Ox0dea: not quite there yet, but I'm taking notes.
unholycrab has joined #ruby
xfbs has quit []
roger_rabbit has joined #ruby
havenn has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<linux_dr>
cndiv: in “traditional” OOP (whatever that means) nouns typically map to classes, and verbs typically map to methods… but that’s supposed to be a guidepost only.
havenwood has quit [Ping timeout: 244 seconds]
Guest34844 has joined #ruby
dtzitz has joined #ruby
JoshL__ has quit [Read error: Connection reset by peer]
khebbie has joined #ruby
<cndiv>
linux_dr: Guideposts are good for me at this point. I won't take it as 1000% literal, always.
<cndiv>
thanks
<Ox0dea>
linux_dr: We don't say `foo.get_property` in Ruby, of course.
<cndiv>
Ox0dea: I get how they could be more 'adjectives' as well.
<Ox0dea>
cndiv: "Adjectiva" is the word you wanted there.
<Ox0dea>
*Adjectival
<Ox0dea>
It's not one you get to use terribly often.
<cndiv>
Ox0dea: Ha, really?
minimalism has joined #ruby
<Ox0dea>
cndiv: "Adjectival" is the adjectival form of "adjective", yes. :P
<cndiv>
Ox0dea: Also, why wouldn't you say 'foo.get_property' in Ruby?
<Ox0dea>
cndiv: Because we just say `foo.property`.
<linux_dr>
Ox0dea: I am an experiencied developer, but I know almost nothing about Ruby…
* cndiv
mind blown
shadoi has joined #ruby
leat1 has joined #ruby
<Ox0dea>
Also "shrieval" is the adjectival form of "sheriff", because English is bonkers.
jenrzzz has joined #ruby
User458764 has joined #ruby
<shevy>
cndiv you can model ruby code to read like terse english sentences/instructions. don't get hung up too much on literal programming as words/verbs/nouns, there are many ways to do things. Example - access the array element at the third position: array[2]
nettoweb has joined #ruby
hayricicek has quit [Ping timeout: 240 seconds]
baweaver has quit [Remote host closed the connection]
User458764 has quit [Client Quit]
<linux_dr>
Ox0dea: in that case, don’t foo.property and foo.property= methods that map to “traditional OOP” methods foo.get_property() and foo.set_property()?
<cndiv>
Ox0dea: So what about 'property' implies that you're 'getting' anything? What implies the action? I would have expected something like "property_get"
<Ox0dea>
linux_dr: Yes, that's right.
<shevy>
cndiv you can name the method that way, and use "alias" to refer to the main method that does it
<Ox0dea>
linux_dr: But the difference kind of breaks the "verb" analogy, don't you feel?
nettoweb has quit [Client Quit]
Juanchito has quit [Quit: Connection closed for inactivity]
<shevy>
so you can use set_property; you can use an alias called property_set, and you can use .property=
<Ox0dea>
cndiv: In the end, it's just a convention that makes a great deal of sense.
bigmac has quit [Ping timeout: 268 seconds]
dima_ has quit [Quit: This computer has gone to sleep]
<linux_dr>
Ox0dea: does it? in that case the get/set is implicit. (*almost* implicit in the case of property=)… because it’s trying to make the PURPOSE of exposing the PROPERTY more transparant?
<Ox0dea>
linux_dr: Ruby just doesn't make much of a distinction between methods and "actual" properties, so the line is considerably blurred.
blik71 has joined #ruby
<Bish>
can i tell irb to remain active after script execution?
<cndiv>
I'm thinking of it like a total n00b. I know I'm doing something with 'property' but don't recall exactly what I named it. I know in Atom (the editor I'm currently using) if I type in three characters of 'property' it'll show me the various options. Did I name it "property_get" or "property_add"? Etc.
drewo has quit [Ping timeout: 264 seconds]
<Bish>
when doing 'irb <script>'
<linux_dr>
Ox0dea: Yes… I get that… I was trying to give cndiv a frame of reference...
freerobby has quit [Quit: Leaving.]
dionysus69 has quit [Ping timeout: 256 seconds]
fantazo has quit [Ping timeout: 260 seconds]
freerobby has joined #ruby
<linux_dr>
cndiv: we were saying that classes map (roughly) to nouns… right?
freerobby has quit [Client Quit]
universa1 has quit [Ping timeout: 246 seconds]
sfr^ has quit [Ping timeout: 246 seconds]
<blik71>
hi guys quick question about file opening in ruby. write now im doing a method call where I'm passing in two functions as parameters with the same file as input. Does ruby have a problem with opening the same file during the same execution?
brendan- has quit [Read error: Connection reset by peer]
momomomomo has joined #ruby
sleungcy has joined #ruby
<shevy>
cndiv so your editor influences you? :D
elperdut has quit [Ping timeout: 240 seconds]
linc01n has joined #ruby
<shevy>
it's why I abandoned vim in the end
<Ox0dea>
Pfft.
brendan- has joined #ruby
<shevy>
a vimster!
leat1 has joined #ruby
<Ox0dea>
You abandoned Vim because it negatively influenced your code?
<shevy>
no
<shevy>
my brain
<shevy>
I wouldn't let vim touch my code
freezevee has joined #ruby
<momomomomo>
I use vim for everything from ruby to go to haxe
<momomomomo>
to scala
<momomomomo>
not java though
yfeldblum has joined #ruby
<cndiv>
shevy: Yes, actually. haha.
<shevy>
why not java?
<blik71>
what does the code do per say 0x0dea?
siemprefresco has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<freezevee>
I am trying to do sudo passenger-install-nginx-module while I have installed ruby 2.2 via rvm and checked with ruby -v but it keeps installing for the 1.9.3 version. What am I doing wrong ?
<nofxx>
shevy, 2. the first and only time in my life I punched the screen
<momomomomo>
using java dependencies is infrequent when I'm using scala (mostly for map/reduce)
<shevy>
nofxx your poor screen man! I hope you don't have a cat :D
<havenn>
freezevee: On your RVM Ruby: gem install passenger
<momomomomo>
for String.x.y.z.j.a.b.c implements a, z b f, I like an IDE
havenn is now known as havenwood
<shevy>
whoa that's a lot of redirection
elperdut has joined #ruby
codenapper has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<bricker>
not using an IDE for Java would be a really inefficient way to write Java
<momomomomo>
that's java
<shevy>
java is the top language at tiobe
<momomomomo>
because of universities
<momomomomo>
also, tiobe != real world
<dfockler>
because of business
HAL2328 has joined #ruby
<nofxx>
shevy, german shepperd... that thing is a war tank. Punch == 'he loves me and wants to play now'
khebbie has joined #ruby
<momomomomo>
the business -> education sectors are in a loop
xfbs has joined #ruby
<momomomomo>
it's feedback
newguy1 has joined #ruby
<freezevee>
havenwood: done that
<dfockler>
business wants butts, school makes the butts
<shevy>
it's sorta crazy what companies end up using languages for... twitter starting with ruby/ruby on rails... then moves literally everything to java + scala
<freezevee>
havenwood: rvm --default 2.2
yfeldblum has quit [Remote host closed the connection]
<freezevee>
and ruby -v = 2.2
<havenwood>
freezevee: What do you get for?: gem which passenger
<Ox0dea>
blik71: To clarify, you're passing actual File objects into those methods, right? Not filenames?
jaequery has joined #ruby
<tubbo>
shevy: what editor do you use now?
<havenwood>
shevy: Yet they still have Ruby and hire Ruby devs.
chills42_ has quit [Remote host closed the connection]
rbowlby has joined #ruby
momomomomo has quit [Ping timeout: 244 seconds]
chipotle has quit [Read error: Connection reset by peer]
mary5030 has joined #ruby
dtzitz has quit [Quit: dick pics]
yfeldblum has joined #ruby
elperdut has joined #ruby
siemprefresco has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<cyrus_mc>
using 1.9.3 and the error went away
<jhass>
mmh
<jhass>
I wonder if that your file is named git.rb is the issue
<jhass>
try renaming it
momomomomo has joined #ruby
<jhass>
1.8 might still have relative stuff in $LOADED_FEATURES
<jhass>
it has . in $LOAD_PATH anyhow
<jhass>
so you load the file itself again I guess
towski__ has joined #ruby
<cyrus_mc>
that was it .. lol .. doh.
<cyrus_mc>
thanks
chipotle has joined #ruby
duggiefresh has quit [Remote host closed the connection]
evanjs has quit [Quit: Leaving...]
sargas has joined #ruby
howdoicomputer has joined #ruby
leat1 has quit [Ping timeout: 246 seconds]
Alayde has quit [Ping timeout: 272 seconds]
<jhass>
cyrus_mc: 1.9 resolved that issue btw
towski_ has quit [Ping timeout: 246 seconds]
<jhass>
and is not even supported anymore, we're watching the clock for 2.0 ticking
<cyrus_mc>
k
chipotle has quit [Read error: Connection reset by peer]
chipotle has joined #ruby
karapetyan has quit [Remote host closed the connection]
karapetyan has joined #ruby
freerobby has quit [Quit: Leaving.]
<BraddPitt>
when creating a CLI client that uses the AWS gem, should I rescue AWS errors and put in my own (hopefully more descriptive) error messages, or just let the default AWS errors be thrown to the user?
<jhass>
well, I have painful experiences from duplicity hiding the AWS errors...
freerobby has joined #ruby
krz has quit [Quit: WeeChat 1.2]
Alayde has joined #ruby
<umgrosscol>
BraddPitt, you're writing a CLI program for a user of what technical level?
<umgrosscol>
BraddPitt, I have my own cli client using the aws api in ruby, but just let the errors show up. The only reason I catch them is to do cleanup.
<dfockler>
BraddPitt: Will your users more likely be able to debug your custom issues or AWS ones?
<BraddPitt>
the end user would be ruby developer
<BraddPitt>
s
chipotle has quit [Read error: Connection reset by peer]
failshell has quit [Remote host closed the connection]
<BraddPitt>
and I've included a link to the AWS error chart which I'm hoping would be enough to figure out what is wrong
<umgrosscol>
BraddPitt, if you're setting up a machine or vpc for them, and they'll have little knowledge of it's internal structure, you might just want to throw your own errors.
<BraddPitt>
its only creating/adding to/deleting S3 buckets
<shevy>
I don't want to watch a ticking clock jhass :(
<BraddPitt>
so nothing super technical, and I expect anyone using this CLI tool would be able to read the AWS errors and figure it out
<umgrosscol>
BraddPitt, because it's going to error out at some discrete step, so you should be able to log where it failed, and pick back up from that later.
chipotle has joined #ruby
<jhass>
shevy: you're on 2.2 right? everything's fine
jgt1 has quit [Quit: WeeChat 1.2]
<shevy>
yeah, but there is the future!
jgt has joined #ruby
<umgrosscol>
BraddPitt, maybe a message "Failed to delete bucket" "Failed to create bucket" and then the technical detail from the AWS error.
karapetyan has quit [Remote host closed the connection]
<BraddPitt>
hmmm yeah
karapetyan has joined #ruby
leat1 has joined #ruby
FernandoBasso has quit [Quit: Leaving]
sepp2k has joined #ruby
Neverdie has joined #ruby
unholycrab has quit [Ping timeout: 264 seconds]
dfockler has quit [Remote host closed the connection]
n008f4g_ has quit [Ping timeout: 260 seconds]
youngbaks has quit [Quit: WeeChat 1.3]
musicmatze has joined #ruby
macksim has joined #ruby
tomchapin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<musicmatze>
Hi rubyists. Why does Pathname#+ work not as expected when doing `Pathname.new("/tmp") + "/"` ? The expected result would be Pathname.new("/tmp/"), but is Pathname.new("/") - or am I wrong here?
araujo has quit [Quit: Leaving]
<musicmatze>
Ruby 2.2.0
<jhass>
musicmatze: you should use Pathname#join to construct the final path
<jhass>
why do you need a trailing /?
Alina-malina has quit [Ping timeout: 264 seconds]
leat1 has quit [Remote host closed the connection]
<musicmatze>
jhass: Because I do not know a better way how to check whether a path is a path to a directory or a file
leat1 has joined #ruby
stamina has joined #ruby
<jhass>
Pathname#directory? / Pathname#file?
<Ox0dea>
jhass: Or even just File instead of Pathname there.
<jhass>
they already have a Pathname, why not use it
<musicmatze>
but Pathname#join does the same "mistake" ... Pathname.new("/tmp").join("/") returns Pathname:"/"
duggiefresh has joined #ruby
dmolina has joined #ruby
<Ox0dea>
That does kinda look like a bug.
<musicmatze>
>> Pathname.new("/tmp").join "/"
<ruboto>
musicmatze # => uninitialized constant Pathname (NameError) ...check link for more (https://eval.in/433943)
<musicmatze>
oh, okay...
<musicmatze>
Ox0dea yes, looks like a bug to me, too.
syath has quit [Quit: WeeChat 1.2]
<jhass>
musicmatze: Pathname normalizes the path, trying to control it's specific look is misuse
leafybasil has joined #ruby
<jhass>
it's quite intended behavior I think
<darix>
well ... unless you feed those paths into rsync,cp and so on ... the trailing slash is actually meaningless
<musicmatze>
seems so. I will check whether I can use Pathname#directory? and the like
<musicmatze>
thank you guys
<jhass>
?guys musicmatze
<ruboto>
musicmatze, Though inclusion was probably intended, not everyone relates to being "one of the guys". Maybe consider using "folks", "all", "y'all", or "everyone" instead?
<darix>
with rsync no trailing slash or trailing slash can be important.
<musicmatze>
jhass: ah, okay, will do so in future, thanks for pointing out!
Coldblackice has joined #ruby
dstarh has joined #ruby
<musicmatze>
ah, ... a follow up question: When using Pathname#directory? It returns false if the directory does not exist, right?
<Ox0dea>
?try musicmatze
<ruboto>
musicmatze, Why don't you try it and see for yourself?
<musicmatze>
well, I tried it and now my tests fail... ... so I'm asking for an alternative here... :-)
<Ox0dea>
musicmatze: How were you previously checking whether some path was a directory?
<Ox0dea>
By the presence of a trailing slash, presumably?
<musicmatze>
with the trailing slash, yes.
<musicmatze>
I know this is kinda ugly, but I don't know a better way
<jhass>
well, that's wrong, as darix pointed out
<jhass>
?xy
<ruboto>
it seems like you are asking for a specific solution to a problem, instead of asking about your problem. This often leads to bad solutions and increases frustration for you and those trying to help you. More: http://meta.stackexchange.com/a/66378
<Ox0dea>
musicmatze: Use #directory? and fix your tests. ;)
<Ox0dea>
musicmatze: Do these paths you're working with actually exist on your system?
alicanyilmaz has joined #ruby
alicanyilmaz has left #ruby [#ruby]
<musicmatze>
Ox0dea: That's not the point. I have to check whether a path is a directory-path or file-path. After that, I can create the file or directory.
linuxboy_ has joined #ruby
<musicmatze>
No they do not necessarily exist, but they can.
<Ox0dea>
So you have to disambiguate between files and directories at the string level...
<musicmatze>
you mean that's the only way to do it?
Voker57 has quit [Read error: Connection reset by peer]
<Ox0dea>
Well, it seems you're not working with anything more concrete than strings, so yeah. :/
<darix>
musicmatze: using a trailing slash as a marker is just ugh
<musicmatze>
darix: yep
<darix>
musicmatze: try to explain the problem you are actually trying to solve as ruboto pointed out
elperdut has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Ox0dea>
musicmatze: Do you know the `touch` utility?
decoponio has quit [Quit: Leaving...]
diegoviola has quit [Ping timeout: 256 seconds]
linuxboytoo has quit [Ping timeout: 246 seconds]
<jhass>
I guess the problem is a bad API definition
Vile` has quit [Read error: Connection reset by peer]
<musicmatze>
Okay. So I'm trying to write a gem for accessing the Filesystem in an ORM-like way. Where you can do `(Directory.new(tmp_pathname).tmp_subdirectory = Directory).subdirs` or similar things. For sanity I want to include some checks on #new whether the passed object is a pathname (or string) and check whether it actually points to a directory (even if it doesn't exist) or to a file. Directory.new(file_pathname)
<musicmatze>
would be illegal, of course.
diego2 has joined #ruby
<darix>
musicmatze: this is a silly approach
<musicmatze>
why?
<darix>
rsync -av /foo/bar /bar/foo/
diego2 has quit [Changing host]
diego2 has joined #ruby
<darix>
rsync -av /foo/bar/ /bar/foo/
<darix>
both are valid
<darix>
both behave totally differently
kyle__ has joined #ruby
<darix>
and if you really want to treat it like an orm
Vile` has joined #ruby
<darix>
then .subdir is calling a child object
<darix>
if the parent doesnt exist... error out
<musicmatze>
If the parent does not exist, it will be created
<darix>
that means your special check is never needed.
<musicmatze>
hm.
<musicmatze>
seems you are right here...
Synthbread has quit [Remote host closed the connection]
<musicmatze>
okay, it seems I have an API issue here :-)
<jhass>
^ if it exists check whether it's a file or directory, if it doesn't exist defer creation, create a directory if you want to create a file or directory beneath
zacts has quit [Ping timeout: 256 seconds]
<darix>
btw: FS is a pretty bad storage for ORM
sheperson has quit [Quit: sheperson]
<musicmatze>
okay, I guess I have to redesign my API, yes.
<darix>
e.g. if you want to have more attributes on directories....
<musicmatze>
darix: I'm not sure ORM is the right term here...
<darix>
special files
<darix>
or xattrß
<darix>
musicmatze: so why do you try to wrap the filesystem?
<musicmatze>
it is more like a library for simple filesystem access
<musicmatze>
because I don't like to write 10 lines of code just to create some folder structure in my application, I want to do it implicitely.
<shevy>
what directory will the above call create by the way?
<musicmatze>
hm, so my idea was a bad idea.
<darix>
not bad per se ... but not thought through :)
<musicmatze>
yes.
<darix>
you could e.g. create a MyFiles class
<musicmatze>
So it seems that FileUtils and Pathname are my friends now. Do they work together?
<darix>
which could hide the logic that it will try to create all it's parent dirs or so
<musicmatze>
yep
<darix>
musicmatze: File/FileUtils/Dir for operations on actual entries
<darix>
pathname for pathname manipulation
yardenbar has quit [Ping timeout: 252 seconds]
<shevy>
musicmatze fileutils should suffice, you can use FileUtils.mkdir_p() for recursively creating a directory
Matachines has joined #ruby
siemprefresco has joined #ruby
juanpablo_ has joined #ruby
dr3wo has joined #ruby
<Matachines>
Hi, new to Ruby. What's the best gem/framework to make command line apps? Not stuff like Unix command line apps but with a menu and stuff.
<Ox0dea>
Matachines: Do you mean a TUI and not a CLI, then?
hahuang65 has quit [Ping timeout: 256 seconds]
kyle__ has joined #ruby
jhooker has joined #ruby
<darix>
Matachines: ncurses might be kinda lowlevel but portable
<musicmatze>
darix shevy Ox0dea thank you all!
jhooker has quit [Max SendQ exceeded]
<Ox0dea>
musicmatze: Are you still gonna go for it, then?
unholycrab has joined #ruby
<Matachines>
Ox0dea Yeah I guess so! And I'll look into ncurses darix
jhooker has joined #ruby
<Ox0dea>
ncurses for directory creation?!
fmcgeough has quit [Quit: fmcgeough]
<Ox0dea>
What's it all coming to?
Macaveli has joined #ruby
<musicmatze>
Ox0dea I guess no. I will start writing the application itself, and not the helper library... and if I need something to make my application code simple, I can write a library then
<musicmatze>
:-)
drew0 has joined #ruby
juanpablo_ has quit [Ping timeout: 264 seconds]
<darix>
musicmatze: starting off with some helper functions covering the unless File.directory? File.dirname(fname) ; FileUtils.mkdir_p(File.dirname(fname)); end
<darix>
will probably go a long way to make your code smaller
dr3wo has quit [Ping timeout: 250 seconds]
ruby-lang818 has joined #ruby
skade has joined #ruby
ruby-lang818 has quit [Client Quit]
_orangejuice has joined #ruby
umgrosscol has quit [Remote host closed the connection]
p0wn3d_ has quit [Ping timeout: 260 seconds]
momomomomo has quit [Quit: momomomomo]
karapetyan has quit [Remote host closed the connection]
FernandoBasso has joined #ruby
<darix>
musicmatze: p=%w{foo bar foobar barfoo} ; File.join(*p)
rushed has joined #ruby
rushed has quit [Client Quit]
ldnunes has quit [Quit: Leaving]
hahuang65 has joined #ruby
<darix>
oh works even without *
jalcine is now known as jacky
tcopeland has quit [Ping timeout: 268 seconds]
JDiPierro has quit [Remote host closed the connection]
solocshaw has quit [Remote host closed the connection]
solocshaw has joined #ruby
Pupeno has joined #ruby
mary5030 has quit [Remote host closed the connection]
mary5030 has joined #ruby
baweaver has quit [Remote host closed the connection]
Macaveli has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dmolina has quit [Quit: Leaving.]
f00dMonsta has joined #ruby
TomyLobo has quit [Ping timeout: 255 seconds]
chrisco has joined #ruby
mclee_ has quit [Ping timeout: 244 seconds]
vF3hNGxc47h8 has joined #ruby
chrisco has left #ruby [#ruby]
chipotle has quit [Read error: Connection reset by peer]
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nettoweb has joined #ruby
luksaur has quit [Quit: Leaving]
bigmac has joined #ruby
chipotle has joined #ruby
mikecmpbll has joined #ruby
chouhoulis has quit [Ping timeout: 252 seconds]
kies^ has quit [Ping timeout: 246 seconds]
leat1 has joined #ruby
f00dMonsta has quit [Ping timeout: 260 seconds]
y0da has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jaequery has joined #ruby
chipotle has quit [Read error: Connection reset by peer]
bigmac has quit [Ping timeout: 246 seconds]
hahuang65 has quit [Quit: WeeChat 1.3]
hahuang65 has joined #ruby
vipaca has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
eminencehc has joined #ruby
nateberkopec has joined #ruby
bigmac has joined #ruby
<eminencehc>
What ruby method could I use for this? If i have sorted array: ["one", "two", "three"], given "two", how would I find which number it is in sequence. When given "two", I want it to return "2" because "two" is the second item in the array.
<wryfi>
what's the story with rbenv? it hasn't had a release in two years, but looks active. is it safe to use git master in prod? or should i be using the 2-yo 0.4.0?
<shevy>
it's dead jim
<eminencehc>
adaedra: Thank you
<adaedra>
you're welcome.
<shevy>
I'd use git
baroquebobcat has quit [Read error: Connection reset by peer]
<havenwood>
shevy: that's unrelated to the chruby project, well... it's unrelated to the maintainers of chruby at least :P
polishdub has quit [Quit: Leaving]
<shevy>
that also sucks :(
xfbs has quit []
jaequery has joined #ruby
<havenwood>
it's related to chruby, in the sense that it's a helper lib, but chruby is a Shell not Ruby
<havenwood>
is Shell*
dopamean_ has quit [Ping timeout: 240 seconds]
<wryfi>
chruby looks like what i was looking for, thanks guys
<BraddPitt>
last night someone (can't remember who) recommended me SCrypt library, but it turns out I'm looking for something different. I need something that will encrypt and then decrypt with a supplied password
<BraddPitt>
I've found a few, but are there any vetted ones?
<BraddPitt>
since, you know, security and all that
baweaver has quit [Remote host closed the connection]
nyon has quit [Quit: F...ix you, Emacs!]
pyon has joined #ruby
<Ox0dea>
BraddPitt: Why do you want to decrypt passwords?
sotojuan has joined #ruby
<BraddPitt>
they aren't necessarily passwords
<BraddPitt>
but
sotojuan has quit [Client Quit]
<BraddPitt>
I want to encrypt and decrypt with a password is what I mean
<ruboto>
BraddPitt # => /tmp/execpad-84642cedd69b/source-84642cedd69b:2: unterminated string meets end of file ...check link for more (https://eval.in/433962)
<BraddPitt>
bleh
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Pupeno has quit [Remote host closed the connection]
eminencehc has quit [Remote host closed the connection]
<pipework>
beauby: I'm not sure I understand what you're describing.
<drbrain>
beauby: look up each one in successive rescues
webguynow has quit [Ping timeout: 264 seconds]
eminencehc has joined #ruby
<beauby>
pipework: I have a class ::A::B::C, and I'm looking up a constant "D", however I would like the lookup to work as stated above
<Ox0dea>
drbrain: Exceptions for control flow?
<beauby>
I was wondering whether there was a clean way to do that
<Ox0dea>
beauby: Do you know about #const_get?
<drbrain>
beauby: you can use Array#find
[k- has quit [Ping timeout: 246 seconds]
<beauby>
Ox0dea: can't say I'm highly familiar with it, will look it up, cheers
karapetyan has quit [Ping timeout: 256 seconds]
TheRinger is now known as james_000_
iamvery has quit [Quit: ZNC - 1.6.0 - http://znc.in]
<Ox0dea>
beauby: Using #const_get and rescuing potential `NameError`s would work, but you might also consider using #constants and #include? to avoid using exceptions for control flow.
<drbrain>
Array#find + Object#const_get
iamvery has joined #ruby
<beauby>
drbrain: So basically, I'll have to build the lookup path manually, and then search it for `x.constants.include?(myconst)`
webguynow has joined #ruby
iamvery has quit [Client Quit]
james_000_ is now known as TheRinger
<pipework>
beauby: Oh you want the reverse of the normal lookup?
<drbrain>
include? won't work with autoload
<Ox0dea>
No?
solocshaw has quit [Ping timeout: 246 seconds]
TheRinger is now known as james_000_
<beauby>
pipework: well, normal lookup is "popping from the back", I want "popping from the front"
<pipework>
beauby: Isn't that what I said?
<beauby>
drbrain: oh, good to know
<beauby>
pipework: it is, I just wanted to make sure we meant the same thing
<drbrain>
pipework: not exactly, since B::C::D isn't in the constant lookup when looking for any D from the nesting of A::B::C
<beauby>
Well, yeah, depends what you call "reverse"
t3rm has joined #ruby
infoget has quit [Quit: Leaving.]
ckinniburgh_ has joined #ruby
goodcodeguy has joined #ruby
<Ox0dea>
beauby: Are ::A::B::C and ::B::C not the same class, then?