eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
eddof13 has joined #ruby
eddof13 has quit [Client Quit]
o|||||o has quit [Ping timeout: 272 seconds]
donofrio has quit [Ping timeout: 260 seconds]
ged has joined #ruby
nirvdrum has quit [Read error: Connection reset by peer]
ur5us has quit [Ping timeout: 260 seconds]
nirvdrum_ has joined #ruby
hanzo has joined #ruby
roadie has joined #ruby
o|||||o has joined #ruby
nirvdrum_ has quit [Read error: Connection reset by peer]
roadie has quit [Ping timeout: 260 seconds]
nirvdrum has joined #ruby
CrazyEddy has quit [Ping timeout: 240 seconds]
nirvdrum has quit [Read error: Connection reset by peer]
nirvdrum has joined #ruby
CrazyEddy has joined #ruby
roadie has joined #ruby
nirvdrum has quit [Read error: Connection reset by peer]
nirvdrum_ has joined #ruby
roadie has quit [Ping timeout: 260 seconds]
roadie has joined #ruby
nirvdrum_ has quit [Read error: Connection reset by peer]
nirvdrum has joined #ruby
nirvdrum has quit [Read error: Connection reset by peer]
nirvdrum_ has joined #ruby
Thanzex has quit [Read error: Connection reset by peer]
Thanzex has joined #ruby
eddof13 has joined #ruby
lunarkitty has quit [Quit: Connection closed for inactivity]
nirvdrum_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ua_ has quit [Ping timeout: 260 seconds]
ua_ has joined #ruby
roadie has quit [Ping timeout: 260 seconds]
roadie has joined #ruby
<ox1eef>
mooff: i saw your comment, thanks. ive become sort of stuck when it comes to specific decisions, like should object.class = 'bar' work? it works in openstruct, but also makes it error out in cases where 'class' is used. i think JS allows it and by magic of its implementation avoids errors in its internals.
<ox1eef>
its much easier to follow JS as close as possible, and avoiding thinking of those kind of decisions altogether.
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<ox1eef>
another thing ive been conscious of is defining as few methods as possible, and so i might move private instance methods to a Utils module that doesn't pollute self
teclator has joined #ruby
jmcgnh has quit [Remote host closed the connection]
<jhass[m]>
adam12: Sure, couple of fresh folks sounds good if anyone is up for it
jmcgnh has joined #ruby
ur5us has joined #ruby
thad_the_man has quit [Read error: Connection reset by peer]
thad_the_man has joined #ruby
Rounin has joined #ruby
d-s has quit [Quit: Leaving...]
ur5us_ has joined #ruby
ur5us has quit [Read error: Connection reset by peer]
jmcgnh has quit [Ping timeout: 246 seconds]
oxfuxxx has joined #ruby
jmcgnh has joined #ruby
fandre1986 has joined #ruby
dionysus69 has joined #ruby
Guest48 has joined #ruby
Guest48 has quit [Client Quit]
Guest48 has joined #ruby
Guest48 has quit [Client Quit]
Tempesta has quit [Read error: Connection reset by peer]
mjacob has quit [Read error: Connection reset by peer]
mjacob has joined #ruby
Guest48 has joined #ruby
CrazyEddy has quit [Ping timeout: 256 seconds]
oxfuxxx has quit [Ping timeout: 260 seconds]
CrazyEddy has joined #ruby
oxfuxxx has joined #ruby
gproto23 has joined #ruby
roadie has quit [Ping timeout: 245 seconds]
taupiqueur has joined #ruby
Tempesta has joined #ruby
roadie has joined #ruby
donofrio has joined #ruby
roadie has quit [Ping timeout: 240 seconds]
John_Ivan has joined #ruby
John_Ivan has quit [Read error: Connection reset by peer]
John_Ivan has joined #ruby
roadie has joined #ruby
oxfuxxx has quit [Ping timeout: 260 seconds]
oxfuxxx has joined #ruby
roadie has quit [Ping timeout: 256 seconds]
roadie has joined #ruby
dionysus69 has quit [Read error: Connection reset by peer]
dionysus69 has joined #ruby
oxfuxxx has quit [Quit: [H]EAT ROX FUCK R0X SHIT BRIX.]
yxhuvud has quit [Read error: Connection reset by peer]
oxfuxxx has joined #ruby
yxhuvud has joined #ruby
ur5us_ has quit [Ping timeout: 240 seconds]
dtroithist has quit [Quit: Lost terminal]
Guest48 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
oxfuxxx has quit [Ping timeout: 260 seconds]
markong has joined #ruby
some14u has joined #ruby
some14u has quit [Client Quit]
o|||||o has quit [Ping timeout: 260 seconds]
donofrio has quit [Remote host closed the connection]
donofrio has joined #ruby
o|||||o has joined #ruby
<henk>
what is state of the art option parsing? OptionParser, optparse, …?
some14u has joined #ruby
<ox1eef>
there's also Slop
Guest48_ has joined #ruby
Guest48_ has quit [Client Quit]
<henk>
ox1eef: would you recommend it over others?
<ox1eef>
i haven't used it in quite some time, and the version i was using is quite old. the old versions had some quirks i believe older major versions addressed.
<ox1eef>
s/older/newer/*
<mooff>
Slop looks nice. i've not used it, but hope to
<mooff>
for a shareable script i'd want to rely on the stdlib. for that case there's OptionParser and GetoptLong
<mooff>
ox1eef: i guess it depends whether you want it to be more BasicObject than Object-like, as a Ruby user of it
<ox1eef>
right now you can do: Object.create(nil, superclass: BasicObject)
<ox1eef>
ive been tinkering with it a bit, ive added Proto::Object and made the Object.create monkeypatch opt-in by require of core_ext/object
<mooff>
cool
<henk>
ox1eef, mooff: thanks
<ox1eef>
welcome
<mooff>
^
SobiX has joined #ruby
SobiX has quit [Quit: Client closed]
<mooff>
ox1eef: JS relies on Object.foo() methods for reflection and manipulation rather than stuff on object prototypes themselves
some14u has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
oxfuxxx has joined #ruby
<mooff>
the main one that was there __proto__ is deprecated in favour of Object.getPrototypeOf(), .setPrototypeOf()
<ox1eef>
indeed, it largely avoids the pitfalls that exist in ruby afaik.
<mooff>
if you hope to leave the choice up to the user, maybe it's possible to avoid defining #class and #singleton_class
<mooff>
#inspect uses self.class, but could check Object === self instead
<ox1eef>
i'm in the process of stripping the module as much as i can, and then the barest object would be Proto::Object.create(proto, superclass: BasicObject)
<mooff>
method_defined? could use (class << self; self; end) instead of singleton_class
<ox1eef>
good call +1
Guest48_ has joined #ruby
Guest48_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<isene>
XRPN is a new programming language written in Ruby. It is stack-based, similar to Forth, Raven and Postscript. It is a superset of the HP-41 programming language, FOCAL.
<chirukodati>
M1 mac problems :(
eddof13 has joined #ruby
<adam12>
isene: Fascinating stuff.
<adam12>
chirukodati: lol yep.
<isene>
adam12: I'm at something like 50 hours so far, wondering what to add next to the language. I'm hoping it will keep me busy for quite some time. But to achieve that, I could do with some feedback.
<chirukodati>
Thanks adam12. It worked.
<adam12>
chirukodati: cheers.
<apotheon>
adam12: Is your username from a TV series?
<adam12>
apotheon: Yea :)
<apotheon>
I've been wondering that for a while.
<apotheon>
a long while
<adam12>
LOL
<apotheon>
I just finally decided I was curious enough to ask.
<apotheon>
I think I saw a grand total of about ten minutes of it once.
<adam12>
I picked it a 100 years ago and it's stuck, tho I wish the show was Adam65535 because on some sites, adam12 is already taken due to the incremental nature of it.
<adam12>
Yeah, it's a very old show.
<apotheon>
yep
<apotheon>
I'm a very old person.
<adam12>
Likewise O_O
eddof13_ has joined #ruby
<apotheon>
You *might* be older than me, given your enthusiasm for Adam-12.
<apotheon>
I think something like three episodes aired since my birth.
<adam12>
I'd bet we're the same age.
<adam12>
It's just naming things is hard, and a 100 years ago I picked a name that stuck due to a passing familiarity to a show.
<apotheon>
gotcha
<mooff>
so you're saying apotheon is more than a hundred years old?!
<mooff>
also very nice ox1eef
<apotheon>
mooff: contemporary of folks like Lao Tzu and Diogenes
apotheon is now known as ElderMalaclypse
<adam12>
heh
<ElderMalaclypse>
I'm kind of a discordian taoist, y'know.
<adam12>
O_o
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
markong has quit [Ping timeout: 260 seconds]
rawley has quit [Ping timeout: 246 seconds]
eddof13_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<adam12>
One interesting (to me anyway) thing about building gemdocs.org is that I see some new interesting gems I'm not sure I'd ever discovered by hand. But also very strange (to me anyway) deployment processes. Such as this one gem that I just saw push 20+ pre-releases in the span of a few minutes, and it's up to pre.1093 as a version number?
eddof13 has joined #ruby
<adam12>
I'm tempted to add the ability to generate gems on-demand; visit /gems/foobar/1.2.3 and it will build it if it doesn't already have it.
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<Guest26nakilon>
basically there are some euristics to decide how to render the Pod, and if it's yet not supported it shows up as "| unsupported scanner |" among other pods
<Guest26nakilon>
you can join ##nakilon and enter '\help wa' to play with the bot, not sure for how many days it will be alive yet
donofrio has quit [Ping timeout: 246 seconds]
chirukodati has quit [Quit: Client closed]
<Guest26nakilon>
and about the "short answer interface", not sure what is the official API but maybe it's a shortcut to limiting the response to just the "primary" pod, but that pod isn't always the best one, and sometimes is absent, and sometimes there are several of them so it's all incosistent and had to be handled in my code
<Rounin>
Yeah... Could be a locale thing I suppose
phenom has quit [Ping timeout: 245 seconds]
<Rounin>
LC_TIME=nb_NO.UTF-8
<Rounin>
Same result with en_US.UTF-8 and C, though
<Rounin>
That's a pretty thorough database, though, if it's got solar time in Berlin in 1893
phenom has joined #ruby
hanzo has quit [Quit: Connection closed for inactivity]
nmollerup has quit [Quit: Leaving]
_ht has quit [Remote host closed the connection]
some14u has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
eddof13_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
eddof13 has joined #ruby
dionysus69 has quit [Ping timeout: 260 seconds]
some14u has joined #ruby
ur5us_ has joined #ruby
some14u has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
emcb59 has joined #ruby
o|||||o has quit [Ping timeout: 260 seconds]
emcb5 has quit [Ping timeout: 250 seconds]
emcb59 is now known as emcb5
some14u has joined #ruby
markong has joined #ruby
cahoots has joined #ruby
<cahoots>
hi, for each line of stdout or stderr that's outputted in my ruby script whether explicitly with puts or implicitly with system(...), i want to prepend a timestamp to it. is there any way to do this within ruby, and without a bash wrapper?
some14u has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
some14u has joined #ruby
<cahoots>
it appears i can reassign $stdout, but what exactly am i allowed to reassign it to? if i use a custom class that just overrides some necessary "write" method, is that enough?
<cahoots>
adam12, this seemed promising but it doesn't intercept the output of subshells
<cahoots>
or of system('echo', 'hi')
<adam12>
system probably accepts a fd for stdout
<adam12>
which your custom class object likely doesn't have.
<cahoots>
it does, but then you have to do it everywhere
<adam12>
I can't look now. Maybe you can make an example if you're still stuck.
<adam12>
bbiaf.
<cahoots>
the example is simply system('echo', 'hi') not using $stdout
clemens3 has joined #ruby
<mooff>
adam12: i never knew about BEGIN. cool feature.
roadie has quit [Remote host closed the connection]
roadie has joined #ruby
<mooff>
cahoots: maybe you could monkey patch Object#system
seifeslimene has joined #ruby
<mooff>
reading back.. i'd use an IO.pipe as $stdout / $stderr
taupiqueur has quit [Ping timeout: 246 seconds]
esaym153 has joined #ruby
roadie has quit [Ping timeout: 245 seconds]
<esaym153>
how do I print the contents of an object/array? Trying to debug a gitlab script, just using 'puts' gives me a list like http://paste.debian.net/plain/1236318