pastorinni has quit [Remote host closed the connection]
xcesariox has joined #ruby
milardovich has quit [Ping timeout: 252 seconds]
wilbert has quit [Quit: wilbert]
itmerc[m] has joined #ruby
jaruga has quit [Quit: jaruga]
redlegion[m] has joined #ruby
jonjits[m] has joined #ruby
torarne has joined #ruby
npgm has quit [Quit: Connection closed for inactivity]
Dimik has joined #ruby
darkhanb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Tagami[m] has joined #ruby
troys has quit [Quit: Bye]
pastorinni has joined #ruby
erciccione_[m] has joined #ruby
Matt[m]1 has joined #ruby
ptx0 has quit [Remote host closed the connection]
KevinMGranger has joined #ruby
aviraldg has joined #ruby
turt2live has joined #ruby
dizzy1or5[m] has joined #ruby
ptx0 has joined #ruby
velu_aon[m] has joined #ruby
marmorkreb has joined #ruby
zalipuha[m] has joined #ruby
haylon has joined #ruby
gokul_mr[m] has joined #ruby
nadir has joined #ruby
Giphy[m] has joined #ruby
hahuang65 has joined #ruby
elphe has quit [Ping timeout: 255 seconds]
hahuang65 has quit [Ping timeout: 252 seconds]
plexigras has quit [Ping timeout: 265 seconds]
n13z has quit [Ping timeout: 252 seconds]
pastorinni has quit [Remote host closed the connection]
LocaMocha has joined #ruby
ptx0 has quit [Remote host closed the connection]
hahuang65 has joined #ruby
Ishido has joined #ruby
alex`` has joined #ruby
schneide_ has joined #ruby
milardovich has joined #ruby
hahuang65 has quit [Ping timeout: 248 seconds]
alfiemax_ has quit [Remote host closed the connection]
schneide_ has quit [Ping timeout: 256 seconds]
xcesariox has quit [Ping timeout: 252 seconds]
elphe has joined #ruby
tvw has joined #ruby
xcesariox has joined #ruby
ptx0 has joined #ruby
alfiemax has joined #ruby
milardovich has quit [Ping timeout: 256 seconds]
dn` has quit [Quit: dn`]
JoshS has joined #ruby
alfiemax has quit [Remote host closed the connection]
apeiros has quit [Remote host closed the connection]
apeiros has joined #ruby
hahuang65 has joined #ruby
apeiros has quit [Ping timeout: 276 seconds]
hahuang65 has quit [Ping timeout: 248 seconds]
hahuang65 has joined #ruby
hahuang65 has quit [Ping timeout: 265 seconds]
xcesariox has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
andikr has joined #ruby
xcesariox has joined #ruby
aufi has joined #ruby
dionysus69 has joined #ruby
hahuang65 has joined #ruby
xcesariox has quit [Ping timeout: 256 seconds]
hahuang65 has quit [Ping timeout: 276 seconds]
sb__ has joined #ruby
conta has joined #ruby
hahuang65 has joined #ruby
bousquet has joined #ruby
amatas has joined #ruby
Lyubo1 has quit [Quit: and I'm out]
hahuang65 has quit [Ping timeout: 248 seconds]
bousquet has quit [Client Quit]
ta_ has quit [Remote host closed the connection]
ta_ has joined #ruby
Lyubo1 has joined #ruby
kapil___ has quit [Quit: Connection closed for inactivity]
DoubleMalt has joined #ruby
ta_ has quit [Ping timeout: 264 seconds]
lele has joined #ruby
apeiros has joined #ruby
schneide_ has joined #ruby
hahuang65 has joined #ruby
schneide_ has quit [Remote host closed the connection]
TomyWork has joined #ruby
hahuang65 has quit [Ping timeout: 248 seconds]
Dimik has quit [Ping timeout: 255 seconds]
konsolebox has quit [Ping timeout: 265 seconds]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
clemens3 has joined #ruby
konsolebox has joined #ruby
schneide_ has joined #ruby
Mortomes|Work has joined #ruby
marmorkreb has quit [Remote host closed the connection]
yohji has joined #ruby
hfp_work has joined #ruby
orbyt_ has joined #ruby
sb__ has quit [Quit: Leaving]
claudiuinberlin has joined #ruby
sundhell_away is now known as sundhell
orbyt_ has quit [Ping timeout: 255 seconds]
devil_tux has joined #ruby
ta_ has joined #ruby
milardovich has joined #ruby
hahuang65 has joined #ruby
TomyWork has quit [Quit: Leaving]
konsolebox has quit [Ping timeout: 248 seconds]
konsolebox has joined #ruby
dionysus69 has quit [Remote host closed the connection]
milardovich has quit [Ping timeout: 240 seconds]
hahuang65 has quit [Ping timeout: 240 seconds]
dionysus69 has joined #ruby
TomyWork has joined #ruby
Burgestrand has joined #ruby
rabajaj has joined #ruby
mark_66 has joined #ruby
auv has quit [Quit: Connection closed for inactivity]
yohji has quit [Ping timeout: 256 seconds]
Strepsils has joined #ruby
atchoum has quit [Ping timeout: 260 seconds]
aupadhye has joined #ruby
Strepsils has quit [Remote host closed the connection]
justinfaler has quit [Ping timeout: 252 seconds]
drewmcmillan has joined #ruby
yohji has joined #ruby
VladGh_ has joined #ruby
huyderman has quit [Ping timeout: 260 seconds]
drewmcmillan has quit [Client Quit]
RougeR has joined #ruby
VladGh has quit [Ping timeout: 264 seconds]
konsolebox has quit [Ping timeout: 248 seconds]
konsolebox has joined #ruby
tomphp has joined #ruby
Sina has joined #ruby
alfiemax has joined #ruby
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
huyderman has joined #ruby
tomphp has joined #ruby
tomphp has quit [Client Quit]
guille-moe has joined #ruby
schneide_ has quit [Remote host closed the connection]
schneide_ has joined #ruby
konsolebox has quit [Ping timeout: 256 seconds]
justinfaler has joined #ruby
konsolebox has joined #ruby
mikecmpbll has joined #ruby
tomphp has joined #ruby
tomphp has quit [Client Quit]
kapil___ has joined #ruby
hahuang65 has joined #ruby
schneide_ has quit [Remote host closed the connection]
Serpent7776 has joined #ruby
hahuang65 has quit [Ping timeout: 256 seconds]
tomphp has joined #ruby
mtkd has quit [Ping timeout: 276 seconds]
tomphp has quit [Client Quit]
mtkd has joined #ruby
jaruga has joined #ruby
elphe has quit [Ping timeout: 265 seconds]
Azure has quit [Read error: Connection reset by peer]
Azure|dc has joined #ruby
alfiemax_ has joined #ruby
alfiemax has quit [Ping timeout: 240 seconds]
workmad3 has joined #ruby
workmad3 has quit [Ping timeout: 252 seconds]
drewmcmillan has joined #ruby
Beams has joined #ruby
elphe has joined #ruby
ikaji_xu has joined #ruby
tomphp has joined #ruby
mikecmpbll has quit [Read error: Connection reset by peer]
mikecmpb_ has joined #ruby
nadir has quit [Quit: Connection closed for inactivity]
schneide_ has joined #ruby
jameser has quit [Ping timeout: 240 seconds]
minimalism has quit [Quit: minimalism]
elphe has quit [Ping timeout: 268 seconds]
alfiemax has joined #ruby
elphe has joined #ruby
raynold has quit [Quit: Connection closed for inactivity]
conta has quit [Quit: conta]
conta has joined #ruby
alfiemax_ has quit [Ping timeout: 256 seconds]
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
milardovich has joined #ruby
conta has quit [Remote host closed the connection]
marr has joined #ruby
conta has joined #ruby
jokke has joined #ruby
<jokke>
hey
<jokke>
is it possible to do lookups on a set/hash just with the hash of a contained element?
milardovich has quit [Ping timeout: 248 seconds]
<canton7>
I'd guess not, as multiple elements may have the same hash, so the set/hash needs to do equality on the element itself as well
<apeiros>
jokke: no
<apeiros>
plain ruby does not expose that. and as canton7 just elaborated, you could only test for the bucket to exist, not the element.
<jokke>
ah i see
<dminuoso>
jokke: set/hash basically do exactly that already. They are just abstractions around a hash table.
<jokke>
i'm trying to figure out how to implement an array, which dedups the elements. i need to be able to access the elements by index so set is not an option because << with an existing element does nothing
<apeiros>
jokke: what do you mean by dedup? it only contains the element once, or only references it once?
<jokke>
references it once
<jokke>
well that's not a problem
<apeiros>
I think that's pointless then
<jokke>
references arent' big
<jokke>
:)
<jokke>
the data is
<apeiros>
yes. and arrays already only hold references.
<apeiros>
or did you think ruby copies objects when you add them to an array?
<jokke>
so um
<apeiros>
x = large_obj; [x,x,x,x] # only contains 4 references to the same object
<jokke>
no you're absolutely right
<jokke>
of course
* dminuoso
smells the topic of missing referential transparency coming up
<apeiros>
jokke: unless you try to do something like:
<apeiros>
x = large_obj; [x.dup, x.dup, x.dup, x.dup]
<dminuoso>
And it just happened.
<apeiros>
then "deduplicating" might make sense. but IMO dangerous unless your deduped objects are frozen/immutable
<dminuoso>
apeiros: And even then they are different from another.
<dminuoso>
By being able to observe the internal id, you can tell them apart still.
<dminuoso>
So you could trivially construct a program whose semantics change if you dedup such an array.
<apeiros>
it becomes a domain specific question
<apeiros>
and yes, that
<jokke>
alright, so lets say i have a data structure that implement #hash, how would i keep track of all existing elements and if i were to create an equal element, how would i get the reference of the element i created before
<dminuoso>
jokke: Are we talking in C or in Ruby?
<jokke>
ruby
tjbp has quit [Ping timeout: 265 seconds]
<apeiros>
jokke: you might be interested into WeakRef/WeakHash
hahuang65 has joined #ruby
<dminuoso>
jokke: You just override #== to have some domain specific value identity and use a Hash?
tjbp has joined #ruby
<dminuoso>
That way you could do some foo[bar] ||= bar
* apeiros
afk for about 2h
<jokke>
yeah
<jokke>
that sounds about right
<dminuoso>
*value equality
jameser has joined #ruby
<dminuoso>
jokke: At that point you might as well use `Set` I guess
<jokke>
dminuoso:no i can't
<dminuoso>
Interesting, compare_by_identity is a cool thing.
<jokke>
because i will need to add it to an array
elphe has quit [Ping timeout: 256 seconds]
<jokke>
so something like objects = (foo[bar] ||= bar)
<jokke>
äh
<jokke>
objects <<
hahuang65 has quit [Ping timeout: 256 seconds]
<jokke>
so i can access it by index
<dminuoso>
jokke: I see what you are on about.
<dminuoso>
jokke: Would you be willing to accept a small native extension?
<jokke>
hehe
* apeiros
repeats weakref/weakhash
<apeiros>
IMO no native extension needed
jameser has quit [Client Quit]
<jokke>
apeiros: i don't follow. I looked at the docs, but i don't see the connection
jameser has joined #ruby
<dminuoso>
apeiros: Im not sure how they help either.
ldnunes has joined #ruby
<dminuoso>
jokke: You know, Matrix covered this topic before. Right now you are noticing that there's something wrong with Ruby, but you dont know what.
<jokke>
well i don't know if there's something wrong with ruby per-se
<jokke>
it's easy enough to implement a DeduppedArray based on what we discussed
alfiemax has quit [Remote host closed the connection]
jameser has quit [Ping timeout: 248 seconds]
Killerkiwi has quit [Ping timeout: 260 seconds]
jason__ has joined #ruby
<apeiros>
jokke/dminuoso I'll show in ~2h. gtg.
jason_ has quit [Ping timeout: 255 seconds]
<apeiros>
the problem if you don't use weakref is that you potentially create godobjects (never gc'ed objects because you keep them in your dedup "registry")
cabotto has joined #ruby
apeiros has quit []
alex`` has quit [Ping timeout: 276 seconds]
alfiemax has joined #ruby
elphe has joined #ruby
schneide_ has quit [Remote host closed the connection]
anisha has quit [Quit: This computer has gone to sleep]
alfiemax has quit [Remote host closed the connection]
justinfaler has quit [Ping timeout: 248 seconds]
doublemalt_ has joined #ruby
RougeR has quit [Ping timeout: 276 seconds]
DoubleMalt has quit [Ping timeout: 264 seconds]
elphe has quit [Ping timeout: 276 seconds]
dinfuehr has quit [Ping timeout: 256 seconds]
justinfaler has joined #ruby
dinfuehr has joined #ruby
sonOfRa has quit [Remote host closed the connection]
kapil___ has quit [Quit: Connection closed for inactivity]
dinfuehr has joined #ruby
yohji has joined #ruby
milardovich has quit [Ping timeout: 240 seconds]
roshanavand has quit [Quit: Leaving.]
roshanavand has joined #ruby
roshanavand has quit [Client Quit]
guardian has quit [Quit: Coyote finally caught me]
guardian has joined #ruby
schneide_ has joined #ruby
al2o3-cr has joined #ruby
alfiemax has quit [Read error: Connection reset by peer]
justinfaler has quit [Ping timeout: 260 seconds]
alfiemax has joined #ruby
GotHyper has joined #ruby
rabajaj has quit [Remote host closed the connection]
schneid__ has quit [Ping timeout: 248 seconds]
GotHyper has quit [Client Quit]
al2o3-cr has quit [Client Quit]
gregf_ has joined #ruby
ochurlaud has joined #ruby
cdg has joined #ruby
<ochurlaud>
Hi, I get this error :Bundler::GemRequireError: There was an error while trying to load the gem 'redmine_extensions'. Gem Load Error is: undefined method `require_dependency' for main:Object
guardian has quit [Quit: Coyote finally caught me]
justinfaler has joined #ruby
guardian has joined #ruby
<ochurlaud>
It seems that the problem is related to the require_dependency that is not defined. I found that it's brought by active_support, which is available
John_Ivan has joined #ruby
John_Ivan has joined #ruby
John_Ivan has quit [Changing host]
jottr has joined #ruby
cdg has quit [Ping timeout: 268 seconds]
konsolebox has quit [Ping timeout: 240 seconds]
hahuang65 has joined #ruby
konsolebox has joined #ruby
brendan- has joined #ruby
goatish has joined #ruby
nadir has joined #ruby
hahuang65 has quit [Ping timeout: 268 seconds]
alfiemax_ has joined #ruby
alfiemax has quit [Ping timeout: 255 seconds]
apeiros_ has joined #ruby
konsolebox has quit [Ping timeout: 268 seconds]
Burgestrand has joined #ruby
alex`` has joined #ruby
konsolebox has joined #ruby
govg has quit [Ping timeout: 260 seconds]
stormpack has joined #ruby
John_Ivan has quit [Read error: Connection reset by peer]
justinfaler has quit [Ping timeout: 255 seconds]
howdoi has quit [Quit: Connection closed for inactivity]
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bmurt has joined #ruby
Guest16002 has joined #ruby
<Guest16002>
hello
Guest16002 has quit [Client Quit]
apeiros_ is now known as apeiros
banisterfiend has joined #ruby
<apeiros>
jokke: solved your problem?
<dminuoso>
apeiros: Even if not, Im curious about your proposed solution.
<dminuoso>
Or rather.. even if so!
<apeiros>
dminuoso: mainly a weakref registry to run the deduplication over. you'd pass in whatever object you want deduped, it looks it up in its weakhash and returns the deduped if available.
<apeiros>
through weakref you avoid your registry "uplifting" those objects to god-objects
bmurt has quit [Ping timeout: 240 seconds]
<dminuoso>
I see what you mean
<dminuoso>
apeiros: And what if those objects go poof?
<dminuoso>
How does a WeakRef behave if the object was claimed by the GC?
<apeiros>
then they get gc'ed and your weakhash won't return them
<apeiros>
weakref_alive?
<dminuoso>
Ah
justinfaler has joined #ruby
<apeiros>
so the bit of logic you need to implement is: compact your hash, test whether weakref is alive upon returning, store new object if no entry is there or entry is dead
<apeiros>
(not necessarily in that order :D)
<dminuoso>
Or you know.. pick a language with intrinsic immutability.. then you dont need to act as if two kind of equal objects are equal :D
<apeiros>
I think I'd implement compacting on write accesses
<apeiros>
those languages don't necessarily guarantee deduplication either, though
<dminuoso>
No but they can do it transparently behind the scenes and be correct.
<dminuoso>
apeiros: And for general interactions its not uncommon to represent lists as RB trees for example under the hood.
<dminuoso>
(It's kind of necessary to make mutation of a single element in a large array not backfire)
<apeiros>
o0
<apeiros>
so they alter basic assumptions of runtimes?
<dminuoso>
apeiros: what assumptions would that be?
<apeiros>
I mean I expect array push/pop to be O(1), inserting in the middle to be O(n). both don't hold if it's really an RB tree
<apeiros>
(iirc both would be logn)
damonf has joined #ruby
<dminuoso>
apeiros: Right. It's O(log n) for mutation and access, and O(1) for appending and removing.
<dminuoso>
apeiros: Though you usually pick relatively broad trees, making it log32 n for example.
<apeiros>
huh? do I misremember? rbtrees are logn for add/remove, no?
shinnya has joined #ruby
<dminuoso>
apeiros: only worst case.
banisterfiend has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<dminuoso>
apeiros: also its not about mutating the actual tree.
<dminuoso>
apeiros: the main idea comes from structural sharing.
<apeiros>
"only worst case" isn't exactly how O notation works
brendan- has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<apeiros>
also in log32(x) the base is a factor ;-) (log(a)/log(b) = logb(a))
<apeiros>
i.e. eliminated in O notation
<dminuoso>
I know.
cabotto has quit [Remote host closed the connection]
<dminuoso>
apeiros: In the end it's O(1) for appending or removing from the end because of structural sharing.
<dminuoso>
You dont actually mutate the tree in place. You just create a new node at the top, that shares some of the old versoin.
cabotto has joined #ruby
govg has joined #ruby
<apeiros>
that makes no sense though
<apeiros>
if you always append at the top, your tree becomes unbalanced
<apeiros>
i.e. at some point you have to restructure your tree (my terminology may be lacking, it's been over a decade)
banisterfiend has joined #ruby
<dminuoso>
apeiros: Mmm, probably not RB trees in this case then.
<apeiros>
all trees. a linear structure isn't a tree anymore :D
<dminuoso>
apeiros: If its not balancing then you dont.
<dminuoso>
apeiros: the bottom most row is the actual "list", everything on top is just internal stuff.
<apeiros>
iirc not all tree structures require to be balanced, yes. but all require some sort of structure in order to retain their properties. otherwise they become "abartig" (bastardized?)
<dminuoso>
Now "appending" means you reference branches from the other tree.
cabotto has quit [Ping timeout: 248 seconds]
<dminuoso>
apeiros: And the reason that appending is O(1), is because you just create a new node with two children. One pointing to the old copy, and one pointing to the new element
<dminuoso>
or rather a new tree with two children. one points at the old tree, and the other points at the new element.
<dminuoso>
that is constant.
<apeiros>
well, even if. some operations will necessarily not hold the promises of an array's complexities.
John_Ivan has joined #ruby
John_Ivan has joined #ruby
John_Ivan has quit [Changing host]
* dminuoso
sighs
<dminuoso>
uninitialized constant OCIError
sonOfRa has quit [Remote host closed the connection]
sylario has joined #ruby
hahuang65 has joined #ruby
marmorkreb has joined #ruby
<dminuoso>
apeiros: Do you have any idea why code reload is not triggering on my cell views anymore?
<dminuoso>
Changes in ruby files are picked up, but changes to my cell slim files not.
<dminuoso>
Dont even know how to debug this.
oetjenj has joined #ruby
stormpack has quit [Quit: Leaving]
Mortomes|Work has quit [Ping timeout: 260 seconds]
hahuang65 has quit [Ping timeout: 248 seconds]
tomphp has joined #ruby
alfiemax_ has quit [Read error: Connection reset by peer]
ferox has joined #ruby
marmorkreb has quit [Read error: Connection reset by peer]
sonOfRa has joined #ruby
nowhere_man has joined #ruby
<apeiros>
dminuoso: rails? no idea. I try to stay away as far as possible from rails interna
<dminuoso>
All I did was do this high sierra upgrade... =/
oetjenj has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<apeiros>
partially. your memoizing of the results means it'll break when an object is mutated.
<jokke>
yes
<dminuoso>
Who mutates anyway.
<jokke>
it won't be
<dminuoso>
jokke: Is ivar sufficient? What about constants?
<jokke>
can i assign constants in methods?
<jokke>
also...
<jokke>
FOO ||= 'bar' won't really work, will it :P
hfp_work has quit [Ping timeout: 255 seconds]
<jokke>
can i somehow auto-freeze every object that's being initialized of a class that implements Dedupable
<dminuoso>
jokke: Mmm, well it'd have to be about constants in each objects singleton class.
<dminuoso>
Since constants reside in classes/modules.
<jokke>
yeahh
<dminuoso>
Kind of depends on how generally applicable you want your module to work.
<dminuoso>
And I have not seen constants in an objects singleton class to be abused as instance variable yet..
damonf has joined #ruby
hahuang65 has joined #ruby
John_Ivan has joined #ruby
John_Ivan has joined #ruby
John_Ivan has quit [Changing host]
hahuang65 has quit [Ping timeout: 240 seconds]
tomphp has joined #ruby
aguestuser has quit [Ping timeout: 255 seconds]
Emmanuel_Chanel has quit [Ping timeout: 240 seconds]
deathwishdave has joined #ruby
aguestuser has joined #ruby
oleo has joined #ruby
justinfaler has quit [Ping timeout: 240 seconds]
tomphp has quit [Client Quit]
aguestuser has quit [Remote host closed the connection]
aguestuser has joined #ruby
oetjenj has joined #ruby
pastorinni has joined #ruby
jordanm has joined #ruby
marmorkreb has quit [Read error: Connection reset by peer]
marmorkreb has joined #ruby
justinfaler has joined #ruby
milardovich has joined #ruby
workmad3 has joined #ruby
rippa has joined #ruby
nowhere_man has joined #ruby
milardovich has quit [Ping timeout: 248 seconds]
jrafanie has joined #ruby
apeiros has quit []
workmad3 has quit [Ping timeout: 264 seconds]
aufi has quit [Quit: Leaving]
schneid__ has quit [Remote host closed the connection]
conta has quit [Ping timeout: 256 seconds]
cschneid has joined #ruby
schneide_ has joined #ruby
schneide_ has quit [Remote host closed the connection]
schneide_ has joined #ruby
bigblind has quit [Ping timeout: 255 seconds]
troys has joined #ruby
yohji has quit [Ping timeout: 240 seconds]
AJA4350 has joined #ruby
schneide_ has quit [Ping timeout: 255 seconds]
krawchyk has quit [Quit: krawchyk]
marmorkreb has quit [Remote host closed the connection]
oetjenj has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
zautomata1 has quit [Quit: WeeChat 1.9.1]
Olipro has quit [Ping timeout: 252 seconds]
yohji has joined #ruby
zautomata has joined #ruby
Olipro has joined #ruby
zautomata has quit [Changing host]
zautomata has joined #ruby
damonf has quit [Remote host closed the connection]
damon has joined #ruby
krawchyk has joined #ruby
justinfaler has quit [Ping timeout: 264 seconds]
workmad3 has joined #ruby
damon is now known as damonf
justinfaler has joined #ruby
_aeris_ has quit [Remote host closed the connection]
tomphp has joined #ruby
apeiros_ has joined #ruby
alfiemax has joined #ruby
_aeris_ has joined #ruby
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
alfiemax has quit [Ping timeout: 240 seconds]
bigblind has joined #ruby
hahuang65 has joined #ruby
bigblind has quit [Ping timeout: 240 seconds]
dionysus69 has joined #ruby
hahuang65 has quit [Ping timeout: 268 seconds]
snath has quit [Ping timeout: 264 seconds]
clemens3 has quit [Ping timeout: 248 seconds]
rrutkowski has joined #ruby
jaruga_ has joined #ruby
rrutkowski has quit [Client Quit]
rrutkowski has joined #ruby
jaruga has quit [Ping timeout: 265 seconds]
doublemalt_ has quit [Ping timeout: 260 seconds]
oetjenj has joined #ruby
cdg has joined #ruby
conta has joined #ruby
justinfaler has quit [Ping timeout: 256 seconds]
cdg_ has quit [Ping timeout: 248 seconds]
cdg has quit [Ping timeout: 248 seconds]
tomeaton17 has joined #ruby
cdg has joined #ruby
<tomeaton17>
I don't work with ruby, but trying to install an old codebase on new hardware. Running bundle install errors on the eventmachine install, which is required by em-http-request, but is also installed on its on in the Gemfile. When I install gem install eventmachine manually it works with version 1.2.5, but when it tries to install version 1.0.3 due to the dependcy it fails. How do I get it to install version
oetjenj has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cdg has quit [Ping timeout: 248 seconds]
SuperLag has quit [Quit: leaving]
bigblind has joined #ruby
workmad3 has quit [Ping timeout: 256 seconds]
nowhereman_ has joined #ruby
Serpent7776 has quit [Quit: Leaving]
nowhere_man has quit [Ping timeout: 256 seconds]
bigblind has quit [Ping timeout: 255 seconds]
jaruga_ has quit [Quit: jaruga_]
ur5us has quit [Ping timeout: 248 seconds]
jamesaxl has joined #ruby
LastWhisper____ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
guacamole has joined #ruby
guacamole has joined #ruby
guacamole has quit [Changing host]
Rebus has joined #ruby
oetjenj has joined #ruby
<Rebus>
Good Eveninn. I was wondering whether it is possible to deconstruct an array of hashes while iterating it, e.g. [ { :a :b } ].each do |k,v| . Unfortunately this does not seem to work. Someone have a suggestion.
garyserj has quit []
<eam>
Rebus: you want to iterate each pair?
raynold has joined #ruby
<Rebus>
eam: yes. I can do that with an array of arrays but unfortunately not with an array of hashes :-/
<eam>
#each_pair will iterate pairs
oetjenj has quit [Client Quit]
darkhanb has joined #ruby
Beams has quit [Quit: .]
n13z has joined #ruby
ur5us has joined #ruby
rrutkowski has quit [Ping timeout: 268 seconds]
LastWhisper____ has joined #ruby
mikecmpbll has quit [Quit: inabit. zz.]
hahuang65 has joined #ruby
<Rebus>
eam: this seems to work on hashes only, but i have an array of hashes over which i want to iterate
justinfaler has quit [Ping timeout: 256 seconds]
ur5us has quit [Ping timeout: 240 seconds]
aupadhye has quit [Quit: Leaving]
tvw has quit [Read error: Connection reset by peer]
milardovich has joined #ruby
<eam>
Rebus: I think I'm not understanding what you want to do
hahuang65 has quit [Ping timeout: 240 seconds]
marxarelli|afk is now known as marxarelli
shinnya has joined #ruby
yohji has quit [Ping timeout: 248 seconds]
<Rebus>
eam: So I can do something like this [ [a,b], [c,d] ].each { |k,v| puts "#{k} = #{v}" }. But not [ {a: b}, {c: d} ].each { |k,v| puts "#{k} = #{v}" } and I was wondering If there is a way without having to resort to a second loop
anisha has joined #ruby
doublemalt_ has joined #ruby
bigblind has joined #ruby
milardovich has quit [Ping timeout: 248 seconds]
lxsameer has quit [Ping timeout: 248 seconds]
rabajaj has quit [Ping timeout: 256 seconds]
justinfaler has joined #ruby
bigblind has quit [Ping timeout: 260 seconds]
stormpack has joined #ruby
snath has joined #ruby
tvw has joined #ruby
<zigzig>
@Rebus, you could convert the hash to pairs first: [ { a: 1, b: 2}, { a: 3, b: 4} ].map(&:to_a).each { |(pair1, pair2)| ... }
milardovich has joined #ruby
ur5us has joined #ruby
ledestin has joined #ruby
hahuang65 has joined #ruby
yohji has joined #ruby
dviola has joined #ruby
ur5us has quit [Ping timeout: 268 seconds]
miskatonic has joined #ruby
<Rebus>
zigzig: That did the trick. Thanks.
<Rebus>
Though I had to tune it a little: [ {a: 'b'}, {c: 'd'} ].map(&:to_a).flatten(1).each { |k,v| puts "#{k} = #{v}" }
dviola has quit [Quit: WeeChat 2.0.1]
<Rebus>
otherwise I get an array of arrays of arrays and that ends up in k
sanscoeur has joined #ruby
Asher has quit [Read error: Connection reset by peer]
<apeiros_>
honestly, I'd just nest two each'es
milardovich has quit [Remote host closed the connection]
<apeiros_>
ary.each do |hash| hash.each do |k,v| … end; end
dviola has joined #ruby
kies has quit [Ping timeout: 240 seconds]
alfiemax has joined #ruby
<Rebus>
I did but then wondered why it did not work the same way as with an array of arrays - seems there is some magic hidden beneath the array class I'll have to dig up to find an answer to that
bigblind has joined #ruby
miskatonic has quit [Remote host closed the connection]
<apeiros_>
{a: 'b'} does not expand to [:a, 'b'] but to [[:a, 'b']]
apeiros_ is now known as apeiros
bigblind has quit [Ping timeout: 260 seconds]
ramfjord has joined #ruby
eckhardt has joined #ruby
guacamole has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
white_lilies has joined #ruby
<apeiros>
though that's actually the less important reason. the more important reason is that ruby can splat arrays, and even automatically does that under certain circumstances. it doesn't splat hashes, though
guacamole has joined #ruby
guacamole has joined #ruby
guacamole has quit [Changing host]
Asher has joined #ruby
justinfaler has quit [Ping timeout: 260 seconds]
[Butch] has joined #ruby
TomyWork has quit [Ping timeout: 240 seconds]
drewmcmillan has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
clemens3 has joined #ruby
chouhoulis has joined #ruby
drewmcmillan has joined #ruby
ur5us has joined #ruby
justinfaler has joined #ruby
KeyJoo has joined #ruby
guille-moe has quit [Ping timeout: 268 seconds]
cabotto has quit []
za1b1tsu has quit [Quit: Leaving]
<Rebus>
it can with ** though. I just doesn't do so automatically :-/
zigzig has quit [Remote host closed the connection]
conta has quit [Ping timeout: 276 seconds]
zigzig has joined #ruby
quobo has joined #ruby
bigblind has joined #ruby
lytol has joined #ruby
claudiuinberlin has joined #ruby
alfiemax has quit [Remote host closed the connection]
yohji has quit [Remote host closed the connection]
elphe has quit [Ping timeout: 260 seconds]
jeffreylevesque has joined #ruby
za1b1tsu has joined #ruby
TomyLobo has joined #ruby
stormpack has quit [Quit: Leaving]
lxsameer has joined #ruby
RougeR has quit [Ping timeout: 252 seconds]
dextrey has joined #ruby
kies has joined #ruby
workmad3 has joined #ruby
Papierkorb has joined #ruby
shinnya has quit [Ping timeout: 256 seconds]
vutral|kali has quit [Ping timeout: 252 seconds]
justinfaler has quit [Ping timeout: 256 seconds]
goatish has joined #ruby
hfp_work has quit [Ping timeout: 265 seconds]
jcalla has quit [Quit: Leaving]
vutral|kali has joined #ruby
vutral|kali has quit [Changing host]
vutral|kali has joined #ruby
justinfaler has joined #ruby
hfp_work has joined #ruby
Papierkorb has left #ruby ["Konversation terminated!"]
KeyJoo has quit [Read error: Connection reset by peer]
ramfjord has quit [Ping timeout: 256 seconds]
ramfjord has joined #ruby
white_lilies has quit [Ping timeout: 240 seconds]
LocaMocha has quit [Remote host closed the connection]
ramfjord has quit [Ping timeout: 256 seconds]
tomphp has joined #ruby
workmad3 has quit [Ping timeout: 255 seconds]
dionysus69 has quit [Remote host closed the connection]
fmccann has quit [Ping timeout: 263 seconds]
comet23 has quit [Quit: Connection closed for inactivity]
Cthulu201 has joined #ruby
cdg has joined #ruby
bigblind has quit [Ping timeout: 248 seconds]
ramfjord has joined #ruby
guacamole has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cdg_ has quit [Ping timeout: 264 seconds]
guacamole has joined #ruby
guacamole has joined #ruby
guacamole has quit [Changing host]
cdg has quit [Ping timeout: 256 seconds]
ramfjord has quit [Ping timeout: 260 seconds]
ramfjord has joined #ruby
white_lilies has joined #ruby
za1b1tsu has quit [Quit: Leaving]
schneide_ has joined #ruby
justinfaler has quit [Ping timeout: 252 seconds]
ramfjord has quit [Ping timeout: 255 seconds]
jcalla has joined #ruby
ramfjord has joined #ruby
guacamole has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ldepandis has joined #ruby
pastorinni has quit [Ping timeout: 248 seconds]
justinfaler has joined #ruby
ramfjord has quit [Ping timeout: 276 seconds]
ramfjord has joined #ruby
Rebus has quit [Quit: Page closed]
TvL2386_ has joined #ruby
ramfjord has quit [Ping timeout: 240 seconds]
krawchyk has quit [Quit: krawchyk]
banisterfiend has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mtkd has quit [Ping timeout: 276 seconds]
TvL2386 has quit [Ping timeout: 240 seconds]
mtkd has joined #ruby
eckhardt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
anisha has quit [Quit: This computer has gone to sleep]
guacamole has joined #ruby
guacamole has quit [Changing host]
guacamole has joined #ruby
anisha has joined #ruby
banisterfiend has joined #ruby
rwb has quit [Remote host closed the connection]
rwb has joined #ruby
anisha has quit [Ping timeout: 255 seconds]
<graft>
anyone played around with the OpenSSL class much?
bigblind has joined #ruby
Dimik has joined #ruby
<graft>
i'm trying to use OpenSSL::PKey.read(File.read(filename)) but it doesn't seem to work - meanwhile, OpenSSL::PKey::RSA.new(File.read(filename)) works fine
<graft>
i get the error 'no start line', which i don't understand
clemens3 has quit [Ping timeout: 240 seconds]
troulouliou_div2 has joined #ruby
ecuanaso has joined #ruby
krawchyk has joined #ruby
bigblind has quit [Ping timeout: 255 seconds]
atchoum has joined #ruby
jamesaxl has quit [Read error: Connection reset by peer]
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
alex`` has quit [Ping timeout: 252 seconds]
erlend has quit [Ping timeout: 265 seconds]
schneide_ has quit [Remote host closed the connection]
schneide_ has joined #ruby
schneide_ has quit [Remote host closed the connection]
amirite has joined #ruby
tomphp has joined #ruby
RougeR has joined #ruby
RougeR has joined #ruby
RougeR has quit [Changing host]
erlend has joined #ruby
<amirite>
I've got a string "\xfb", if I print it I see the byte as I expect to (a weird non-ascii character). What I want to know is how do I go from '\xfb' to "\xfb", because I'm trying to concatenante "\x" with the hex code and have it interpreted to the intended encoded character
<amirite>
if i try to gsub(/(..)/, '\x\1') I end up with a literal string, but I need that \1 capture escaped into the \x
n0m4d1c has quit [Remote host closed the connection]
white_lilies has quit [Ping timeout: 256 seconds]
jokke has quit [Ping timeout: 256 seconds]
jokke has joined #ruby
amatas has quit [Quit: amatas]
tcopeland has quit [Quit: tcopeland]
chouhoulis has quit [Remote host closed the connection]
chouhoulis has joined #ruby
PaulCapestany has quit [Quit: .]
guacamole has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
workmad3 has quit [Ping timeout: 256 seconds]
npgm has joined #ruby
PaulCapestany has joined #ruby
FrostCandy has joined #ruby
jason_ has quit [Remote host closed the connection]
swills has joined #ruby
chouhoulis has quit [Ping timeout: 248 seconds]
guacamole has joined #ruby
guacamole has joined #ruby
guacamole has quit [Changing host]
McSoFake has quit [Quit: Konversation terminated!]
<nchambers>
i have a bundle of ca certificates written in PEM format to a file. Is there an easy way to turn each of these certificates into an array of OpenSSL::X509::Certificate objects?
<graft>
you probably have to split the strings
FrostCandy has quit []
<nchambers>
im hoping to avoid that, so im keeping it as a backup plan
<graft>
maybe split on /(?<=-----)\n(?=-----)/
<graft>
or some such
<graft>
if you're hoping for an openssl method i don't think there is one
_haylon has quit [Ping timeout: 276 seconds]
<nchambers>
split it is then
snath has quit [Ping timeout: 256 seconds]
jottr has joined #ruby
jcalla has quit [Quit: Leaving]
nowhereman_ has joined #ruby
nowhere_man has quit [Ping timeout: 248 seconds]
LastWhisper____ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
amirite has quit [Ping timeout: 248 seconds]
mniip has quit [Ping timeout: 240 seconds]
hahuang61 has joined #ruby
<eckhardt>
huh i didn't know about Array#pack. That is slick.
cdg has quit [Read error: Connection reset by peer]
mniip has joined #ruby
cdg has joined #ruby
drewmcmillan has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
DLSteve_ has quit [Quit: All rise, the honorable DLSteve has left the channel.]
Ishido has quit [Read error: Connection reset by peer]
tvw has quit [Remote host closed the connection]
moei has quit [Quit: Leaving...]
tcopeland has joined #ruby
hahuang61 has quit [Quit: WeeChat 2.0.1]
<xcyclist>
I would really like a general purpose plotter that I can get jpg, png, pdf and ps files out of, if not others.
white_lilies has joined #ruby
<xcyclist>
Looks like gruff does it. That and gnuplot will probably keep me satisfied. However, as nyaplot is part of sciruby, and sciruby is presumably trying to be like the science stuff in python, it would be nice to be able to do that from a terminal.
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
white_lilies has quit [Ping timeout: 248 seconds]
snath has joined #ruby
cdg has joined #ruby
amirite has joined #ruby
x77686d has quit [Ping timeout: 260 seconds]
x77686d_ has joined #ruby
elphe has quit [Ping timeout: 255 seconds]
aintno_sunshine has quit [Remote host closed the connection]
x77686d_ has quit [Client Quit]
chet has joined #ruby
justache has joined #ruby
<chet>
Hi, am a RoR newbie, our webserver is behind a rev proxy and after authentication, the redirect url is that of the webserver instead of the rev proxy ip. am looking for help in fixing this.