<fdan>
the build has been failing from a custom build tool
<fdan>
im trying to figure out how to edit the steps
pandabot has quit [Ping timeout: 250 seconds]
benjaminwil has quit [Ping timeout: 252 seconds]
<fdan>
jhass[m] can i try changing the version in the gemfile?
dstein64 has quit [Ping timeout: 256 seconds]
leftylink has quit [Ping timeout: 260 seconds]
<jhass[m]>
bundle update google-protobuf would be the safe version of editing Gemfile.lock, those changes you can commit and retry the build tool
leftylink has joined #ruby
benjaminwil has joined #ruby
dstein64 has joined #ruby
pandabot has joined #ruby
<fdan>
ok i tried to do that in my terminal
<fdan>
i get this error Your Ruby version is 2.6.3, but your Gemfile specified 2.5.5
taupiqueur has joined #ruby
<jhass[m]>
ah, bummer. If you have docker lying around fastest might be to run it in there, something like docker run --rm ruby:2.5 -v "$(pwd):/mnt" -w /mnt ruby:2.5 bundle update google-protobuf if memory serves well
mixfix41 has joined #ruby
taupiqueur_ has joined #ruby
<jhass[m]>
otherwise temporarily commenting the ruby line in Gemfile might be fair too
taupiqueur has quit [Ping timeout: 256 seconds]
<fdan>
jhass[m] i get this error docker: Error response from daemon: OCI runtime create failed: container_linux.go:380: starting container process caused: exec: "-v": executable file not found in $PATH: unknown.
<jhass[m]>
Ah sorry, had an extra ruby:2.5 in there, remove the first one
<fdan>
hmm ok i get this now Your Ruby version is 2.5.9, but your Gemfile specified 2.5.5
<jhass[m]>
Hum, okay it shouldn't get stuck on that...
<fdan>
i opened a new tab and did a docker ps
<fdan>
i see the container is up
<jhass[m]>
Normally it should be installing and updating gems after that and then exit on its own
<fdan>
hmm
<fdan>
so what can i do to fix this
<jhass[m]>
I'd kill it and try to throw an -i -t into the args list to see if it's somehow stuck on allocating a pty, but probably not
Bounga has joined #ruby
<jhass[m]>
If that does not help next up would be temporarily removing that silly ruby version restriction in the Gemfile (not Gemfile.lock), never understood why that's even a feature
<jhass[m]>
oh well, looks like whatever gembuilder.s3.amazonaws.com was in the first place no longer exists. rubygems.org doesn't seem to host the versions of the gems referenced from there, so I guess you have to consider the project dead, sorry
___nick___ has quit [Read error: Connection reset by peer]
___nick___ has joined #ruby
infinityfye has quit [Remote host closed the connection]
infinityfye has joined #ruby
fef has joined #ruby
TomyWork has joined #ruby
fredlinhares has joined #ruby
BSaboia has joined #ruby
BSaboia has quit [Quit: This computer has gone to sleep]
Guest9014 has quit [Ping timeout: 256 seconds]
perrierjouet has joined #ruby
TCZ has joined #ruby
bluedust has joined #ruby
bluedust_ has quit [Ping timeout: 240 seconds]
duderonomy has quit [Remote host closed the connection]
gproto23 has quit [Read error: Connection reset by peer]
Thanzex8 has quit [Read error: Connection reset by peer]
Thanzex has joined #ruby
nebiros_ has quit [Quit: ZNC 1.7.5+deb4 - https://znc.in]
nebiros has joined #ruby
nebiros has quit [Changing host]
nebiros has joined #ruby
gproto23 has joined #ruby
_aeris_ has joined #ruby
aeris has quit [Remote host closed the connection]
_aeris_ is now known as aeris
fruity has joined #ruby
fredlinhares has quit [Read error: Connection reset by peer]
fruity has quit [Client Quit]
LazyDev123 has joined #ruby
fredlinhares has joined #ruby
TCZ has quit [Quit: Leaving]
infinityfye has quit [Ping timeout: 240 seconds]
oxfuxxx has quit [Ping timeout: 240 seconds]
LazyDev123 has quit [Quit: Client closed]
oxfuxxx has joined #ruby
fredlinhares has quit [Read error: Connection reset by peer]
fredlinhares has joined #ruby
fdan has joined #ruby
bluedust_ has joined #ruby
bluedust has quit [Ping timeout: 240 seconds]
<fdan>
why is edititng the Gemfile.lock not a good idea?
<Vaevictus>
sorry, adam12 / havenwood ... i had to run and get my kids from the bus as you were helping me yesterday. the index attribute is a unique value, at least in theory, and we can go along that.
BSaboia has joined #ruby
BSaboia has quit [Client Quit]
fdan has quit [Quit: Client closed]
<adam12>
Vaevictus: The naive answer would be to just generate a Hash with the attribute as the key and the object as the value.
<adam12>
Vaevictus: I _believe_ Ruby Hashes are O(1) so it should be fast for lookups.
<Vaevictus>
gotcha... is there a pretty directive to accomplish that, or just iterate the array push the key/object into the hash?
<adam12>
I normally do each_with_object or reduce, but if you're on a newer version of Ruby, Array#to_h takes a block. so it would be as simple as array.to_h { |item| [item.attribute, item] }
<jhass[m]>
fdan: just very easy to destroy it as part of the process, not updating all places that need to be or doing one too many, putting in an invalid dependency tree resolution etc
<Vaevictus>
this project is ruby 3.0
<adam12>
Vaevictus: Should be fine then, afaik.
<Vaevictus>
cool, thanks. i was looking at reduce initially but not quite figuring that out. I'm a bit dense, haven't used ruby since 1.2 or something :D
<adam12>
If you think you need reduce, I'd reach for each_with_object before it. They are similar, but I find each_with_object easier to reason about mentally.
<adam12>
With reduce, you need to return the memo object (IIRC) and each_with_object has that hidden away from you.
<jhass[m]>
yeah, ton's of inject/reduce abuse in the wild
* adam12
reduces jhass[m] into {}s
BSaboia has joined #ruby
<jhass[m]>
:(
<adam12>
jhass[m]: Happy Friday!
<jhass[m]>
Indeed, happy it's weekend already, am I right?!
BSaboia has quit [Read error: Connection reset by peer]
BSaboia has joined #ruby
BSaboia has quit [Read error: Connection reset by peer]
<adam12>
jhass[m]: You win!
<jhass[m]>
Yay!
<jhass[m]>
let's create an NFT for this moment
oxfuxxx has quit [Ping timeout: 250 seconds]
BSaboia has joined #ruby
<adam12>
jhass_ape.gif
BSaboia has quit [Client Quit]
fdan has joined #ruby
oxfuxxx has joined #ruby
BSaboia has joined #ruby
BSaboia has quit [Read error: Connection reset by peer]
BSaboia has joined #ruby
BSaboia has quit [Client Quit]
croberts has joined #ruby
Thanzex has quit [Read error: Connection reset by peer]
Thanzex has joined #ruby
<croberts>
I was looking at the OPENSSL::X509::Certificate class and was curious if you have a subject like this Subject: O=Default_Organization, CN=57b26ce3-e4fe-4f79-a377-2c4d9dea5204
<croberts>
is there a way to grab just the CN= out of it without regex?
<croberts>
i checked the docs but just saw subject and not a cn method
<John_Ivan_>
hi, is there any way to get the entries of a directory's in fullpath mode?
<John_Ivan_>
looking inside the Dir object, there's nothing of the sort. but File contains File.realpath(). so my actual question is - how can I make Dir return an array of Files ?
<John_Ivan_>
File objects*
<John_Ivan_>
or to just print out the full absolute path instead of entry name.
<adam12>
John_Ivan_: Can you get what you want via Pathname?
<John_Ivan_>
adam12, yes. that works, it's perfect. how does that work? O_O
<John_Ivan_>
it takes a string and it can retrieve it's absolute path.... based on what?
<John_Ivan_>
the last call made to enumerate a dir or?
<jhass[m]>
croberts: iirc openssl has no API for it and the format there is more of a convention than a standard. But should be simple enough to parse with a .split(", ").to_h {|item| item.split("=") }
<adam12>
John_Ivan_: I'd have to see code since I'm not sure what you see.
<John_Ivan_>
adam12, actually no. my bad. I'm getting a weird path prefix. I'm getting C:\User\Me
<adam12>
John_Ivan_: But ultimately, I consider Pathname above Dir and File in terms of higher-order functionality.
<John_Ivan_>
that's not where the actual file is located in.
<micah>
is there a way I can tell `gem install` to use the pre-built binary version, rather than compile it manually
<adam12>
John_Ivan_: If you're globbing, you might need to glob a full path and not relative.
<adam12>
micah: It should, if it's available.
<micah>
adam12: you mean it should by default?
<adam12>
micah: Yes.
<adam12>
micah: what gem and what platform?
<micah>
adam12: hm, it seems its building libv8
<micah>
adam12: i've set x86_64-linux
<micah>
Installing libv8-node 15.14.0.1 with native extensions
<John_Ivan_>
adam12, let's start from step 1 again. think I might've messed things up completely. so I have a full path. "D:\mydata\direktory". I need to enumerate all **directories** inside direktory but in the form of "D:\mydata\direktory\fileA.ext", "D:\mydata\direktory\fileB.ext" etc.
<adam12>
John_Ivan_: So you want all _files_ inside all _directories_ inside that parent directory?
<John_Ivan_>
adam12, no. just the toplevel directories inside "direktory" in fullpath form.
<John_Ivan_>
and yes, I know I can just append the path I pass over to Dir then concatenate that with the results returned from it, but isn't there like, Dir.entries("path", Mode::FullPath) ?
<adam12>
John_Ivan_: Pathname("D:\mydata\direktory").each_child { |path| p path }
<adam12>
micah: What version of Ruby? What version of `gem`?
<adam12>
micah: Also `uname -a`?
<John_Ivan_>
adam12, that solves it. thanks. I'll keep pathname in mind :)
<adam12>
John_Ivan_: cheers.
<John_Ivan_>
no. thank you :)
<adam12>
micah: I just realized you're using bundler. Which version of bundler? There were some improvements around this lately.
<micah>
adam12: 2.5, bundler 2.2.33, and on a debian buster machine
<micah>
although I think i'll update to debian bullseye, and bundler 2.3.3
<jhass[m]>
mmh, debian package supplied bundler & rubygems? I would trust them to patch out stuff like using prebuilt binaries 🤣
<adam12>
LOL
<croberts>
jhass[m]: I tried to use the split but it comes back with it saying unknown method https://paste.centos.org/view/a6643717 am i using it in the wrong spot?
<jhass[m]>
Ah, I guess you need to to_s or something first
<croberts>
oh ok
<jhass[m]>
croberts: though Name#to_a also looks interesting, give that a call
<croberts>
ok i'll play around with it, after doing to_s i got ArgumentError: wrong array length at 0 (expected 2, was 3) so will keep at it
<croberts>
will check out name too
<jhass[m]>
?pry
* jhass[m]
kicks the bot
<jhass[m]>
?pry
ruby[bot] has joined #ruby
John_Ivan_ has quit [Read error: Connection reset by peer]
<jhass[m]>
?pry
<ruby[bot]>
Pry, the better IRB, provides easy object inspection `ls`, `history`, viewing docs `?`, viewing source `$`, syntax highlighting and other features (see `help` for more). Put `binding.pry` in your source code for easy debugging. Install Pry (http://pry.github.io/): gem install pry pry-doc
<jhass[m]>
croberts: ^ check this out, good for playing around :)
<croberts>
ok ty
reset has joined #ruby
John_Ivan has joined #ruby
fef has quit [Quit: Leaving]
gproto23 has quit [Read error: Connection reset by peer]
justJustache is now known as justache
<ox1eef>
Not sure I would still call Pry the "better IRB". Have you used IRB recently? it is catching up with Pry, if not over taking it.
gr33n7007h has quit [Quit: WeeChat 3.4]
dstein64 has quit [Ping timeout: 256 seconds]
<havenwood>
ox1eef: "Pry, the inspiration for modern IRB"
Rounin has quit [Ping timeout: 240 seconds]
<havenwood>
ox1eef: Here's a fun one Pry is still better at: :xxxxxxxxx; Symbol.all_symbols.grep(/xx/)
<havenwood>
Check results in Pry and IRB. :)
<havenwood>
Now we have ruby/debug too.
gr33n7007h has joined #ruby
John_Ivan has quit [Remote host closed the connection]
John_Ivan has joined #ruby
dstein64 has joined #ruby
taupiqueur_ has quit [Ping timeout: 240 seconds]
<adam12>
debug is so nice.
<adam12>
I can't believe it took so long to get a better one.
<adam12>
I guess everyone was happy wth byebug. I rarely used it.
<adam12>
Tho I use debug constantly.
<rapha>
can you replace the contents of a capture with themselves .downcase?
<rapha>
wait, that's a badly posed question
<rapha>
better: what's the most foolproof way of downcasing any character immediately following a specific list of characters?
John_Ivan has quit [Remote host closed the connection]
John_Ivan has joined #ruby
duds- has quit [Remote host closed the connection]
<adam12>
gsub with block? Maybe some code would help explain a bit better what you want to do.
___nick___ has quit [Ping timeout: 256 seconds]
taupiqueur has joined #ruby
taupiqueur has quit [Remote host closed the connection]
<ox1eef>
havenwood: +1
miah has quit [Ping timeout: 265 seconds]
taupiqueur has joined #ruby
taupiqueur has quit [Ping timeout: 256 seconds]
teocle has joined #ruby
<rapha>
adam12: rn i'm (lastc=''; str.chars.map{|c| c.downcase! if lastc.match?(/[ʿʾ]/); lastc=c}.join)'ing
constxd has joined #ruby
Thanzex has quit [Read error: Connection reset by peer]
Thanzex has joined #ruby
oxfuxxx has quit [Quit: can you please adjust your IRC quit message to be less transphobic?]
<ruby[bot]>
havenwood: I'm terribly sorry, I could not evaluate your code because of an error: JSON::ParserError:A JSON text must at least contain two octets!
<havenwood>
#=> "OMGWTFBBQLOLcOPTERLOLlIGAG"
John_Ivan has quit [Ping timeout: 240 seconds]
<havenwood>
ruby[bot]: Showing example input and the output you want would be best, if that ^ doesn't make sense for your case?
<havenwood>
rapha: ^
* havenwood
talks to ruby[bot]
oxfuxxx has quit [Ping timeout: 256 seconds]
John_Ivan__ has joined #ruby
<adam12>
havenwood: Happy Friday!
<adam12>
I'd love to figure out why ruby[bot] won't talk to carc.in anymore.
<adam12>
Maybe I'll run my own ruby[bot] on the weekend to look.
John_Ivan__ has quit [Read error: Connection reset by peer]
John_Ivan__ has joined #ruby
John_Ivan_ has quit [Ping timeout: 256 seconds]
fdan has quit [Ping timeout: 256 seconds]
<mooff>
ah, ruby[bot] is still bust
<mooff>
well, i was wondering about the class/module scope difference between instance_eval(str) and instance_eval(&blk)
ruby[moo] has joined #ruby
<mooff>
] [ instance_eval { class Foo; end }, instance_eval "class Bar; end" ]
<mooff>
] [ instance_eval { class Foo; end }, instance_eval "class Bar; end" ]
<ruby[moo]>
Fuck, SyntaxError: (eval):1: syntax error, unexpected string literal, expecting `do' or '{' or '('
<ruby[moo]>
...ass Foo; end }, instance_eval "class Bar; end" ]
<mooff>
] [ instance_eval { class Foo; end }, instance_eval("class Bar; end") ]
<rapha>
havenwood: i got very confused when you talked to the bot. apart from that, yes, that's it, but i'm very amazed by your code and will be starting at it for the next 2 to 3 days. thank you! :D
yosafbridge` has quit [Quit: Leaving]
hanzo has quit [Quit: Connection closed for inactivity]
Bounga has joined #ruby
<micah>
adam12: i tried with a newer bundler, and same results :()
<adam12>
micah: Maybe worth raising a bug report on rubygems repo. I'd see if you could install nokogiri with similar results.
<Vaevictus>
can you have two entirely different qrcodes generate the exact same binary data? anyone?
<Vaevictus>
error correction aside?
yosafbridge has joined #ruby
teocle has left #ruby [#ruby]
unyu has quit [Quit: WeeChat 3.4]
Bounga has quit [Remote host closed the connection]
Thanzex has quit [Read error: Connection reset by peer]
Thanzex has joined #ruby
taupiqueur has quit [Quit: taupiqueur]
Bounga has joined #ruby
Bounga has quit [Remote host closed the connection]
Bounga has joined #ruby
ZAJDAN has quit [Ping timeout: 256 seconds]
fredlinhares has quit [Quit: WeeChat 3.4]
_ht has quit [Remote host closed the connection]
<havenwood>
Vaevictus: Sure, there are a variety of ways, depending on the why?
<havenwood>
Vaevictus: You can for example use a single format but vary things like shape, color, and size. Or vary formats.
<havenwood>
Shapes within the QR code, I mean.
constxd has quit [Ping timeout: 240 seconds]
John_Ivan__ has quit [Quit: Leaving]
ZAJDAN has joined #ruby
gproto23 has joined #ruby
duds- has joined #ruby
Thanzex has quit [Read error: Connection reset by peer]
Thanzex has joined #ruby
ur5us has joined #ruby
BSaboia has joined #ruby
BSaboia has quit [Remote host closed the connection]