<rapha>
is it possible that it's name is misleading? or that my understanding of the english word "map" ("to map" in the sense of "to map something onto something"?) is erroneous?
<rapha>
well, the 'a'*3 thing at least is easy to understand and intuitive :)
jottr has joined #ruby
<havenwood>
rapha: In Ruby we have #map (from Lisp) and the lesser-used #collect alias (from Smalltalk).
<mistym>
havenwood: Oh, that's what the etymology is! I'd wondered.
<havenwood>
rapha: Most modern language (ahem, Go >.>) have adopted map.
talntid has joined #ruby
<rapha>
hmm
<havenwood>
rapha: The Lispy terms have won. Similarly #inject is from Smalltalk and #reduce is from Lisp.
<rapha>
interesting, i didn't realize programming languages were that much like real languages
<havenwood>
rapha: We map/reduce instead of collect/inject ;-).
kapil___ has quit [Quit: Connection closed for inactivity]
John_Ivan has quit [Read error: Connection reset by peer]
<lupine>
if you don't give `times` a block, it returns an Enumerator
dmitriy_ has joined #ruby
dmitriy_ has quit [Read error: Connection reset by peer]
<havenwood>
mistym: Most of the Smalltalk terms seem to be disappearing.
<lupine>
that's the only magic worth mentioning
<mistym>
havenwood: :'(
<talntid>
I have an app that was written in ruby.. it's a webapp with Sinatra/Mongo ... it was working perfect until yesterday, where it just stopped working, and started complaining that gems were missing... I reinstalled the gems, and now I get errors that I suspect are from gem versions being off.... anyone want to fix it today? or help me fix it? It mostly works, but there are some small issues right
<talntid>
now. I'd be willing to pay for your time.
<havenwood>
Ruby is the Smalltalk that won. :-O
<lupine>
lol
<rapha>
i wonder what'll happen if i /join #smalltalk and declare "ruby is t he smalltalk that won"
redlegion has quit [Remote host closed the connection]
jottr_ has quit [Ping timeout: 240 seconds]
<havenwood>
talntid: Prefix your command with `bundle exec`. Donate what you'd have paid me to the EFF. ;-)
<havenwood>
rapha: Good luck!!
redlegion has joined #ruby
redlegion has joined #ruby
redlegion has quit [Changing host]
workmad3 has joined #ruby
<havenwood>
rapha: And please don't quote me, hahaha.
redlegion has quit [Remote host closed the connection]
<lupine>
I learned about wolf pack programming from a smalltalk veteran
<rapha>
(will they send me to /join #go-lang to learn that "go is the ruby that won"?)
<lupine>
worthy of respect innit
<havenwood>
rapha: Matz does like Go.
houhoulis has quit [Remote host closed the connection]
<talntid>
havenwood, i had tried that earlier today. threw a bunch of errors about versions, so I manually installed all the gems in the gemfile, and the app works, but basically a few things are wonky...
<havenwood>
talntid: Same Ruby version as before?
<rapha>
seriously? "[wolf pack programming] depends on a shared (web-based) editor that several developers use at once to develop code for the same tasks"? i'd go crazy!
<talntid>
negative. I upgraded ruby version afterwards in an attempt to get it working.
<havenwood>
talntid: I'm curious if `bundle exec` would have sufficed and the Ruby upgrade is the cause of the new compatibility issues. I suppose it's nice to fix those issues and get on the shiny new Ruby.
<talntid>
it started by saying thin wasn't available, so i did bundler install, and it said that eventmachine wasn't compatible with version of ruby, so i upgraded ruby, and then it said that mongo's "wire line" was version 0, but needed to be version 2, so i upgraded mongo, and now the app works, but.... when it returns ids, it is returning them as objects instead of stringsd
dmitriy_ has joined #ruby
dmitriy_ has quit [Read error: Connection reset by peer]
Rgs1955 has quit [Quit: Page closed]
<havenwood>
talntid: Can you just .to_s the objects or something else is awry? I don't follow Mongo close enough to know what might have gone wrong in the version bump.
<talntid>
so basically, i assume the view is trying to show info on an "appointment" object, that it can't find, because ruby is looking for appointment(id) where id is an object instead of a string
sylario has quit [Quit: Connection closed for inactivity]
tvw has quit [Ping timeout: 265 seconds]
alfiemax has joined #ruby
bkxd has joined #ruby
dmitriy_ has joined #ruby
dmitriy_ has quit [Read error: Connection reset by peer]
alfiemax has quit [Ping timeout: 240 seconds]
redlegion has joined #ruby
redlegion has joined #ruby
redlegion has quit [Changing host]
bkxd has quit [Ping timeout: 245 seconds]
dmitriy_ has joined #ruby
dmitriy_ has quit [Read error: Connection reset by peer]
bkxd has joined #ruby
bkxd has quit [Ping timeout: 240 seconds]
dmitriy_ has joined #ruby
dmitriy_ has quit [Read error: Connection reset by peer]
redlegion has quit [Quit: WeeChat 2.0.1]
redlegion has joined #ruby
talntid has quit [Changing host]
talntid has joined #ruby
alfiemax has joined #ruby
dmitriy_ has joined #ruby
dmitriy_ has quit [Read error: Connection reset by peer]
<arahael>
Where is the documentation for writing files?
<talntid>
whats the best way to post code from many pages?
bmurt has quit [Ping timeout: 252 seconds]
bmurt has joined #ruby
c0ncealed has quit [Remote host closed the connection]
zenspider_ has joined #ruby
c0ncealed has joined #ruby
beauby has joined #ruby
drewmcmillan has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
drewmcmillan has joined #ruby
beauby has quit [Ping timeout: 252 seconds]
marxarelli is now known as marxarelli|afk
houhoulis has quit [Remote host closed the connection]
alfiemax has joined #ruby
pastorinni has quit [Remote host closed the connection]
alfiemax has quit [Ping timeout: 252 seconds]
reaVer has quit [Ping timeout: 240 seconds]
alfiemax has joined #ruby
bkxd has joined #ruby
alfiemax has quit [Ping timeout: 240 seconds]
wojnar has joined #ruby
reaVer has joined #ruby
govg has joined #ruby
reaVer has quit [Ping timeout: 240 seconds]
bkxd has quit [Ping timeout: 248 seconds]
reaVer has joined #ruby
milardov_ has quit [Remote host closed the connection]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
karapetyan has quit [Remote host closed the connection]
alfiemax has joined #ruby
karapetyan has joined #ruby
karapetyan has quit [Remote host closed the connection]
alfiemax has quit [Ping timeout: 268 seconds]
karapetyan has joined #ruby
reaVer has quit [Remote host closed the connection]
darkhanb has quit [Ping timeout: 245 seconds]
Sembei has quit [Ping timeout: 245 seconds]
MyMind has joined #ruby
drewmcmillan has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
karapetyan has quit [Ping timeout: 256 seconds]
kn-928 has quit [Quit: WeeChat 2.0.1]
reaVer has joined #ruby
cdg has joined #ruby
alfiemax has joined #ruby
darkhanb has joined #ruby
alfiemax has quit [Ping timeout: 252 seconds]
Pisuke has joined #ruby
MyMind has quit [Ping timeout: 252 seconds]
zenspider_ has quit [Quit: bye]
alfiemax has joined #ruby
cdg has quit [Remote host closed the connection]
alfiemax_ has joined #ruby
alfiemax has quit [Ping timeout: 256 seconds]
trautwein has joined #ruby
gix has joined #ruby
milardovich has joined #ruby
gix- has quit [Ping timeout: 240 seconds]
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
RushPL has quit [Ping timeout: 256 seconds]
wojnar has quit [Quit: Leaving]
milardovich has quit [Ping timeout: 252 seconds]
jeffreylevesque has joined #ruby
bkxd has joined #ruby
workmad3 has joined #ruby
eightlimbed has joined #ruby
jnollette has quit [Ping timeout: 255 seconds]
bkxd has quit [Ping timeout: 256 seconds]
workmad3 has quit [Ping timeout: 252 seconds]
kapil___ has joined #ruby
eightlimbed has quit [Remote host closed the connection]
<havenwood>
?gist talntid
<ruby[bot]>
talntid: https://gist.github.com - Multiple files, syntax highlighting, even automatically with matching filenames, can be edited
alfiemax_ has quit [Remote host closed the connection]
alfiemax has joined #ruby
alfiemax has quit [Remote host closed the connection]
jnollette has joined #ruby
Pisuke has quit [Ping timeout: 245 seconds]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
iMadper has joined #ruby
<Vashy>
anyone know how I can check if something is installed from a ruby script? e.g. if I want to write a script that checks to see if postgres is installed
jottr has quit [Ping timeout: 240 seconds]
troys has quit [Ping timeout: 252 seconds]
<Vashy>
I want to write a script that will help me set up projects easily, so it will do some set up like check if postgres is installed, create a rails app, set the db credentials properly, etc
AxelAlex has joined #ruby
<Vashy>
my machines are running ubuntu and macos so I'll have terminal commands to work with
anisha has joined #ruby
anisha has quit [Client Quit]
jenrzzz has quit [Ping timeout: 240 seconds]
rippa has joined #ruby
anisha has joined #ruby
memo1 has quit [Ping timeout: 260 seconds]
nchambers is now known as uplime
uplime is now known as nchambers
Pisuke has joined #ruby
milardovich has joined #ruby
alex`` has joined #ruby
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jamesaxl has joined #ruby
milardovich has quit [Ping timeout: 248 seconds]
howdoi has joined #ruby
<havenwood>
Vashy: Chef or Puppet do those sorts of things.
ramfjord has quit [Ping timeout: 252 seconds]
ramfjord has joined #ruby
<Vashy>
ok I'll read into those tools
ramfjord has quit [Ping timeout: 252 seconds]
bkxd has joined #ruby
duderonomy has joined #ruby
duderonomy is now known as Guest85770
sidx64 has joined #ruby
sidx64 has quit [Client Quit]
sidx64 has joined #ruby
ramfjord has joined #ruby
bkxd has quit [Ping timeout: 240 seconds]
ramfjord has quit [Ping timeout: 240 seconds]
sidx64 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
kapil___ has quit [Quit: Connection closed for inactivity]
strika has quit [Quit: leaving]
strika has joined #ruby
jottr has joined #ruby
sidx64 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
sidx64 has joined #ruby
jottr has quit [Ping timeout: 252 seconds]
apeiros has quit [Remote host closed the connection]
mtkd has quit []
sidx64 has quit [Read error: Connection reset by peer]
sidx64 has joined #ruby
mtkd has joined #ruby
n008f4g_ has joined #ruby
sidx64 has quit [Client Quit]
jottr has joined #ruby
milardovich has joined #ruby
jottr has quit [Ping timeout: 260 seconds]
milardovich has quit [Ping timeout: 240 seconds]
AJA4350 has quit [Quit: AJA4350]
darkhanb has joined #ruby
guardianx has joined #ruby
tolland has joined #ruby
andikr has joined #ruby
jottr has joined #ruby
ryzokuken has joined #ruby
KeyJoo has quit [Ping timeout: 252 seconds]
kapil___ has joined #ruby
jottr has quit [Ping timeout: 248 seconds]
xt233 has joined #ruby
xt233 has left #ruby [#ruby]
<zenspider>
rawr
conta has joined #ruby
dionysus69 has joined #ruby
jottr has joined #ruby
n008f4g_ has quit [Ping timeout: 245 seconds]
Gabemo has quit [Ping timeout: 240 seconds]
jottr has quit [Ping timeout: 256 seconds]
jottr has joined #ruby
guardianx has quit []
mtkd has quit []
jottr has quit [Ping timeout: 268 seconds]
mtkd has joined #ruby
Qchmqs__ has joined #ruby
zenspider has quit [Quit: bye]
zenspider has joined #ruby
Gabemo has joined #ruby
jottr has joined #ruby
terens has joined #ruby
rahul_bajaj has joined #ruby
Gabemo has quit [Ping timeout: 256 seconds]
jottr has quit [Ping timeout: 240 seconds]
<terens>
If you used version.match(/^\d\.\d\.\d/) would you change it with Gem::Version.corrent?(data) ?
Qchmqs__ is now known as Qchmqs
willmichael has quit [Ping timeout: 245 seconds]
rabajaj has quit [Ping timeout: 276 seconds]
willmichael has joined #ruby
ta_ has joined #ruby
alex`` has quit [Ping timeout: 245 seconds]
rabajaj has joined #ruby
bkxd has joined #ruby
sidx64 has joined #ruby
rahul_bajaj has quit [Ping timeout: 240 seconds]
jottr has joined #ruby
funnel has quit [Ping timeout: 256 seconds]
hahuang65 has joined #ruby
cdg has joined #ruby
clemens3 has joined #ruby
maum has quit [Remote host closed the connection]
jottr has quit [Ping timeout: 240 seconds]
funnel has joined #ruby
Burgestrand has joined #ruby
alex`` has joined #ruby
schneider has joined #ruby
willmichael has quit [Read error: Connection reset by peer]
willmichael has joined #ruby
cdg has quit [Ping timeout: 245 seconds]
Qchmqs has left #ruby ["Konversation terminated!"]
sidx64 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bkxd has quit [Ping timeout: 240 seconds]
sidx64 has joined #ruby
jottr has joined #ruby
sidx64 has quit [Client Quit]
bkxd has joined #ruby
claudiuinberlin has joined #ruby
sidx64 has joined #ruby
darkhanb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jenrzzz has quit [Ping timeout: 276 seconds]
jottr has quit [Ping timeout: 248 seconds]
alfiemax has joined #ruby
beauby has joined #ruby
bigblind has quit [Ping timeout: 240 seconds]
ryzokuken has quit [Ping timeout: 240 seconds]
Dimik has quit [Ping timeout: 248 seconds]
bigblind has joined #ruby
jottr has joined #ruby
beauby has quit [Ping timeout: 268 seconds]
jamesaxl has quit [Read error: Connection reset by peer]
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
vondruch has quit [Remote host closed the connection]
jamesaxl has joined #ruby
vondruch has joined #ruby
workmad3 has joined #ruby
jottr has quit [Ping timeout: 256 seconds]
aupadhye has joined #ruby
aupadhye is now known as aupadhye|mtg
Fusselgesicht has joined #ruby
hahuang65 has quit [Quit: WeeChat 2.0.1]
alex`` has quit [Ping timeout: 240 seconds]
workmad3 has quit [Ping timeout: 256 seconds]
jottr has joined #ruby
TomyWork has joined #ruby
t0adst00l has joined #ruby
sleetdrop has joined #ruby
mtkd has quit []
alfiemax has quit [Ping timeout: 252 seconds]
ramfjord has joined #ruby
jottr has quit [Ping timeout: 245 seconds]
ramfjord has quit [Ping timeout: 240 seconds]
willmichael has quit [Ping timeout: 252 seconds]
willmichael has joined #ruby
ramfjord has joined #ruby
mtkd has joined #ruby
jottr has joined #ruby
roshanavand has joined #ruby
Sembei has joined #ruby
drewmcmillan has joined #ruby
drewmcmillan has quit [Client Quit]
milardovich has joined #ruby
Pisuke has quit [Ping timeout: 248 seconds]
ramfjord has quit [Ping timeout: 240 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
ramfjord has joined #ruby
guille-moe has joined #ruby
jottr has quit [Ping timeout: 248 seconds]
yohji has joined #ruby
milardovich has quit [Ping timeout: 245 seconds]
weaksauce has quit [Ping timeout: 240 seconds]
ramfjord has quit [Ping timeout: 256 seconds]
jottr has joined #ruby
alfiemax has joined #ruby
jottr has quit [Ping timeout: 240 seconds]
strika has quit [Quit: leaving]
sameerynho has joined #ruby
jottr has joined #ruby
dionysus69 has quit [Read error: Connection reset by peer]
dionysus69 has joined #ruby
dionysus69 has quit [Remote host closed the connection]
amatas has joined #ruby
dionysus69 has joined #ruby
jottr has quit [Ping timeout: 252 seconds]
mikecmpbll has joined #ruby
riotjones has joined #ruby
jottr has joined #ruby
sameerynho has quit [Ping timeout: 265 seconds]
jenrzzz has quit [Ping timeout: 265 seconds]
jottr has quit [Ping timeout: 248 seconds]
beauby has joined #ruby
Gabemo has joined #ruby
sameerynho has joined #ruby
mtkd has quit []
mtkd has joined #ruby
rahul_bajaj has joined #ruby
aupadhye_ has joined #ruby
eb0t- has quit [Read error: Connection reset by peer]
eb0t has quit [Read error: Connection reset by peer]
ramfjord has joined #ruby
sidx64 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Matt2843 has joined #ruby
aupadhye|mtg has quit [Read error: Connection reset by peer]
<Matt2843>
hey =) any good gems for getting my current longitude / latitude location?
<Matt2843>
or services in general
rabajaj has quit [Read error: Connection reset by peer]
RougeR has joined #ruby
rabajaj has joined #ruby
eb0t has joined #ruby
eb0t- has joined #ruby
sleetdrop has quit [Quit: Computer has gone to sleep.]
aupadhye_ has quit [Ping timeout: 260 seconds]
rahul_bajaj has quit [Ping timeout: 252 seconds]
jottr has joined #ruby
ramfjord has quit [Ping timeout: 240 seconds]
riotjoe has joined #ruby
ramfjord has joined #ruby
sleetdrop has joined #ruby
riotjones has quit [Ping timeout: 248 seconds]
sameerynho has quit [Ping timeout: 248 seconds]
jottr has quit [Ping timeout: 240 seconds]
ramfjord has quit [Ping timeout: 256 seconds]
terens2 has joined #ruby
huyderman has joined #ruby
ramfjord has joined #ruby
huyderman has quit [Remote host closed the connection]
terens has quit [Ping timeout: 268 seconds]
t0adst00l has quit [Ping timeout: 255 seconds]
sidx64 has joined #ruby
sagax has joined #ruby
drewmcmillan has joined #ruby
ramfjord has quit [Ping timeout: 260 seconds]
aupadhye_ has joined #ruby
sidx64 has quit [Client Quit]
cdg has joined #ruby
jottr has joined #ruby
Serpent7776 has joined #ruby
cdg has quit [Ping timeout: 245 seconds]
jottr has quit [Ping timeout: 240 seconds]
sidx64 has joined #ruby
bkxd has quit [Read error: Connection reset by peer]
sidx64 has quit [Client Quit]
jottr has joined #ruby
alex`` has joined #ruby
sidx64 has joined #ruby
Beams has joined #ruby
riotjones has joined #ruby
sylario has joined #ruby
riotjoe has quit [Ping timeout: 260 seconds]
bkxd has joined #ruby
riotjones has quit [Remote host closed the connection]
jottr has quit [Ping timeout: 256 seconds]
riotjones has joined #ruby
jottr has joined #ruby
phaul has joined #ruby
ltt has joined #ruby
riotjones has quit [Ping timeout: 252 seconds]
InfinityFye has joined #ruby
karapetyan has joined #ruby
InfinityFye has left #ruby [#ruby]
jottr has quit [Ping timeout: 245 seconds]
Matt2843 has quit [Quit: Page closed]
jottr has joined #ruby
uruk1993 has joined #ruby
uruk1993 has left #ruby [#ruby]
morfin60 has joined #ruby
<morfin60>
hello
<morfin60>
any clue why can connection reset by peer happen in Net::HTTP with this message: "Internal Server Error: Connection reset by peer <internal:prelude>:78:in `__read_nonblock'"?
<morfin60>
i perform first request using Faraday and then performing second and get this error
<dminuoso>
I actually wrote it because I dont know how else to tell a caller about problems..
karapetyan has joined #ruby
<dminuoso>
I mean the canonical way would be to throw an exception (which incidentally models the same thing) - but the entire code path in between catching and throwing is unaware of this.
bkxd has quit [Ping timeout: 252 seconds]
jottr has joined #ruby
bkxd has joined #ruby
<dminuoso>
If I extend this with bind, it allows me to securely transport error conditions while _forcing_ callers to deal with them
<dminuoso>
How else does one do this in Ruby?
roshanavand has quit [Ping timeout: 240 seconds]
karapetyan has quit [Ping timeout: 240 seconds]
mtkd has quit [Read error: Connection reset by peer]
mtkd has joined #ruby
jottr has quit [Ping timeout: 240 seconds]
sidx64 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bkxd has quit [Ping timeout: 240 seconds]
dcluna has quit [Ping timeout: 248 seconds]
bkxd has joined #ruby
milardovich has quit [Remote host closed the connection]
jottr has joined #ruby
dcluna has joined #ruby
ltt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jottr has quit [Ping timeout: 260 seconds]
wojnar has joined #ruby
<Bish>
dminuoso: i figured, thanks
<Bish>
so ruby does use the .hash method on values
ltt has joined #ruby
alfiemax has joined #ruby
meinside has joined #ruby
ledestin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
apparition has joined #ruby
jottr has joined #ruby
wojnar has quit [Quit: Leaving]
goatish has joined #ruby
wojnar has joined #ruby
bkxd has quit [Ping timeout: 260 seconds]
bkxd has joined #ruby
sleetdrop has quit [Quit: Computer has gone to sleep.]
wojnar has quit [Client Quit]
sidx64 has joined #ruby
jottr has quit [Ping timeout: 256 seconds]
wojnar has joined #ruby
<darix>
Everytime i talk to my perl devs here, I am happy to be a ruby dev.
<zmo>
basically, replacing that method in that module with one I write in the context of where I use it
<apeiros>
zmo: all you have to do is load your code after theirs
<zmo>
I've seen many methods of monkey patching in ruby which offer a wild variety of monkey patching, but how can I replace a Module's method with another one, binding that method to its context ?
<apeiros>
last definition wins
RougeR has quit [Ping timeout: 248 seconds]
<apeiros>
also we barely have any functions in ruby. it's mostly all methods.
<zmo>
so I just add on top of my own module a module X / module Y / module Z / module T / def foobar end / end / end / end, and X::Y::Z::T.foobar will be replaced ?
<apeiros>
and `result = []; something.each do; result.push(x); end; result` is better done by: `result = something.map { x }`
<apeiros>
yes @ replaced. but as said, make sure you load their code first.
<zmo>
of course, I'm doing rails, so I feel like the entire world is loaded before my code runs anyway :)
<apeiros>
you're wrong then. especially in dev mode in rails. a lot of things are lazy loaded there.
<zmo>
ah ok
<zmo>
I'm struggling with knowing what's in the env at any moment in rails
<apeiros>
and you can break lazy loading with the kind of code above.
<zmo>
(it's actually killing me)
<apeiros>
yeah, the way they implemented lazy loading is IMO terrible.
<zmo>
well, it's still only an experiment
<zmo>
if I get it right, I'll submit a PR anyway
<zmo>
and I'll point the gem to my fork
houhoulis has joined #ruby
Burgestrand has joined #ruby
bigblind has quit [Ping timeout: 268 seconds]
<apeiros>
alternatively, instead of monkey patching: clone the repo. edit the method there. change your gemfile to use your local gem version (see `path` option in Gemfile config spec)
<zmo>
yup, but I'm running in docker-compose, and it's more painful to shut it down, rebuild, re-up etc. just for a gem change
<apeiros>
well, you choose your pains ;-p
<zmo>
(and actually doing it again if my guess is wrong)
jottr has joined #ruby
<zmo>
with monkey patching, I'd only do it once
<zmo>
thanks again :)
jeffreylevesque has quit [Ping timeout: 256 seconds]
gizmore has quit [Ping timeout: 256 seconds]
gizmore has joined #ruby
SirOliver has joined #ruby
roshanavand has joined #ruby
k0mpa has joined #ruby
SirOliver has left #ruby [#ruby]
workmad3 has quit [Ping timeout: 248 seconds]
drewmcmillan has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
shinnya has joined #ruby
mtkd has quit []
vondruch has quit [Ping timeout: 276 seconds]
vondruch has joined #ruby
mtkd has joined #ruby
schneider has quit [Ping timeout: 260 seconds]
schneider has joined #ruby
ltt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
milardovich has joined #ruby
alfiemax has quit [Ping timeout: 248 seconds]
ltt has joined #ruby
drewmcmillan has joined #ruby
kapil___ has quit [Quit: Connection closed for inactivity]
yohji has quit [Ping timeout: 240 seconds]
guille-moe has quit [Ping timeout: 252 seconds]
tvw has joined #ruby
synthroid has joined #ruby
workmad3 has joined #ruby
ltt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
alfiemax_ has joined #ruby
karapetyan has joined #ruby
clemens3 has joined #ruby
alfiemax_ has quit [Remote host closed the connection]
bigblind has joined #ruby
howdoi has quit [Quit: Connection closed for inactivity]
karapetyan has quit [Ping timeout: 248 seconds]
yohji has joined #ruby
despai has joined #ruby
rwb has quit [Ping timeout: 248 seconds]
stormpack has joined #ruby
bmurt has joined #ruby
AJA4350 has joined #ruby
memo1 has joined #ruby
<Bish>
what's a good lib to scale pngs?
apparition has quit [Ping timeout: 245 seconds]
guille-moe has joined #ruby
ltt has joined #ruby
<dminuoso>
Bish: magick?
<dminuoso>
that is rmagick
<Bish>
i don't know, i'd like no C stuff
<dminuoso>
Bish: It's a ruby wrapper around limagic
Psybur has joined #ruby
Psybur has joined #ruby
Psybur has quit [Changing host]
<dminuoso>
*libmagick
<dminuoso>
Bish: alternatively you can use minimagick.
<apeiros>
imagescience, oilypng and chunkypng (not sure which of those are still maintained)
<stormpack>
probably ChunkyPNG can deal with that
<apeiros>
rmagick is annoying in several regards. often causes trouble. still can't use imagemagick 7 :<
<Bish>
chunkypng looks good
<dminuoso>
chunkpng is raw access to png itself
<dminuoso>
apeiros: Ah yeah. I used minimagick at the end, but that was annoying for other reasons.
<dminuoso>
Things that invoke command line tools tend to be brittle.
<breakfast1>
so adding instance methods in a class adds up methods to all instances
<breakfast1>
while adding them in a metaclass adds them up to a single instance
<breakfast1>
I can't seem to really understand what metaclasses are for
willmichael has joined #ruby
rwb has joined #ruby
ramfjord has quit [Ping timeout: 240 seconds]
<phaul>
ruby uses metaclasses to emulate java / c++ static ie class methods
vondruch has quit [Ping timeout: 245 seconds]
mtkd has quit []
sonOfRa has quit [Remote host closed the connection]
vondruch has joined #ruby
karapetyan has quit [Remote host closed the connection]
<phaul>
breakfast1: ^^
mtkd has joined #ruby
<breakfast1>
the problem is i never used java nor cpp
<breakfast1>
but thanks for replying
ramfjord has joined #ruby
kapil___ has joined #ruby
cdg has joined #ruby
stormpack has quit [Quit: Leaving]
sonOfRa has joined #ruby
<phaul>
breakfast1: ok, sorry. so that example is when the method does not operate / belong to any induvidual object but belongs to the class itself. for instance Array.new . .new is not called on any array object but the class itself.
<apeiros>
those are 3 methods which are in Date's metaclass and provide convenience constructors (wrappers around new)
<Bish>
oh there it is
<Bish>
didn't see that
<apeiros>
phaul: though .new is not in the metaclass. it's the instance method from Class (usually)
<Bish>
stormpack:thanks
andikr has quit [Remote host closed the connection]
ramfjord has quit [Ping timeout: 240 seconds]
jcalla has joined #ruby
<breakfast1>
okay thanks
breakfast1 has left #ruby ["Au revoir"]
<phaul>
apeiros: I thought that was the case I wanted to give the method that list all symbols allocated in the Symbol metaclass (if there is one) but could 't remember the name
cdg has quit [Ping timeout: 245 seconds]
<apeiros>
all_symbols?
<phaul>
probably :)
sleetdrop has joined #ruby
<apeiros>
:D
ramfjord has joined #ruby
karapetyan has joined #ruby
<Bish>
does
<Bish>
h[k] ||= SomeExpensiveCalculation work?
<Bish>
so that this expression yields h[k] if it's set and SomeExpensiveCalculation if it isnt?
willmichael has quit [Read error: Connection reset by peer]
<apeiros>
yes
<apeiros>
`h[k] ||= expr` expands to `h[k] || h[k] = expr`, with || shortcutting as usual
<Bish>
makes sense
<Bish>
but not really
<Bish>
since
<Bish>
if i do
ramfjord has quit [Ping timeout: 240 seconds]
<Bish>
x += 1
<apeiros>
it's slightly unexpected since other <op>= have a different expansion
<Bish>
it doesexpand to x = x + 1
<apeiros>
&&= and ||= are the odd-ones
<Bish>
okay, thanks
willmichael has joined #ruby
<apeiros>
everything expands the same as +=, i.e. `a <op>= b` expands to `a = a <op> b`
<apeiros>
everything *else* :)
<Bish>
it's like irregulars in german language
<Bish>
it's pretty simple, except for: <insert 1 million things>
ramfjord has joined #ruby
<apeiros>
calling irregular things in german language irregular evokes the patently wrong idea that anything in german was regular to begin with…
cdg has joined #ruby
<apeiros>
use lojban if you want a language which at least tries to have sensible rules :D
<Bish>
when i tried to learn japanese, it was really cool to see it's design
<Bish>
but then i came to counting thigns, man that shit is funny
<Bish>
you have different "numbers" for things that are: flat, books, can jump, are flying
<Bish>
and some others
<Bish>
and insects that jump.. will get counted like flying things
<Bish>
which is very logical, ofcourse
<Bish>
and i think bunnies count as flying to, because they jump so efficiently, but don't quote me on that
<Burgestrand>
Now I'm curious, how would you count a made-up being?
<Bish>
Burgestrand: there is some "neutral" counting-strategy, which you use for all otehrs
<Burgestrand>
Ah, a fallback
<Bish>
which is mostly this well known ichi, ni, san, chi
<Burgestrand>
Aye
ramfjord has quit [Ping timeout: 252 seconds]
<Burgestrand>
I recently came back from the land of ninja katana samurai, and was surprised when my friend ordered fudatsu bieru as opposed to ni bieru…
tomlukeywood has joined #ruby
<Bish>
yeah that country is funny
<Burgestrand>
Then again, to be fair, danes count kinda weird too…
<Bish>
especially funny fact is.. if you skip the "u" at bieru
<Bish>
they won't understand at all what you're saying
ramfjord has joined #ruby
<Bish>
they will just hear "bie"
<Bish>
learned that the hard way, when ordering a "big mac"
<Burgestrand>
The l/r split is indeed hilarious
<Bish>
i didn.t even mean the l/r stuff
<Burgestrand>
Ah, yeah
<Bish>
i meant consonants? at the end
<Burgestrand>
The phonetics
<Bish>
i said big mac, and they heard bi ma
<Burgestrand>
hah
<Bish>
so you have to say bigu macu(or something oike that?).. and i felt incredibly stupid doing that
<Bish>
because.. i really can't speak japanese
netherwolfe has quit [Ping timeout: 245 seconds]
<Burgestrand>
Bish upside of being scandinavian, works rather well with most sounds so it translates quite well as long as you can figure out what it says :)
milardovich has quit [Read error: Connection reset by peer]
milardovich has joined #ruby
milardovich has quit [Remote host closed the connection]
<apeiros>
arup_r: that's not the same
karapetyan has quit [Remote host closed the connection]
<apeiros>
skipping 3 csv rows != skipping 3 lines
<apeiros>
though, you said 4 lines. yeah, if it's indeed 4 lines and not 4 rows, then opening the IO, reading 4 lines, and then passing that to CSV to parse it is a solution.
<arup_r>
ok can u tell me the difference between 4 lines and 4 rows in CSV? Just want to teach myself what they mean. :)
<ruby[bot]>
dminuoso: # => undefined method `strip' for 1:Fixnum (NoMethodError) ...check link for more (https://eval.in/964668)
<dminuoso>
>> nil.strip
krawchyk has joined #ruby
<ruby[bot]>
dminuoso: # => undefined method `strip' for nil:NilClass (NoMethodError) ...check link for more (https://eval.in/964669)
<dminuoso>
>> Class.strip
<ruby[bot]>
dminuoso: # => undefined method `strip' for Class:Class (NoMethodError) ...check link for more (https://eval.in/964670)
<dminuoso>
FrostCandy: As you can see, NoMethodError generally means "I can not find a matching method in the class/hierarchy of the thing you called it on"
netherwolfe has joined #ruby
<dminuoso>
FrostCandy: That means either "the method does not exist", or "the thing you call it on, is something else". THe last thing can be checked, as the exception message tells you the exact class.
<dminuoso>
undefined method `strip' for **Class:Class**
d9867eb has joined #ruby
chouhoul_ has quit [Remote host closed the connection]
<dminuoso>
undefined method `strip' for **nil:NilClass**
<dminuoso>
undefined method `strip' for **1:Fixnum**
<FrostCandy>
oh ok dminuoso thanks i'll look
chouhoulis has joined #ruby
<FrostCandy>
so you are right it was nil :D
eckhardt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
despai has quit [Quit: ...]
<FrostCandy>
easy mistake, sorry to bother
<d9867eb>
hi, I am using the latest available Ruby on debian stretch. when running bundle install i get: /usr/local/bin/bundle:23:in `load': cannot load such file -- /usr/lib/ruby/gems/2.3.0/gems/bundler-1.16.1/exe/bundle (LoadError)
<d9867eb>
from /usr/local/bin/bundle:23:in `<main>'
ta_ has joined #ruby
<d9867eb>
from /usr/local/bin/bundle:23:in `<main>'
nowhereman_ has quit [Read error: Connection reset by peer]
nowhereman_ has joined #ruby
eckhardt_ has joined #ruby
ta_ has quit [Client Quit]
rgiscard has joined #ruby
guacamole has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bkxd has joined #ruby
dviola has quit [Quit: WeeChat 2.0.1]
<darix>
d9867eb: check if you have a file with a suffix in /usr/lib/ruby/gems/2.3.0/gems/bundler-1.16.1/exe/bundle
<darix>
and then rename it back to just /usr/lib/ruby/gems/2.3.0/gems/bundler-1.16.1/exe/bundle
<darix>
it seems sometimes rubygems applies the binary suffix also to files in the /exe/ subdirectory.
bkxd has quit [Ping timeout: 252 seconds]
pastorinni has joined #ruby
nowhere_man has joined #ruby
<d9867eb>
darix: /usr/lib/ruby/gems/2.3.0/gems/bundler-1.16.1/exe/bundle doesnt exist on my machine. should create that?
ams__ has quit [Quit: Connection closed for inactivity]
<darix>
d9867eb: just run ls /usr/lib/ruby/gems/2.3.0/gems/bundler-1.16.1/exe/
<d9867eb>
ok
drewmcmillan has joined #ruby
SeepingN has joined #ruby
krawchyk has quit [Quit: krawchyk]
xfbs has quit []
synthroi_ has quit []
bkxd has joined #ruby
dviola has joined #ruby
<d9867eb>
darix, i ran ls /usr/lib/ruby/gems/2.3.0/gems/ and i got bundler-1.16.0 rdoc-4.2.1
<d9867eb>
however i got bundler 1.16.1
<darix>
so why does your /usr/local/bin/bundle think you had 1.16.1 ?
nowhereman_ has quit [Ping timeout: 268 seconds]
achen has joined #ruby
<d9867eb>
darix, i dont know. anyway i ran sudo mv /usr/lib/ruby/gems/2.3.0/gems/bundler-1.16.0 /usr/lib/ruby/gems/2.3.0/gems/bundler-1.16.1 and i t works now
<d9867eb>
thanks
<apeiros>
that's not really a good idea
<apeiros>
but it might show how you got to the current problem in the first place. randomly moving managed stuff around is a recipe for troubles.
bkxd has quit [Ping timeout: 268 seconds]
<dminuoso>
apeiros: I regularly move things around on my coworkers desk when he's not there.
<dminuoso>
So I can confirm: It's a recipe for trouble
<apeiros>
dminuoso: got wireless keyboards? swapping those is always good fun.
<d9867eb>
apeiros, but really I dont use bundler 1.16.
<dminuoso>
apeiros: I did one better: Another coworker dropped in with his macbook. While they were out grabbing coffee, I switched the macbooks.
<apeiros>
d9867eb: but it's really still a bad idea to randomly move managed stuff around
<apeiros>
dminuoso: hah
<d9867eb>
apeiros, then what should i do?
alex`` has quit [Ping timeout: 240 seconds]
<dminuoso>
apeiros: For about 10 minutes he stared in disbelief after the 3rd time it woudnt accept his password. The rest of the time he was totally confused "since when does Apple have air logon to nearby macbooks..."
<apeiros>
dminuoso: :D
<d9867eb>
a dir for bundle was missing
<apeiros>
d9867eb: if moving things around which you shouldn't is a habit - no idea. you might have broken an arbitrary number of things.
<dminuoso>
apeiros: And if you have a coworker you _dont_ like, take some transparent adhesive tape, and stick it on the maglock right inside on the 4 pins.
<apeiros>
I'd say just reinstalling/updating bundler would be the better approach. but hey, you said it works. so: good luck, I guess?
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<dminuoso>
Watch him claw his eyes out when his battery runs out of juice, trying to figure out why "yet another power cord is broken"
<apeiros>
dminuoso: only tb3 macbooks here anymore :-| (also I like my coworkers)
<eam>
if you really, *really* don't like them, use foil tape
<d9867eb>
apeiros, i jsut I ran gem update --system and then bundle wouldnt run. I am not sure about how I would have broken something.
<dminuoso>
eam: Haha!
bigblind has joined #ruby
<eam>
I spilled water on a yubikey in my usb port once and it shorted the 5v pins and melted it into my port
cpruitt has joined #ruby
<dminuoso>
eam: Ever since the width of your notebook increased by 3cm?
<eam>
thankfully the battery was fine
<eam>
I burnt out the data pins though. The port could charge, but inactive data pins
shalok has joined #ruby
jcalla has quit [Quit: Leaving]
<eam>
about 6mo later I worked on a project with a usb protocol analyzer and I found a whole bunch of garbage noise on the *other* usb port that still did work, so I swapped out the laptop and all was well