<someish>
baweaver: See my comment on the gist. Is that a reasonable solution?
<baweaver>
do you care if any other keys are sorted?
<someish>
Nope.
<someish>
I’m not convinced what I’m doing is optimal.
<baweaver>
you can simplify it a bit more by taking out the ternary
<baweaver>
though why do you want to do it?
<baweaver>
also you can use != and get rid of the reverse
<someish>
The reverse was leftover from some other stuff I was trying.
<baweaver>
fair.
<someish>
I should have removed it.
jaguarmagenta has quit [Remote host closed the connection]
<baweaver>
So what's the reasoning behind sorting a hash?
<baweaver>
there might be a different solution altogether depending on what it is.
flashpoint9 has quit [Remote host closed the connection]
flashpoint9 has joined #ruby
<someish>
Well, the hash is a return value from some pretty convoluted, and relatively poorly written code, which I do not want to touch for fear of regression.
<baweaver>
expand on that a bit because I don't see how this really effects anything
<someish>
The hash is iterated through on the client side, and one of the values, given some conditionals, needs to come first.
<baweaver>
odd. Any particular reason why one of them needs to come first?
<someish>
It’s a business requirement.
* baweaver
scratches head
<baweaver>
don't suppose you'd tell me why it's a business requirement?
<someish>
In short, “I want to see this particular plot first, and all other plots can appear in any order”.
<baweaver>
just seems like a really obscure requirement to have is all.
threh has quit [Ping timeout: 245 seconds]
<baweaver>
Aha
<baweaver>
you could always relay that to the frontend though so you don't have to patch it in ruby
<someish>
To be honest, I’d rather do it in ruby.
<baweaver>
because it'll end up being a frontend concern
<baweaver>
yeah, I know that feeling.
buglessdr has joined #ruby
howdoi has joined #ruby
<baweaver>
could always make a concept of a featured plot and pluck that particular kv pair out of the object/hash
<someish>
I agree though. It’s certainly a client side concern.
flashpoint9 has quit [Ping timeout: 258 seconds]
<baweaver>
If you have Lodash it'd be easier to manage
Hyuk has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
r3vDev has quit [Ping timeout: 265 seconds]
xall has joined #ruby
<llua>
did you install it?
etehtsea has joined #ruby
iMadper has quit [Remote host closed the connection]
iMadper has joined #ruby
h1fuelcell has quit [Remote host closed the connection]
NightMonkey has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
h1fuelcell has joined #ruby
akar has joined #ruby
matp has joined #ruby
c355e3b has quit [Quit: Connection closed for inactivity]
h1fuelcell has quit [Ping timeout: 258 seconds]
beilabs_ has joined #ruby
pawnbox has joined #ruby
mastappl has quit [Ping timeout: 260 seconds]
jhooker has quit [Read error: Connection reset by peer]
beilabs has quit [Ping timeout: 258 seconds]
william3 has joined #ruby
jhooker has joined #ruby
arescorpio has quit [Quit: Leaving.]
houhoulis has quit [Remote host closed the connection]
jhooker has quit [Read error: Connection reset by peer]
jhooker has joined #ruby
Safouane has joined #ruby
marxarelli is now known as marxarelli|afk
jenrzzz has quit [Ping timeout: 268 seconds]
jhooker has quit [Read error: Connection reset by peer]
jhooker has joined #ruby
haraoka has quit [Ping timeout: 245 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
jhooker has quit [Read error: Connection reset by peer]
jhooker has joined #ruby
govg has quit [Ping timeout: 244 seconds]
Snowy has quit [Ping timeout: 244 seconds]
chouhoulis has joined #ruby
jhooker has quit [Read error: Connection reset by peer]
ruby427 has joined #ruby
jhooker has joined #ruby
hutch34 has quit [Ping timeout: 244 seconds]
enterprisey has quit [Remote host closed the connection]
govg has joined #ruby
ruby427 has quit [Client Quit]
kp666[m] has joined #ruby
axyjo has joined #ruby
jhooker has quit [Read error: Connection reset by peer]
ruby980 has joined #ruby
jhooker has joined #ruby
jhooker has quit [Read error: Connection reset by peer]
kp666 has joined #ruby
jhooker has joined #ruby
<nchambers>
llua, yeah I was missing that step
<nchambers>
now I've gotten into some weird C errors
chouhoulis has quit [Remote host closed the connection]
optiz0r has joined #ruby
jhooker has quit [Read error: Connection reset by peer]
jhooker has joined #ruby
<nchambers>
oh nmd. I'm just stupid
jhooker has quit [Read error: Connection reset by peer]
jhooker has joined #ruby
infernix has quit [Ping timeout: 260 seconds]
DenSchub has quit [Ping timeout: 260 seconds]
Tony-St4rk has quit [Ping timeout: 260 seconds]
jhooker has quit [Read error: Connection reset by peer]
jhooker has joined #ruby
mikeXsh has quit [Ping timeout: 260 seconds]
electrostat has quit [Ping timeout: 260 seconds]
adgtl has quit [Ping timeout: 260 seconds]
AndyWojo has quit [Ping timeout: 260 seconds]
alem0lars has quit [Ping timeout: 260 seconds]
bounb has quit [Ping timeout: 260 seconds]
jxf has quit [Ping timeout: 260 seconds]
jhill_ has quit [Ping timeout: 260 seconds]
zipkid has quit [Ping timeout: 260 seconds]
jimeh has quit [Ping timeout: 260 seconds]
Klumben has quit [Ping timeout: 260 seconds]
makufiru has quit [Ping timeout: 260 seconds]
bcavileer has quit [Ping timeout: 260 seconds]
Guest98979 has quit [Ping timeout: 260 seconds]
nedbat has quit [Ping timeout: 260 seconds]
rideh has quit [Ping timeout: 260 seconds]
amitchellbullard has quit [Ping timeout: 260 seconds]
zero7 has quit [Ping timeout: 260 seconds]
wsmoak has quit [Ping timeout: 260 seconds]
vcoinminer has quit [Ping timeout: 260 seconds]
Heero has quit [Ping timeout: 260 seconds]
imanc has quit [Ping timeout: 260 seconds]
zipkid_ has joined #ruby
Tony-St4rk has joined #ruby
Devalo has joined #ruby
jxf has joined #ruby
lightstalker has quit [Ping timeout: 248 seconds]
hanmac has quit [Ping timeout: 260 seconds]
Batholith has quit [Ping timeout: 260 seconds]
arooni has quit [Ping timeout: 260 seconds]
tpendragon has quit [Ping timeout: 260 seconds]
znz_jp has quit [Ping timeout: 260 seconds]
Iacobus__ has quit [Ping timeout: 260 seconds]
teotwaki has quit [Ping timeout: 260 seconds]
iooner has quit [Ping timeout: 260 seconds]
cschneid has quit [Ping timeout: 260 seconds]
hayden__ has quit [Ping timeout: 260 seconds]
Diabolik has quit [Ping timeout: 260 seconds]
deepak_ has quit [Ping timeout: 260 seconds]
wsmoak has joined #ruby
Xi[m] has quit [Ping timeout: 260 seconds]
Donalmartin[m] has quit [Ping timeout: 260 seconds]
philidor[m] has quit [Ping timeout: 260 seconds]
velu_aon[m] has quit [Ping timeout: 260 seconds]
aurelien has quit [Ping timeout: 260 seconds]
alexandernst has quit [Ping timeout: 260 seconds]
jokke has quit [Ping timeout: 260 seconds]
saneax-_-|AFK has quit [Ping timeout: 260 seconds]
rflot has quit [Ping timeout: 260 seconds]
[diecast] has quit [Ping timeout: 260 seconds]
eregon has quit [Ping timeout: 260 seconds]
eregon has joined #ruby
jhooker has quit [Read error: Connection reset by peer]
electrostat has joined #ruby
adgtl has joined #ruby
rflot has joined #ruby
vcoinminer has joined #ruby
alexandernst has joined #ruby
deepak_ has joined #ruby
hutch34 has joined #ruby
Heero has joined #ruby
jhooker has joined #ruby
imanc has joined #ruby
zero7 has joined #ruby
[diecast] has joined #ruby
jhill_ has joined #ruby
hayden__ has joined #ruby
jhooker has quit [Read error: Connection reset by peer]
mikeXsh has joined #ruby
amitchellbullard has joined #ruby
jhooker has joined #ruby
AndyWojo has joined #ruby
Devalo has quit [Ping timeout: 260 seconds]
Iacobus__ has joined #ruby
znz_jp has joined #ruby
ghostlight has quit [Ping timeout: 260 seconds]
bounb has joined #ruby
bounb has quit [Changing host]
bounb has joined #ruby
C0deMaver1ck has joined #ruby
Batholith has joined #ruby
cschneid has joined #ruby
rideh has joined #ruby
DenSchub has joined #ruby
C0deMaver1ck is now known as Guest62217
Diabolik has joined #ruby
lightstalker has joined #ruby
bcavileer has joined #ruby
jhooker has quit [Read error: Connection reset by peer]
makufiru has joined #ruby
jhooker has joined #ruby
tau has quit [Read error: Connection reset by peer]
djbkd has joined #ruby
jimeh has joined #ruby
jhooker has quit [Read error: Connection reset by peer]
jhooker has joined #ruby
h1fuelcell has joined #ruby
yeticry has quit [Ping timeout: 265 seconds]
emptyflask has joined #ruby
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
dviola has quit [Quit: WeeChat 1.6]
tpendragon has joined #ruby
saneax-_-|AFK has joined #ruby
arooni has joined #ruby
jhooker has quit [Read error: Connection reset by peer]
xall has quit [Ping timeout: 245 seconds]
nofxxx has joined #ruby
yeticry has joined #ruby
Donalmartin[m] has joined #ruby
philidor[m] has joined #ruby
velu_aon[m] has joined #ruby
Xi[m] has joined #ruby
alem0lars has joined #ruby
jhooker has joined #ruby
Klumben has joined #ruby
emptyflask has quit [Remote host closed the connection]
jokke has joined #ruby
emptyflask has joined #ruby
jhooker has quit [Read error: Connection reset by peer]
Guest20053 has quit [Remote host closed the connection]
nofxx has quit [Ping timeout: 258 seconds]
jhooker has joined #ruby
tessi_zz has quit [Ping timeout: 245 seconds]
tessi_zz has joined #ruby
infernix has joined #ruby
ghostlight has joined #ruby
Dimik has joined #ruby
hanmac has joined #ruby
tenderlove has joined #ruby
jhooker has quit [Read error: Connection reset by peer]
yeticry has quit [Ping timeout: 248 seconds]
tenderlove has quit [Read error: Connection reset by peer]
aryaching has joined #ruby
tenderlove has joined #ruby
yeticry has joined #ruby
ariedler has joined #ruby
nedbat has joined #ruby
<ariedler>
I am trying to determine if the I am getting a lot of GIL contention in MRI, any recommendations on how to do this?
h1fuelcell has quit [Remote host closed the connection]
hardest has joined #ruby
brendan- has joined #ruby
threh has quit [Ping timeout: 260 seconds]
<ariedler>
Is there an easy way to poll for something like the number of threads waiting on the GIL ?
h1fuelcell has joined #ruby
eggshke has joined #ruby
jtdoncas_ has joined #ruby
jenrzzz has quit [Ping timeout: 268 seconds]
jhooker has joined #ruby
bturker has joined #ruby
maattdd has joined #ruby
jenrzzz has joined #ruby
h1fuelcell has quit [Remote host closed the connection]
jhooker has quit [Read error: Connection reset by peer]
jhooker has joined #ruby
kareelee has joined #ruby
jtdoncas_ has quit [Ping timeout: 258 seconds]
nankyokusei has joined #ruby
brendan- has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
jhooker has quit [Read error: Connection reset by peer]
jenrzzz has quit [Client Quit]
maattdd has quit [Ping timeout: 256 seconds]
bturker has quit [Ping timeout: 256 seconds]
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
h1fuelcell has joined #ruby
beilabs_ has quit [Remote host closed the connection]
haraoka has joined #ruby
lxsameer has joined #ruby
Snowy has joined #ruby
nankyokusei has quit [Ping timeout: 260 seconds]
threh has joined #ruby
jaguarmagenta has quit [Remote host closed the connection]
Snowy has quit [Ping timeout: 246 seconds]
dnicole has quit [Remote host closed the connection]
jaguarmagenta has joined #ruby
ascarter has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ascarter has joined #ruby
<ariedler>
or is the easiest way just to strace and watch for waits / timers?
ascarter has quit [Client Quit]
ariedler has quit [Remote host closed the connection]
jtdoncas has joined #ruby
xberg has joined #ruby
muelleme has joined #ruby
xberg_ has joined #ruby
jtdoncas has quit [Ping timeout: 260 seconds]
xberg has quit [Ping timeout: 245 seconds]
LoneHerm_ has joined #ruby
xberg_ has quit []
Tempesta_ has joined #ruby
akar has quit [Quit: leaving]
LoneHer__ has joined #ruby
jshjsh has joined #ruby
Tempesta has quit [Ping timeout: 256 seconds]
xberg has joined #ruby
jshjsh has quit [Remote host closed the connection]
william3 has quit [Remote host closed the connection]
LoneHerm_ has quit [Ping timeout: 265 seconds]
JoshS has quit [Ping timeout: 268 seconds]
william3 has joined #ruby
Jesuspiece has quit [Ping timeout: 250 seconds]
djbkd has quit [Quit: Leaving...]
joelroa has joined #ruby
x77686d has joined #ruby
jenrzzz has quit [Ping timeout: 260 seconds]
william3 has quit [Ping timeout: 250 seconds]
h1fuelcell has quit [Remote host closed the connection]
ruby980 has quit [Ping timeout: 260 seconds]
nowz has joined #ruby
saneax-_-|AFK is now known as saneax
kareelee has quit [Remote host closed the connection]
kareelee has joined #ruby
LoneHer__ has quit [Read error: Connection reset by peer]
hutch34 has quit [Ping timeout: 248 seconds]
LoneHermit has joined #ruby
NeverTired has quit [Quit: Connection closed for inactivity]
iMadper has quit [Ping timeout: 268 seconds]
chopin_ has joined #ruby
etehtsea has quit [Read error: Connection reset by peer]
greister has quit [Ping timeout: 244 seconds]
x77686d has quit [Quit: x77686d]
chopin has quit [Ping timeout: 244 seconds]
deimos has quit [Ping timeout: 244 seconds]
etehtsea has joined #ruby
_main_ has joined #ruby
Ademan has quit [Ping timeout: 265 seconds]
yeticry has quit [Ping timeout: 244 seconds]
kareelee has quit [Ping timeout: 260 seconds]
ICantCook has quit [Quit: bye]
__main__ has quit [Ping timeout: 244 seconds]
Guest64702 has quit [Ping timeout: 244 seconds]
AustinMatherne has quit [Ping timeout: 244 seconds]
AustinMatherne has joined #ruby
yeticry has joined #ruby
greister has joined #ruby
deimos has joined #ruby
_main_ is now known as __main__
tuxaddicted has quit [Ping timeout: 246 seconds]
Omni_ has joined #ruby
joelroa has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
djbkd has joined #ruby
Ademan has joined #ruby
someish has joined #ruby
Wizznt has joined #ruby
azor has joined #ruby
xall has joined #ruby
balazs has quit [Ping timeout: 248 seconds]
xall has quit [Ping timeout: 246 seconds]
threh has quit [Ping timeout: 244 seconds]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Snowy has joined #ruby
adavia has quit [Ping timeout: 245 seconds]
last_staff has joined #ruby
dnicole has joined #ruby
balazs has joined #ruby
lorenzoscalfani has joined #ruby
dnicole has quit [Ping timeout: 245 seconds]
r3vDev has joined #ruby
buglessdr has quit [Ping timeout: 268 seconds]
ignarps has quit [Ping timeout: 260 seconds]
jgnagy has quit [Remote host closed the connection]
ignarps has joined #ruby
Antiarc has quit [Ping timeout: 265 seconds]
jgnagy has joined #ruby
h1fuelcell has joined #ruby
charliesome has joined #ruby
Antiarc has joined #ruby
balazs has quit [Ping timeout: 256 seconds]
amclain has quit [Quit: Leaving]
jgnagy has quit [Ping timeout: 260 seconds]
Devalo has joined #ruby
pawnbox has quit [Remote host closed the connection]
gbgdev has joined #ruby
djbkd has quit []
tom has joined #ruby
aganov has joined #ruby
Devalo has quit [Ping timeout: 265 seconds]
h1fuelcell has quit [Remote host closed the connection]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
gbgdev has quit [Ping timeout: 268 seconds]
h1fuelcell has joined #ruby
charliesome has joined #ruby
SpiffTR has joined #ruby
balazs has joined #ruby
aufi has joined #ruby
charliesome has quit [Client Quit]
Coldblackice has joined #ruby
kareelee has joined #ruby
conta has joined #ruby
Coldblackice has quit [Max SendQ exceeded]
Snowy has quit [Ping timeout: 245 seconds]
h1fuelcell has quit [Ping timeout: 260 seconds]
Puffball has quit [Quit: No Ping reply in 180 seconds.]
Coldblackice has joined #ruby
Puffball has joined #ruby
grh has joined #ruby
Tempesta_ is now known as Tempesta
Tempesta has quit [Changing host]
Tempesta has joined #ruby
kp__ has joined #ruby
kp666 has quit [Read error: Connection reset by peer]
emilkarl has joined #ruby
blaxter has joined #ruby
cibs has quit [Ping timeout: 268 seconds]
cibs has joined #ruby
pawnbox has joined #ruby
h1fuelcell has joined #ruby
axyjo has quit [Ping timeout: 250 seconds]
charliesome has joined #ruby
Coldblackice has quit []
h1fuelcell has quit [Remote host closed the connection]
r3vDev has quit [Ping timeout: 256 seconds]
aryaching_ has joined #ruby
SpiffTR has quit [Quit: Leaving.]
aryaching has quit [Ping timeout: 244 seconds]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
h1fuelcell has joined #ruby
Coldblackice has joined #ruby
jgnagy has joined #ruby
antoniobeyah has quit [Quit: antoniobeyah]
Coldblackice has quit [Client Quit]
ropeney has quit [Ping timeout: 260 seconds]
bturker has joined #ruby
minimalism has quit [Quit: minimalism]
andikr has joined #ruby
astrobunny has quit [Read error: Connection reset by peer]
agarciava has joined #ruby
<agarciava>
hi there
symm- has quit [Ping timeout: 245 seconds]
astrobunny has joined #ruby
<agarciava>
Where can I find a large testsuite?
william3 has joined #ruby
Emmanuel_Chanel has quit [Ping timeout: 245 seconds]
nankyokusei has joined #ruby
<manveru>
agarciava: how large? any preferences for the test lib?
bturker has quit [Ping timeout: 256 seconds]
russt has quit [Ping timeout: 260 seconds]
william3 has quit [Ping timeout: 246 seconds]
nankyokusei has quit [Ping timeout: 244 seconds]
someish has quit [Quit: someish]
jeyraof has quit [Read error: Connection reset by peer]
sarlalian_ has joined #ruby
Emmanuel_Chanel has joined #ruby
sarlalian has quit [Ping timeout: 244 seconds]
russt has joined #ruby
jeyraof has joined #ruby
vondruch_ has joined #ruby
naprimer_2 has joined #ruby
perniciouscaffei has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Pongles has quit [Ping timeout: 260 seconds]
Pongles has joined #ruby
vondruch has quit [Read error: Connection reset by peer]
agarciava has quit [Quit: Page closed]
fenre has joined #ruby
fold4 has quit [Ping timeout: 244 seconds]
naprimer has quit [Ping timeout: 260 seconds]
jtdoncas has joined #ruby
fold4 has joined #ruby
Hobbyboy has quit [Ping timeout: 260 seconds]
dionysus69 has joined #ruby
jtdoncas has quit [Ping timeout: 250 seconds]
aryaching_ has quit [Read error: Connection reset by peer]
haraoka has quit [Ping timeout: 250 seconds]
tom has quit []
SpiffTR has joined #ruby
aryaching has joined #ruby
h1fuelcell has quit [Remote host closed the connection]
bigkevmcd has quit [Quit: Outta here...]
h1fuelcell has joined #ruby
jeyraof has quit [Read error: Connection reset by peer]
jeyraof has joined #ruby
SJr has quit [Ping timeout: 260 seconds]
AustinMatherne has quit [Ping timeout: 260 seconds]
SpiffTR1 has joined #ruby
SpiffTR has quit [Ping timeout: 260 seconds]
aufi has quit [Ping timeout: 260 seconds]
AustinMatherne has joined #ruby
eggshke has quit [Remote host closed the connection]
eggshke has joined #ruby
Derderderd has quit [Quit: leaving]
Derderderd has joined #ruby
SJr has joined #ruby
r3vDev has joined #ruby
bigkevmcd has joined #ruby
blackbombay has quit [Ping timeout: 250 seconds]
KnownSyntax has quit [Ping timeout: 268 seconds]
Snowy has joined #ruby
teclator has joined #ruby
Snickers has joined #ruby
Humdai has joined #ruby
User458764 has joined #ruby
emptyflask has quit [Remote host closed the connection]
jtdoncas_ has joined #ruby
Safouane has left #ruby [#ruby]
r3vDev has quit [Read error: Connection reset by peer]
Derderderd has quit [Quit: leaving]
Derderderd has joined #ruby
Derderderd has joined #ruby
Derderderd has quit [Changing host]
lorenzoscalfani has quit [Ping timeout: 265 seconds]
Derderderd has quit [Client Quit]
h1fuelcell has quit [Remote host closed the connection]
TomyWork has joined #ruby
SpiffTR1 has quit [Quit: Leaving.]
aufi has joined #ruby
Derderderd has joined #ruby
Derderderd has joined #ruby
Derderderd has quit [Changing host]
Dimik has quit [Ping timeout: 246 seconds]
Derderderd has quit [Client Quit]
xall has joined #ruby
charliesome has joined #ruby
Derderderd has joined #ruby
muelleme has quit [Ping timeout: 258 seconds]
SuperLag has quit [Ping timeout: 250 seconds]
charliesome has quit [Client Quit]
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
SuperLag has joined #ruby
claudiuinberlin has joined #ruby
tom has joined #ruby
tom has quit [Client Quit]
nofxxx has quit [Ping timeout: 250 seconds]
KnownSyntax has joined #ruby
charliesome has joined #ruby
william3 has joined #ruby
aryaching_ has joined #ruby
noodle has quit [Ping timeout: 256 seconds]
aryaching has quit [Ping timeout: 246 seconds]
william3 has quit [Remote host closed the connection]
h1fuelcell has joined #ruby
william3 has joined #ruby
al2o3-cr has quit [Ping timeout: 268 seconds]
d0nn1e has quit [Ping timeout: 258 seconds]
william3 has quit [Remote host closed the connection]
d0nn1e has joined #ruby
h1fuelcell has quit [Ping timeout: 265 seconds]
lorenzoscalfani has joined #ruby
gbgdev has joined #ruby
mikecmpbll has quit [Quit: inabit. zz.]
SHyx0rmZ has joined #ruby
antoniobeyah has joined #ruby
Trynemjoel has quit [Ping timeout: 260 seconds]
lorenzoscalfani has quit [Ping timeout: 245 seconds]
h1fuelcell has joined #ruby
Guest18400 is now known as alamar
Snowy has quit [Ping timeout: 250 seconds]
william3 has joined #ruby
marr has joined #ruby
mikecmpbll has joined #ruby
buglessdr has joined #ruby
william3 has quit [Ping timeout: 250 seconds]
maattdd has joined #ruby
william3 has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nettoweb has joined #ruby
rrawlins has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
biberu has joined #ruby
_joes__ has joined #ruby
Hobbyboy has joined #ruby
Tempesta has quit [Read error: Connection reset by peer]
LoneHerm_ has joined #ruby
Tempesta has joined #ruby
Tempesta has quit [Changing host]
Tempesta has joined #ruby
Derderderd has quit [Quit: leaving]
jtdoncas has joined #ruby
LoneHermit has quit [Ping timeout: 260 seconds]
bayed has joined #ruby
h1fuelcell has quit [Remote host closed the connection]
hfp_work has quit [Ping timeout: 260 seconds]
aryaching_ has quit [Ping timeout: 268 seconds]
h1fuelcell has joined #ruby
aryaching has joined #ruby
hfp_work has joined #ruby
jtdoncas_ has quit [Ping timeout: 256 seconds]
Derderderd has joined #ruby
konsolebox has joined #ruby
ferr1 has joined #ruby
Devalo has joined #ruby
_joes__ has quit [Ping timeout: 250 seconds]
JeanCarloMachado has joined #ruby
emptyflask has joined #ruby
emptyflask has quit [Remote host closed the connection]
tomphp has joined #ruby
bturker has joined #ruby
Devalo has quit [Ping timeout: 260 seconds]
codfection has joined #ruby
charliesome has joined #ruby
vondruch_ is now known as vondruch
toretore has joined #ruby
SpiffTR has joined #ruby
gbgdev has quit [Remote host closed the connection]
aryaching has quit [Ping timeout: 258 seconds]
mark_66 has joined #ruby
haraoka has joined #ruby
triangles has quit [Quit: Leaving]
neanderslob has quit [Read error: Connection reset by peer]
jshjsh has joined #ruby
antoniobeyah has quit [Quit: antoniobeyah]
z3uS has quit [Ping timeout: 250 seconds]
z3uS has joined #ruby
senayar has joined #ruby
h1fuelcell has quit [Remote host closed the connection]
xrlk has quit [Ping timeout: 250 seconds]
h1fuelcell has joined #ruby
pawnbox_ has joined #ruby
Silthias1 has joined #ruby
pawnbox has quit [Read error: Connection reset by peer]
Silthias has quit [Ping timeout: 245 seconds]
bturker has quit [Ping timeout: 256 seconds]
h1fuelcell has quit [Remote host closed the connection]
h1fuelcell has joined #ruby
tvw has joined #ruby
r3vDev has joined #ruby
mg^ has quit [Ping timeout: 268 seconds]
pandaant has joined #ruby
dnicole has joined #ruby
astrobunny has quit [Remote host closed the connection]
astrobunny has joined #ruby
rodfersou has joined #ruby
nankyokusei has joined #ruby
ishe_ua has joined #ruby
al2o3-cr has joined #ruby
mg^ has joined #ruby
flying has joined #ruby
astrobunny has quit [Ping timeout: 268 seconds]
pandaant has quit [Remote host closed the connection]
h1fuelcell has quit [Remote host closed the connection]
nankyokusei has quit [Ping timeout: 250 seconds]
h1fuelcell has joined #ruby
jaruga___ has joined #ruby
aryaching has joined #ruby
Beams has joined #ruby
aknagi has joined #ruby
jeyraof has quit [Quit: This computer has gone to sleep]
kp__ has quit [Ping timeout: 260 seconds]
eggshke has quit []
xall has quit [Ping timeout: 260 seconds]
faces has quit [Read error: Connection reset by peer]
faces has joined #ruby
kp666 has joined #ruby
ConsoleFx has joined #ruby
<ConsoleFx>
which I do this operation: > "0x71c033a0".pack('V') I am unable to execute this expression
<ConsoleFx>
it returns an error
SpiffTR has quit [Quit: Leaving.]
workmad3 has joined #ruby
<ConsoleFx>
it shows error like, NoMethodError: undefined method `pack' for "0x71c033a0":String
<ConsoleFx>
do i call something like require 'String' or something?
bturker has joined #ruby
<ConsoleFx>
i dont have rb coding idea
<ConsoleFx>
thus this silly question
<apeiros>
pack is Array#pack
<apeiros>
unpack is on String
<apeiros>
and I don't think that does what you want it to
<apeiros>
V | Integer | 32-bit unsigned, VAX (little-endian) byte order
<apeiros>
(from the pack docs)
<apeiros>
"0x71c033a0" is not an integer, 0x71c033a0 is
<ConsoleFx>
apeiros, so basically in buffer 0xa0 0x33 0xc0 0x71 would be stored right?
<apeiros>
I don't know what you mean by that
<ConsoleFx>
lets say i store the value in a variable
<ConsoleFx>
of the above i.e. abc = "0x71c033a0".pack('V')
<al2o3-cr>
ConsoleFx: you basically want this then [0x71c033a0].pack('V')
<ConsoleFx>
abc would return 0xa0 0x33 0xc0 0x71 right?
z3uS has quit [Ping timeout: 268 seconds]
<ConsoleFx>
al2o3-cr, oo yeah exactly...
<ConsoleFx>
how can i print its corresponding hex values?
<ConsoleFx>
i mean the return value (in hex)
workmad3_ has joined #ruby
bturker has quit [Ping timeout: 256 seconds]
djellemah_ has quit [Ping timeout: 258 seconds]
lxsameer has quit [Read error: Connection reset by peer]
<apeiros>
ConsoleFx: what do you want to achieve?
workmad3 has quit [Ping timeout: 260 seconds]
<apeiros>
because this sounds strongly like an xy problem
lxsameer has joined #ruby
adgtl has quit [Changing host]
adgtl has joined #ruby
adgtl has joined #ruby
<ConsoleFx>
apeiros, I basically have an array with some hex streams... i want to know while the data is packed through 'V' what would be the complete hex strings
adgtl is now known as java
java is now known as adgl
h1fuelcell has quit [Remote host closed the connection]
adgl is now known as java
<ConsoleFx>
i want to send this in tcp socket
java is now known as adgl
h1fuelcell has joined #ruby
adgl is now known as adgtl
<apeiros>
if you pack, you get binary data, not hex
william3 has quit [Remote host closed the connection]
<ConsoleFx>
apeiros, yeah true.. what if I want to see what are its hex characters (there would be some non-printable chars).. i want to see their hex representations
<ConsoleFx>
apeiros, something like [0x71c033a0].pack('V').hex
<ConsoleFx>
apeiros, awesome!!! this is exactly what I wanted
workmad3 has joined #ruby
<ConsoleFx>
sorry to ask the qstn in a different way
h1fuelcell has quit [Remote host closed the connection]
workmad3_ has quit [Ping timeout: 244 seconds]
jaguarmagenta has quit [Remote host closed the connection]
pawnbox has joined #ruby
h1fuelcell has joined #ruby
<ConsoleFx>
thanks a lot, apeiros
<ConsoleFx>
:)
pawnbox_ has quit [Read error: Connection reset by peer]
h1fuelcell has quit [Remote host closed the connection]
h1fuelcell has joined #ruby
JeanCarloMachado has quit [Ping timeout: 260 seconds]
lenwood has joined #ruby
JeanCarloMachado has joined #ruby
SpiffTR has joined #ruby
djellemah has joined #ruby
h1fuelcell has quit [Remote host closed the connection]
william3 has joined #ruby
iamawesome has joined #ruby
<iamawesome>
Hi, is it possible to write website with ruby without using any ruby framework?
bestie has quit []
gbgdev has joined #ruby
bestie has joined #ruby
h1fuelcell has joined #ruby
mg^ has quit [Ping timeout: 258 seconds]
<manveru>
iamawesome: sure, you know rack?
tuxaddicted has joined #ruby
lenwood has quit [Ping timeout: 250 seconds]
<manveru>
or, if you want to do it without any external library, webrick still exists in stdlib
JeanCarloMachado has quit [Ping timeout: 250 seconds]
william3 has quit [Ping timeout: 250 seconds]
<iamawesome>
manveru: Then I've to make something like rack by myself?
<adaedra>
yeah, going down to rack looks like your goal
<manveru>
the purpose of rack is to provide a common interface to all web servers
<iamawesome>
What's the difference between rack and webrick?
<manveru>
webrick is a pure ruby webserver
<adaedra>
rack is a common interface between web servers and applications, webrick is just a webserver in ruby
JeanCarloMachado has joined #ruby
flashpoint9 has joined #ruby
<iamawesome>
Can rack communicate with apache webserver?
<adaedra>
Going rack will let you be compatible with multiple ruby web servers, like webrick, but also puma, unicorn, and so many others, as well as many gems providing middleware
<adaedra>
I think that's what passenger is for but I don't know it well, but otherwise just do a reverse proxy
<manveru>
rack can talk with apache via cgi or fcgi too
kith has quit [Read error: Connection reset by peer]
<manveru>
though i don't think that's recommended these days :)
<adaedra>
manveru one thing ticks me with the article you linked, it doesn't use the standard config.ru and instead instantiate the web server directly, which makes changing front-end a code change
william3 has joined #ruby
<manveru>
true that
galtgendo has left #ruby [#ruby]
<manveru>
i'm sure there are better examples that use rackup :)
fusmu has joined #ruby
h1fuelcell has quit [Remote host closed the connection]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mg^ has joined #ruby
hardest has quit [Ping timeout: 245 seconds]
Tony-St4rk has quit []
r3vDev has quit [Ping timeout: 260 seconds]
charliesome has joined #ruby
teotwaki has quit [Ping timeout: 258 seconds]
iooner has quit [Ping timeout: 258 seconds]
ghostlight has quit [Ping timeout: 258 seconds]
tsunamie has quit [Ping timeout: 256 seconds]
Tony-St4rk has joined #ruby
Silox| has joined #ruby
kireevco has quit []
kireevco has joined #ruby
ghostlight has joined #ruby
wsmoak has quit []
tuxaddicted_back has joined #ruby
boxrick1 has quit []
wsmoak has joined #ruby
boxrick1 has joined #ruby
al2o3-cr has quit [Read error: Connection reset by peer]
tuxaddicted has quit [Ping timeout: 250 seconds]
al2o3-cr has joined #ruby
blackbombay has joined #ruby
iooner has joined #ruby
discopatrick has quit []
discopatrick has joined #ruby
peteretep has quit []
peteretep has joined #ruby
t-richards has quit []
iooner has quit [Ping timeout: 258 seconds]
t-richards has joined #ruby
blackbombay has quit [Ping timeout: 265 seconds]
teotwaki has joined #ruby
matp has quit [Max SendQ exceeded]
matp has joined #ruby
teotwaki has quit [Ping timeout: 258 seconds]
Devalo has joined #ruby
beilabs has quit [Remote host closed the connection]
beilabs has joined #ruby
jenrzzz has quit [Ping timeout: 246 seconds]
maattdd has quit [Ping timeout: 245 seconds]
Devalo has quit [Ping timeout: 248 seconds]
lenwood has joined #ruby
Tempesta has quit [Quit: See ya!]
beilabs has quit [Ping timeout: 256 seconds]
teotwaki has joined #ruby
last_staff has quit [Quit: last_staff]
yeticry has quit [Ping timeout: 250 seconds]
rann has quit []
emilkarl has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rann has joined #ruby
jtdoncas has quit [Ping timeout: 258 seconds]
tuxaddicted_back is now known as tuxaddicted
yeticry has joined #ruby
pawnbox has quit [Remote host closed the connection]
teotwaki has quit [Ping timeout: 258 seconds]
quoboo has quit []
mikecmpb_ has joined #ruby
mikecmpbll has quit [Ping timeout: 268 seconds]
Madplatypus has quit [Quit: Connection closed for inactivity]
synbit has joined #ruby
Tempesta has joined #ruby
beilabs has joined #ruby
pawnbox has joined #ruby
paralitix has joined #ruby
sparch has joined #ruby
Kestrel-029 has quit [Read error: Connection reset by peer]
kp666 has quit [Ping timeout: 260 seconds]
Nicmavr has joined #ruby
Nicmavr is now known as Guest47960
ndrst has quit [Ping timeout: 246 seconds]
bturker has joined #ruby
matp has quit [Max SendQ exceeded]
cjk101010 has quit [Ping timeout: 246 seconds]
ndrst has joined #ruby
teotwaki has joined #ruby
cjk101010 has joined #ruby
ndrst is now known as Guest97762
ptx0 has quit [Remote host closed the connection]
ptx0 has joined #ruby
matp has joined #ruby
hardest has joined #ruby
GodFather has joined #ruby
h1fuelcell has joined #ruby
h1fuelcell has quit [Remote host closed the connection]
tvw has quit []
kp666 has joined #ruby
SpiffTR has quit [Quit: Leaving.]
quoboo has joined #ruby
dcluna has joined #ruby
<paralitix>
Hey, guys... I got a problem I've been trying to work out for hours now, but can't seem to nail it. I've got it to kind of work, but the results are very inconsistant and I'm just stumped. I'd appreciate it if someone could take a quick look at it. It's only about 10 lines of code. https://gist.github.com/paralitix/d5bb48542dc9165b32ec1d862eb2eb8c
fenre has quit [Remote host closed the connection]
SpiffTR has joined #ruby
pawnbox has quit [Read error: Connection reset by peer]
h1fuelcell has joined #ruby
pawnbox has joined #ruby
Snowy has quit [Read error: Connection reset by peer]
nankyokusei has joined #ruby
Snowy has joined #ruby
uranellus has quit [Ping timeout: 246 seconds]
<toretore>
paralitix: firstly, you should wait until you've changed all the lines before you write them back to the file
inoperable has quit [Ping timeout: 246 seconds]
yeticry has quit [Ping timeout: 265 seconds]
bigkevmcd has quit [Quit: Outta here...]
uranellus has joined #ruby
uranellus has quit [Changing host]
uranellus has joined #ruby
<toretore>
so you'll have: original_lines = File.readlines('filename'); changed_lines = ...; File.open('filename', 'w'){|f| changed_lines.each{|l| f.write l } }
yeticry has joined #ruby
frozengeek____ has joined #ruby
<paralitix>
makes, sense. I'll try messing with this a bit. thanks
nankyokusei has quit [Ping timeout: 248 seconds]
inoperable has joined #ruby
vayan has joined #ruby
<toretore>
to begin with, just do `changed_lines = original_lines` to see that it does what you expect (the file doesn't change); then you can figure out how to create changed_lines the way you want
<paralitix>
alright, I'll try that. I'll get back to you with results
azor has quit [Quit: Connection closed for inactivity]
Emmanuel_Chanel has quit [Ping timeout: 260 seconds]
ferr1 has quit [Read error: Connection reset by peer]
<apeiros>
it's also considered good practice to write your changes to a new file, then remove the original, then rename the new file
<apeiros>
that way, if your program crashes, you don't lose the original file
Silox| has quit []
jtdoncas has joined #ruby
ixti has joined #ruby
bayed has quit []
bayed has joined #ruby
Silox| has joined #ruby
eggshke has joined #ruby
<paralitix>
I create a new textfile every time I run the program so it's no issue
haraoka has quit [Ping timeout: 268 seconds]
jtdoncas has quit [Ping timeout: 248 seconds]
workmad3 has quit [Ping timeout: 268 seconds]
xall has quit [Ping timeout: 244 seconds]
<nowz>
is there a way in Ruby to have a variable useable on all my methods class ?! without using @var ?
<tobiasvl>
nowz: what do you mean, "all my methods class"
<tobiasvl>
all your class's methods, you mean?
<nowz>
all methods in my class
<nowz>
yes sorry
<tobiasvl>
you should probably use @var. why don't you want to use @var?
<nowz>
I cant :(
<nowz>
Im at school, and it's forbidden
<tobiasvl>
forbidden?
muelleme has joined #ruby
SpiffTR has quit [Quit: Leaving.]
<nowz>
yes I already have the right to use one @page_name, no more
<tobiasvl>
OK…
<nowz>
and I set the filename in @page_name
<aknagi>
nowz: Perhaps you could pass variables into methods as arguments to avoid setting an instance variable like this...
<nowz>
im going to show you my code, wait
<aknagi>
nowz: def my_method(my_var) ; puts my_var ; end
<tobiasvl>
or you can use "define_method" :D (please don't)
mikecmpb_ has quit [Quit: inabit. zz.]
<aknagi>
tobiasvl: :)
claudiuinberlin has quit [Remote host closed the connection]
<aknagi>
nowz: You could avoid setting @file by changing the method signature of the head method to "def head(file)". You'd need to make other modifications but that should hopefully set you of on the right path.
jaguarmagenta has joined #ruby
jtdoncas has joined #ruby
yeticry has quit [Ping timeout: 244 seconds]
claudiuinberlin has quit [Ping timeout: 260 seconds]
yeticry has joined #ruby
byte512 has joined #ruby
<nowz>
yes but I cant use param to any other method except for dump one
<nowz>
thats exercice is a bit creepy
dnicole has quit [Ping timeout: 258 seconds]
jaguarmagenta has quit [Ping timeout: 244 seconds]
<aknagi>
nowz: I don't fully understand what you want to do, but generally you can avoid both parameters AND instance variables by making bigger methods.
dnicole has joined #ruby
<aknagi>
nowz: That would mean you were working with "local variables", instead.
jtdoncas has quit [Ping timeout: 260 seconds]
<aknagi>
Another option is to use global variables, but that is often considered very bad practice. Sorry if the terminology is a bit scary!
reverberations has joined #ruby
Emmanuel_Chanel has joined #ruby
<apeiros>
nowz: you probably should look for what this lesson wants to teach you
<apeiros>
pretty sure there's some concept you should be using which was taught recently
<apeiros>
even more so since the proper answer to your question really is "use an @ivar", which is - as you said - forbidden.
<nowz>
I found a solution, and I understood why I cant use @var ... Im using directly File.open().write() , the exercice is made for using after begin,raise,rescue !
<nowz>
Im not supposed to use @var because they want us to make something that can directly write in a File and not in memory ...
<nowz>
If im doing it with pry, step by step, and cat -e the file, there is nothing in it
SpiffTR has joined #ruby
<nowz>
thats why they dont want us to use @file = File.open() @file.write()
<tobiasvl>
huh?
<tobiasvl>
@file.close()
<tobiasvl>
and it should appear in the file
<tobiasvl>
of course it's better to use a block, could that be what they mean?
<nowz>
@file.close() i think it sync, but if my main program want to check the same file while my instance class is still used ... nothing in it
aryaching has joined #ruby
<nowz>
sorry I know im not really good with english.
ConsoleFx has quit [Ping timeout: 250 seconds]
Cra2yZer0 has quit []
cibs has quit [Ping timeout: 268 seconds]
threh has joined #ruby
cibs has joined #ruby
lenwood has quit [Quit: Konversation terminated!]
workmad3 has joined #ruby
lenwood has joined #ruby
z3uS has joined #ruby
tvw has joined #ruby
<aknagi>
nowz: I'm not sure if this helps, but here is a code fragment which writes to a file without a @var:
charliesome has quit [Ping timeout: 250 seconds]
maattdd has joined #ruby
<aknagi>
nowz: File.open('/tmp/hi', 'w') { |f| f.write("Hello in file") }
Emmanuel_Chanel has quit [Ping timeout: 246 seconds]
tcpdump has joined #ruby
bigkevmcd has joined #ruby
<tcpdump>
hey everyone
h1fuelce_ has joined #ruby
charliesome has joined #ruby
yeticry has quit [Ping timeout: 250 seconds]
<tcpdump>
anyone know much about oauth 2.0?
x77686d has joined #ruby
yeticry has joined #ruby
GinoManWorks has joined #ruby
<aknagi>
tcpdump: I'm afraid I find it very confusing, but have blundered along in the past. Maybe just shoot and see if anyone knows?
_ZerGabriel_ has joined #ruby
<apeiros>
aknagi: that's verbose for File.write("/tmp/hi", "Hello in file") ;-)
h1fuelcell has quit [Ping timeout: 256 seconds]
<tcpdump>
aknagi: yea, Im going to have to imploment it. I've been reading that its much easier to impliment using AD.
<aknagi>
apeiros: Much better!
<tcpdump>
And I've noticed there are a few good looking gems for it.
h1fuelce_ has quit [Remote host closed the connection]
<tcpdump>
aknagi: yea.
wugy has joined #ruby
<tcpdump>
I was reading that If you use AD its takes out most of the manual design things.
<tcpdump>
Which sounds appealing. I was hoping to find someone that had done it...
<tcpdump>
but its apparently cryptic, and no one has done it outside a few random blogs. :D
charliesome_ has joined #ruby
charliesome has quit [Ping timeout: 245 seconds]
claudiuinberlin has joined #ruby
sdothum has joined #ruby
ryan_notabot has joined #ruby
<aknagi>
tcpdump: I'm afraid I didn't integrate with AD. I was always using a combo of Devise and Doorkeeper. If you are working with AD could you avoid OAUTH 2 altogether?
<tcpdump>
Well, no, because Im integrating to the Amazon hub and Google Home.
<tcpdump>
Which both require it.
SpiffTR has quit [Quit: Leaving.]
livcd has quit [Remote host closed the connection]
<aknagi>
tcpdump: But all your users are on MS systems and they have AD user accounts?
<tcpdump>
aknagi: no, not at all. Apparently (just reading this - havent done it) if you have an AD server it will basically use the AD as the storage engine for the auth server.
johnmilton has joined #ruby
<tcpdump>
My "users" are all consumers.
claudiuinberlin has quit [Ping timeout: 250 seconds]
<tcpdump>
Just everyday users that pay for my services.
lxsameer has quit [Quit: WeeChat 1.6]
stoffus_ has joined #ruby
<aknagi>
tcpdump: Sounds like a sledge hammer to crack a nut to me. OAUTH only needs a couple of tables to store an app id and app secrets for each app (Amazon Hub, Google Home), and tokens for each users. Not sure I'd want to run a MS Domain controller + set up duplicate users to get that; I must be missing something.
<tcpdump>
aknagi: would each user have to be created individually?
<tcpdump>
aknagi: you know of any pre-made solutions for it?
<tcpdump>
that use SQL?
jtdoncas has joined #ruby
<aknagi>
tcpdump: If you have a Ruby web app you should defo checkout Doorkeeper as a potential option.
stoffus has quit [Ping timeout: 246 seconds]
tdump has joined #ruby
eggshke has quit [Remote host closed the connection]
kn330 has joined #ruby
synthroid has joined #ruby
eggshke has joined #ruby
<tdump>
Hello. I might be going about this all wrong, but I've written a class, and I want one of the methods I've defined to call another method I've defined in the same class. Is there a special syntax I need to use?
eggshke has quit [Remote host closed the connection]
stoffus has joined #ruby
eggshke has joined #ruby
aryaching has quit [Ping timeout: 260 seconds]
stoffus_ has quit [Ping timeout: 256 seconds]
<toretore>
tdump: gist your code?
jtdoncas has quit [Ping timeout: 265 seconds]
<tdump>
toretore: what's gist?
<tdump>
toretore: oh it's a github code sharing thing. Give me one second
<aknagi>
tdump: Are you getting an error message / stack trace? Could you add that to the gist please?
<toretore>
tdump: what aknagi said, and describe what you're trying to do
<tdump>
alright. it's kinda wierd. This is problem from test first ruby. I'm trying to do the extra credit. I'll add the stuff to the gist...brb
matp_ has joined #ruby
r3vDev has joined #ruby
howdoi has quit [Quit: Connection closed for inactivity]
Emmanuel_Chanel has quit [Quit: Leaving]
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
matp has quit [Ping timeout: 260 seconds]
Devalo has joined #ruby
x77686d has quit [Quit: x77686d]
<paralitix>
Hey, I've managed to print out the modified values of the text file the way they should be, but I'm stumped at how I can actually write them to the file, I feel like I can't quite get the synthax down, or I'm not sure what I'm missing really. https://gist.github.com/paralitix/d5bb48542dc9165b32ec1d862eb2eb8c
<tdump>
aknagi: comment added
<tdump>
toretore: comment added
<toretore>
paralitix: ok, so you have changedLines = originalLines, meaning they're the same. what you want to do is `changedLines = something that returns the changed lines`
ryan_notabot has quit [Remote host closed the connection]
claudiuinberlin has joined #ruby
jenrzzz has quit [Ping timeout: 250 seconds]
<toretore>
paralitix: so you have an array, and you want to produce an array of equal size with different values
<paralitix>
hmm, ok I don't know what map is. I'll check it out
<toretore>
hint: changedLines = originalLines.map do |line|
<aknagi>
tdump: This won't get you all the way there, but you might want to start with...
<aknagi>
operations = { :+ => :plus ... etc ...
<tdump>
aknagi: ok I'll give it a shot. Thanks. Does the overall approach seem to make sense?
<tdump>
aknagi: it made sense to me hahah!
<aknagi>
tdump: Looks good at a glance. Note that later if you want to invoke the plus method you could do: "self.send(:plus)"
<tdump>
aknagi: ok I'm gonna screw around with it for a bit. thanks again
yeticry has quit [Ping timeout: 244 seconds]
<aknagi>
tdump: yw
tyang has joined #ruby
yeticry has joined #ruby
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
x77686d has joined #ruby
tuxaddicted has quit [Quit: Leaving]
synthroi_ has joined #ruby
charliesome_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Chair has joined #ruby
synthroid has quit [Ping timeout: 244 seconds]
Emmanuel_Chanel has joined #ruby
<nchambers>
does ruby have anything like python's generators?
<dminuoso>
nchambers: What is a generator?
<dminuoso>
Oh yes.
<dminuoso>
nchambers: Enumerator.
SpiffTR has quit [Quit: Leaving.]
<dminuoso>
Same thing.
<nchambers>
dminuoso, def foo(): yield 1; yield 2; yield 3; # when doing for item in foo(): it returns 1 then 2 then 3 instead of returning an array then iterating over that
<nchambers>
thanks
CloCkWeRX has joined #ruby
hs366 has joined #ruby
gbgdev has quit [Read error: Connection reset by peer]
npgm has quit [Quit: Connection closed for inactivity]
gbgdev has joined #ruby
codfection has quit [Remote host closed the connection]
User458764 has joined #ruby
User458764 has quit [Max SendQ exceeded]
User458764 has joined #ruby
bmurt has joined #ruby
lenwood has quit [Ping timeout: 260 seconds]
c355e3b has joined #ruby
last_staff has joined #ruby
omphe has joined #ruby
cdg has joined #ruby
allcentury has joined #ruby
<kke>
is there some nice way to do: YAML.dump(value: obj)[/value: (.*)/, 1].chomp ?
h1fuelcell has joined #ruby
<apeiros>
YAML.dump(obj) ?
x77686d has quit [Quit: x77686d]
_ZerGabriel_ has quit []
<apeiros>
would also be less broken in case of the dump spanning more than 1 line
pandaant has joined #ruby
gbgdev has quit [Ping timeout: 245 seconds]
<kke>
>> YAML.dump(true)
<ruby[bot]>
kke: # => uninitialized constant YAML (NameError) ...check link for more (https://eval.in/692467)
<ruby[bot]>
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
Sammichmaker has quit [Ping timeout: 256 seconds]
<kke>
because it will have those three lines and sometimes trailing three dots.
<apeiros>
that does not really explain why that won't work.
<apeiros>
anyway, resolve the xy first please.
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<tdump>
aknagi: I did it! That send method is where it's at!
<apeiros>
tdump, aknagi: should use public_send, not send
<apeiros>
(unless your methods are private and you're calling from the "inside" of the object, or you want to knowingly bypass visibility)
<dminuoso>
apeiros: Can we have ruby[bot] tell people if it detects /\w\.send[ (]/ ?
<apeiros>
hm…
<ljarvis>
that'll send us all notifications
ramortegui has joined #ruby
<apeiros>
is that a good idea?
<ljarvis>
^ meta
<apeiros>
ljarvis: publicly!
saneax is now known as saneax-_-|AFK
<tdump>
apeiros: Thanks. I'll look at the documentation for that. I think I am calling from "inside" of the object though.
<dminuoso>
apeiros: It always makes me smile to see candide in ##c people point out peoples stupidity when they paste "sizeof(char)" :-)
Silox| has quit [Quit: Connection closed for inactivity]
<dminuoso>
apeiros: So.. I don't know!
<dminuoso>
:-)
synthroid has joined #ruby
<ljarvis>
I'd probably just add a factoid
hutch34 has joined #ruby
<ljarvis>
?send
<ruby[bot]>
ljarvis: I don't know anything about send
<dminuoso>
I'd rather name it public_send
xberg_ has joined #ruby
<ljarvis>
but it's longer
<dminuoso>
Fair enough
<ljarvis>
*cries into my keyboard*
<dminuoso>
Speaking of adding things, where is adaedra? Our doc bot is still linking to old docs.
<adaedra>
Hello
<aknagi>
tdump: Well played! :)
<dminuoso>
hello adaedra :)
xberg has quit [Ping timeout: 248 seconds]
iMadper has joined #ruby
<apeiros>
!fact add send Favor public_send over send. Use send only if you want to either explicitly bypass visibility, or call the object's own private methods
<ruby[bot]>
apeiros: I will remember that send is Favor public_send over send. Use send only if you want to either explicitly bypass visibility, or call the object's own private methods
<_derpy>
Hello dminuoso
<apeiros>
?send ljarvis
<ruby[bot]>
ljarvis: Favor public_send over send. Use send only if you want to either explicitly bypass visibility, or call the object's own private methods
CloCkWeRX has quit [Quit: Leaving.]
<apeiros>
!fact alias send public_send
<ruby[bot]>
apeiros: I will remember that send is also called public_send.
<apeiros>
ljarvis, dminuoso: ^ good?
synthroi_ has quit [Ping timeout: 246 seconds]
<dminuoso>
apeiros: Im unsure how bypassing visibility is different from "objects own private methods" - but sure
<apeiros>
one is dynamically call your own private methods
<apeiros>
the other is dynamically call another object's private methods
<apeiros>
the former does not actually violate visibility. but public_send won't work for that case.
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
jhack has joined #ruby
<_derpy>
>> RUBY_VERSION
<_derpy>
u wot m8
<apeiros>
e.g. `def foo; send(:my_own_private_method); end` vs. `def foo; @plerp.send(:foreign_private_method); end`
_derpy is now known as `derpy
<elomatreb>
Why don't we just let the bot run everything pasted here through rubocop and paste the output? :P
<aknagi>
dminuoso: apeiros: In the context of his code, public_send would be odd; so I'm not sure making a bot would make sense.
<apeiros>
so map depends on the *return value* of your block. what is the return value of your map-block in the 2nd file in the gist?
tdump_ has joined #ruby
skalfyfan has joined #ruby
<paralitix>
[[3,4], [3,4], [3,4], [3,4], [3,4]]
nopolitica has joined #ruby
<paralitix>
Amount of times there are lines in my text file
h1fuelcell has quit [Ping timeout: 260 seconds]
<apeiros>
ok, that's not what I meant. what is in general the return value of a block?
tdump has quit [Ping timeout: 258 seconds]
<paralitix>
I'm not sure
<apeiros>
then either take a shot, or find it out
skalfyfan has quit [Client Quit]
SpiffTR has joined #ruby
jhack has quit [Quit: jhack]
hutch34 has quit [Ping timeout: 258 seconds]
skalfyfan has joined #ruby
tdump has joined #ruby
User458764 has joined #ruby
tdump has quit [Remote host closed the connection]
grh has quit [Ping timeout: 244 seconds]
r3vDev has joined #ruby
<paralitix>
ok, thanks.
tdump has joined #ruby
tdump has quit [Remote host closed the connection]
beilabs has quit [Remote host closed the connection]
blackbombay has quit [Ping timeout: 248 seconds]
beilabs has joined #ruby
tdump_ has quit [Ping timeout: 256 seconds]
beilabs has quit [Read error: Connection reset by peer]
beilabs has joined #ruby
stoffus has quit [Quit: leaving]
cdg_ has joined #ruby
TomyWork has quit [Remote host closed the connection]
polishdub has joined #ruby
blackbombay has joined #ruby
TomyWork has joined #ruby
matp_ has quit [Quit: ZZzzzZz...]
beilabs has quit [Ping timeout: 244 seconds]
Snowy has joined #ruby
cdg has quit [Ping timeout: 258 seconds]
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
lenwood has joined #ruby
jhack has joined #ruby
DLSteve_ has quit [Quit: All rise, the honorable DLSteve has left the channel.]
kn330 has quit [Ping timeout: 248 seconds]
DLSteve_ has joined #ruby
digitalfiz has quit [Quit: Updating details, brb]
cibs has quit [Ping timeout: 268 seconds]
Fernando-Basso has joined #ruby
cibs has joined #ruby
vaxxon has joined #ruby
fmcgeough has joined #ruby
someish has joined #ruby
Devalo has joined #ruby
pawnbox has quit [Remote host closed the connection]
<guardian>
hello, when I do "foo, bar, baz".to_json, why do I get "\""foo, bar, baz\"" ?
sdwrage has quit [Quit: Leaving]
beilabs has joined #ruby
<guardian>
the " in "foo, bar, baz" are not part of the string, so why do they get escaped?
SpiffTR has quit [Quit: Leaving.]
digitalfiz has joined #ruby
ResidentBiscuit has joined #ruby
ResidentBiscuit has quit [Max SendQ exceeded]
ResidentBiscuit has joined #ruby
ResidentBiscuit has quit [Max SendQ exceeded]
ResidentBiscuit has joined #ruby
ResidentBiscuit has quit [Max SendQ exceeded]
Devalo has quit [Ping timeout: 246 seconds]
ResidentBiscuit has joined #ruby
xberg_ has quit [Remote host closed the connection]
patarr has joined #ruby
littlemyu has joined #ruby
vaxxon has quit [Quit: leaving]
ariedler has joined #ruby
beilabs has quit [Remote host closed the connection]
beilabs has joined #ruby
aryaching has joined #ruby
Burgestrand has joined #ruby
<aknagi>
guardian: If you do `puts "foo, bar, baz".to_json`, then you'll see "foo, bar, baz". If you then check that against the rules of JSON on json.org you'll see that it is correct, and without the quotes it would not be valid JSON.
allcentury has quit [Ping timeout: 245 seconds]
<guardian>
well the point is, later in Javascript, I'm seeing ""foo, bar, baz""
allcentury has joined #ruby
kareelee_ has quit [Remote host closed the connection]
edwardly has quit [Max SendQ exceeded]
h1fuelcell has joined #ruby
edwardly has joined #ruby
edwardly has quit [Changing host]
edwardly has joined #ruby
edwardly has quit [Max SendQ exceeded]
jtdoncas has joined #ruby
edwardly has joined #ruby
edwardly has quit [Changing host]
edwardly has joined #ruby
rory has left #ruby [#ruby]
<guardian>
I don't want the JSON string to contain enclosing quotes
ascarter has joined #ruby
SesMan has joined #ruby
antoniobeyah has joined #ruby
<aknagi>
guardian: That's odd. That implies that if you sent the client "foo,bar,baz" without first calling #to_json on it then that would do what you wanted :/ I've not seen that behavoir before I'm afriad.
emptyflask has joined #ruby
<aknagi>
guardian: It sounds like your client is might not be parsing what you sending it as json, and is instead just "eval"ing it; but that's a shot in the dark
jtdoncas has quit [Ping timeout: 258 seconds]
<guardian>
it definitely does
<guardian>
even in Javascript, JSON.stringify("foo") will produce ""foo""
<toretore>
which is correct
<guardian>
and I wanted to use .to_json to escape what I don't control in the string that has to be escaped by the JSON spec
<toretore>
you are either: 1) confused about representation, or 2) double encoding
ascarter has quit [Ping timeout: 258 seconds]
ascarter_ has joined #ruby
MarkFletcher has joined #ruby
<toretore>
guardian: look in your browsers network tab to see what is actually sent from the server
rodfersou|lunch has quit [Ping timeout: 258 seconds]
x77686d has quit [Quit: x77686d]
william3 has joined #ruby
<toretore>
if it looks ok, it has something to do with how you're 1) inspecting it, or 2) parsing it in your js
<guardian>
I just wanted to sanitize a string
<aknagi>
guardian: BTW in addition to that you might note that JSON.parse(JSON.stringify("foo")) === "foo"
toretore has quit [Quit: Leaving]
toretore has joined #ruby
pawnbox has joined #ruby
bturker_ has joined #ruby
antoniobeyah has quit [Quit: antoniobeyah]
aganov has quit [Remote host closed the connection]
<aknagi>
Ok, I just confused myself. JSON.parse("foo".to_json) results in JSON::ParserError. I'm going to throw my computer away and take up gardening.
davidt has joined #ruby
dionysus69 has quit [Ping timeout: 260 seconds]
william3 has quit [Remote host closed the connection]
bturker has quit [Ping timeout: 256 seconds]
<guardian>
in fact that's a double encoding issue
antoniobeyah has joined #ruby
<guardian>
thanks for pointing me into the right direction
x77686d has joined #ruby
shinnya has joined #ruby
<apeiros>
aknagi: ruby's json parser follows an older spec and requires an object or array as root
bturker_ has quit [Ping timeout: 256 seconds]
<aknagi>
apeiros: Phew, thanks It's freezing outside, and the garden looks fine anyway.
<antoniobeyah>
“foo” is valid json? had no idea
<apeiros>
antoniobeyah: newer specs, yes
<apeiros>
it used to be invalid
<apeiros>
but don't ask me when that changed. I'd have to look it up :)
<antoniobeyah>
how would you access it?
<antoniobeyah>
i.e. what would a parse retunr
jrafanie has joined #ruby
<apeiros>
well, '"foo"' is valid
jrafanie has quit [Client Quit]
<apeiros>
try in your browser: JSON.parse('"foo"')
SesMan has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
pawnbox has quit [Remote host closed the connection]
<apeiros>
yeah, I think the only case where I have an array as root is in my index api's
pawnbox has joined #ruby
<apeiros>
actually… even there I have an object: {data: […], offset: N, limit: N, totalCount: N, …}
<antoniobeyah>
lol, just return “yes”
<antoniobeyah>
get /items -> “yes"
tdump has joined #ruby
<toretore>
get /items -> null
<apeiros>
get /items -> status: 418, message: "I'm a teapod"
rodfersou|lunch has joined #ruby
dcluna has quit [Ping timeout: 246 seconds]
<toretore>
i think the most compelling reason for "always use objects" is that it lets you extend with lower chance of breaking current usage
<apeiros>
true
<apeiros>
that's also why I like kwargs
<apeiros>
besides of them having names
<toretore>
yep
_djbkd has quit [Remote host closed the connection]
<toretore>
unnamed and positional = bad :(
djbkd has joined #ruby
maattdd has quit [Ping timeout: 245 seconds]
<apeiros>
it can be ok for 1-2 arguments
<apeiros>
I mean things like io.puts, or array.push - no need to name those args
bronson has quit [Remote host closed the connection]
<toretore>
yeah, it's simpler, but i'd be ok if all there was was kwargs
Snickers has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
conta has quit [Ping timeout: 268 seconds]
<toretore>
there's not much difference between `def foo(bar:)` and `def foo(bar)`
tdump has quit [Ping timeout: 250 seconds]
ascarter has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<toretore>
calling is of course different and slightly more tedious
<toretore>
anyway, enough rambling, dinner time
anuxivm has joined #ruby
<apeiros>
bon apps :)
<paralitix>
Hey, guys. I'm at the absolute end of my line here, I can't even think straight anymore, but I feel like I'm so close. Can someone just tell me how to solve this problem I have?
rodfersou|lunch has quit [Ping timeout: 260 seconds]
<paralitix>
I don't know how to use .maps , but I gave it a shot, didn't change much, probably because i'm using it wrong
<apeiros>
it's .map, not .maps
someish has quit [Quit: someish]
<paralitix>
yeah, that's what I means
william3 has joined #ruby
<apeiros>
have you found out what a block returns?
<paralitix>
no, it just raised more questions. I don't even know what a block is
djbkd has quit [Ping timeout: 260 seconds]
<paralitix>
a snippet of code or something? in between the {} ?
rodfersou|lunch has joined #ruby
jrafanie has joined #ruby
<apeiros>
ok, I'm not sure whether I want to continue here. I enjoy helping. but I don't want to teach ruby 101 here. IMO you should do that on your own, or try ##new2ruby
<apeiros>
and this stuff is understanding ruby basics
<paralitix>
So when I grasp the concept of "block", i'll have a clearer picture?
<apeiros>
yes
<apeiros>
blocks are a very important part of how ruby works
<paralitix>
Ok, I'll look better into it. thanks
antoniobeyah has quit [Quit: antoniobeyah]
<apeiros>
yw. as said, ##new2ruby probably has people who are willing to also teach ruby 101, if you want to try there.
<paralitix>
Alright thanks, I didn't know about that channel
nettoweb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
kareelee has joined #ruby
chouhoulis has joined #ruby
Hyuk has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
Hyuk has joined #ruby
dviola has joined #ruby
someish has joined #ruby
Devalo has joined #ruby
bturker has joined #ruby
Trynemjoel has joined #ruby
c_nick has joined #ruby
c_nick has left #ruby [#ruby]
c_nick has joined #ruby
<c_nick>
Hi anyone has any experience on batch jobs and roby copy ?
jenrzzz has joined #ruby
Silthias1 has quit [Ping timeout: 248 seconds]
Silthias has joined #ruby
dunpeal has joined #ruby
brent__ has joined #ruby
<dunpeal>
What's the most idiomatic way to write: `val.nil? : 0 ? val`
antoniobeyah has joined #ruby
<apeiros>
val || 0
<dunpeal>
apeiros: not quite the same, since it will return 0 if val is any falsey value.
<c_nick>
how to get the output of robocopy in a batch job
<apeiros>
except if `false` is also valid. but if false, nil and 0 are valid, then IMO you have a variable with an identity issue :)
littlemyu has quit [Remote host closed the connection]
synthroi_ has joined #ruby
<apeiros>
dunpeal: ^
Burgestrand has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
* apeiros
back in ~30min
<dunpeal>
thanks.
bronson has joined #ruby
jaruga___ has quit [Quit: jaruga___]
jenrzzz has quit [Ping timeout: 250 seconds]
synthroid has quit [Ping timeout: 268 seconds]
emilkarl has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
yqt has joined #ruby
matp has joined #ruby
patarr has quit [Ping timeout: 265 seconds]
aufi has quit [Quit: Leaving]
Ishido has quit [Read error: Connection reset by peer]
chouhoulis has quit [Remote host closed the connection]
kareelee has quit [Remote host closed the connection]
chouhoulis has joined #ruby
xrlk has joined #ruby
flashpoint9 has quit [Remote host closed the connection]
lenwood has quit [Ping timeout: 260 seconds]
Ishido has joined #ruby
theRoUS has quit [Quit: Coyote finally caught me]
kareelee has joined #ruby
npgm has joined #ruby
nettoweb has joined #ruby
chouhoulis has quit [Ping timeout: 244 seconds]
theRoUS has joined #ruby
theRoUS has quit [Changing host]
theRoUS has joined #ruby
wugy has quit []
deadnull is now known as _deadnull
chouhoulis has joined #ruby
x77686d has joined #ruby
_deadnull has quit [Quit: AFK]
patarr has joined #ruby
konsolebox has quit [Ping timeout: 244 seconds]
kareelee has quit [Ping timeout: 260 seconds]
Dimik has joined #ruby
<nchambers>
Hello! I am writing a gem for a project of mine. Most of it is going to be in ruby, but some of it is going to be in C (mostly bindings to some other code). If I just have the C part in there, it compiles fine with `rake compile`, and I can build the gem successfully and use it in IRB. but when I add ruby files (so something like lib/mygem.rb) and put that in the gemspec, then rebuild/reinstall, it doesn't l
<nchambers>
extension, only in mygem.rb. Am I missing something?
aknagi has quit [Quit: Leaving]
h1fuelcell has quit [Remote host closed the connection]
andikr has quit [Remote host closed the connection]
jackjackdripper has joined #ruby
Devalo has quit [Remote host closed the connection]
tvw has quit [Remote host closed the connection]
skweek has joined #ruby
william3 has quit [Remote host closed the connection]
william3 has joined #ruby
OTORelic has joined #ruby
william3 has quit [Remote host closed the connection]
william3 has joined #ruby
deadnull has joined #ruby
dionysus69 has joined #ruby
maattdd has joined #ruby
synbit has quit [Quit: Ex-Chat]
blaxter has quit [Quit: foo]
ixti has quit [Ping timeout: 268 seconds]
Snowy has quit [Remote host closed the connection]
konsolebox has joined #ruby
kareelee has joined #ruby
Rutix`away is now known as Rutix
c_nick has quit [Ping timeout: 260 seconds]
<apeiros>
nchambers: your message got chomped
<apeiros>
"it doesn't l"
flashpoint9 has joined #ruby
skalfyfan has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<nchambers>
... rebuild/reinstall, it doesn't let me use any of the functions defined in the C extension, only in mygem.rb. Am I missing something?
<apeiros>
you say without the ruby files, it works?
<apeiros>
what's the require for the extension, what's the require for the ruby file?
<OTORelic>
^
dbruns has joined #ruby
rodferso1 has joined #ruby
skweek has quit [Ping timeout: 248 seconds]
rodfersou has quit [Ping timeout: 250 seconds]
rodferso1 is now known as rodfersou
Snickers has joined #ruby
tdump has quit [Ping timeout: 258 seconds]
william3 has quit [Remote host closed the connection]
shinnya has quit [Ping timeout: 256 seconds]
omphe has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Eiam has joined #ruby
Ishido has quit [Read error: Connection reset by peer]
kareelee has joined #ruby
xberg has joined #ruby
patarr has joined #ruby
Ishido has joined #ruby
ascarter has joined #ruby
reverberations has quit [Ping timeout: 250 seconds]
kareelee_ has joined #ruby
<nchambers>
apeiros, sorry had to step away
conta has joined #ruby
skweek has joined #ruby
someish has quit [Quit: someish]
<nchambers>
without the .rb file, I just do require 'wish' in my program. When I add lib/wish.rb, I add require_relative './wish' in it, then require 'wish' in my code again
kareelee has quit [Ping timeout: 244 seconds]
<apeiros>
yeah, that'd be your issue then :)
<nchambers>
oh
<apeiros>
you're shadowing your native extension
<nchambers>
ah
<nchambers>
so I need to name the native one something else?
<apeiros>
yes
patarr has quit [Ping timeout: 256 seconds]
<nchambers>
ok thanks
<apeiros>
and require_relative won't find it
skalfyfan has joined #ruby
<nchambers>
my native extension?
<apeiros>
yes
<nowz>
is there a way to pass 2 arguments in a Error Class with raise ?
bronson has quit [Remote host closed the connection]
jtdoncas has quit [Ping timeout: 260 seconds]
synthroi_ has quit [Remote host closed the connection]
synthroid has joined #ruby
marr has joined #ruby
synthroid has quit [Read error: Connection reset by peer]
kareelee has joined #ruby
aswen has joined #ruby
synthroid has joined #ruby
synthroid has quit [Read error: Connection reset by peer]
splud has joined #ruby
synthroid has joined #ruby
SeepingN has joined #ruby
synthroid has quit [Read error: Connection reset by peer]
deadnull has joined #ruby
tenderlove has joined #ruby
synthroid has joined #ruby
synthroid has quit [Read error: Connection reset by peer]
aeontech has joined #ruby
synthroid has joined #ruby
bronson has joined #ruby
synthroid has quit [Read error: Connection reset by peer]
sp4rrow has quit [Quit: The Internet needs a break and I need a cookie]
djbkd has joined #ruby
synthroid has joined #ruby
synthroid has quit [Read error: Connection reset by peer]
lacour has joined #ruby
dunpeal has quit [Read error: Connection reset by peer]
Azure|dc has quit [Ping timeout: 245 seconds]
dunpeal has joined #ruby
flashpoi_ has quit []
senayar has quit []
<nchambers>
apeiros, ok, so I've got it mostly working. now its ext/wishsys/wishsys.c. I rake compile that, and end up with lib/{wishsys.so, wish.rb}. I build/install the gem, and run a script that has require 'wish'. It lets me run everything from the wishsys extension (which still has everything in the Wish module) loaded by require 'wish'. But I cannot run anything directly in wish.rb
<nchambers>
any ideas?
Azure has joined #ruby
flashpoint9 has joined #ruby
hutch34 has joined #ruby
omphe has joined #ruby
<apeiros>
not without the code. but iirc wishsys.so should NOT go into lib. it should stay in ext.
william3 has joined #ruby
Macaveli has joined #ruby
unreal has quit [Ping timeout: 265 seconds]
patarr has joined #ruby
<apeiros>
(changing its location won't have any effect on the observed behavior)
xberg has quit [Remote host closed the connection]
nankyokusei has joined #ruby
Humdai has quit [Quit: Leaving]
william3 has quit [Remote host closed the connection]
ascarter has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
william3 has joined #ruby
ascarter has joined #ruby
conta has quit [Ping timeout: 246 seconds]
eggshke has quit []
patarr has quit [Ping timeout: 268 seconds]
salut has quit [Quit: salut]
<nchambers>
ok
<nchambers>
hmm
maattdd has quit [Ping timeout: 268 seconds]
lxsameer has joined #ruby
<nchambers>
Its not on github yet, so I'll get it up there when I can and ping you
<apeiros>
you can just gist the wish.rb
nankyokusei has quit [Ping timeout: 260 seconds]
MarkFletcher has joined #ruby
<nowz>
when im doing @file = myline and change @file, it also change myline why?
RobertBirnie has joined #ruby
<apeiros>
nowz: because you have code somewhere doing that
dunpeal_ has joined #ruby
sp4rrow has joined #ruby
<apeiros>
oh, wait… what precisely do you mean by "change"?
<nowz>
if im doing any modification on @file, it also change myline
<apeiros>
same vague
bronson has quit [Remote host closed the connection]
tercenya has quit [Remote host closed the connection]
tercenya has joined #ruby
ascarter has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
manjaro-kde5-- has joined #ruby
kareelee has joined #ruby
enterprisey has joined #ruby
marxarelli|afk is now known as marxarelli
ascarter has joined #ruby
claudiuinberlin has joined #ruby
xberg has joined #ruby
kareelee_ has quit [Ping timeout: 244 seconds]
brent__ has quit [Quit: Connection closed for inactivity]
sneakers has joined #ruby
bocaneri has quit [Remote host closed the connection]
zeroDi has joined #ruby
lorenzoscalfani has quit [Ping timeout: 268 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
omphe has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
symm- has joined #ruby
emilkarl has quit [Read error: Connection reset by peer]
jaguarmagenta has joined #ruby
ixti has joined #ruby
jenrzzz has quit [Ping timeout: 260 seconds]
centrx has joined #ruby
sp4rrow has quit [Quit: The Internet needs a break and I need a cookie]
SpiffTR has quit [Quit: Leaving.]
jaguarmagenta has quit [Ping timeout: 258 seconds]
SeepingN has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
lorenzoscalfani has joined #ruby
ramfjord has joined #ruby
dnicole has quit [Remote host closed the connection]
zeroDi has quit [Quit: WeeChat 1.6]
govg has quit [Ping timeout: 246 seconds]
jackjackdripper has quit [Quit: Leaving.]
jackjackdripper has joined #ruby
zeroDi has joined #ruby
aryaching has quit [Quit: Bye]
SpiffTR has joined #ruby
harai has quit [Quit: WeeChat 1.5]
aryaching has joined #ruby
muelleme has joined #ruby
dunpeal has quit [Quit: leaving]
jyaworski has joined #ruby
Rodya_ has quit [Quit: Leaving...]
Salih has quit [Quit: Leaving]
foxxx0 has quit [Quit: WeeChat 1.6]
Macaveli has quit [Ping timeout: 258 seconds]
foxxx0 has joined #ruby
hahuang61 has quit [Ping timeout: 246 seconds]
Macaveli has joined #ruby
nankyokusei has joined #ruby
johnmilton has quit [Remote host closed the connection]
yeticry has quit [Ping timeout: 248 seconds]
meowzus has joined #ruby
byte512 has quit [Ping timeout: 260 seconds]
meowzus has left #ruby [#ruby]
sparch has quit [Ping timeout: 265 seconds]
xberg has quit [Remote host closed the connection]
sp4rrow has joined #ruby
skweek has joined #ruby
nankyokusei has quit [Ping timeout: 268 seconds]
yeticry has joined #ruby
hahuang61 has joined #ruby
tdump has joined #ruby
bronson has joined #ruby
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
millerti has joined #ruby
millerti has quit [Client Quit]
omphe has joined #ruby
VladGh has quit [Remote host closed the connection]
tdump has quit [Ping timeout: 258 seconds]
synthroid has quit [Ping timeout: 246 seconds]
flashpoint9 has quit []
janemba has joined #ruby
gusrub has quit [Remote host closed the connection]
<janemba>
hi
brendan- has joined #ruby
<apeiros>
hi janemba
VladGh has joined #ruby
bronson has quit [Ping timeout: 245 seconds]
conta has joined #ruby
Synthead has quit [Quit: Synthead]
gusrub has joined #ruby
<janemba>
how can I compile a gem ?
<janemba>
apeiros: \o/
mwlang has joined #ruby
<janemba>
gem install seems to install a package
<apeiros>
janemba: what do you mean by "compile a gem"?
<janemba>
apeiros: I want "gem install" compile the package
<apeiros>
ok. what do you mean by that?
<janemba>
apeiros: what do you understand ?
conta has quit [Client Quit]
<apeiros>
well, ruby is not a compiled language. so either you have a native extension, or you misunderstand what gems are.
<apeiros>
or you misunderstand what the term "compile" means
JeanCarloMachado has quit [Ping timeout: 260 seconds]
conta has joined #ruby
<janemba>
"gem install foo" <- how do you call foo ?
<apeiros>
the name of the gem
<apeiros>
or short "the gem" :)
<janemba>
...
gusrub has quit [Ping timeout: 256 seconds]
<janemba>
so I want the gem to be compiled instead of having a binary
<apeiros>
ok. I'm quite convinced that you misunderstand that term.
<janemba>
when using gem install
patarr has quit [Ping timeout: 245 seconds]
<apeiros>
what do you expect as a result of compiling the gem?
<janemba>
thats possible
AckZ has joined #ruby
atmosx has joined #ruby
last_staff has quit [Ping timeout: 248 seconds]
<janemba>
well the question is not the result of the compilation
AgentVenom has joined #ruby
<apeiros>
for me it is, otherwise I don't know how to help you :)
<apeiros>
because I need to know what you're after, so I can tell you how to get there.
gusrub has joined #ruby
<janemba>
so you misunderstand the questio then :) I care about the compilation of that "gem"
whchien has joined #ruby
<janemba>
+n
<apeiros>
I understand that. but again: unless your gem has a native extension, there *is no* compilation.
<apeiros>
hence I need to know what you mean by that.
<janemba>
native extension ? so it means the gem if gem install don't compile the gem there is native extension ?
patarr has joined #ruby
<apeiros>
gem install downloads the source, unpacks the archive, copies files to the right places. no compilation.
conta has quit [Ping timeout: 250 seconds]
<janemba>
never ?
<apeiros>
if the gem has/is a native extension, then there is an added step of compiling.
<janemba>
ok so is there any way to make it compile ?
<apeiros>
so do you want to keep running in circles or can you finally explain what you mean?
<tobiasvl>
janemba: what do you want to achieve? WHY do you want to compile the gem?
<janemba>
tobiasvl: achieve ? nothing ! but I want it to compile to link against my libs (the gem seems to use an old version)
MarkFletcher has quit [Ping timeout: 246 seconds]
<apeiros>
ok. I'll come back when you ping me with an explanation.
<janemba>
apeiros: don't worry I already noticed you didn't understand.
<apeiros>
mhm, sure. sure. good luck then.
<janemba>
apeiros: thx I will find a solution anyway
dionysus69 has quit [Ping timeout: 258 seconds]
<havenwood>
janemba: A gem is Ruby code (unless you have a native extension in another language). You don't compile Ruby code, you run the code with a virtual machine.
<apeiros>
havenwood: you think explaining them that a third time will help? :)
jenrzzz has joined #ruby
<havenwood>
apeiros: Thought I'd tag in and give it a try! :-P
<apeiros>
hehe
<janemba>
havenwood: I noticed that the gem end with a library file (.so) so if I understand you the gem should have native extension
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
kareelee has quit [Remote host closed the connection]
<apeiros>
reminds me that I've patches for stringscanner which haven't been added for over 6y :<
<tobiasvl>
ouch'
kareelee has joined #ruby
dnicole has joined #ruby
tonytonyjan has joined #ruby
<paralitix>
Hey, apeiros. It's me again. I feel like I'm so close, but I can't seem to be able to quite nail it. It writes only the last line to my file, but it writes it the exact way I need it to. Could you take a quick look and tell me what am I overlooking here? (the 1st gist) https://gist.github.com/paralitix/d5bb48542dc9165b32ec1d862eb2eb8c
tercenya has quit [Remote host closed the connection]
tercenya has joined #ruby
Eiam has quit [Quit: ╯°□°)╯︵ǝpouǝǝɹɟ]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
claudiuinberlin has quit []
davidt has quit [Read error: Network is unreachable]
<apeiros>
havenwood: nobu already wrote the code. I wonder why it's not in :-/
davidt has joined #ruby
<tobiasvl>
paralitix: 'w' as file mode overwrites the file
Yacker has joined #ruby
<tobiasvl>
you want 'a'
<paralitix>
yeah, I know that's the thing, I tried "a" and it just keeps adding, not replacing
jhack has quit [Quit: jhack]
<tobiasvl>
uuh ok, I guess I misunderstood you then, I thought you wanted to add instead of replacing
<apeiros>
paralitix: the idea somebody gave you was to do it in 3 steps: read the lines, map them to their new values, write the mapped lines to file
dnicole has quit [Ping timeout: 258 seconds]
kareelee has quit [Ping timeout: 268 seconds]
jhack has joined #ruby
<apeiros>
paralitix: a block in ruby will return the value of the last statement
<apeiros>
so: changed_lines = original_lines.map { |line| do_stuff; the_string_you_want_your_mapped_line_to_be }
<apeiros>
your 2nd file is close. but you have to make the block return that string. at the moment it returns [3,4], because [3,4].each … returns [3,4].
<ruby[bot]>
baweaver: # => undefined method `each_with_object' for "AGTCAGTCAGTCTTTCCCAAAT":String (NoMethodError) ...check link for more (https://eval.in/692766)
<borei>
need to create custom type/provider for puppet
<borei>
xml file(s) will be used by libvirt
centrx has quit []
Eiam has quit [Quit: ╯°□°)╯︵ǝpouǝǝɹɟ]
synthroid has quit [Ping timeout: 268 seconds]
blackwind_123 has quit [Ping timeout: 260 seconds]
cyberarm has joined #ruby
cyberarm has left #ruby [#ruby]
<antoniobeyah>
nooo, i’m trying to rid nokogiri from the internet
gusrub has joined #ruby
<borei>
???
nopolitica has quit [Ping timeout: 244 seconds]
<ruby-lang317>
#apeiros thanx
blackwind_123 has joined #ruby
gusrub has quit [Remote host closed the connection]
ascarter has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<antoniobeyah>
nokogiri is one of the top frustrations for the people I work with due to its native extensions, consistently causing gem installs to fail, and generally slowing down ruby dev
gusrub has joined #ruby
<borei>
ok
<apeiros>
antoniobeyah: you're an oganian? :)
<borei>
what is the option then ?
<apeiros>
does oga have a builder?
skweek has quit [Ping timeout: 246 seconds]
<antoniobeyah>
depends on what you need to do. nokogiri is super powerful, i will give it that
ascarter has joined #ruby
bronson has joined #ruby
muelleme has quit [Ping timeout: 244 seconds]
nopolitica has joined #ruby
<antoniobeyah>
new-new xml file or inplace manipulation?
<antoniobeyah>
net-new*
<antoniobeyah>
i don’t have much time atm but imo add a nokogiri dependency to your project with care
solocshaw has joined #ruby
grh has quit [Ping timeout: 246 seconds]
gbgdev_ has quit [Remote host closed the connection]
gloscombe has joined #ruby
william3 has joined #ruby
ascarter has quit [Client Quit]
bronson has quit [Ping timeout: 246 seconds]
nettoweb has quit [Ping timeout: 245 seconds]
GodFather has quit [Quit: Ex-Chat]
GodFather has joined #ruby
brendan- has joined #ruby
nettoweb has joined #ruby
chouhoulis has quit [Ping timeout: 258 seconds]
SpiffTR has quit [Quit: Leaving.]
aswen has quit [Quit: WeeChat 1.5]
railssmith has joined #ruby
maattdd has joined #ruby
gusrub has quit [Remote host closed the connection]
emilkarl has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bronson has joined #ruby
bronson has quit [Remote host closed the connection]
bronson has joined #ruby
johnmilton has quit [Remote host closed the connection]
ta_ has joined #ruby
polishdub has quit [Quit: Leaving]
cyberarm has joined #ruby
skalfyfan has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
synthroid has joined #ruby
skalfyfan has joined #ruby
skalfyfan has quit [Client Quit]
millerti has joined #ruby
bronson has quit [Remote host closed the connection]
ascarter has joined #ruby
Rodya_ has joined #ruby
synthroi_ has quit [Ping timeout: 268 seconds]
AndBobsYourUncle has joined #ruby
nettoweb1 has joined #ruby
nettoweb has quit [Ping timeout: 258 seconds]
ruby-lang317 has quit [Ping timeout: 260 seconds]
solocshaw has quit [Ping timeout: 260 seconds]
bronson has joined #ruby
<AndBobsYourUncle>
Hi
<havenwood>
AndBobsYourUncle: welcome!
Rodya_ has quit [Ping timeout: 258 seconds]
marxarelli is now known as marxarelli|afk
zapata has quit [Ping timeout: 250 seconds]
toretore has quit [Ping timeout: 245 seconds]
bronson has quit [Remote host closed the connection]
cyberarm has quit [Remote host closed the connection]
biberu has quit []
gusrub has joined #ruby
jhack has quit [Ping timeout: 250 seconds]
AndBobsYourUncle has quit []
willardg has joined #ruby
AndBobsYourUncle has joined #ruby
AndBobsYourUncle has quit [Client Quit]
brendan- has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
AndBobsYourUncle has joined #ruby
william3 has quit [Remote host closed the connection]