havenwood changed the topic of #ruby to: Rules & more: https://ruby-community.com | Ruby 2.7.1, 2.6.6, 2.5.8: https://www.ruby-lang.org | Paste 4+ lines of text to https://dpaste.de/ and select Ruby as the language | Rails questions? Ask in #RubyOnRails | Books: https://goo.gl/wpGhoQ | Logs: https://irclog.whitequark.org/ruby | Can't talk? Register/identify with Nickserv first!
Smokie has joined #ruby
Bounga has quit [Ping timeout: 265 seconds]
kristian_on_linu has quit [Remote host closed the connection]
banisterfiend has quit [Ping timeout: 260 seconds]
banisterfiend has joined #ruby
cschneid has joined #ruby
Bounga has joined #ruby
xissburg has joined #ruby
Bounga has quit [Ping timeout: 244 seconds]
banisterfiend has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
gix has quit [Ping timeout: 260 seconds]
ldepandis has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
d3bug has quit [Quit: Connection closed for inactivity]
xissburg has quit [Quit: ZZZzzz…]
hiroaki has quit [Ping timeout: 246 seconds]
braj has joined #ruby
TvL2386 has quit [Ping timeout: 240 seconds]
TvL2386 has joined #ruby
ur5us has joined #ruby
dan64 has joined #ruby
Emmanuel_Chanel has quit [Ping timeout: 264 seconds]
mikecmpbll has quit [Ping timeout: 256 seconds]
greypack has quit [Ping timeout: 260 seconds]
hiroaki has joined #ruby
mikecmpbll has joined #ruby
TCZ has quit [Quit: Leaving]
cnsvc has joined #ruby
jinmiaol2 has joined #ruby
ChmEarl has quit [Quit: Leaving]
chalkmonster has joined #ruby
impermanence has joined #ruby
Smokie has quit [Ping timeout: 240 seconds]
d3bug has joined #ruby
golevka has quit [Read error: Connection reset by peer]
Emmanuel_Chanel has joined #ruby
greypack has joined #ruby
SeepingN has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
SeepingN has joined #ruby
ta has quit [Ping timeout: 260 seconds]
ta has joined #ruby
sergioro has quit [Quit: leaving]
nofxx has quit [Read error: Connection reset by peer]
nofxx has joined #ruby
helpa has quit [Remote host closed the connection]
helpa-bot has joined #ruby
helpa-bot has quit [Remote host closed the connection]
helpa has joined #ruby
mokha has joined #ruby
greypack has quit [Ping timeout: 260 seconds]
greypack has joined #ruby
Garb0 has quit [Read error: Connection reset by peer]
Garb0 has joined #ruby
Garb0 has quit [Max SendQ exceeded]
Garb0 has joined #ruby
mokha has quit [Remote host closed the connection]
sergioro has joined #ruby
banisterfiend has joined #ruby
Garb0 has quit [Read error: Connection reset by peer]
Garb0 has joined #ruby
dhollinger has quit [Ping timeout: 246 seconds]
dhollinger has joined #ruby
cnsvc has quit [Ping timeout: 240 seconds]
chalkmonster has quit [Remote host closed the connection]
cnsvc has joined #ruby
cnsvc has quit [Ping timeout: 240 seconds]
tty1_ has quit [Ping timeout: 258 seconds]
arahael3 has quit [Ping timeout: 260 seconds]
gigetoo has quit [Ping timeout: 260 seconds]
Cork has quit [Ping timeout: 260 seconds]
arahael3 has joined #ruby
gigetoo has joined #ruby
Rudd0 has quit [Ping timeout: 265 seconds]
Cork has joined #ruby
ur5us has quit [Quit: Leaving]
ur5us has joined #ruby
nofxx_ has joined #ruby
nofxx has quit [Read error: Connection reset by peer]
SeepingN has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
polishdub has joined #ruby
pandakekok9 has joined #ruby
Rudd0 has joined #ruby
SeepingN has joined #ruby
xissburg has joined #ruby
DTZUZU2 has joined #ruby
DTZUZU has quit [Ping timeout: 244 seconds]
xissburg has quit [Quit: ZZZzzz…]
BTRE has quit [Ping timeout: 256 seconds]
BTRE has joined #ruby
plutes has quit [Ping timeout: 260 seconds]
Garb0_ has joined #ruby
Garb0_ has quit [Read error: Connection reset by peer]
Garb0_ has joined #ruby
Garb0 has quit [Ping timeout: 264 seconds]
braj has quit []
chalkmonster has joined #ruby
jinmiaol2 has quit [Ping timeout: 244 seconds]
alexherbo2 has joined #ruby
jinmiaol2 has joined #ruby
chouhoulis has quit [Remote host closed the connection]
polishdub has quit [Quit: leaving]
imode has quit [Ping timeout: 256 seconds]
alexherbo2 has quit [Quit: The Lounge - https://thelounge.chat]
BTRE has quit [Ping timeout: 260 seconds]
alexherbo2 has joined #ruby
burgestrand has joined #ruby
CrazyEddy has quit [Remote host closed the connection]
cthu| has quit [Ping timeout: 256 seconds]
CrazyEddy has joined #ruby
MuffinPimp has joined #ruby
ericm has quit [Ping timeout: 256 seconds]
MuffinPimp has quit [Quit: Goodbye.]
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
conta has joined #ruby
ldepandis has joined #ruby
d3bug has quit [Quit: Connection closed for inactivity]
howdoi has quit [Quit: Connection closed for inactivity]
Garb0_ has quit [Read error: Connection reset by peer]
infernix has quit [Ping timeout: 272 seconds]
BTRE has joined #ruby
mikecmpbll has quit [Ping timeout: 260 seconds]
ur5us has quit [Ping timeout: 240 seconds]
gordie has joined #ruby
chouhoulis has joined #ruby
infernix has joined #ruby
mikecmpbll has joined #ruby
<gordie> Hi, I have a nested hash (working with json schemas) and I would like to remove all attributes named "properties" from it. In fact, I don't want to delete those attributes, I want to "level up" them. Is that possible ? https://gist.github.com/gordielachance/36520b2ab250a56610c29288c38ca581
dviola has quit [Quit: WeeChat 2.8]
chouhoulis has quit [Ping timeout: 260 seconds]
BTRE has quit [Ping timeout: 260 seconds]
burgestrand has quit [Quit: burgestrand]
schne1der has joined #ruby
sergushakov has quit [Ping timeout: 256 seconds]
BTRE has joined #ruby
cd has quit [Quit: cd]
Garb0 has joined #ruby
mbarbar has quit [Quit: killed]
turt2live has quit [Quit: killed]
stan has quit [Quit: killed]
Garb0 has quit [Ping timeout: 260 seconds]
execat[m] has quit [Quit: killed]
linuus[m] has quit [Quit: killed]
haylon[m] has quit [Quit: killed]
justache has quit [Max SendQ exceeded]
sepp2k has quit [Quit: killed]
hsiktas[m] has quit [Quit: killed]
justache has joined #ruby
cschneid has quit [Quit: The Lounge - https://thelounge.chat]
chalkmonster has quit [Quit: WeeChat 2.8]
hsiktas[m] has joined #ruby
cschneid has joined #ruby
TomyWork has joined #ruby
rapha has joined #ruby
<rapha> hi
<rapha> is it possible to temporarily suppress "warning: already initialized constant XYZ"?
conta has quit [Quit: conta]
Rudd0 has quit [Ping timeout: 260 seconds]
<jhass> remove_const(:FOO) if const_defined?(:FOO)
<jhass> why do you see this warning though? you shouldn't redefine constants
mbarbar has joined #ruby
linuus[m] has joined #ruby
execat[m] has joined #ruby
turt2live has joined #ruby
stan has joined #ruby
haylon[m] has joined #ruby
alexherbo2 has quit [Quit: The Lounge - https://thelounge.chat]
Rudd0 has joined #ruby
Xiti has quit [Read error: Connection reset by peer]
Xiti has joined #ruby
ur5us has joined #ruby
chalkmonster has joined #ruby
pandakekok9 has quit [Ping timeout: 256 seconds]
<rapha> jhass: I know I shouldn't but I made the mistake of using constants for a config file and now I realised I want to divide that up into two: one that can be kept under version control, with sensible defaults, and the other for local use, that can overwrite stuff from the first. And rn I need a quick fix, I'll think of some more sensible way of doing it latr. Thank you!
<jhass> not sure what you did exactly but it shouldn't be hard to use the more sensible way for the defaults and maybe even new config files but still read the constants. like Config.foo || Config::FOO || Defaults.foo
Xiti has quit [Read error: Connection reset by peer]
Xiti has joined #ruby
BH23 has quit [Remote host closed the connection]
donofrio has quit [Remote host closed the connection]
BH23 has joined #ruby
TCZ has joined #ruby
<sergioro> rapha: you could use -W0 option. see: `ruby -h | grep -- -W`
sergioro has quit [Quit: leaving]
jetchisel has quit [Quit: Unfortunately time is always against us -- [Morpheus]]
jetchisel has joined #ruby
<rapha> Yes, I thought of that, but it'd quelch all the other warnings, too.
alexherbo2 has joined #ruby
chalkmonster has quit [Quit: WeeChat 2.8]
tekk has joined #ruby
<rapha> do people usually use some library for that?
<jhass> I can't say there's a defacto standard
<jhass> it depends a lot on what you're configuring and who should do it in what context
<jhass> there's a slight bias to yaml based configuration maybe
<jhass> what you could maybe do is just make sure the user config is loaded in before your default config and just put an unless const_defined?(...) behind each in the default
<rapha> hmm. the whole thing is a thingo for reading excel files, doing stuff with the data in them, and outputting yaml files. so why not also make the configuration files yaml.
<jhass> not saying that's cleanest but maybe most minimal
<rapha> what do you personally prefer, jhass?
<jhass> depends on context
<rapha> by context you mean what kind of and how many users?
<jhass> yeah, but also what kind of tool or a library or so. server/daemon or single invocation. One time use vs regular use vs cronjob
<jhass> I don't have strict rules, more of a yeah this way makes sense here
ur5us has quit [Ping timeout: 252 seconds]
<jhass> also multiple configs or just a single one can be an important consideration
<jhass> how frequently will it be changed
<rapha> ah, okay. it's a script that is being invoked half-hourly with one file as the argument and nightly with a whole folder of files as an argument, and there's half a dozen people invoking it a couple of times per day manually. there's around 30 settings in the config.rb file that change every once in a while, and half a dozen settings in config-local.rb that are different on each machine.
<rapha> that very minimal setup has worked fine so far, with almost no overrides in the "config-local.rb", but now ppl have started doing that and are getting annoyed at the warnings.
<jhass> if it's edited heavily a forgetting format like toml can make sense
* rapha googles toml
<jhass> *forgiving I mean
<rapha> "Tom's Obvious, Minimal Language" ... I already like it :-D
<rapha> looks a bit like a Samba config file
<jhass> it's basically a better defined INI
<jhass> YAML being indentation/whitespace sensitive can break fairly easily with hard to understand error messsages
<jhass> but then it leaves more structure, has the reference stuff etc
<rapha> indeed. it was not the best of choices to have non-technical users enter YAML into Excel cells.
<rapha> otoh we needed the hierarchical representation...
<jhass> I should make a TOML provider for https://github.com/jhass/configurate :D
<rapha> oh sweet!
<rapha> i like having a library that provides a simple interface like that
<jhass> I'm not sure I'd write it like this today though
<jhass> see the gotchas section
<jhass> it's quite big gotchas
<rapha> loks like ... 300-odd lines? you can still have another go at it :)
<rapha> and the list of gotchas has exactly two entries, i think one can get used to those
chalkmonster has joined #ruby
<jhass> yeah, implementation is not the issue, design is :D
<rapha> You said you wouldn't do it like that _anymore_. That sounded like you do have an alternative design in mind?
<jhass> no, just grudges against the one I picked there
<jhass> did cause more than one bug in the project I did this for
ellcs has joined #ruby
<rapha> Hmm. In both cases you say to use .get ... why can't that be the default behind .some.setting?
<jhass> For appending ? it is
<jhass> so in either case appending ? will work
<jhass> but of course that doesn't look too nice
<jhass> but given the dotted.chain.syntax and the fact that you don't have to pre-declare the complete possible tree of possible keys, the gem has to return a proxy object to support diving in deeper
<rapha> that's beyond my current ruby-foo
* rapha bookmarks for consumption in a quiet hour
<jhass> haha
<rapha> on the upside: you last worked on it in 2016 and it still has maintainability "A" and build "passing" :)
<jhass> well I guess they don't refresh that unless you commit to it :D
Tempesta has quit [Ping timeout: 260 seconds]
cschneid2 has joined #ruby
<rapha> You sure? https://secure.travis-ci.org/jhass/configurate.png?branch=master sounds like it's a live view.
<jhass> that's just the status of the last CI run
cschneid has quit [Ping timeout: 246 seconds]
cschneid2 is now known as cschneid
<rapha> Well, I, for one, am looking forward to your new TOML provider. Which will by necessity result in a commit.
<jhass> I'll push one to see how much breaks on ruby 2.7 :D
<jhass> hah, not even a warning apparently :D
<rapha> See! :-D
<rapha> Hmm. In my memory, everybody used to have Gemfile.lock committed. A while ago I started removing mine but didn't think about it much. You also just did that. Interesting.
<jhass> policy is to commit is for applications and don't for libraries
<jhass> since libraries generally should strive for broader compatibility and define their version restrictions in the .gemspec
<jhass> so, how does one install rubinius via RVM these days...
<rapha> I don't know, I gave up on RVM for rbenv and have been much happier since. If rubinius==rbx, then rbenv install rbx-4.15 but according to https://github.com/rbenv/ruby-build/issues/862, "Rubinius seems unmaintained. (FYI rubinius/rubinius#3813)" ... never used Rubinius, either.
<jhass> yeah me neither, just have been running CI against it for this gem for why not
sergushakov has joined #ruby
fercell has joined #ruby
burningserenity has joined #ruby
burningserenity has quit [Read error: Connection reset by peer]
burningserenity has joined #ruby
conta has joined #ruby
aesthe has joined #ruby
nutcr4ck3r has joined #ruby
gordie has quit [Remote host closed the connection]
drincruz_ has joined #ruby
Tempesta has joined #ruby
greengriminal has quit [Quit: Leaving]
nutcr4ck3r has left #ruby [#ruby]
fuzzface has joined #ruby
chalkmonster has quit [Quit: WeeChat 2.8]
drincruz_ has quit [Ping timeout: 256 seconds]
sagax has quit [Read error: Connection reset by peer]
ua_ has quit [Ping timeout: 256 seconds]
ua_ has joined #ruby
sergushakov has quit [Quit: WeeChat 2.3]
drincruz_ has joined #ruby
chalkmonster has joined #ruby
chalkmonster has quit [Client Quit]
cschneid1 has joined #ruby
cschneid has quit [Ping timeout: 260 seconds]
cschneid1 is now known as cschneid
greypack has quit [Read error: Connection reset by peer]
greypack has joined #ruby
howdoi has joined #ruby
kinduff has quit [Read error: Connection reset by peer]
kinduff has joined #ruby
chalkmonster has joined #ruby
ChmEarl has joined #ruby
akem has quit [Ping timeout: 240 seconds]
troulouliou_div2 has joined #ruby
chalkmonster has quit [Quit: WeeChat 2.8]
akem has joined #ruby
<adam12> Just FYI, they backtracked on ignoring Gemfile.lock and now it's recommended to commit it in libraries as well.
fuzzface has quit [Quit: Leaving]
akem_ has joined #ruby
<havenwood> There's general disagreement. Bundler now says always commit it.
<havenwood> I don't, because I'm old, and old people don't commit Gemfile.lock.
<havenwood> (For gems.)
<havenwood> At least everyone agrees commit it for apps. :)
<havenwood> adam12: The new Bunder recommendation of always committing it is at least easier to explain.
akem has quit [Ping timeout: 260 seconds]
<havenwood> I guess it was years ago, but still feels newish.
<havenwood> I think it's a tossup whether to commit it with gems. Neither the argument to commit it or not is compelling. It just doesn't matter.
<adam12> I'm on the fence. I was doing some contributions to simplecov and CI was failing where locally it wasn't. Without a Gemfile.lock, it was hard to know if it was a dependency issue. I can't remember the end result but it was a bit frustrating debugging without that lock.
<adam12> I've always never committed them but changed that recently for new projects.
<havenwood> adam12: Looking at my new projects, I now seem to waffle. >.>
akem_ has quit [Ping timeout: 256 seconds]
<havenwood> jhass: Rubinius is looking less like a Ruby and more like it's own thing so I've stopped testing against it.
akem has joined #ruby
<havenwood> I'd like to go ahead and remove it from ruby-install too. Fun to have an experimental language, just no a Ruby implementation trying to conform to the reference implementation.
<havenwood> From the new docs... "Rubinius is a time machine. When you use it, you travel into the future."
<adam12> rapha: This gem works great for silencing specific warnings. https://github.com/jeremyevans/ruby-warning
TCZ has quit [Quit: Leaving]
<havenwood> "Consider Rubinius a mostly compatible superset of Ruby for now."
<adam12> I had high hopes for Rubinius.
<havenwood> adam12: Much of its source code lives on in TruffleRuby. The Ruby Spec project also panned out.
<havenwood> adam12: It just got its JIT back!
<adam12> havenwood: Rubinius? It's been hard to follow.
<havenwood> adam12: Yeah, just very recently brixen restored the JIT, after yanking it out years ago right before Rubinius work slowed.
chalkmonster has joined #ruby
TomyWork has quit [Remote host closed the connection]
<havenwood> It sounds from the new README that they're moving to a time-machine-based JIT, where they compile to machine code in the past so its actually ready ahead of time.
entel has joined #ruby
impermanence74 has joined #ruby
<stan> anyone have advice for getting a patch considered that seems to have been forgotten? on https://bugs.ruby-lang.org/issues/9758
impermanence has quit [Quit: Connection closed]
impermanence74 has quit [Client Quit]
impermanence has joined #ruby
<havenwood> stan: Add an agenda item for it to the next dev meeting: https://bugs.ruby-lang.org/issues/16775
<havenwood> stan: It's two weeks from now.
alexherbo26 has joined #ruby
sergioro has joined #ruby
alexherbo2 has quit [Ping timeout: 260 seconds]
alexherbo26 is now known as alexherbo2
impermanence has quit [Quit: Connection closed]
chalkmonster has quit [Quit: WeeChat 2.8]
cow[moo] has joined #ruby
i9zO5AP has joined #ruby
Ai9zO5AP has quit [Ping timeout: 240 seconds]
Benett has quit [Quit:  ]
imode has joined #ruby
Benett has joined #ruby
ellcs has quit [Ping timeout: 240 seconds]
cschneid0 has joined #ruby
cschneid has quit [Ping timeout: 260 seconds]
cschneid0 is now known as cschneid
tty1 has quit [Quit: WeeChat 2.8]
conta has quit [Quit: conta]
crisfm has joined #ruby
bvdw has quit [Quit: The Lounge - https://thelounge.chat]
bvdw has joined #ruby
bvdw has quit [Client Quit]
bvdw has joined #ruby
alexherbo22 has joined #ruby
fercell has quit [Quit: WeeChat 2.8]
alexherbo2 has quit [Ping timeout: 240 seconds]
alexherbo22 is now known as alexherbo2
chalkmonster has joined #ruby
banisterfiend has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
banisterfiend has joined #ruby
gix has joined #ruby
chalkmonster has quit [Remote host closed the connection]
cthu| has joined #ruby
ldepandis has quit [Read error: Connection reset by peer]
schne1der has quit [Ping timeout: 256 seconds]
troulouliou_div2 has quit [Ping timeout: 264 seconds]
d3bug has joined #ruby
leitz has joined #ruby
dandaman has joined #ruby
<dandaman> hi all, can someone help me debug an issue i'm having with my rails project? I'm having some trouble with thin —ssl the server starts up just fine, but as soon as I try to access the site on chrome I get this massive flood of text in my console which i have pasted here: https://gist.github.com/dsauerbrun/ab68a9f300aa6a0566aeb5117ed4d7d1
<dandaman> i asked in the rails channel but it seems like this is more of a ruby issue than rails
troulouliou_div2 has joined #ruby
cd has joined #ruby
chalkmonster has joined #ruby
banisterfiend_ has joined #ruby
banisterfiend_ has quit [Client Quit]
banisterfiend has quit [Quit: Textual IRC Client: www.textualapp.com]
banisterfiend has joined #ruby
chalkmonster has quit [Quit: WeeChat 2.8]
alexherbo2 has quit [Read error: Connection reset by peer]
drincruz_ has quit [Ping timeout: 246 seconds]
alexherbo2 has joined #ruby
Esa__ has joined #ruby
cschneid6 has joined #ruby
ellcs has joined #ruby
mikecmpbll has quit [Ping timeout: 260 seconds]
cschneid has quit [Ping timeout: 260 seconds]
cschneid6 is now known as cschneid
bvdw has quit [Quit: The Lounge - https://thelounge.chat]
bvdw has joined #ruby
mikecmpbll has joined #ruby
ldepandis has joined #ruby
chalkmonster has joined #ruby
chalkmonster has quit [Client Quit]
akem has quit [Remote host closed the connection]
akem has joined #ruby
akem_ has joined #ruby
chalkmonster has joined #ruby
chalkmonster has quit [Client Quit]
alfiemax has joined #ruby
alfiemax has quit [Remote host closed the connection]
akem has quit [Ping timeout: 260 seconds]
chalkmonster has joined #ruby
dandaman has quit [Quit: Leaving.]
chalkmonster has quit [Client Quit]
bvdw has quit [Quit: The Lounge - https://thelounge.chat]
<rapha> adam12: what a guilty pleasure! thank you for the link!
bvdw has joined #ruby
sagax has joined #ruby
<rapha> as for the Gemfile.lock thing, I think what I'll do from now on is to keep it on the ignore list until a project has matured enough to wander outside of my own boxes, then start to commit it.
aesthe has quit [Ping timeout: 246 seconds]
conta has joined #ruby
drincruz_ has joined #ruby
bvdw has quit [Quit: The Lounge - https://thelounge.chat]
SeepingN has quit [Read error: Connection reset by peer]
bvdw has joined #ruby
SeepingN has joined #ruby
<havenwood> dandaman: start by updating to Ruby 2.5.8.
bvdw has quit [Client Quit]
bvdw has joined #ruby
bvdw has quit [Client Quit]
bvdw has joined #ruby
kristian_on_linu has joined #ruby
plutes has joined #ruby
wymillerlinux has joined #ruby
chromis has joined #ruby
ellcs has quit [Ping timeout: 240 seconds]
bvdw has quit [Quit: The Lounge - https://thelounge.chat]
bvdw has joined #ruby
robinzonina has joined #ruby
arcaos_ has joined #ruby
dan64 has quit [Ping timeout: 260 seconds]
vondruch has quit [Ping timeout: 256 seconds]
hiroaki has quit [Ping timeout: 260 seconds]
ellcs has joined #ruby
alfiemax has joined #ruby
conta has quit [Quit: conta]
alfiemax has quit [Ping timeout: 260 seconds]
hiroaki has joined #ruby
d3bug has quit [Quit: Connection closed for inactivity]
chouhoulis has joined #ruby
d3bug has joined #ruby
cschneid9 has joined #ruby
ellcs has quit [Remote host closed the connection]
cschneid has quit [Ping timeout: 264 seconds]
cschneid9 is now known as cschneid
chouhoulis has quit [Ping timeout: 260 seconds]
alexherbo2 has quit [Quit: Ping timeout (120 seconds)]
alexherbo2 has joined #ruby
armatechnicos has joined #ruby
masticass has quit [Ping timeout: 244 seconds]
hadifarnoud has joined #ruby
<hadifarnoud> how can I add else to this shorthand if
<hadifarnoud> <%= 'btn-rtl' if rtl? %>
<hadifarnoud> want to print something else if rtl is false
masticass has joined #ruby
<leftylink> in such a case, I would use a ternary
armatechnicos has quit [Quit: Leaving]
genpaku has quit [Remote host closed the connection]
genpaku has joined #ruby
caterfxo has quit [Ping timeout: 260 seconds]
caterfxo has joined #ruby
<hadifarnoud> this did not work:=> <% puts rtl ? puts 'pull-right' : 'pull-left' %>
<hadifarnoud> <% rtl ? puts 'pull-right' : 'pull-left' %>
cgfbee has quit [Ping timeout: 244 seconds]
ellcs has joined #ruby
<leftylink> well of course it didn't. nothing is being outputted if it's false
<leftylink> &>> false ? puts 777 : 1919
<rubydoc> stderr: -e:4: syntax error, unexpected integer literal, expecting `do' or '{' or '('... check link for more (https://carc.in/#/r/8zp3)
<leftylink> &>> false ? puts(777) : 1919
<rubydoc> # => 1919 (https://carc.in/#/r/8zp4)
<leftylink> sigh, where's the raw thing
<leftylink> &raw>> :hello
<rubydoc> leftylink: parser error at position 0 around `r'
burningserenity has quit [Remote host closed the connection]
hadifarnoud has quit [Quit: Textual IRC Client: www.textualapp.com]
<leftylink> &bare>> false ? puts(777) : 1919
<leftylink> see, no output
<leftylink> it needs to have output when it's false
<leftylink> note also that I don't think `puts` in erb has any effect
<leftylink> it seems I have jumped to a conclusion too quickly and misdiagnosed the problem
<leftylink> whereas the actual problem was that puts in erb has no effect
<leftylink> I failed to follow the advice of Yoda ("do not draw a conclusion too quickly / time is it's yet early")
<leftylink> I apologise for that!
Emmanuel_Chanel has quit [Quit: Leaving]
<apotheon> The puts method has an effect, but its effect goes to stdout, not into HTML. The return value of puts ends up in HTML, and puts returns nil, which doesn't show up in the HTML from erb.
<apotheon> I think erb treats it as an empty string.
<apotheon> Depending on context, stdout might be directed to logs, or to a console in which the application is running.
<apotheon> I'm pretty sure there are other places it might point, but nothing comes to mind.
<leftylink> it just goes to show that it is often an unwise idea for me to give advices on things I don't know, like erb. too often, I give the wrong advice and then people get the wrong idea. sometimes, silence is golden
<leftylink> I must again apologise
troulouliou_div2 has quit [Remote host closed the connection]
Emmanuel_Chanel has joined #ruby
TCZ has joined #ruby
<leftylink> the most dangerous situation is "when you don't know it but you think you know it". in things where it's "you don't know it, and you know you don't know", then it's easy to know to stay silent and refrain from giving bad advice
<leftylink> but if I don't know it but think "it can't be so hard to give good advice about this thing I don't know, because it's so similar to a thing I know!" then that is the most dangerous time and easiest to give wrong advice
<leftylink> I should be more careful.
banisterfiend has quit [Quit: banisterfiend]
gueorgui has quit [*.net *.split]
segy has quit [*.net *.split]
Mikaela has quit [*.net *.split]
lypsis has quit [*.net *.split]
apotheon has quit [*.net *.split]
eldritch has quit [*.net *.split]
electrostat has quit [*.net *.split]
IsoLnCHiP has quit [*.net *.split]
russt has quit [*.net *.split]
michael_mbp has quit [*.net *.split]
trif has quit [*.net *.split]
ule has quit [*.net *.split]
gsingh93 has quit [*.net *.split]
adam12 has quit [*.net *.split]
thecoffemaker has quit [*.net *.split]
skywalker has quit [*.net *.split]
trif has joined #ruby
apotheon has joined #ruby
russt_ has joined #ruby
electrostat has joined #ruby
Mikaela has joined #ruby
michael_mbp has joined #ruby
gsingh93 has joined #ruby
lypsis has joined #ruby
segy has joined #ruby
eldritch has joined #ruby
thecoffemaker has joined #ruby
<apotheon> Too bad I missed hadifarnoud.
<apotheon> 20:28 < hadifarnoud> <% rtl ? puts 'pull-right' : 'pull-left' %>
<apotheon> . . . should be <%= rtl ? 'pull-right' : 'pull-left' %>
<apotheon> . . . if I understand the intent properly.
ur5us has joined #ruby
wymillerlinux has quit [Quit: wymillerlinux]
<apotheon> Wait . . . I should really make sure I don't misremember how this works.
alexherbo22 has joined #ruby
alexherbo2 has quit [Ping timeout: 260 seconds]
alexherbo22 is now known as alexherbo2
ellcs has quit [Ping timeout: 240 seconds]
<apotheon> Yep, I remembered it correctly.
<apotheon> leftylink: http://sprunge.us/CssOF5 (example to illustrate)
<apotheon> Calling that file "erbtest.rb", I get this:
<apotheon> $ ruby erbtest.rb
<apotheon> <strong>pull-right</strong>
<apotheon> <strong>pull-left</strong>
<apotheon> I'm surprised I recalled how erb works well enough to do all that off the top of my head.
<apotheon> It has been a while.
davispuh has joined #ruby
cschneid3 has joined #ruby
cschneid has quit [Ping timeout: 240 seconds]
cschneid3 is now known as cschneid
jinmiaol2 has quit [Ping timeout: 260 seconds]
schne1der has joined #ruby
kinduff has quit [Read error: Connection reset by peer]
kinduff has joined #ruby
EvanR has joined #ruby
<EvanR> when C code called from ruby blocks for some reason, e.g. waiting on I/O, does that block all Threads ?
gr33n7007h has joined #ruby
oneeggeach has joined #ruby
al2o3-cr has quit [Ping timeout: 256 seconds]
gr33n7007h has quit [Quit: WeeChat 2.8]
drincruz_ has quit [Ping timeout: 246 seconds]
impermanence has joined #ruby
<CommunistWolf> can do
<CommunistWolf> depends on the ruby, and the c
<jhass> mainly whether the C releases the GVL
<jhass> whether it's called from within a block or not should be irrelevant though
<CommunistWolf> e.g. jruby calling c via jni woul dbe unaffected
<CommunistWolf> cruby calling c via, um, c? it's going to block harder than suzy hotrod
al2o3-cr has joined #ruby
<EvanR> for example, cruby in a Thread calls a C function that calls recv or read (on not non-blocking socket) which could block as expected.
<EvanR> but other Threads are waiting to run
<EvanR> releasing the GVL ??
<EvanR> I guess all the threads are blocked in this case
<jhass> depends on whether the GVL is released or not ;)
<jhass> GVL is Global VM lock
<jhass> so CRuby has a lock around the VM, preventing any parallel execution of ruby code. Or in other words any two threads entering the VM at the same time
<EvanR> it's funny you should mention that because on this page describing ruby C API, it says "As long as your dfree function doesn’t unlock the GVL (why would you do that???) you can" https://silverhammermba.github.io/emberb/c/
<jhass> however most of its in C implemented stdlib functions, especially those around IO, release the lock. So while those are waiting on the IO syscall, other threads can enter the VM
<EvanR> so surrounding a recv or read with an unlocking and relocking of GVL is a sane thing to do
<jhass> yeah, totally
<EvanR> interesting
<jhass> anything that'll block for while and for sure won't try to enter the VM
<EvanR> thanks
masticass has quit [Ping timeout: 256 seconds]
masticass has joined #ruby
TCZ has quit [Quit: Leaving]
i9zO5AP has quit [Ping timeout: 240 seconds]
oneeggeach has quit [Remote host closed the connection]
oneeggeach has joined #ruby
oneeggeach has quit [Remote host closed the connection]
oneeggeach has joined #ruby
oneeggeach has quit [Remote host closed the connection]
Emmanuel_Chanel has quit [Quit: Leaving]
impermanence99 has joined #ruby
impermanence99 has quit [Client Quit]
i9zO5AP has joined #ruby
r29v has joined #ruby
r29v has quit [Client Quit]
alfiemax has joined #ruby
impermanence has quit [Quit: Connection closed]
rickhull has joined #ruby
alfiemax has quit [Ping timeout: 246 seconds]
banisterfiend has joined #ruby
banisterfiend has quit [Remote host closed the connection]
adam12 has joined #ruby
ldepandis has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
TCZ has joined #ruby
Emmanuel_Chanel has joined #ruby