whippythellama has quit [Ping timeout: 276 seconds]
jdawgaz has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
HoierM has quit [Ping timeout: 240 seconds]
jameser_ has joined #ruby
gix has quit [Ping timeout: 255 seconds]
domgetter has joined #ruby
__Yiota has joined #ruby
banisterfiend has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jdawgaz has joined #ruby
banisterfiend has joined #ruby
gix has joined #ruby
tacoboy has quit [Remote host closed the connection]
ecuanaso has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
banisterfiend has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
whippythellama has joined #ruby
banisterfiend has joined #ruby
carnegie has quit [Remote host closed the connection]
jdawgaz has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jdawgaz has joined #ruby
davic has quit [Quit: Connection closed for inactivity]
herbmillerjr has quit [Read error: Connection reset by peer]
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bronson has joined #ruby
jenrzzz has quit [Ping timeout: 276 seconds]
_aeris_ has quit [Remote host closed the connection]
_aeris_ has joined #ruby
ledestin has joined #ruby
bronson has quit [Ping timeout: 246 seconds]
whippythellama has quit [Quit: WeeChat 1.4]
kies has joined #ruby
segmond has quit [Quit: l8r]
claw has quit [Ping timeout: 240 seconds]
jameser_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
aldo has joined #ruby
<aldo>
Hey there!
<aldo>
I am having problems. I am learning how to consume Google Drive Api through Ruby, and then I got this problem while I try to run the sample given by google.
banisterfiend has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
banisterfiend has joined #ruby
roshanavand has joined #ruby
https__GK1wmSU has joined #ruby
https__GK1wmSU has quit [Excess Flood]
anisha has joined #ruby
rahul_bajaj has joined #ruby
carnegie has quit [Remote host closed the connection]
Guest25260 is now known as olspookishmagus
rabajaj has quit [Ping timeout: 260 seconds]
Stickwalker has joined #ruby
Bish has quit [Ping timeout: 260 seconds]
Stickwalker has quit [Client Quit]
banisterfiend has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bruno- has quit [Ping timeout: 246 seconds]
Bhootrk_ has joined #ruby
carnegie has joined #ruby
Bish has joined #ruby
https_GK1wmSU has joined #ruby
DK2 has quit [Read error: Connection reset by peer]
ltem has joined #ruby
perniciouscaffei has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
TomyLobo3 has quit [Ping timeout: 240 seconds]
https_GK1wmSU has quit [Excess Flood]
banisterfiend has joined #ruby
dionysus69 has joined #ruby
banisterfiend has quit [Client Quit]
banisterfiend has joined #ruby
cam27 has quit [Quit: cam27]
moeabdol has joined #ruby
https_GK1wmSU has joined #ruby
nacsurte has joined #ruby
https_GK1wmSU has quit [K-Lined]
conta has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nacsurte has quit [Ping timeout: 246 seconds]
jameser has joined #ruby
banisterfiend has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mostlybadfly has quit [Ping timeout: 276 seconds]
banisterfiend has joined #ruby
etehtsea has quit [Ping timeout: 260 seconds]
ta_ has quit [Remote host closed the connection]
banisterfiend has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
code_zombie has quit [Quit: Leaving]
banisterfiend has joined #ruby
howdoi has joined #ruby
sagax has quit [Ping timeout: 276 seconds]
djbkd has joined #ruby
carnegie has quit [Remote host closed the connection]
Awsy has joined #ruby
carnegie has joined #ruby
grant has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
kculpis has quit [Remote host closed the connection]
Bish has quit [Ping timeout: 255 seconds]
kculpis has joined #ruby
kculpis has quit [Max SendQ exceeded]
Bish has joined #ruby
banisterfiend has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
banisterfiend has joined #ruby
nadir has quit [Quit: Connection closed for inactivity]
lxsameer has joined #ruby
Rodya_ has quit [Remote host closed the connection]
rahul_bajaj has quit [Ping timeout: 246 seconds]
rabajaj has joined #ruby
banisterfiend has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
banisterfiend has joined #ruby
andikr has joined #ruby
mniip_ has joined #ruby
TomyWork has joined #ruby
mniip has quit [Read error: Connection reset by peer]
mniip_ is now known as mniip
etehtsea has joined #ruby
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ShekharReddy has joined #ruby
minimalism has quit [Quit: minimalism]
etehtsea has quit [Client Quit]
jameser has joined #ruby
banisterfiend has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nacsurte has joined #ruby
rabajaj has quit [Read error: Connection reset by peer]
rabajaj has joined #ruby
banisterfiend has joined #ruby
rabajaj has quit [Remote host closed the connection]
mark_66 has joined #ruby
nacsurte has quit [Ping timeout: 240 seconds]
Cnapier has joined #ruby
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
bronson has joined #ruby
rabajaj has joined #ruby
ta_ has joined #ruby
djbkd has quit [Remote host closed the connection]
djbkd has joined #ruby
ta_ has quit [Remote host closed the connection]
djbkd has quit [Remote host closed the connection]
jenrzzz has quit [Ping timeout: 255 seconds]
bronson has quit [Ping timeout: 260 seconds]
djbkd has joined #ruby
lxsameer has quit [Ping timeout: 240 seconds]
Mgtuiw211 has joined #ruby
enterprisey has quit [Read error: Connection reset by peer]
Silthias has joined #ruby
Silthias1 has quit [Read error: Connection reset by peer]
djbkd has quit [Ping timeout: 240 seconds]
mikecmpbll has joined #ruby
alex`` has joined #ruby
carnegie has quit [Remote host closed the connection]
banisterfiend has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ta_ has joined #ruby
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Silthias1 has joined #ruby
banisterfiend has joined #ruby
Silthias has quit [Ping timeout: 240 seconds]
algun has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<algun>
Hi. I haven’t done Ruby in a while, can someone remind me what the mechanism for lazy evaluation is? I seem to remember, say, a lazy collection being populated not on consumption (ie reading) but as early as assignment. How’s that possible, or does my memory fail me?
<dminuoso>
algun: You just call Enumerator#lazy
Mgtuiw211 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<dminuoso>
Enabling you to do fancy stuff like this
<algun>
dminuoso: so my memory fails me?
jameser has joined #ruby
<dminuoso>
algun: "a lazy collection being populated not on consumption (ie reading) but as early as assignment" that sounds like the opposite by the way.
<algun>
yeah, maybe
rikai has quit [Read error: Connection reset by peer]
<dminuoso>
algun: Without lazy this would not be possible.
renchan has joined #ruby
rikai has joined #ruby
<dminuoso>
algun: Another to make a point to what you said:
banisterfiend has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<algun>
here’s where I’m coming from myCollection > map > filter. It would benefit me to be able to apply clever optimisations of my own such as cleverly filtering first, and mapping later. But if I postpone both until consumption (rather than assignment), then I may keep stuff in memory I don’t need (filter says I only need some of the stuff).
<algun>
dminuoso: ^
<dminuoso>
algun: lazy is your best friend then.
<algun>
dude
<algun>
do you even try to grok what i’m saying?
<algun>
or are you just memeing?
<algun>
no offense but really
mim1k has joined #ruby
<dminuoso>
algun: If you do a enumerable.lazy.filter(&filterPredicate).map(&func) there are no intermediate arrays generated in the first place, there are no multiple enumerations. It will not keep "stuff in memory you don't need"
<algun>
algun: it will keep the original enumerable in memory
<algun>
the original may contain elements whose side is greater than that to which they are mapped, and their count may be larger than the count to which they are mapped
leandrobighetti has joined #ruby
<algun>
That’s what i’m saying. I’d like to build a collection which does some composition heuristics, but gets forced (ie stops being lazy) on assignment.
<algun>
I seem to remember ruby being able to do this, but I may be wrong
<dminuoso>
algun: Are you asking whether you can explicitly force a lazy enumerator to apply its chain?
umaaji has joined #ruby
<algun>
I know I can do that, but I would like forcing to be implicit - on assignment
<dminuoso>
algun: Then don't use lazy.
<dminuoso>
Or, use lazy + force
<dminuoso>
Actually if you want the benefits of combing enumerations
<dminuoso>
i.e. stuff = collection.lazy.filter(&predicate).map(&func).force
<algun>
yeah, it has occurred to me
<dminuoso>
algun: The original array will still be there though, and you can't really work around that.
<dminuoso>
apeiros: By the way! It happened.
<algun>
well if it’s forced, the original may be garbage collected
<dminuoso>
algun: Oh I think I understand what you were getting at.
emers2n has quit [Ping timeout: 260 seconds]
<algun>
:)
<dminuoso>
algun: You were worried that the lazy enumerator would hold a reference to the original array and keep it in place?
Rodya_ has joined #ruby
<dminuoso>
And thus blow up memory consumption
<algun>
yes
<algun>
until consumed/forced
<algun>
*explicitly
<dminuoso>
Right.
spyder55 has joined #ruby
bigkevmcd has joined #ruby
<dminuoso>
Actually not until consumed
<dminuoso>
But until the lazy enuemrator itself is garbage collected.
antgel has joined #ruby
<algun>
wow, ruby, wth haha
<dminuoso>
Consumption is a bad word in this place, lazy just defers and combines execution.
banisterfiend has joined #ruby
vee_ has quit [Ping timeout: 246 seconds]
Rodya_ has quit [Ping timeout: 246 seconds]
nacsurte has joined #ruby
<dminuoso>
algun: lazy is kind of a high-end `compose`, functionally its similar to ARel (what ActiveRecord uses behind the scenes)
<algun>
i know
xall has joined #ruby
Mgtuiw211 has joined #ruby
pwnd_nsfw has quit [Ping timeout: 240 seconds]
nacsurte has quit [Ping timeout: 240 seconds]
pwnd_nsfw has joined #ruby
<algun>
maybe it can remove stuff from the method chain like AR can, and that’s why it keeps a reference to the original at all times?
<algun>
(eg. you remove filter, suddenly you need the whole original array again)
Beams has joined #ruby
spyder55 has quit []
banisterfiend has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
workmad3 has joined #ruby
banisterfiend has joined #ruby
<algun>
dminuoso: ^ something like unscope?
charliesome has joined #ruby
<dminuoso>
algun: It keeps a reference to the original at all times, because you can at any time execute (or append and execute later) it. Multiple times.
Mgtuiw211 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<dminuoso>
algun: If you want it disconnected, actually use an array of procs.
jaruga has joined #ruby
Ropeney has joined #ruby
Mgtuiw211 has joined #ruby
umaaji has quit [Read error: Connection reset by peer]
umaaji has joined #ruby
banisterfiend has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mostlybadfly has joined #ruby
<algun>
dminuoso: but if you can only add to the end, then you don’t need the original
<dminuoso>
algun: Yes you do, because lazy combines!
banisterfiend has joined #ruby
<algun>
can you give an example where this would come into play?
<dminuoso>
algun: You have to step back and realize that a.b.c actually creates intermediate objects. When you call #lazy you get a lazy enumerator back. When you invoke #select on that, you get another lazy enumerator back.
<dminuoso>
And you keep getting lazy enumerator objects back
<algun>
dminuoso: I didn’t mean you clean up c. I meant you clean up original collection
<dminuoso>
.force is just a "execute what you have right now"
<dminuoso>
algun: Yeah, but since any of these enumerators a, b, c and e exist, the original collection can't disappear.
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<algun>
yeah, but none other than c is used in line 17, so you can garbage collect c, b, a, and colleciton
<dminuoso>
algun: No you cant...
<algun>
*b a and collection, not c
<algun>
why not?
<algun>
remember, c is forced in line 13
<dminuoso>
algun: For the sake of sanity, let's rename them okay?
<algun>
no
<dminuoso>
Yes, because the issue you are experiencing is just bad english by japanese folks.
<dminuoso>
"force" does not "consume"
<dminuoso>
"force" means "execute"
<dminuoso>
it means "execute what you have right now",
<dminuoso>
It does not invalidate the lazy enumerator
<dminuoso>
in fact you can call .force on the lazy enumerator many times.
<algun>
i don’t know what you mean by consume
<algun>
but i assume i don’t mean what you think it means
<algun>
dminuoso: force executes the enumerator, creating intermediate results from the original collection. with intermediate results, providing you can only append *further* operations, you can forget the original
banisterfiend has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<dminuoso>
algun: Let me rephrase. As long as any lazy enumerator is in scope, the original collection's lifetime is extended.
<dminuoso>
Whether or not it's forced is completely irrelevant.
<algun>
well that’s wasteful
<algun>
you don’t need the original anymore
<dminuoso>
algun: Please share some code about what your intention is, so we're on the same page.
<algun>
nvm
moeabdol1 has joined #ruby
brent__ has joined #ruby
jdawgaz has joined #ruby
moeabdol has quit [Ping timeout: 255 seconds]
ar1arelaybot1 has joined #ruby
noe has joined #ruby
ar1arelaybot has quit [Ping timeout: 260 seconds]
romankapitonov has joined #ruby
brent__ has quit [Ping timeout: 260 seconds]
banisterfiend has joined #ruby
ur5us has joined #ruby
xall_ has joined #ruby
xall has quit [Ping timeout: 260 seconds]
Dimik has quit [Ping timeout: 240 seconds]
<apeiros>
dminuoso: it?
<dminuoso>
apeiros: Yes, I hopped onto the Elixir train!
<apeiros>
ah
<dminuoso>
Like, for real this time.
<apeiros>
have fun, I guess? :)
<dminuoso>
apeiros: My only problem is, it's leaking all over my Ruby code now.
<dminuoso>
Creating lambdas left and right. :S
<apeiros>
why's that a problem?
<dminuoso>
apeiros: I fear getting features on thedailywtf for trying to haskell in Ruby some day.
<dminuoso>
*featured
Cnapier has quit [Quit: Leaving]
<apeiros>
all PR is good PR? 😂
Bish has quit [Ping timeout: 246 seconds]
kt has joined #ruby
nacsurte has joined #ruby
Bish has joined #ruby
Rodya_ has joined #ruby
Rodya_ has quit [Ping timeout: 255 seconds]
nacsurte has quit [Ping timeout: 240 seconds]
Stickwalker has joined #ruby
phinxy has joined #ruby
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
pootiscoder has quit [Quit: pootiscoder]
jameser has joined #ruby
Stickwalker has quit [Quit: Leaving]
GodFather has quit [Ping timeout: 260 seconds]
GodFather has joined #ruby
rahul_bajaj has joined #ruby
GodFather_ has joined #ruby
bronson has joined #ruby
rabajaj has quit [Ping timeout: 260 seconds]
Serpent7776 has joined #ruby
bronson has quit [Ping timeout: 258 seconds]
alex`` has quit [Ping timeout: 258 seconds]
cabotto has joined #ruby
pootiscoder has joined #ruby
charliesome has joined #ruby
Ishido has joined #ruby
treaki_ has quit [Ping timeout: 260 seconds]
nacsurte has joined #ruby
nacsurte has quit [Ping timeout: 240 seconds]
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Rodya_ has joined #ruby
DoubleMalt has quit [Quit: Leaving]
jameser has joined #ruby
tvw has joined #ruby
tvw has quit [Remote host closed the connection]
Rodya_ has quit [Ping timeout: 246 seconds]
marr has joined #ruby
banisterfiend has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
banisterfiend has joined #ruby
rahul_bajaj has quit [Ping timeout: 260 seconds]
tvw has joined #ruby
ur5us has quit [Remote host closed the connection]
ur5us has joined #ruby
banisterfiend has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
domgetter has joined #ruby
banisterfiend has joined #ruby
ur5us has quit [Ping timeout: 260 seconds]
postmodern has quit [Quit: Leaving]
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
xall_ has quit [Ping timeout: 260 seconds]
someuser has joined #ruby
jameser has joined #ruby
scottschecter has quit [Quit: ZNC 1.6.3+deb1 - http://znc.in]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
scottschecter has joined #ruby
cabotto has quit [Remote host closed the connection]
dangerousdave has joined #ruby
cabotto_ has joined #ruby
cabotto_ is now known as cabotto
DefV_ has quit [Quit: leaving]
nacsurte has joined #ruby
rahul_bajaj has joined #ruby
banisterfiend has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
banisterfiend has joined #ruby
ghoti_ has joined #ruby
nacsurte has quit [Ping timeout: 240 seconds]
ghoti has quit [Read error: Connection reset by peer]
rgtk has joined #ruby
ShekharReddy has quit [Quit: Connection closed for inactivity]
Ropeney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
contradictioned has quit [Ping timeout: 255 seconds]
hightower2 has joined #ruby
banisterfiend has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nadir has joined #ruby
Rodya_ has joined #ruby
gaurav has quit [Quit: leaving]
contradictioned has joined #ruby
Rodya_ has quit [Ping timeout: 246 seconds]
cabotto has quit [Remote host closed the connection]
quobo has joined #ruby
tacoboy has joined #ruby
banisterfiend has joined #ruby
banisterfiend has quit [Client Quit]
HoierM has joined #ruby
apparition47 has joined #ruby
tobiasvl has quit [Quit: Fedora 26]
conta has quit [Quit: conta]
bronson has joined #ruby
rikkipitt has joined #ruby
rikkipitt has quit [Remote host closed the connection]
conta has joined #ruby
banisterfiend has joined #ruby
Bhootrk_ has quit [Remote host closed the connection]
Bhootrk_ has joined #ruby
jrafanie has joined #ruby
bronson has quit [Ping timeout: 260 seconds]
GodFather_ has quit [Ping timeout: 240 seconds]
GodFather has quit [Ping timeout: 260 seconds]
rgr_ has quit [Quit: rgr_]
gloscombe has joined #ruby
xall_ has joined #ruby
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
ldnunes has joined #ruby
ltem has quit [Quit: Leaving]
cadillac_ has quit [Ping timeout: 240 seconds]
brent__ has joined #ruby
nacsurte has joined #ruby
tvl has joined #ruby
tvl is now known as tobiasvl
ocn has joined #ruby
ocn has left #ruby [#ruby]
brent__ has quit [Ping timeout: 260 seconds]
nacsurte has quit [Ping timeout: 260 seconds]
dangerousdave has quit [Ping timeout: 240 seconds]
synthroid has joined #ruby
ecuanaso has joined #ruby
olivierjanss has joined #ruby
Rodya_ has joined #ruby
MarkBilk has joined #ruby
ecuanaso has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Rodya_ has quit [Ping timeout: 276 seconds]
MarkBilk_ has quit [Ping timeout: 258 seconds]
jenrzzz has quit [Ping timeout: 240 seconds]
banisterfiend has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
banisterfiend has joined #ruby
jinie_ has quit [Ping timeout: 246 seconds]
jinie_ has joined #ruby
banisterfiend has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
rgtk has quit [Ping timeout: 276 seconds]
jrafanie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
anisha has quit [Read error: Connection reset by peer]
Emmanuel_Chanel has joined #ruby
banisterfiend has joined #ruby
anisha has joined #ruby
charliesome has joined #ruby
xall_ has quit [Ping timeout: 246 seconds]
anisha has quit [Read error: Connection reset by peer]
anisha has joined #ruby
jameser has joined #ruby
banisterfiend has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
banisterfiend has joined #ruby
cabotto has joined #ruby
nacsurte has joined #ruby
bane_ has joined #ruby
cabotto has quit [Remote host closed the connection]
banisterfiend has quit [Client Quit]
banisterfiend has joined #ruby
__Yiota has joined #ruby
nacsurte has quit [Ping timeout: 255 seconds]
ecuanaso has joined #ruby
ecuanaso has quit [Client Quit]
tirej has joined #ruby
heftig has quit [Ping timeout: 240 seconds]
Giphy[m] has quit [Ping timeout: 240 seconds]
testnick[m] has quit [Ping timeout: 258 seconds]
turt2live has quit [Ping timeout: 246 seconds]
Tagami[m] has quit [Ping timeout: 240 seconds]
aviraldg has quit [Ping timeout: 240 seconds]
aidalgol has quit [Ping timeout: 240 seconds]
lasenna[m] has quit [Ping timeout: 240 seconds]
KevinMGranger has quit [Ping timeout: 240 seconds]
dman[m] has quit [Ping timeout: 240 seconds]
tirej has joined #ruby
velu_aon[m] has quit [Ping timeout: 246 seconds]
tirej has quit [Changing host]
yana[m] has quit [Ping timeout: 246 seconds]
jonjits[m] has quit [Ping timeout: 246 seconds]
voltai[m] has quit [Ping timeout: 255 seconds]
torarne has quit [Ping timeout: 255 seconds]
M107262[m] has quit [Ping timeout: 255 seconds]
gokul_mr[m] has quit [Ping timeout: 264 seconds]
aagdbl[m] has quit [Ping timeout: 276 seconds]
bmurt has joined #ruby
Matt[m]1 has quit [Ping timeout: 276 seconds]
vali has quit [Quit: vali]
banisterfiend has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jaruga has quit [Quit: jaruga]
jaruga has joined #ruby
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
arvindsa- has quit [Ping timeout: 240 seconds]
banisterfiend has joined #ruby
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
carnegie has joined #ruby
howdoi has quit [Quit: Connection closed for inactivity]
arvindsaik has joined #ruby
sepp2k has joined #ruby
govg has quit [Ping timeout: 248 seconds]
jphase has joined #ruby
rgtk has joined #ruby
rgtk has quit [Ping timeout: 258 seconds]
spiette has joined #ruby
ltem has joined #ruby
DLSteve has joined #ruby
code_zombie has joined #ruby
<konsolebox>
can gem be built with different parameters during 'gem install'?
<konsolebox>
i mean, can a gem be configured to do so?
<adam12>
konsolebox: Sure.
<konsolebox>
adam12: how is a parameter passed?
<adam12>
konsolebox: Finish the gem install command with --, and anything after is passed along as build flags.
<konsolebox>
adam12: and how does the gem query that?
<konsolebox>
or access
ledestin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<adam12>
konsolebox: It's a getopts thing, IIRC. The -- signifies end of options for current binary, with the remainder being provided to the next (if applicable)
<konsolebox>
which part of the gem should i configure to do that? *.gemspec?
bronson has joined #ruby
<adam12>
konsolebox: Let's step back a bit. What exactly are you trying to do?
umaaji has quit [Quit: Leaving...]
Tagami[m] has joined #ruby
<konsolebox>
creating a gem that can be configured to build differently based on an argument to `gem install`
<adam12>
konsolebox: What is `build differently`?
<konsolebox>
because one could build from a common static source file, but it can also link to an existing library. the library has the advantage of being optimized depending on the platform.
banisterfiend has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jameser has joined #ruby
oleo has joined #ruby
agent_white has quit [Quit: bai]
<adam12>
konsolebox: so your using the `extensions` part of the spec?
<konsolebox>
i could create two versions of the gem, but i thought it might be better if can have just one
<konsolebox>
yes
naprimer3 has quit [Ping timeout: 240 seconds]
<konsolebox>
i'm building the ext
banisterfiend has joined #ruby
Xiti` has joined #ruby
<adam12>
I have no experience in this area, but maybe you can access the extra args through the `@build_args` instance method inside Gem::Ext::Builder
<adam12>
do you have an ext file that your building?
bronson has quit [Ping timeout: 240 seconds]
nacsurte has joined #ruby
<adam12>
konsolebox: maybe something through mkmf? This is about the length of my knowledge in this area.
<konsolebox>
yes i study the mkmf
<konsolebox>
i haven't seen anything helpful
<konsolebox>
i have extconf.rb sure
Xiti has quit [Ping timeout: 255 seconds]
gizmore has joined #ruby
<konsolebox>
i could try echoing some ARGV later. maybe i'll see something.
nacsurte has quit [Ping timeout: 240 seconds]
<adam12>
konsolebox: I'd wonder what context your extconf.rb is running in
jdawgaz has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<adam12>
konsolebox: I'm assuming it's running in context of Gem::Ext::ExtConfBuilder - which makes me think you have access to the build_args instance method. But I'm not 100% sure tbh.
banisterfiend has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<dminuoso>
Though in other cases, `const { type, payload } = yield(stuff());` can be a bit nicer than having to shuffle around large objects whose contents largely dont concern you
milardovich has quit [Ping timeout: 260 seconds]
banisterfiend has joined #ruby
drcode has joined #ruby
pootiscoder has quit [Quit: pootiscoder]
milardovich has joined #ruby
cam27 has joined #ruby
drcode has quit [Client Quit]
ascarter has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
apparition47 has quit [Quit: Bye]
drcode has joined #ruby
zululee has quit [Ping timeout: 268 seconds]
ResidentBiscuit has joined #ruby
ana_ has quit [Ping timeout: 246 seconds]
milardovich has quit [Ping timeout: 240 seconds]
jamal7 has joined #ruby
mikecmpbll has quit [Quit: inabit. zz.]
theunraveler has quit [Ping timeout: 246 seconds]
noe has quit [Remote host closed the connection]
mikecmpbll has joined #ruby
rgtk has quit [Ping timeout: 240 seconds]
noe has joined #ruby
__Yiota has joined #ruby
imperator has joined #ruby
dionysus69 has joined #ruby
polishdub has joined #ruby
synthroid has quit [Remote host closed the connection]
Serpent7776 has quit [Quit: Leaving]
banisterfiend has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
banisterfiend has joined #ruby
cabotto has quit [Remote host closed the connection]
tobiasvl has quit [Read error: Connection reset by peer]
gnufied has quit [Ping timeout: 246 seconds]
howdoi has joined #ruby
edwardly has quit [Ping timeout: 260 seconds]
edwardly has joined #ruby
edwardly has joined #ruby
edwardly has quit [Changing host]
carnegie has quit [Remote host closed the connection]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bmurt has joined #ruby
jdawgaz has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rgtk has quit [Ping timeout: 260 seconds]
mikecmpbll has quit [Quit: inabit. zz.]
rgtk has joined #ruby
renchan has quit [Quit: Leaving...]
jdawgaz has joined #ruby
cdg has joined #ruby
carnegie has joined #ruby
sneakerhax has quit [Ping timeout: 255 seconds]
alex`` has joined #ruby
gusrub has joined #ruby
cabotto has quit []
kies has quit [Ping timeout: 246 seconds]
carnegie has quit [Ping timeout: 276 seconds]
algun has joined #ruby
enterprisey has quit [Ping timeout: 260 seconds]
davic has joined #ruby
leandrobighetti has quit [Remote host closed the connection]
sagax has joined #ruby
leandrobighetti has joined #ruby
mim1k has quit [Ping timeout: 248 seconds]
Beams has quit [Quit: .]
jaruga has quit [Quit: jaruga]
leandrobighetti has quit [Ping timeout: 255 seconds]
rgtk has quit [Ping timeout: 240 seconds]
mim1k has joined #ruby
ar1arelaybot111 has joined #ruby
ar1arelaybot11 has quit [Ping timeout: 248 seconds]
rgtk has joined #ruby
TomyLobo3 has joined #ruby
enterprisey has joined #ruby
romankapitonov has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
domgetter has quit [Ping timeout: 260 seconds]
carnegie has joined #ruby
carnegie has quit [Client Quit]
jrafanie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tvw has quit [Remote host closed the connection]
synthroi_ has joined #ruby
mim1k has quit [Ping timeout: 248 seconds]
mtkd has quit [Ping timeout: 268 seconds]
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ramfjord has joined #ruby
synthroid has quit [Ping timeout: 260 seconds]
mtkd has joined #ruby
milardovich has joined #ruby
ryzokuken has joined #ruby
rgtk has quit [Ping timeout: 260 seconds]
wilbert has joined #ruby
conta has joined #ruby
milardovich has quit [Ping timeout: 258 seconds]
krichtof has joined #ruby
SuperLag has joined #ruby
perniciouscaffei has joined #ruby
BeginnerRubyist has joined #ruby
chouhoul_ has joined #ruby
chouhoulis has quit [Ping timeout: 248 seconds]
BeginnerRubyist has quit [Client Quit]
rickumali has joined #ruby
cdg has quit [Remote host closed the connection]
rgtk has joined #ruby
hutch34 has joined #ruby
hahuang65 has joined #ruby
BeginnerRubyist has joined #ruby
rgtk has quit [Ping timeout: 255 seconds]
alex`` has quit [Quit: WeeChat 1.9]
bronson has joined #ruby
milardovich has joined #ruby
kies has joined #ruby
carnegie has joined #ruby
duderonomy has joined #ruby
milardovich has quit [Ping timeout: 255 seconds]
hahuang65 has quit [Quit: WeeChat 1.9]
jdawgaz has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
eckhardt has joined #ruby
jdawgaz has joined #ruby
jdawgaz has quit [Client Quit]
romankapitonov has joined #ruby
carnegie has quit [Remote host closed the connection]
hahuang65 has joined #ruby
conta has quit [Quit: conta]
jdawgaz has joined #ruby
gusrub has quit [Remote host closed the connection]
gusrub has joined #ruby
perniciouscaffei has quit [Ping timeout: 260 seconds]
milardovich has joined #ruby
gusrub has quit [Ping timeout: 246 seconds]
dangerousdave has quit [Ping timeout: 240 seconds]
jameser_ has quit [Ping timeout: 240 seconds]
b3ck has quit [Ping timeout: 240 seconds]
gloscombe has quit [Quit: WeeChat 1.9]
jackjackdripper has joined #ruby
bronson has quit [Remote host closed the connection]
milardovich has quit [Ping timeout: 260 seconds]
rabajaj has joined #ruby
bane_ has quit [Quit: Konversation terminated!]
millerti has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
chrisgopher has joined #ruby
jackjackdripper has quit [Quit: Leaving.]
jackjackdripper has joined #ruby
tahr314301 has joined #ruby
b3ck has joined #ruby
tahr314301 has quit [Quit: Leaving]
postmodern has joined #ruby
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
krichtof has quit [Quit: leaving]
moeabdol has joined #ruby
milardovich has joined #ruby
ledestin has joined #ruby
__Yiota has joined #ruby
dstrunk has joined #ruby
rwt has joined #ruby
rwt has quit [Changing host]
rwt has joined #ruby
rwt has joined #ruby
minimalism has joined #ruby
workmad3 has quit [Ping timeout: 255 seconds]
milardovich has quit [Ping timeout: 260 seconds]
dstrunk has quit [Client Quit]
jdawgaz has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
carnegie has joined #ruby
dcluna has quit [Ping timeout: 255 seconds]
kkiero has joined #ruby
leandrobighetti has joined #ruby
mikecmpbll has joined #ruby
dcluna has joined #ruby
carnegie has quit [Remote host closed the connection]
carnegie has joined #ruby
jrafanie has joined #ruby
tvw has joined #ruby
Bock has quit [Ping timeout: 240 seconds]
jameser has joined #ruby
carnegie has quit [Quit: Leaving...]
SeepingN has joined #ruby
vuoto has joined #ruby
cam27 has quit [Quit: cam27]
balazs has joined #ruby
gusrub has joined #ruby
romankapitonov has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
weaksauce has joined #ruby
_sfiguser has joined #ruby
roshanavand has joined #ruby
kobain has joined #ruby
jdawgaz has joined #ruby
ur5us has joined #ruby
millerti has joined #ruby
antgel has joined #ruby
ur5us has quit [Ping timeout: 255 seconds]
gusrub has quit [Remote host closed the connection]
guacamole has joined #ruby
antgel has quit [Remote host closed the connection]
antgel has joined #ruby
MarkBilk has quit [Ping timeout: 255 seconds]
antgel has quit [Ping timeout: 258 seconds]
bruno- has quit [Quit: Lost terminal]
m27frogy has quit [Ping timeout: 260 seconds]
bruno- has joined #ruby
synthroid has joined #ruby
bruno- is now known as Guest74148
polysics has quit [Remote host closed the connection]
polysics has joined #ruby
t-recx has joined #ruby
synthroi_ has quit [Ping timeout: 248 seconds]
m27frogy has joined #ruby
polysics has quit [Client Quit]
hahuang65 has quit [Ping timeout: 240 seconds]
milardovich has joined #ruby
Mattx has joined #ruby
<Mattx>
Hey people! I have this string: "\141", and I want to convert it to "a". How is it done?
Rodya_ has joined #ruby
<Mattx>
(actually the string may be in hex, oct or whatever. I don't know beforehand)
marr has joined #ruby
<havenwood>
Mattx: That String already is "a", do you mean you have?: "\\141"
<havenwood>
>> "\141"
<Mattx>
sorry. yes, I have \\141
<ruby[bot]>
havenwood: I'm terribly sorry, I could not evaluate your code because of an error: NoMethodError:undefined method `[]' for nil:NilClass
<Papierkorb>
Mattx: You mean, given an input like that (from a file, a user, ...), you want to produce the string that doesn't use this notation, correct?
<Mattx>
or "\\x6" in other cases. or things like that
milardovich has quit [Ping timeout: 240 seconds]
<Mattx>
Papierkorb, that's right. I want to get the string in plain ascii
<Papierkorb>
Well you'll get a unicode string, not plain ascii. You can check/enforce that later though
Fin1te has joined #ruby
<Mattx>
no problem about that
<Papierkorb>
Mattx: See String#gsub - Use a regex to find the "\..." notation, and then use Integer#chr to turn that integer value you read out into a character, and return it from the #gsub block
<Papierkorb>
Mattx: Important bit: `\123` is octal 123 aka, base 8, and not in decimal as you might expect.
<Mattx>
that's exactly what I was doing, but isn't there a better way than checking if the match starts with \x, \o, \ or whatever?
<Papierkorb>
Can you share your current code?
<Mattx>
sure, one sec
ramfjord has quit [Ping timeout: 240 seconds]
<Mattx>
it's pretty simple at the moment: content.gsub! /(\\.\d+)/ do ...$1... end
<Mattx>
that $1 contains the character, I thought there may be something like .to_s(base) or something, but the other way around
<Papierkorb>
I'd have two capture groups: First something like ([xu]?), and second (\d+). Then check the first capture group to get the base, and decode the second accordingly
dangerousdave has joined #ruby
<Mattx>
alright, I was trying to avoid that but if there's no other way...
<Papierkorb>
Minus the `u` in the first one if you want to replicate rubys behaviour.
<Mattx>
nothing or \o for base 8, \x for base 16, \b for base 2
<Mattx>
is there anything else out there?
<Papierkorb>
\b doesn't exist, \o neither (no "o")
<Papierkorb>
notations are "\xFF", "\123" and "\u{1234}"
<Mattx>
no? I think I used \b in the past, maybe on another language (?)
<Mattx>
thanks Papierkorb
<Papierkorb>
\b is the BEL character
rwt has left #ruby [#ruby]
<Papierkorb>
No wait, it's not. It's the backspace character
hahuang65 has joined #ruby
wilbert has quit [Ping timeout: 240 seconds]
<Mattx>
"foobar".gsub! /\\(x?)([0-9a-f]+)/i do $1 == "x" ? $2.to_i(16).chr : $2.to_i(8).chr end
<Mattx>
that would do it
t-recx has quit [Quit: t-recx]
<Papierkorb>
It will do, but also accept broken input like `"\9"`
<apeiros>
if you use /\\(x)?([0-9a-f]+)/i, you can just do `$1 ? …`
<apeiros>
and if you want it valid, you can use /\\x(\h\h)|\\([0-7]{1,3})/ with $1 ? …
romankapitonov has joined #ruby
gusrub has joined #ruby
hutch34 has quit [Ping timeout: 246 seconds]
guacamole has quit [Ping timeout: 255 seconds]
troulouliou_div2 has joined #ruby
<Mattx>
didn't know about \h, nice
GodFather has joined #ruby
GodFather_ has joined #ruby
gusrub has quit [Ping timeout: 255 seconds]
testnick[m] has quit [Quit: idle]
<apeiros>
there might even be one for octal, I was too lazy to look it up :)
kkiero has left #ruby [#ruby]
brent__ has quit [Remote host closed the connection]
brent__ has joined #ruby
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
romankapitonov has quit [Read error: Connection reset by peer]
wilbert has joined #ruby
hahuang65 has quit [Ping timeout: 260 seconds]
boombox_ has joined #ruby
Fin1te has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
brent__ has quit [Ping timeout: 260 seconds]
Fin1te has joined #ruby
brent__ has joined #ruby
dionysus69 has quit [Remote host closed the connection]
dionysus69 has joined #ruby
jenrzzz has quit [Ping timeout: 258 seconds]
romankapitonov has joined #ruby
hahuang65 has joined #ruby
bronson has joined #ruby
romankapitonov has quit [Read error: Connection reset by peer]
boombox_ has quit [Remote host closed the connection]
romankapitonov has joined #ruby
milardovich has joined #ruby
rabajaj has quit [Remote host closed the connection]
brendan- has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
brendan- has joined #ruby
cam27 has joined #ruby
bronson has quit [Ping timeout: 260 seconds]
milardovich has quit [Ping timeout: 240 seconds]
anisha has quit [Quit: This computer has gone to sleep]
troulouliou_div2 has quit [Quit: Leaving]
eckhardt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
chouhoul_ has quit [Remote host closed the connection]
chouhoulis has joined #ruby
synthroi_ has joined #ruby
marxarelli is now known as marxarelli|afk
chrisgopher has quit [Remote host closed the connection]
synthro__ has joined #ruby
gloscombe has joined #ruby
ramfjord has joined #ruby
hndk has joined #ruby
synthroid has quit [Ping timeout: 276 seconds]
synthroi_ has quit [Ping timeout: 240 seconds]
hutch34 has joined #ruby
Jakaria has joined #ruby
vuoto has quit [Ping timeout: 260 seconds]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<Jakaria>
is `self.class.method_name` is same as `class.method_name`?
vuoto has joined #ruby
hinbody has quit [Ping timeout: 255 seconds]
jenrzzz has joined #ruby
gusrub has joined #ruby
<apeiros>
Jakaria: if class wasn't a keyword, yes
<apeiros>
but since it's a keyword, no. class.method_name will be a syntax error.
hutch34 has quit [Ping timeout: 246 seconds]
moeabdol has quit [Quit: WeeChat 1.9]
t-recx has joined #ruby
ltem has quit [Quit: Leaving]
milardovich has joined #ruby
machinewar has joined #ruby
_sfiguser has quit [Ping timeout: 240 seconds]
lxsameer has joined #ruby
dangerousdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ur5us has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
sgen has quit [Quit: Leaving]
milardovich has quit [Ping timeout: 240 seconds]
slackR has joined #ruby
leandrobighetti has quit [Remote host closed the connection]
MarkBilk has joined #ruby
leandrobighetti has joined #ruby
jdawgaz has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
eckhardt has joined #ruby
sgen has joined #ruby
ryzokuken has quit [Quit: Leaving]
leandrobighetti has quit [Ping timeout: 240 seconds]
rickumali has left #ruby [#ruby]
hahuang65 has quit [Ping timeout: 246 seconds]
_sfiguser has joined #ruby
drcode has joined #ruby
hahuang65 has joined #ruby
alex`` has joined #ruby
Murda has joined #ruby
Murda has quit [Remote host closed the connection]
_sfiguser has quit [Client Quit]
_sfiguser has joined #ruby
ta_ has joined #ruby
zapata has quit [Ping timeout: 240 seconds]
hahuang65 has quit [Ping timeout: 246 seconds]
leandrobighetti has joined #ruby
conta3 has joined #ruby
banisterfiend has quit [Ping timeout: 255 seconds]
vuoto has quit [Remote host closed the connection]
conta3 has quit [Ping timeout: 258 seconds]
skinnymg1 has joined #ruby
johnny56_ is now known as johnny56
dangerousdave has joined #ruby
zapata has joined #ruby
belteshazzar has quit [Quit: WeeChat 1.8]
bronson has joined #ruby
synthro__ has quit []
dangerousdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
brent__ has quit [Remote host closed the connection]
milardovich has joined #ruby
bronson has quit [Ping timeout: 248 seconds]
kkiero has joined #ruby
quobo has joined #ruby
sepp2k has quit [Ping timeout: 255 seconds]
enterprisey has quit [Remote host closed the connection]
noe has quit [Quit: noe]
dionysus69 has quit [Ping timeout: 246 seconds]
jenrzzz_ has joined #ruby
hutch34 has joined #ruby
leandrobighetti has quit []
jenrzzz has quit [Ping timeout: 276 seconds]
_aeris_ has quit [Ping timeout: 248 seconds]
chouhoulis has quit [Ping timeout: 240 seconds]
_aeris_ has joined #ruby
jenrzzz_ has quit [Ping timeout: 240 seconds]
hutch34 has quit [Ping timeout: 276 seconds]
roshanavand has quit [Quit: roshanavand]
ramfjord has quit [Ping timeout: 260 seconds]
millerti has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
brent__ has joined #ruby
moei has quit [Quit: Leaving...]
Mattx has quit [Quit: Leaving]
ascarter has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
ldnunes has quit [Quit: Leaving]
Jakaria has left #ruby ["WeeChat 1.4"]
BeginnerRubyist has quit [Ping timeout: 260 seconds]
hutch34 has joined #ruby
milardovich has quit [Remote host closed the connection]
milardovich has joined #ruby
oleo has quit [Ping timeout: 276 seconds]
alex`` has quit [Quit: WeeChat 1.9]
Fin1te has quit [Quit: Later, tater.]
ascarter has joined #ruby
dstrunk has joined #ruby
milardovich has quit [Ping timeout: 260 seconds]
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
spheric has joined #ruby
chrisgop_ has joined #ruby
hutch34 has quit [Ping timeout: 258 seconds]
banisterfiend has joined #ruby
millerti has joined #ruby
pootiscoder has quit [Quit: pootiscoder]
hutch34 has joined #ruby
tirej has quit [Quit: Lost terminal]
jdawgaz has joined #ruby
ascarter has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
GodFather has quit [Ping timeout: 260 seconds]
GodFather_ has quit [Ping timeout: 240 seconds]
jdawgaz has quit [Client Quit]
hutch34 has quit [Ping timeout: 240 seconds]
[Butch] has quit [Quit: I'm out . . .]
GodFather has joined #ruby
GodFather_ has joined #ruby
tvw has quit [Remote host closed the connection]
wilbert has quit [Ping timeout: 246 seconds]
machinewar has quit []
mim1k has joined #ruby
jdawgaz has joined #ruby
hutch34 has joined #ruby
mim1k has quit [Ping timeout: 260 seconds]
hutch34 has quit [Ping timeout: 240 seconds]
eckhardt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
eckhardt has joined #ruby
mim1k has joined #ruby
gusrub has quit [Remote host closed the connection]
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]