snguyen has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tomchapin has quit [Read error: Connection reset by peer]
tomchapin has joined #ruby
Amaterasu has quit [Quit: Leaving]
Pumukel has quit [Ping timeout: 264 seconds]
ta_ has quit [Ping timeout: 250 seconds]
PaulCapestany has quit [Quit: .]
Pumukel has joined #ruby
jonoyeong has joined #ruby
PaulCapestany has joined #ruby
CihanKaygusuz has left #ruby ["Leaving"]
arescorpio has joined #ruby
Pumukel has quit [Ping timeout: 260 seconds]
tdy has quit [Ping timeout: 244 seconds]
tmtwd_ has joined #ruby
juggernaut has joined #ruby
<juggernaut>
Hey guys! Are there any open source projects for which I could contribute to? I am a complete newbie with respect to contributing to open source. Any help or guidance would be appreciated.Thank you
<baweaver>
!spam malabaris
<baweaver>
juggernaut: What are you currently working on as far as side projects?
<baweaver>
are you using any specific OS tools already?
hutch34 has joined #ruby
Pumukel has joined #ruby
<juggernaut>
Currently I'm working on python for identifying bots in chat related projects
<juggernaut>
@baeweaver Could you give any examples of OS tools ... Linux?
Xiti has quit [Quit: Xiti]
<baweaver>
are you looking to contribute in Ruby or Python?
<juggernaut>
Ruby
jenrzzz has quit [Ping timeout: 250 seconds]
<baweaver>
The best opening is to look for bad documentation
<baweaver>
pretty it up, make it more comprehensive
<baweaver>
In the process you tend to learn how the framework runs on a whole, and once you know that it's a lot easier to dive into code problems.
Xiti has joined #ruby
<juggernaut>
That sounds amazing! Thanks @baweaver. I'll go through github right away :)
<baweaver>
That, and most OS people are bad about docs in the first place so always lots to love out there in the wild
Pumukel has quit [Ping timeout: 258 seconds]
TheHodge has quit [Quit: Connection closed for inactivity]
Pumukel has joined #ruby
<juggernaut>
Haha! Not sure OS people would feel that way. Any projects that you are working on that are opensource ?
nando293921 has quit [Ping timeout: 265 seconds]
Rodya_ has quit [Remote host closed the connection]
<zenspider>
nothing in ruby is a statement... using contemporary lingo
nankyokusei has quit [Ping timeout: 276 seconds]
<async_prince>
well, class ... end is a statement. but `class` is just a keyword
Pumukel has joined #ruby
<zenspider>
class / end is an expression
<soulisson>
async_prince, zenspider, ok, thanks
<async_prince>
zenspider: there are no statements in contemporary lingo?
c355e3b has quit [Quit: Connection closed for inactivity]
rajdesai has joined #ruby
<moon_>
baweaver: ikd your not gonna guide me. But does eval.in require users to be a browseR? We seemingly got the request perfect. And its telling us 'forbidden'
<soulisson>
I thought the word instruction didn't apply in english but apparently it's the case: ". It is an instruction written in a high-level language that commands the computer to perform a specified action."
gix has joined #ruby
astrobun_ has joined #ruby
<zenspider>
soulisson: your question is hard to answer. is `1 + 1` an instruction?
<soulisson>
zenspider, yes
<zenspider>
how many?
<soulisson>
zenspider, I would say 1
Pumukel has quit [Ping timeout: 264 seconds]
<matthewd>
soulisson: instruction is a relevant term, but it means something specific, and very unlikely the thing you're interested in
<soulisson>
but yeah not an easy question to answer
<zenspider>
soulisson: at what level is it a single instruction?
<async_prince>
ruby program is a sequence of *lines* which are *statements*
<soulisson>
zenspider, user level, then I don't know how the interpreter transforms it
<soulisson>
I see class end as the equivalent "create this class"
<zenspider>
yall keep saying statements... I keep saying there aren't any. nearly EVERYTHING in ruby is an _expression_.
<zenspider>
the number of things we have considered statements is... I dunno... about 3-5. And you don't use them hardly ever
<async_prince>
zenspider: what is an expression?
<zenspider>
a thing that evaluates to some value
<baweaver>
Ruby takes notes from lisp
<baweaver>
lisp is comprised of s-expressions
bmurt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
the_rhizo3 has joined #ruby
<zenspider>
the number of things ruby has that don't evaluate to a value is minuscule
<baweaver>
zenspider: getting a slight headache trying to think of any
<zenspider>
alias
<baweaver>
because technically most of them return nil if nothing else.
<zenspider>
undef
<matthewd>
return
<soulisson>
async_prince, do you agree with "class end" is the equivalent of "create this class"?
memorasus has quit [Ping timeout: 252 seconds]
<async_prince>
soulisson: it is "create class object" *and**assign this object to some constant in global table*
<baweaver>
still returns nil technically.
arescorpio has joined #ruby
<soulisson>
async_prince, ok
<zenspider>
return is an expression
moeabdol has quit [Ping timeout: 265 seconds]
<soulisson>
async_prince, plus the functions which are included in it, right?
<async_prince>
soulisson: `class X .. end` and `X = Class.new { ... }` is the same
<zenspider>
not really the same... but close
Pumukel has joined #ruby
<async_prince>
ok, Class.new { .. } create a closure but who cares
<soulisson>
async_prince, and def func end, is the equivalent of "create the func fonction"?
<async_prince>
and also `class X ... end` could reopen already defined class
<zenspider>
!ban Pumukel !T 1h please fix your connection
Pumukel was kicked from #ruby by ruby[bot] [please fix your connection]
<zenspider>
oh noes... either I'm no op anymore or the bot is way way slow
<baweaver>
bot is slow
kp666 has joined #ruby
<baweaver>
shenanigans?
<baweaver>
use !connection, does it for ya
<baweaver>
apeiros and friends made fancy commands
gusrub has joined #ruby
qguv has quit [Quit: bye]
qguv has joined #ruby
adam^ is now known as adam12
<soulisson>
async_prince, any confirmation about my last sentence?
A_Drone has quit [Remote host closed the connection]
<async_prince>
technically ruby often mutates some things and sometimes that things are global. and often you don't even care about return value. so it feels more like statements, not the expressions
<moon_>
baweaver: it apparently dislikes my bot. We have the request pretty much perfect
<async_prince>
in ruby everything is an optical illusion
<soulisson>
:)
<baweaver>
I want some of what they're smoking zenspider
<moon_>
Is code:"javascript/node-0.10.29" valid? Just making sure. As we are stuck real hard.
crystal77 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<baweaver>
moon_ I would think so but doesn't appear to even send a param to it for JS
<baweaver>
do note I have no idea how it works
<baweaver>
I'm just guessing along
<moon_>
oh
Guest20954 is now known as adam12
nettoweb has joined #ruby
nettoweb has quit [Client Quit]
<async_prince>
how often should i care about the return value of a `class .. end`? yeah i know that it's an *expression* but i don't care. more important that it's a *statement* that defines a class
craigp has quit [Ping timeout: 244 seconds]
<soulisson>
async_prince, the same goes with def foo; end, this instructions defines a function but returns a label
* baweaver
grabs popcorn
<async_prince>
"everything is an expression" was the first thing i learned about ruby.
jgt has quit [Ping timeout: 276 seconds]
<async_prince>
i thought wow it's great
<matthewd>
soulisson: I think it all comes down to why you're asking the question.
<matthewd>
soulisson: If you want to know how things are commonly viewed, then the answer is no.
<async_prince>
soulisson: yes. it's a statement and also it's an expression.
Derperperd has joined #ruby
<soulisson>
matthewd, simple quetion that poped in my mind. No practical impact to be honest
<matthewd>
soulisson: If you want to argue that the answer could technically be yes, then.. enjoy?
<async_prince>
i think `def` returns a value for you be able to write `private def ... end` and so on
<async_prince>
but private is not a keyword, it's a method
<zenspider>
I'm back! stupid cafe network...
jackjackdripper has quit [Quit: Leaving.]
<soulisson>
matthewd, oh sorry, didn't mean to start an argument or debating, it was a genuine question
<moon_>
baweaver: ik your not gonna do this. But can yoy pm me what lang values you know work?
<async_prince>
but we cannot implement `def` is a method because it's handy to 'erase the content'
<zenspider>
async_prince: it seems clear to me that your fixation on "statement" has little to do with the discussion at hand.
<zenspider>
and yet... define_method is a method.
jonoyeong has joined #ruby
<baweaver>
moon_ : the ones in the drop down. JS just happens to post no value in the code param
<zenspider>
baweaver: been a while... how goes?
<baweaver>
Ah not to bad. Still over at Sony, now working on a monitoring and logging team
<baweaver>
get to make all types of fancy charts and stuff.
<async_prince>
zenspider: just curious why statements contradict expressions. i think ruby is a mix of both.
<baweaver>
that and somehow I'm teaching Ruby now internally
<zenspider>
I'm sure you do
<zenspider>
baweaver: that's pretty cool... they're officially using ruby now? I thought it was just sorta underground ops'y stuff before
<moon_>
Ah.
<baweaver>
The entire ops core for PS4 is on Ruby / Rails
<moon_>
setting a useragent fixed it
<baweaver>
with a few smatterings of Node and now Elixir.
jhack has quit [Read error: Connection reset by peer]
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
blandflakes has joined #ruby
blandflakes has quit [Client Quit]
malconis has joined #ruby
<zenspider>
yay! just committed my deprecations on minitest 5
jhack has joined #ruby
<baweaver>
I should jump back into contributing to some Ruby projects.
coolboy has joined #ruby
<baweaver>
Though now I'm on a lot of Python, JS, and AWS for Pluralsight. Figured it's good inspiration to actually learn them in depth.
<zenspider>
I've been playing with racket (more and more) and rust (not sure, but probably less and less)
<soulisson>
baweaver, you work for pluralsight?
<zenspider>
need to get some of my projects dusted off and healthy again... hence the evening cafe and minitest
<baweaver>
Only with Lisp can you be a Schemer and a Racketeer and somehow still get Clojure.
<baweaver>
auditioning for it within the next few weeks
<soulisson>
baweaver, good luck
<baweaver>
they're not looking for Ruby and I know enough on the other subjects that it's a non-issue.
jonoyeong has quit [Remote host closed the connection]
coolboy has quit [Quit: rcirc on GNU Emacs 24.5.1]
alfiemax has joined #ruby
soulisson has quit [Changing host]
soulisson has joined #ruby
jenrzzz has joined #ruby
coolboy has joined #ruby
keeslinp has quit [Read error: Connection reset by peer]
Wolland has joined #ruby
keeslinp has joined #ruby
coolboy has quit [Remote host closed the connection]
Coldblackice has joined #ruby
SeepingN has joined #ruby
jarred has joined #ruby
beilabs has quit [Remote host closed the connection]
elifoster has quit [Quit: night]
hahuang61 has joined #ruby
Wolland has quit [Ping timeout: 250 seconds]
kies has joined #ruby
jenrzzz has quit [Ping timeout: 265 seconds]
jonoyeong has joined #ruby
saneax_AFK is now known as saneax
<jonoyeong>
Hey all anyone know of any good resources for a intermediate Ruby dev? I know the basics of the Ruby lang, looking for next steps.
saneax is now known as Guest72746
<SeepingN>
build a database driven site with Rails
hahuang65 has joined #ruby
<baweaver>
Look through the docs, especially Enumerable and String
<baweaver>
though really, looking into open source projects or just outright building things in Ruby is the fastest way to get good with them
<baweaver>
you can read as many books as you want about woodworking, but until you actually start carving you won't see the real gains in experience.
hahuang61 has quit [Ping timeout: 250 seconds]
_KaLiF has quit [Ping timeout: 258 seconds]
pawnbox has joined #ruby
<jonoyeong>
Okay awesome. I see a lot of contributing to open source. Would trying to contribute straight to the Ruby lang be a good idea? Or is that too advanced?
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
<baweaver>
that'd be in C
<baweaver>
so unless you're really good with that it may be hard
<jonoyeong>
Oh I didn't even know that
<jonoyeong>
haha
_KaLiF has joined #ruby
xall has quit [Ping timeout: 240 seconds]
<SeepingN>
I'd say it's advanced, esp at this point. You'd have to be really good to enhance something, unless perhaps it was a little nor not-at-all developed area. a project that could be pulled in to ruby or as a module might be good
<baweaver>
I mean, yeah it's a good way to learn the really advanced parts of the language but it's pretty deep in some cases.
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
_KaLiF has quit [Max SendQ exceeded]
johnny56_ has quit [Ping timeout: 264 seconds]
mitt3ns has joined #ruby
agent_white has quit [Disconnected by services]
mitt3ns is now known as agent_white
<SeepingN>
I was looking at code for SSH and SFTP today and realized I have a lot to learn
<agent_white>
Evenin'
<SeepingN>
all the class extending and such confuse me
tmtwd_ has quit [Ping timeout: 244 seconds]
zotherstupidguy has joined #ruby
A_Drone has joined #ruby
advorak has joined #ruby
<moon_>
baweaver: thanks for your help.
beilabs has joined #ruby
<zotherstupidguy>
any known limitations of sintatra streaming, say vs icecast2 server for instance?
arescorpio has quit [Quit: Leaving.]
johnny56_ has joined #ruby
SeepingN has quit [Quit: The system is going down for reboot NOW!]
<zenspider>
jonoyeong: not all contributions to ruby require C. you can contribute to lib/* test/* or any of the doco... but it'd probably be easier to get entry into a more user-level OSS project
moeabdol has joined #ruby
<advorak>
I'm happy I made my program get this far :-) just one more hump..
<zenspider>
advorak: you're just looking to see the changes from 1 to 0 instead of 0 to 1?
<advorak>
zenspider, yes.
<zenspider>
do the same thing backwards?
dhollinger has quit [Quit: WeeChat 1.4]
A_Drone has quit [Remote host closed the connection]
A_Drone has joined #ruby
rajdesai has quit [Remote host closed the connection]
duncannz has joined #ruby
duncannz has quit [Max SendQ exceeded]
duncannz has joined #ruby
duncannz has quit [Max SendQ exceeded]
moeabdol has quit [Ping timeout: 244 seconds]
etehtsea has quit [Quit: Computer has gone to sleep.]
<advorak>
zenspider, thanks! :-) I was plugging in everything ..... except that, obviously.
<agent_white>
I want Perl's $_ in Ruby.
<agent_white>
It seems like it'd mesh perfectly, passing single variables through a block and such.
<agent_white>
Or... however many I guess.
Immune has joined #ruby
A_Drone has quit [Remote host closed the connection]
Pumukel has joined #ruby
<zenspider>
but... that's not what it is? Isn't that just @_ evaluated in a scalar context?
<zenspider>
and @_ is rather like *args, no?
craigp has joined #ruby
etehtsea has joined #ruby
A_Drone has joined #ruby
<eam>
zenspider: nope
<zenspider>
which nope?
mixtli has quit [Ping timeout: 265 seconds]
dhollinger has joined #ruby
<eam>
@_ is like a default *args for all subroutines, that part's true
<eam>
but $_ is entirely different - it's the default iterator
<eam>
so you can say: print for @things
hahuang65 has quit [Ping timeout: 258 seconds]
<jonoyeong>
Thanks for the tips zenspider, baweaver and SeepingN
<jonoyeong>
will definitely keep that in mind!
<eam>
and that means print $_ for @things; which is also just like: for my $iterator (@things) { print $iterator }
advorak has quit [Quit: Leaving]
<zenspider>
eam: sure. I get that... but as I understood it... that was all being done via @_... they're all the same... what's their term? glob? blob? something
<eam>
(except $_ is local/dynamic scope and my() is lexical scope but that's a bit more obscure)
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<agent_white>
$_ reflects the last eval in the current binding, I thought?
<agent_white>
"it"
<eam>
zenspider: nope. And yes, there's a glob *_ which are all possible buckets for that symbol
bluOxigen has joined #ruby
<eam>
but $_ and @_ are totally distinct
<eam>
other than they both share the _ symbol
<eam>
there's also a %_
Pumukel has quit [Ping timeout: 264 seconds]
<zenspider>
I don't have enough perl to try to prove me right at this point :)
<zenspider>
it's been MANY years. tho, oddly... I semi-recently ported some old OO perl I had from 10 years prior and it was clean as hell. I was amazed how quickly it came over to ruby
<agent_white>
zenspider, eam: I'm learning Perl and just was curious a bit by the default scalar. It just seems neat :)
mixtli has joined #ruby
<agent_white>
(Ruby shop without Ruby on our machines [except the Rails one] :( _
<zenspider>
we DO use $_ in ruby... I think technically it was deprecated a while back
<agent_white>
Some dude took over the caretaking for potion's VM, it was one of many on perl11.org
<Nilium>
Ah.
* agent_white
shrugs
<agent_white>
I check in once ina while on the dude who maintains it to see if he actively does... apprently so.
etehtsea has quit [Ping timeout: 265 seconds]
Pumukel has quit [Ping timeout: 264 seconds]
yfeldblum has quit [Ping timeout: 250 seconds]
Pumukel has joined #ruby
yfeldblu_ has quit [Ping timeout: 250 seconds]
<Nilium>
I'm accidentally making myself the maintainer of the Lua 5.2 implementation in Go. Starting to.. regret that decision.
<Nilium>
Wonder if the Potion person has the same feeling.
dminuoso has joined #ruby
skade has joined #ruby
Pumukel has quit [Ping timeout: 260 seconds]
mrwn has joined #ruby
etehtsea has joined #ruby
tmtwd_ has quit [Ping timeout: 244 seconds]
xall has joined #ruby
<mrwn>
in all ruby books i read, it uses object messaging terminology, why? why they just don't say method-calling like any other language, what is different in saying you message the object with a message to respond, than just saying method-calling? is there something different about the language that makes using this terminology useful?
babblebre has quit [Quit: Connection closed for inactivity]
pawnbox has quit [Remote host closed the connection]
A_Drone has joined #ruby
A_Drone has quit [Remote host closed the connection]
<Nilium>
mrwn: Because it's messaging.
Pumukel has joined #ruby
Coldblackice has quit [Ping timeout: 244 seconds]
<dminuoso>
mrwn: Well the behavior comes from smalltalk basically.
<dminuoso>
mrwn: An example domain is lazy methods in ActiveRecord. They are caught using method_missing (but defined when AR actually parses the database metadata)
<Nilium>
Also `Object.send :puts, "foo"` prints foo. It's messaging. The VM can probably make some optimizations around method calls, but semantically a method call is a message.
<dminuoso>
mrwn: So the main usefulness is any metaprogramming that relies on method_missing
<async_prince>
yes, method_missing is a manual dispatching of the message
<Nilium>
It's hard explaining that method calls are just messaging after a bottle of wine.
<meatchicken>
Does anyone actually know what a CRM is?
<Nilium>
Customer relationship manager/ment?
<async_prince>
meatchicken: an app with lot of crud
<meatchicken>
I'm reading the wiki page
<meatchicken>
and I have no clue what a CRM actually does
<meatchicken>
Lol
<Nilium>
Note: I hit Cmd+Ctrl+D and looked up what CRM is.
<dminuoso>
mrwn: Ruby basically gives you the tools to catch specific messages (in form of "methods")
<dminuoso>
Or to catch any message (in form of "method_missing")
<dminuoso>
If that makes sense.
<async_prince>
if ruby has messages where is the postman and where is my mailbox?
<mrwn>
dminuoso: you mean i could call a method (message) and the something makes the object fail to get the message?
<async_prince>
i'm sure erlang has messages
tmtwd_ has joined #ruby
<dminuoso>
async_prince: The postman is hard to see, but using binding_of_caller you can get it.
<dminuoso>
async_prince: and the mailbox is the object itself.
<dminuoso>
mrwn: Let's look at it differently.
Pumukel has quit [Ping timeout: 250 seconds]
<dminuoso>
mrwn: obj.method is actually obj.send(:method) (ruby does this really under the hood)
mixtli has quit [Ping timeout: 244 seconds]
<async_prince>
not send(:method) but public_send(:method)
<dminuoso>
I was simplifying for the sake of discussion.
Pumukel has joined #ruby
<async_prince>
dminuoso: i think it matters. what is the analogy in messaging for private/protected methods?
<dminuoso>
mrwn: Either the object finds a method in its ancestory matching that name (in which case it will respond using that method), or it will dispatch that message to the method :method_missing if its defined, and at last if none if defined a NoMethodError is raised.
<Nilium>
What it _really_ does is kind of beyond the point of explaining why "message" vs. "method call"
daffy_duck_2 has joined #ruby
Ishido has joined #ruby
<dminuoso>
mrwn: The distinction is only important when you implement DSLs or lazy metaprogramming (ActiveRecord makes use of this a lot).
<async_prince>
and how to send a message without reply-to?
<async_prince>
i mean, asynchronously
<dminuoso>
async_prince: You cant.
<async_prince>
only with celluloid
<dminuoso>
Not in Ruby anyhow.
<async_prince>
and celluloid has mailboxes
<Nilium>
Not sure where asynchronous anything came into that
hahuang65 has joined #ruby
<mrwn>
dminuoso: but the message will arrive to the object right a way, there is no such a thing like managing this messaging or something prevent the message to get to the object?
daffy_duck has quit [Ping timeout: 276 seconds]
Pumukel has quit [Ping timeout: 260 seconds]
raeoks has joined #ruby
Pumukel has joined #ruby
<dminuoso>
mrwn: No, and I think it's dangerous to consider Ruby message-oriented.
lightheaded has joined #ruby
<mrwn>
dminuoso: i mean, think about it as message makes a lot of ideas come to your mind than method calling
dhollinger has quit [Quit: WeeChat 1.4]
<mrwn>
thinking*
<async_prince>
really, messaging is a bad analogy. i send a message and forced to wait for someone to receive it and then to read. and n the other hand, when i receive a message i cannot ignore it.
<async_prince>
relax, it's simply method calling
<async_prince>
messaging is just a buzzword
skade has quit [Quit: Computer has gone to sleep.]
<dminuoso>
mrwn: Indeed. DSLs use this to a great extend. For example: xml_builder.node_xyz "foo" // your builder might not even have a node_xyz defined, but method_missing sees the message (:node_xyz, "foo") and does something useful with it.
<dminuoso>
This kind of metaprogramming is widely used for DSLs in fact.
<Nilium>
It's a term, it's not like what you think a message is if you've only seen it outside of programming.
<dminuoso>
mrwn: So for example that builder might then produce some output: <node_xyz>foo</node_xyz>
<mrwn>
mmm, ok, i was just confused
<mrwn>
thanks very much
Pumukel has quit [Ping timeout: 260 seconds]
blandflakes has joined #ruby
<async_prince>
in erlang, for example, messages are more like real messages. you have a mailbox that accumulates messages. you have a semantics of checking out that mailbox. you can just send a message and don't wait for someone to read it and answer.
<async_prince>
and methods in ruby are just functions bound to the class
<async_prince>
messaging in ruby is just a word juggling
<dminuoso>
or a module
blandflakes has quit [Client Quit]
solars has joined #ruby
<async_prince>
i just wanted to show an opposite point of view. truth is somewhere in the middle
<mrwn>
async_prince: as a programmer, you just want to call the method, just that, no more thoughts about it, this unnecessary analogy could make you think of it as if you making http request
mixtli has joined #ruby
tdy has quit [Ping timeout: 276 seconds]
<baweaver>
Let's stop being pedantic about metaphors and analogies.
pawnbox has joined #ruby
<async_prince>
i agree
<baweaver>
it does no one any good
tomphp has joined #ruby
<mrwn>
ok :)
<baweaver>
Now a Monad is like a burrito.
Pumukel has joined #ruby
<baweaver>
or a Spacesuit
<baweaver>
I lose track
<Nilium>
The monad is like a bad concept that maybe wasn't given proper consideration.
<Nilium>
And also a cult.
<baweaver>
Either
<async_prince>
it scares me when i see monads somewhere outside of the haskell.
dminuoso has quit [Ping timeout: 265 seconds]
Immune has quit [Ping timeout: 244 seconds]
<baweaver>
Frege
<agent_white>
dminousu explained that well :) Never thought about it that way.
dminuoso has joined #ruby
<Nilium>
I typically only see Haskell and Javascript obsessives talking about monads, and the latter case is weirder than the former somehow.
<baweaver>
They show up a lot in Scala as well.
<Nilium>
It's like bandwagoning, but.. no, it's just normal bandwagoning.
<baweaver>
A monad is like a wagon train
<async_prince>
clojure has monads too
<agent_white>
Haskell are a different folk. Least our lead wizard wrote our routing engine with that.
<agent_white>
(NOC here)
<Nilium>
Only ever did android dev with Scala. It was.. neat but in the same class as my love of C++11.
<Nilium>
Or I guess C++14 now. I can do a _ton_ of things. That doesn't mean I'm actually being a sane person in the process.
lele has quit [Ping timeout: 260 seconds]
A_Drone_ has joined #ruby
mrwn has quit [Quit: Page closed]
conta has joined #ruby
Pumukel has quit [Ping timeout: 265 seconds]
<agent_white>
So
<agent_white>
Question.
<Nilium>
Does the question require me to actually not have my head lopsided 'cause it turns out lopsided is more comfortable when body parts are heavier.
last_staff has joined #ruby
<Nilium>
... That should've had a question mark somewhere. Pretend I did.
Pumukel has joined #ruby
firstdayonthejob has joined #ruby
rkazak has joined #ruby
A_Drone_ has quit [Remote host closed the connection]
Pupp3tm4st3r has joined #ruby
<async_prince>
are the rubyists basically good at making jokes?
<Nilium>
Ruby people are generally good at being relaxed and nice.
lele has joined #ruby
Wolland has joined #ruby
<Nilium>
I don't use Ruby as my day to day language and I will continue to insist the community is great.
etehtsea has quit [Read error: Connection reset by peer]
agit0 has quit [Quit: zzzZZZ….]
<async_prince>
was it a joke attempt?
<Nilium>
Was what?
<baweaver>
I've now been roped into teaching Ruby at work, so progress
<agent_white>
baweaver: \o/
<Nilium>
I converted my office to Go. I have no problems with this, I wouldn't use Ruby for what we do.
phredus_ has quit [Read error: Connection reset by peer]
<async_prince>
Nilium: converted from ruby?
<baweaver>
though my area is Sys/DevOps
<Nilium>
Converted from node.js and PHP.
phredus_ has joined #ruby
rkazak has quit [Client Quit]
<Nilium>
Believe me, we couldn't do worse.
<agent_white>
We're a CLEC. Haskell, C, Ruby, Python... wherever is fit.
Wolland_ has joined #ruby
<Nilium>
Ruby would still be an improvement, but Go helps with homogeneity and not doing concurrent programming in a psychotic manner.
<baweaver>
Node tooling still makes me want to jump off a cliff.
<Nilium>
I have to maintain node.js things at work and I honestly don't know how people using it have convinced themselves this isn't torture.
Azure has quit [Ping timeout: 252 seconds]
Pumukel has quit [Ping timeout: 260 seconds]
<Nilium>
It's truly terrible. The ecosystem, the community, even just basic things like testing.
<baweaver>
We've recently taken to Elixir for concurrency.
<async_prince>
ruby has a best tooling
<async_prince>
but it's slow (
rkazak has joined #ruby
<dminuoso>
async_prince: Try jruby with truffle/graal.
<Nilium>
I think Go has better tooling than Ruby. Built-in testing, pprof, etc. via the go tool.
<agent_white>
baweaver: I was discussing that with the dev team here. We're telecom, so it fits like a glove.
<baweaver>
or Crystal
<dminuoso>
you will be downright amazed if you can get around the warmup phase.
<Nilium>
It's very nice having a standard, even if the standard is minimal.
<async_prince>
dminuoso: they are not better for *tools*
<Nilium>
Being able to say "your tests must run with go test or they're not tests" is fantastic for automation.
<baweaver>
We're at such a scale that we break everything :P
<async_prince>
they're better for long-running stuff
Wolland has quit [Ping timeout: 250 seconds]
<async_prince>
maybe
<dminuoso>
async_prince: Ruby 3.0 is expected to come with *some* form of proper JIT compilation to finally introduce optimizations.
keeslinp has quit [Ping timeout: 276 seconds]
<Nilium>
Telecom seems like an appropriate place for Erlang, given its history.
<baweaver>
We've already managed to break ElasticSearch and a few other tools
<agent_white>
Nilium: Yupyup! My point entirely.
<agent_white>
Nilium: Session management is all it is.
<Nilium>
I mean thematically appropriate
<Nilium>
I've not used Erlang. It's on my to-learn list, but it's hard coming up with personal projects that it'd be good for.
Wolland_ has quit [Ping timeout: 250 seconds]
<agent_white>
Yup exactly.
<agent_white>
Nilium: Well for instance, in telecom say VOIP, registration. Perfect for tracking peers.
<agent_white>
or subscribers, rather.
<Nilium>
Yeah, I tend to be more in the processing massive tons of data area.
<agent_white>
!
<Nilium>
It is actually actively annoying when you have to measure something in petabytes
<agent_white>
Question then! :D
kies has quit [Ping timeout: 240 seconds]
<agent_white>
Rather no. Nevermind.
<Nilium>
I've been drinking, my capacity for answering is limited.
<Nilium>
Apparently not my capacity for typing.
<agent_white>
:)
lheaded has joined #ruby
moeabdol has joined #ruby
dhollin3 has quit [Quit: WeeChat 1.5]
lightheaded has quit [Read error: Connection reset by peer]
<async_prince>
chillin' like a pro rubyist
<Nilium>
Also, my capacity for answering is actually probably just fine because the only thing I seem to suffer from during light drinking is a) I talk a lot and b) I have a hard time with coordinated, physical movement
<Nilium>
Which is why I'll be disappointed if I ever get to the point that a bottle of wine _doesn't_ do this.
Pumukel has joined #ruby
<baweaver>
Nilium: right there with you on petabytes :/
<Nilium>
"Does our data have an expiry?" "Nope!" "Oh dear."
<baweaver>
More of a "LOG ALL THE THINGS" mentality for some teams
<Nilium>
Most people don't think about how to clean up after something's in place. It's kind of a problem.
<Nilium>
Oh, yeah, we have that problem too.
<baweaver>
thankfully we got down to TB scale again...
<baweaver>
30 day truncation unless you put it in Glacier
<Nilium>
We have a DB explicitly for logging. Someone started logging new things to it, so the 20tb of space we had for the original logs is now only enough for less than 30 days of the new thing being logged.
aibot_ has quit [Ping timeout: 250 seconds]
<baweaver>
we recently had approval to cut down to only 30 days logs from indefinite
<baweaver>
so many dead OpenTSDB clusters after that, it was beautiful
<Nilium>
I've had to strong-arm people into dropping less than 30 days of logs for one thing to keep 90 days of another thing
<baweaver>
justification was that people might use it
moeabdol has quit [Ping timeout: 240 seconds]
<Nilium>
And it's like pulling teeth every time I go "hey, we're nearly at 98% capacity on disk, I really do need to start removing data"
<baweaver>
so we said better to apologize if someone was, they'll self-select if they really were using it after we cut it
<Nilium>
Sadly, our logs are in MySQL.
<baweaver>
oof
<Nilium>
It hurts pretty bad.
<baweaver>
Y'might see about getting Cassandra our Couchbase on that.
<Nilium>
The replacement's a work in progress, but any replacement will involve rewriting some internal things.
<baweaver>
KairosDB can handle a lot of the scale for time series
<Nilium>
So, we're trying to get the datastore and format right before we do anything drastic.
Pumukel has quit [Ping timeout: 264 seconds]
<baweaver>
current pipeline for us is to use Spark to normalize things out of Logstash piped in through Kafka.
<Nilium>
We're using InfluxDB for general event logging and metric aggregates, but it's still a little weird.
rkazak has quit [Quit: Sleep.....ing....]
<baweaver>
Influx is going to give you scale problems later.
harai has joined #ruby
<baweaver>
we wanted to use it :/
firstdayonthejob has quit [Ping timeout: 264 seconds]
<Nilium>
Influx is bad if you have anything resembling a cardinality bomb.
<Nilium>
'Cause it doesn't really try to make intelligent decisions about indices.
yfeldblum has joined #ruby
<baweaver>
such is a time series store
<Nilium>
It's literally just C(tag1) * C(tag2) * c(…)
<baweaver>
Bosun might save you a ton of time.
A_Drone has joined #ruby
<baweaver>
log processing and alerting system by StackExchange
<Nilium>
Far as I know, someone's looking at doing an ELK thing and just.. generalized logging. I don't know yet.
<baweaver>
nice piece of work, that one.
dminuoso has quit [Remote host closed the connection]
<Nilium>
I would personally be fine with a syslog I could grep through, but we have to make it at least sort of idiot-friendly for people outside of the dev team.
<baweaver>
Grafana
<Nilium>
i.e., it needs to be palatable for people who like CSVs.
<Nilium>
We actually use Grafana.
<baweaver>
If you use Grafana and Bosun that takes care of 95% of scrub traffic wanting data
<Nilium>
Doesn't give them the access we're looking for, though.
<Nilium>
Basically, it has to be equivalent to what they've got now with MySQL + non-garbage indices.
<Nilium>
Or at least that with some limitations.
<baweaver>
Bosun comes close
<baweaver>
watch some of the preview videos on it
<Nilium>
We've got options for it, anyway, I just can't talk about it right now
<baweaver>
I know the feeling
<baweaver>
There are certain things I'd be sued blind for mentioning :P
<Nilium>
The tedious part of it being half of what someone went "oh that's a product" to
Cohedrin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
memorasus has joined #ruby
submitnine has joined #ruby
<baweaver>
well, bed for me. 'night
jeffaustin81 has joined #ruby
<Nilium>
Have a good one.
yfeldblum has quit [Ping timeout: 250 seconds]
bocaneri has quit [Ping timeout: 265 seconds]
<Nilium>
Actually, I should probably do the same.
<agent_white>
Me5.
jeffaustin81 has left #ruby [#ruby]
<agent_white>
Thanks for the help Nilium!
jeffaustin81 has joined #ruby
Pumukel has joined #ruby
raeoks has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Ropeney has quit [Read error: Connection reset by peer]
raeoks has joined #ruby
tdy has joined #ruby
Ropeney has joined #ruby
dminuoso has joined #ruby
Pumukel has quit [Ping timeout: 260 seconds]
Pumukel has joined #ruby
agit0 has joined #ruby
aganov has joined #ruby
Pumukel has quit [Ping timeout: 260 seconds]
Pumukel has joined #ruby
ICantCook has quit [Quit: bye]
mixtli has quit [Ping timeout: 265 seconds]
kies has joined #ruby
amclain has quit [Quit: Leaving]
memorasus has quit [Ping timeout: 244 seconds]
Guest72746 is now known as saneax_AFK
Pumukel has quit [Ping timeout: 260 seconds]
saneax_AFK is now known as saneax
yeticry has quit [Read error: Connection reset by peer]
saneax is now known as Guest81855
Pumukel has joined #ruby
ta_ has joined #ruby
Guest81855 is now known as saneax_AFK
jackjackdripper1 has joined #ruby
jackjackdripper has quit [Read error: Connection reset by peer]
tmtwd_ has quit [Ping timeout: 258 seconds]
Derperperd has quit [Read error: Connection reset by peer]
Pumukel has quit [Ping timeout: 264 seconds]
ta_ has quit [Ping timeout: 265 seconds]
ta_ has joined #ruby
yeticry has joined #ruby
lubekpl has joined #ruby
Pumukel has joined #ruby
deniskozlov has joined #ruby
Derperperd has joined #ruby
A_Drone has quit [Remote host closed the connection]
raeoks has quit [Ping timeout: 250 seconds]
minimalism has quit [Quit: minimalism]
A_Drone has joined #ruby
pokalyis has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Pumukel has quit [Ping timeout: 260 seconds]
goeast has joined #ruby
agent_white has quit [Quit: baibai]
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Pumukel has joined #ruby
tdy has quit [Ping timeout: 276 seconds]
andikr has joined #ruby
hahuang65 has quit [Quit: WeeChat 1.5]
hahuang65 has joined #ruby
tomphp has joined #ruby
edwinvdgraaf has joined #ruby
Pumukel has quit [Ping timeout: 260 seconds]
lheaded has quit [Read error: Connection reset by peer]
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mikhael_k33hl has joined #ruby
Pumukel has quit [Ping timeout: 260 seconds]
Wolland has joined #ruby
antgel has joined #ruby
lheaded has joined #ruby
lightheaded has quit [Read error: Connection reset by peer]
peteykun has quit [Quit: Leaving]
<mikhael_k33hl>
Is there a way to get the uid and gid of a certain Process? Process.euid and Process.gid seems to only work to get the owner and group id of the current process.
<ruby[bot]>
mikhael_k33hl: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
Pumukel has quit [Ping timeout: 260 seconds]
<dminuoso>
mikhael_k33hl: `derpy is just a bot handling ri commands amongst other things
<mikhael_k33hl>
dminuoso: hahaha, didn't know that sorry
nankyokusei has joined #ruby
symm- has joined #ruby
Pumukel has joined #ruby
<dminuoso>
mikhael_k33hl: Im not sure whether there's a Ruby way to do this.
weemsledeux has joined #ruby
<dminuoso>
From the looks of it there is not.
<mikhael_k33hl>
dminuoso: another thing, if I want to rescue from an exception but do nothing and continue with the script/program, what's the best practice for that? just leave the rescue Errno::ESERCH blank?
<dminuoso>
mikhael_k33hl: Yes.
<mikhael_k33hl>
dminuoso: okay
<mikhael_k33hl>
dminuoso: thanks
MrBusiness3 has joined #ruby
<jhass>
I think there's no way because there's no POSIX way to do it
<jhass>
that is I can't find a syscall to do it
l4v2 has quit [Quit: l4v2]
yfeldblum has quit [Quit: Leaving...]
hahuang65 has quit [Ping timeout: 260 seconds]
nankyokusei has quit [Ping timeout: 250 seconds]
Pumukel has quit [Ping timeout: 260 seconds]
Silthias has joined #ruby
MrBusiness2 has quit [Ping timeout: 250 seconds]
ec0 has quit [Ping timeout: 250 seconds]
symm- has quit [Ping timeout: 240 seconds]
yfeldblum has joined #ruby
Pumukel has joined #ruby
yfeldblum has quit [Remote host closed the connection]
Silthias1 has joined #ruby
johnbat26 has joined #ruby
<jhass>
that is you have to parse /proc on linux for example
teclator_ is now known as teclator
Burgestrand has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
Silthias has quit [Ping timeout: 265 seconds]
<dminuoso>
jhass: Pedants note: That requires syscalls, namely read :P
Pumukel has quit [Ping timeout: 260 seconds]
ddffg has joined #ruby
<jhass>
open too and perhaps stats ;)
<jhass>
*stat
Pumukel has joined #ruby
TomyWork has joined #ruby
<dminuoso>
:)
the_rhizo3 has quit [Ping timeout: 240 seconds]
tdy has joined #ruby
<jhass>
so "a syscall to do it" is actually right, you can't do it with a single one ;)
Pumukel has quit [Ping timeout: 264 seconds]
<dminuoso>
Is there such a thing as overly pedantic? :P
tomphp has quit [Read error: Connection reset by peer]
tomphp has joined #ruby
Pumukel has quit [Ping timeout: 264 seconds]
blackmesa has joined #ruby
blandflakes has quit [Client Quit]
saneax_AFK has quit [Quit: Bye!]
mikecmpbll has joined #ruby
skade has joined #ruby
Dimik has quit [Ping timeout: 260 seconds]
craigp has quit [Quit: WeeChat 1.5]
S-HiP has joined #ruby
joonty has joined #ruby
devmagpie has joined #ruby
jonoyeong has quit [Remote host closed the connection]
jeanlinux has joined #ruby
<S-HiP>
Dzień dobry,
<S-HiP>
W chwili obecnej dla swojego klienta poszukuję doświadczonego programisty Ruby On Rails, który pracowałby stacjonarnie w jednej z podanych lokalizacji. Szczegóły oferty pod spodem:
<S-HiP>
Location: Katowice / Rzeszów/ Warszawa / Wrocław / Poznań / Łódź / Opole / Kraków
<S-HiP>
To develop and maintain the user interface and related tools so that the product team can bring new projects from ideas to production and clients can use the application without problems, within the scope of the development procedures and systems in use.
<S-HiP>
Accountabilities and result area’s
<S-HiP>
• To estimate, design and implement user stories into pieces of code that can be released to production, based on the current technology and workflow in use.
<S-HiP>
• To document his work and share knowledge so that people in the team are always informed of the evolution of the application, based on the tools and communication means in use.
<S-HiP>
• To review the code of his teammates in order to insure a high level of quality of what is produced within the team, based on the reviewing tools and internal guidelines.
<S-HiP>
• To test technical user stories that can’t be handled by the testing team to insure that no bug is introduced into the application, within the scope of the user stories
<S-HiP>
• To monitor and maintain the application to make sure the clients tools are behaving as expected within the scope of the user stories and unpredicted technical events.
<S-HiP>
Professionalism (education and knowledge)
moeabdol has joined #ruby
<mikecmpbll>
:|
craigp has joined #ruby
jackjackdripper1 has quit [Quit: Leaving.]
S-HiP has quit [Client Quit]
valkyrka has joined #ruby
<jhass>
!spam S-HiP
devmagpie has quit [Quit: [BX] Bob Barker uses BitchX. Have your BitchX spayed or neutered.]
cibs has quit [Ping timeout: 240 seconds]
moeabdol has quit [Ping timeout: 265 seconds]
jaruga___ has joined #ruby
Pumukel has joined #ruby
async_prince has quit [Ping timeout: 265 seconds]
cibs has joined #ruby
deniskozlov has quit [Ping timeout: 244 seconds]
agit0 has joined #ruby
pandaant has joined #ruby
the_drow has joined #ruby
joonty has quit [Quit: This computer has gone to sleep]
saneax_-_ has joined #ruby
mark_66 has joined #ruby
beilabs_ has joined #ruby
Pumukel has quit [Ping timeout: 260 seconds]
mrgrieves has joined #ruby
beilabs__ has joined #ruby
beilabs has quit [Read error: Connection reset by peer]
saneax_-_ has quit [Quit: Bye!]
reednj_ has joined #ruby
A_Drone has quit [Ping timeout: 244 seconds]
aibot_ has joined #ruby
beilabs_ has quit [Ping timeout: 258 seconds]
saneax has joined #ruby
gsingh93 has quit [Ping timeout: 244 seconds]
A_Drone has joined #ruby
bruce_lee has joined #ruby
bruce_lee has quit [Changing host]
bruce_lee has joined #ruby
pokalyis has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
lheaded has quit [Remote host closed the connection]
lightheaded has joined #ruby
gsingh93 has joined #ruby
tdy has joined #ruby
lightheaded has quit [Ping timeout: 264 seconds]
jgt has joined #ruby
xall has quit [Ping timeout: 265 seconds]
ta__ has joined #ruby
flying has joined #ruby
marr has joined #ruby
blackmesa has quit [Ping timeout: 276 seconds]
yardenbar has quit [Ping timeout: 252 seconds]
kp666 has quit [Ping timeout: 276 seconds]
ta__ has quit [Ping timeout: 276 seconds]
Derperperd has quit [Quit: Derperperd]
jenrzzz has quit [Ping timeout: 265 seconds]
moei has quit [Quit: Leaving...]
A_Drone has quit [Remote host closed the connection]
edwinvdg_ has quit [Ping timeout: 244 seconds]
Pumukel has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
pawnbox has joined #ruby
Pumukel has quit [Ping timeout: 244 seconds]
the_drow has quit [Quit: This computer has gone to sleep]
reednj_ has quit [Quit: WeeChat 1.5]
Pumukel has joined #ruby
deniskozlov has joined #ruby
kp666 has joined #ruby
edwinvdg_ has joined #ruby
soulisson has quit [Quit: Quitte]
blackmesa has joined #ruby
Pumukel has quit [Ping timeout: 264 seconds]
joonty has joined #ruby
xall has joined #ruby
TheHodge has joined #ruby
tdy has quit [Ping timeout: 258 seconds]
the_drow has joined #ruby
xall has quit [Ping timeout: 265 seconds]
jonoyeong has joined #ruby
geek876 has joined #ruby
tdy has joined #ruby
blackmesa has quit [Ping timeout: 258 seconds]
leitz has joined #ruby
joonty has quit [Quit: This computer has gone to sleep]
xall has joined #ruby
jonoyeong has quit [Ping timeout: 252 seconds]
Pumukel has joined #ruby
the_drow_ has joined #ruby
ledestin has joined #ruby
c0mrad3 has joined #ruby
the_drow has quit [Ping timeout: 276 seconds]
aryaching has joined #ruby
Pumukel has quit [Ping timeout: 260 seconds]
futilegames has joined #ruby
Pumukel has joined #ruby
moeabdol has joined #ruby
A_Drone has joined #ruby
nankyokusei has joined #ruby
joonty has joined #ruby
bluOxigen has quit [Ping timeout: 244 seconds]
lightheaded has joined #ruby
bluOxigen has joined #ruby
genpaku has joined #ruby
moeabdol has quit [Ping timeout: 244 seconds]
Pumukel has quit [Ping timeout: 264 seconds]
joonty has quit [Read error: Connection reset by peer]
joonty has joined #ruby
nankyokusei has quit [Ping timeout: 265 seconds]
Snowy is now known as smooooy
skade has quit [Quit: Computer has gone to sleep.]
weemsledeux has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Pumukel has joined #ruby
senayar has joined #ruby
astrobun_ has quit [Remote host closed the connection]
tdy has quit [Ping timeout: 244 seconds]
marr has quit [Remote host closed the connection]
<geek876>
Hello, I have a time format Thu Aug 18 05:21:08 2016 UTC just wanted to clarify that the equivalent representation in ruby would be %a %b %d %H:%M:%S %Y %Z ? Thanks
<Burgestrand>
Fun fact about time! Sweden wanted to convert from Julian to Gregorian calendar in the year 1700, which meant skipping a certain amount of days, they decided the best course of action was to not have leap years, i.e. skip 29th of February, over the course of about 50 years.
<jhass>
haha, fun
Pumukel has quit [Ping timeout: 260 seconds]
<Burgestrand>
However, Sweden were having too many wars at the time, and kind of forgot to skip the leap year in 1704… and again in 1708! Now, come 1712, the king decided it was best to not switch calendar, and they went back to Julian calendar again.
jaruga___ has quit [Ping timeout: 276 seconds]
moeabdol has joined #ruby
<Burgestrand>
Which means that if you're doing anything with time in the 17xx, and Sweden is involved, you better also think of the Swedish calendar, which is a mix between Julian and Gregorian, but only between these 12 years in history.
<Burgestrand>
Time is fun!
<jhass>
yeah
<jhass>
NPT is a great timezone, + 5:45
<Burgestrand>
Haha, time zones never cease to amaze
memorasus has joined #ruby
<Burgestrand>
(Oh, by the way, egypt decided to skip daylight savings time this year… which they announced three days before the fact!)
craigp has quit [Ping timeout: 264 seconds]
<Burgestrand>
(then they decided not to skip it, I believe!)
Burgestrand has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<apeiros>
despite the branch with `x = 1` not being executed, the lvar exists.
<a1fa>
:popcorn is it Monday?
<dminuoso>
>> puts a if a = 1
<ruby[bot]>
dminuoso: # => /tmp/execpad-2d9548656a43/source-2d9548656a43:2: warning: found = in conditional, should be == ...check link for more (https://eval.in/625003)
<dminuoso>
apeiros: Same story. ^- :)
Pumukel has quit [Ping timeout: 264 seconds]
alfiemax has joined #ruby
Pumukel has joined #ruby
<dminuoso>
a1fa: The general problem is that whether an identifier is considered a variable or method, is decided during lexing (!). But if at any point in a stack frame a variable exists, it exists in the entire frame.
<dminuoso>
Despite my example demonstrating that it still results in unexpected behavior if used carelessly
<a1fa>
thank you
DaniG2k has joined #ruby
lightheaded has quit [Ping timeout: 244 seconds]
<dminuoso>
>> def f; p local_variables; a = 1; end; f()
<dminuoso>
a1fa: So yeah, actually come to think of it, just test whether variable.nil? - you cannot "conditionally" make a variable exist.
pokalyis has joined #ruby
<dminuoso>
It simply cannot be done.
dhollinger has joined #ruby
<a1fa>
dminuoso: my solution is to if string; string << lol; else string = "lol";
joonty has quit [Quit: Leaving]
moeabdol1 has joined #ruby
<dminuoso>
a1fa: Yeah. Personally I would test for .nil? explicitly, since I reserve (if expr) to test for truthy in general.
<dminuoso>
But that's just personal preference.
<async_prince>
a1fa: "#{string}lol"
<a1fa>
async_prince: that would work
xyzzy12 has joined #ruby
<apeiros>
dminuoso: I only test for .nil? for boolean variables
<dminuoso>
o_o
<apeiros>
all other variables should IMO always be nil or value-object (usually of a single type)
<dminuoso>
apeiros: Well as long as its consistent through-out your code base.. :P
<apeiros>
i.e. user_name is always either a string or nil. so `if user_name` is fine to test for nil. it'll never ever be `false`.
<async_prince>
when `.nil?` can be true on the boolean?
Omni_ has quit [Ping timeout: 276 seconds]
Vingador has quit [Remote host closed the connection]
<apeiros>
async_prince: bad phrasing on my part. "on a boolean variable which is allowed to be nil".
<dminuoso>
apeiros: Yeah that would be the other approach. Ruby is too duck-typy - so I prefer my code to be explicit.
<apeiros>
analogous to "a String variable which is allowed to be nil"
<dminuoso>
Since just because the variable is named "string" it does not mean it must be a string.
<dminuoso>
In particular when shit hits the fan it usually is not. :P
IanMalcolm has joined #ruby
<async_prince>
boolean variables which are allowed to be nil is an antipattern.
<dminuoso>
apeiros: You just made me want to write Crystal code more.
<dminuoso>
:(
<async_prince>
this is when in database someone didn't add a `NOT NULL` constraint on the boolean field
howdoi has quit [Quit: Connection closed for inactivity]
<apeiros>
dminuoso: "I want ruby to be statically typed"?
flashpoint9 has joined #ruby
aryaching has quit []
<dminuoso>
apeiros: ;-)
jud has joined #ruby
<apeiros>
I rarely ever assert on a var's type
<harfangk>
so i want to become a ruby dev, not just rails dev, what topics and books should i learn?
<toretore>
ruby
ta__ has joined #ruby
hutch34 has quit [Quit: WeeChat 1.5]
<apeiros>
the syntax, the object model, the core libs
The_Phoenix has joined #ruby
dunpeal has joined #ruby
<apeiros>
and at least a glimpse of the stdlib & gem ecosystem.
<dunpeal>
Does anyone know what a Counter is in Python? Can I get the same in Ruby?
<dminuoso>
harfangk: One important bit (probably not relevant in the beginning but keep this in mind): When you start writing productive code, write tests.
<dminuoso>
Minitest, rspec, whatever floats your boat.
<dminuoso>
But after years of Rubying I found rspec to be one of the best things in Ruby.
<dunpeal>
(A Counter instance takes an iterable (think Ruby's Enumerable) and returns a hash mapping its elements to their frequency)
<async_prince>
harfangk: what do you want to write instead of rails?
xall has joined #ruby
KaliLinuxGR has quit [Changing host]
KaliLinuxGR has joined #ruby
<dunpeal>
e.g. Counter("abbc") #=> {a: 1, b: 2, c: 1}
<dminuoso>
dunpeal: Nope, we have all these tricks in the Enumerable bag.
<dminuoso>
Ruby is not a big fan of hiding services in classes, for the stdlib at least.
<apeiros>
and .each_with_object > .inject with `; accumulator` in the block
<dminuoso>
I guess its a bit nicer considering you dont have to return the memo like in reduce/inject.
<dminuoso>
Yeah.
johnny56 has quit [Ping timeout: 264 seconds]
<dunpeal>
toretore: group_by should also work
<apeiros>
yupp :)
<harfangk>
async_prince well i'm not saying i do not want to write rails. it's just that i learned it hard way that i cannot be a good rails dev if i just remain just a rails dev without good knowledge of ruby
<apeiros>
group_by will also work, yes. might even be faster, but is more allocation heavy.
<dminuoso>
harfangk: Whether you use minitest or rspec is your choice. I will not recommend either way.
<dminuoso>
Both are solid and have a huge community.
johnny56_ has joined #ruby
<apeiros>
also needs an additional pass to perform the .size on the groups
okrasi has quit [Quit: Konversation terminated!]
<dunpeal>
what's the fastest way to go from a hash of {group => collection of instances} to .size
moeabdol1 has quit [Ping timeout: 276 seconds]
<dunpeal>
some sort of a map I assume
<harfangk>
dminuoso well then my default behavior is to stick to ruby core libraries :D thank you for the recommendations!
moeabdol1 has joined #ruby
<ljarvis>
dunpeal: .size of what, the collection?
<async_prince>
need to write Enumerable#count_by
<dunpeal>
apeiros: I couldn't find a count_by in the latest Ruby docs, maybe it's just a common recipe?
<dminuoso>
harfangk: Absolutely. Tests improve code more than any book in the world Id say.
pokalyis has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<dminuoso>
:)
<dunpeal>
ljarvis: yes
xall has quit [Ping timeout: 258 seconds]
<dminuoso>
Good coding out there.
<beelzebot>
is there any way to get qtbindings for ruby 2.3 by now?
eljimmy has joined #ruby
<toretore>
harfangk: learning or trying out rspec should be done after you learn the basics
Rodya_ has quit [Remote host closed the connection]
<apeiros>
dunpeal: I think it's slated for 2.4.0
<toretore>
rspec is a gem that's not part of ruby basics
edwinvdgraaf has joined #ruby
<toretore>
neither is testing, tbh, but if it's what you're used to then do it
loechel has quit [Ping timeout: 260 seconds]
<apeiros>
hm, reading NEWS/ChangeLog it seems it's not in 2.4.0 either.
<dunpeal>
ljarvis: thanks
<apeiros>
but I'm pretty sure I saw it as an accepted feature for upcoming rubies :-/
ledestin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<dunpeal>
Ruby is pretty cool, only issue with it is that it's slow, or at least our Rails stack is slow
<ljarvis>
dunpeal: i now realise you just said fast, i imagine each_with_object would be much faster but i dont know, you'll want to bench it if necessary
<apeiros>
another take at group -> sizes:
<ljarvis>
ruby is super slow
<apeiros>
hash.map { |k,v| [k,v.size] }.to_h
<dunpeal>
ljarvis: nah, I meant concise
<ljarvis>
hey I wrote that
<apeiros>
oh
<apeiros>
only saw your second impl :)
<ljarvis>
apeiros be stealing
<dunpeal>
stealin yo shit
<dunpeal>
all the codez
dminuoso has quit [Ping timeout: 258 seconds]
<apeiros>
it's not stealing if it's from my own snippets!
<ljarvis>
hmm
<dunpeal>
anyway, yeah, if you guys can make Ruby a little bit faster, that would be great mmkay
<ljarvis>
ok ok
<ljarvis>
if you want processing speed, you're using the wrong language
<dunpeal>
Raw Processing Powah
<ljarvis>
if you want to be happy and have development speed, ruby is awesome
tyang_ has quit [Ping timeout: 244 seconds]
<dunpeal>
what if my happiness also depends on processing speed
<dunpeal>
because I get shite from my bosses when website is slow
<dunpeal>
maybe with Truffle Ruby will be blazing fast one fine morning
<ljarvis>
dockerize your container to roflscale
<ljarvis>
shard it, obviously
<dunpeal>
obviously
<dunpeal>
I'll also make sure to hipsterize my nosql
<ljarvis>
i mean if you haven't done that yet you're way behind
beilabs has joined #ruby
<soulisson>
dunpeal, :)
submitnine has quit []
<soulisson>
I said once I didn't know nosql, people were shocked
<soulisson>
:)
<mim1k>
What is the most hipster nosql DB? CouchDB or something?
beilabs_ has quit [Remote host closed the connection]
beilabs_ has joined #ruby
KaliLinuxGR has quit [Quit: Keep Hacking]
camilasan has quit [Quit: No Ping reply in 180 seconds.]
KaliLinuxGR has joined #ruby
<dunpeal>
sorry, I was too busy riding my fixie to the organic coffee shop to get some fair-trade, cruelty-free, sustainably-farmed, responsibly-ground mochaccino
camilasan has joined #ruby
Pupp3tm4st3r has quit [Remote host closed the connection]
beilabs has quit [Ping timeout: 240 seconds]
aufi has quit [Ping timeout: 240 seconds]
axisys has joined #ruby
dminuoso has joined #ruby
tyang_ has joined #ruby
karmatr0n has joined #ruby
Pumukel has joined #ruby
the_drow has joined #ruby
the_drow_ has quit [Read error: No route to host]
etehtsea has quit [Ping timeout: 265 seconds]
rodfersou is now known as rodfersou|lunch
rippa has joined #ruby
Pumukel has quit [Ping timeout: 260 seconds]
tyang_ has quit [Ping timeout: 250 seconds]
zacts has quit [Quit: WeeChat 1.5]
jeanlinux has joined #ruby
giz|work|2 has quit [Ping timeout: 244 seconds]
saneax is now known as saneax-_-|AFK
workmad3_ has joined #ruby
jeanlinux has quit [Ping timeout: 258 seconds]
tyang_ has joined #ruby
etehtsea has joined #ruby
hutch34 has joined #ruby
kp666 has quit [Remote host closed the connection]
kiba_ has quit [Ping timeout: 252 seconds]
workmad3 has quit [Ping timeout: 264 seconds]
<dunpeal>
OK, I'm in IRB, and I defined a variable `foo`. Now I want to define a method `foo` to supercede that variable. Possible?
kiba_ has joined #ruby
dminuoso has quit [Remote host closed the connection]
cd-rum_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
lightheaded has joined #ruby
<matthewd>
dunpeal: No
etetz has joined #ruby
<dunpeal>
matthewd: but I was told nothing is impossible!!!
<dunpeal>
(thanks)
soulisson has left #ruby ["Quitte"]
Omni_ has joined #ruby
<dunpeal>
speaking of hipsters, what do you guys think of Crystal?
<matthewd>
Well, if you dug deep enough, you could probably try to replace irb's current binding with a new one, that copied all the other locals etc :)
solocshaw has joined #ruby
mikecmpbll has quit [Ping timeout: 244 seconds]
Pumukel has joined #ruby
synthroid has quit [Remote host closed the connection]
<jhass>
dunpeal: it's awesome :P
Moosashi has joined #ruby
<dunpeal>
jhass: isn't it too different from Ruby though? no dynamic method dispatch, no method_missing
<dunpeal>
I wonder if it even feels like Ruby to program in
jeanlinux has joined #ruby
IanMalcolm has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<jhass>
it's quite different, it doesn't feel like Ruby, no. It does still feel at home though
<jhass>
it's not "what's this strange place all about" but more "oh, it's like this here, ok"
yardenbar has quit [Ping timeout: 265 seconds]
Pumukel has quit [Ping timeout: 264 seconds]
jeanlinu_ has joined #ruby
coolboy has quit [Remote host closed the connection]
jeanlinux has quit [Ping timeout: 244 seconds]
conta has quit [Ping timeout: 240 seconds]
banisterfiend has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mozzarella has quit [Ping timeout: 276 seconds]
moeabdol1 has quit [Quit: WeeChat 1.4]
SteenJobs has joined #ruby
BrianJ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<SteenJobs>
anyone have an elegant ruby implementation of insertion sort using blocks rather than for loops?
moeabdol has joined #ruby
jeanlinux has joined #ruby
jeanlinu_ has quit [Ping timeout: 250 seconds]
Pumukel has joined #ruby
<jhass>
just replace your for loops with n.times and/or n.upto(m)
<jhass>
perhaps an .each_index here and there
moeabdol has quit [Client Quit]
<SteenJobs>
jhass: yea for the main part of the function that works…i’m wondering about the insert method - i’ll gist you what i wrote in a sec. if you couldn’t guess, i’m finally taking the time to learn algos and data structures for interview prep ha
solocshaw has quit [Ping timeout: 258 seconds]
<SteenJobs>
and while i’ve been practicing using swift, i figured i should get more familiar doing it in ruby since that’ll be my go to lang
moeabdol has joined #ruby
jeanlinu_ has joined #ruby
jeanlinux has quit [Ping timeout: 240 seconds]
<jhass>
these days for is just syntax sugar over .each
coolboy has joined #ruby
mustmodify has joined #ruby
<SteenJobs>
jhass: really?? i thought it was the opposite
mozzarella has joined #ruby
Pumukel has quit [Ping timeout: 260 seconds]
<jhass>
no, not at all
Rodya_ has joined #ruby
pokalyis has joined #ruby
[Butch] has joined #ruby
SilverKey has joined #ruby
<mustmodify>
ok here's an academic sort of question. I have a model Waypoint... a stop on a map. And it has a calculated status. In that status, I use "tech_report_count" to make some decisions. So I'd like to move "tech_report_count" out into its own method. But I don't really want tech_report_count to be a part of the api. I could mark it 'private' but in Ruby, nothing is really private... so ... I guess, is that what makes sense here? Just to mark it private?
<SteenJobs>
but for is sucha python thing…blocks are like Ruby’s TM
jeanlinu_ has quit [Ping timeout: 264 seconds]
jeanlinux has joined #ruby
Pumukel has joined #ruby
<jhass>
mustmodify: yes
<jhass>
it really is private, it just doesn't mean that there's absolutely no way to call it
synthroid has joined #ruby
<jhass>
for all that matters is communicates the same intent though
<mustmodify>
jhass: great, thanks for the confirmation. I've been working in Ruby forever but my thinking is still evolving. I used to use `private' a lot, but haven't been lately. Maybe time to get back in to that.
<jhass>
*it
deniskozlov_ has quit [Ping timeout: 244 seconds]
<jhass>
hence I argue public_send over send where possible
<jhass>
some people do argue everything should be public, the argument is that if it's worth for you to extract into a method, it might be worth for somebody else to reuse it, don't prevent them from doing so
<mustmodify>
Is that a thing? I hadn't even heard of that.
<jhass>
yes it is
cdg has quit [Remote host closed the connection]
<mustmodify>
Sure. But you don't want sloppy apis.
Vingador has joined #ruby
DaniG2k has quit [Ping timeout: 250 seconds]
<mustmodify>
or seemingly-sloppy, overly-verbose
govg has joined #ruby
<mustmodify>
apis
<jhass>
yes, the more surface the easier to break backwards compatibility
Weavel has joined #ruby
jeanlinu_ has joined #ruby
jeanlinux has quit [Ping timeout: 265 seconds]
Pumukel has quit [Ping timeout: 264 seconds]
djbkd has quit [Read error: Connection reset by peer]
crystal77 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
djbkd has joined #ruby
craigp has joined #ruby
<jhass>
array.each_index for line 13
Burgestrand has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<SteenJobs>
nice
deniskozlov_ has joined #ruby
antgel has quit [Ping timeout: 260 seconds]
<mustmodify>
If I have a TimeFrame model, with a start_time and an end_time... I know I want #future? and #past? ... but what's the question for current?
<mustmodify>
#current? seems wrong.
<mustmodify>
#now?
<SteenJobs>
jhass: eh although it needs to be -1 because of the array[n + 1] check
<mustmodify>
#happenin?
<SteenJobs>
DateTime.now?
jeanlinux has joined #ruby
LuckyABA has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<mustmodify>
SteenJobs: no, it's not a discreet time.
<jhass>
SteenJobs: if so the current code has the same issue
<mustmodify>
It's a range of times.
<SteenJobs>
jhass: nah because i used non-inclusive array.count -1 (which is basically array.count - 2)
the_drow has quit [Quit: This computer has gone to sleep]
<mustmodify>
But I guess it makes sense to use the same name. It works.
jeanlinu_ has quit [Ping timeout: 244 seconds]
coolboy has quit [Remote host closed the connection]
<jhass>
SteenJobs: your other loop you can do right_index.downto(0) do |i| break if array[i] <= value
stamina has joined #ruby
<SteenJobs>
mustmodify: don’t understand - you have a date and want to know if it falls within a range?
brianpWins_ has joined #ruby
nankyokusei has joined #ruby
<jhass>
mustmodify: covers?
<SteenJobs>
yea .covers? will check the range
blackmesa has quit [Ping timeout: 250 seconds]
<SteenJobs>
jhass: yea was thinking about that, that’s cool - with the other loop though, if i’m using each_index(), how can i subtract that additional index without doing a check that index + 1 doesn’t exceed the array’s indexes
<jhass>
SteenJobs: 0.upto(array.size - 2) then
brianpWins has quit [Ping timeout: 244 seconds]
brianpWins_ is now known as brianpWins
<SteenJobs>
ah right
Pumukel has joined #ruby
jeanlinux has quit [Ping timeout: 240 seconds]
jeanlinu_ has joined #ruby
<SteenJobs>
jhass: do you know of any good libraries to use locally where i can write and run ruby code interactively and easily? like the equivalent of a swift playground
<jhass>
mustmodify: and I think I don't like past? and future? too much either tbh
<mustmodify>
jhass: I think #now? will work. (a) same interface as Time, which is nice. (b) "when is it between 10:30 am and 1:30 pm?" can be answered "now."
<jhass>
SteenJobs: no, I only use pry
<mustmodify>
jhass: Well, I'm open to suggestions.
<SteenJobs>
yea same - but the line by line bit can be a bit annoying. aright back to learning!
<jhass>
mustmodify: it's closer to a range than to a time though IMO
<mustmodify>
that's true.
dminuoso has joined #ruby
<mustmodify>
we do implement #includes?
aganov has quit [Remote host closed the connection]
<kegster>
what is the best way to run a function ,and if false, wait X seconds and tryagain--- up to Y times in ruby?
agent_white has joined #ruby
Pumukel has joined #ruby
deniskozlov_ has quit [Ping timeout: 260 seconds]
deniskozlov has joined #ruby
RegulationD has joined #ruby
jeanlinu_ has joined #ruby
<smathy>
kegster, you want to block during those X seconds? Or you want this running as a background retry?
jeanlin__ has quit [Ping timeout: 265 seconds]
snguyen has joined #ruby
<jhass>
Y.times { break if foo; sleep(X); }
jeanlinux has quit [Ping timeout: 265 seconds]
<kegster>
smathy, block it. the user has to wait on it. basically i can't modify a case if it's open so i need to isCaseOpen() -- and if FALSE, wait then try it again
<kegster>
but i want to limit it to like 8 tries or something, at 500ms or something
<kegster>
jhass, so is Y an integer?
<jhass>
sure
xyzzy12 has joined #ruby
blackmesa has quit [Ping timeout: 258 seconds]
Rodya_ has quit [Remote host closed the connection]
jeanlinux has joined #ruby
Pumukel has quit [Ping timeout: 264 seconds]
jokke has quit [Remote host closed the connection]
jeanlinu_ has quit [Ping timeout: 265 seconds]
Pumukel has joined #ruby
jokke has joined #ruby
pawnbox has joined #ruby
davedev24 has joined #ruby
tyang_ has quit [Ping timeout: 250 seconds]
nikivi has joined #ruby
tyang_ has joined #ruby
hahuang65 has joined #ruby
symm- has joined #ruby
ycakar has quit [Quit: Leaving]
jeanlinu_ has joined #ruby
jeanlinux has quit [Ping timeout: 265 seconds]
replay has joined #ruby
Pumukel has quit [Ping timeout: 264 seconds]
jeanlinux has joined #ruby
tyang_ has quit [Ping timeout: 250 seconds]
<dunpeal>
What's a good library to quickly visualize result sets?
<dunpeal>
Plots, charts, bar graphs, etc.
jeanlinu_ has quit [Ping timeout: 265 seconds]
hahuang65 has quit [Ping timeout: 240 seconds]
<kegster>
jhass, sure? lol can it be something else?
<jhass>
anything there's a times method defined on
etetz has quit [Read error: Connection reset by peer]
jgt has quit [Ping timeout: 258 seconds]
etetz has joined #ruby
etetz has quit [Remote host closed the connection]
pawnbox has quit [Remote host closed the connection]
Pumukel has joined #ruby
Vingador has quit [Read error: Connection reset by peer]
blaxter has quit [Quit: foo]
IanMalcolm has joined #ruby
xall has joined #ruby
youch has quit [Client Quit]
IanMalcolm has quit [Max SendQ exceeded]
youch has joined #ruby
finisherr has joined #ruby
ta__ has quit [Ping timeout: 250 seconds]
chridal has quit [Ping timeout: 276 seconds]
youch has quit [Client Quit]
youch has joined #ruby
SilverKey has quit [Read error: Connection reset by peer]
jackjackdripper has quit [Quit: Leaving.]
Pumukel has quit [Ping timeout: 244 seconds]
<foxxx0>
i'm trying to call another sinatra route from within an endpoint but i cannot figure out how to properly set the request body for that call, this does not work: https://paste.foxxx0.de/4IS3J3/
Pumukel has joined #ruby
b3atr has quit [Quit: leaving]
dn` has joined #ruby
IanMalcolm has joined #ruby
RedNifre_ is now known as RedNifre
<foxxx0>
the request body is just empty
Pumukel has quit [Ping timeout: 264 seconds]
chridal has joined #ruby
claudiuinberlin has joined #ruby
Eiam has joined #ruby
banisterfiend has quit [Read error: Connection reset by peer]
ec0 has joined #ruby
banisterfiend has joined #ruby
Dimik has joined #ruby
tyang_ has quit [Ping timeout: 244 seconds]
etetz has joined #ruby
Pumukel has joined #ruby
pokalyis has quit [Read error: Connection reset by peer]
zacts has joined #ruby
pokalyis has joined #ruby
rajdesai has joined #ruby
SteenJobs has quit [Quit: SteenJobs]
Madplatypus has joined #ruby
tyang_ has joined #ruby
cloaked1 has quit [Ping timeout: 265 seconds]
DoubleMalt has joined #ruby
sdrew has joined #ruby
sdrew has quit [Max SendQ exceeded]
elifoster has joined #ruby
dinoangelov_ has quit [Quit: (null)]
sdrew has joined #ruby
Pumukel has quit [Ping timeout: 264 seconds]
Silthias1 has quit [Ping timeout: 250 seconds]
giz|work|2 has joined #ruby
IanMalcolm has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bad_ip has quit [Ping timeout: 244 seconds]
bad_ip has joined #ruby
jhack has quit []
Pumukel has joined #ruby
moeabdol has quit [Ping timeout: 258 seconds]
giz|work|2 has quit [Ping timeout: 265 seconds]
elaptics has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
Kilo`byte has quit [Quit: ZNC - 1.6.0 - http://znc.in]
mrBen2k2k2k has joined #ruby
craigp has quit [Ping timeout: 258 seconds]
giz|work|2 has joined #ruby
Kilo`byte has joined #ruby
kiba_ has joined #ruby
thm has joined #ruby
<thm>
how do I teach gem --user-install to install binaries in ~/.local/bin and not in ~/bin ?
Pupp3tm4st3r has joined #ruby
Pumukel has quit [Ping timeout: 264 seconds]
ledestin has joined #ruby
mrBen2k2k2k has quit [Max SendQ exceeded]
<matthewd>
thm: Does --bindir not work?
<thm>
is there a permanent solution?
<matthewd>
.gemrc?
moon_ has joined #ruby
nhhc has joined #ruby
<thm>
thanks
moonythedwarf_ has quit [Ping timeout: 250 seconds]
Silthias has joined #ruby
firstdayonthejob has joined #ruby
mrBen2k2k2k has joined #ruby
cdg has quit [Ping timeout: 264 seconds]
dikaio has joined #ruby
dikaio has quit [Max SendQ exceeded]
rajdesai has quit [Remote host closed the connection]
Silthias has quit [Client Quit]
rajdesai has joined #ruby
<SeepingN>
if I have an older net-ssh gem in my main (project's) gems, but in my home direcotry gems I have a newer one that I'd like to "prefer", how do I get Rails console to use my copy? Change some Gem paths?
Pumukel has joined #ruby
rajdesai has quit [Read error: Connection reset by peer]
rajdesai_ has joined #ruby
rajdesai_ has quit [Read error: Connection reset by peer]
rajdesai has joined #ruby
mrBen2k2k2k has quit [Max SendQ exceeded]
CuriousMind has joined #ruby
<CuriousMind>
I haven't been in this channel for a long time now
<CuriousMind>
Probably 2-3 years ago
Pumukel has quit [Ping timeout: 264 seconds]
<matthewd>
SeepingN: In a Rails application, you should be using bundler, whose job is precisely to ensure everyone is using the same versions of gems
allcentury has quit [Ping timeout: 276 seconds]
karmatr0_ has joined #ruby
karmatr0n has quit [Read error: Connection reset by peer]
mrBen2k2k2k has joined #ruby
etetz has quit [Remote host closed the connection]
etetz has joined #ruby
<SeepingN>
yes but I'm not in charge of everyone
kiba_ has quit [Ping timeout: 250 seconds]
<thm>
matthewd: I tried echo "gem: --bindir=ENV['HOME']/.local/bin" > .gemrc, but that doesn't work
<SeepingN>
I'm not part of the web team, I'm running reporting scripts, often from console. So I have a need for SFTP. They don't.
ledestin has quit [Ping timeout: 265 seconds]
<thm>
matthewd: nevermind, ~ works
bluOxigen has quit [Ping timeout: 240 seconds]
siegy has joined #ruby
craigp has joined #ruby
<havenwood>
SeepingN: You can add a group to the Gemfile for your case. Some folk rig up a Gemfile.local.
<matthewd>
SeepingN: If the application has a dependency on the older version, using the new one presumably risks incompatibilities / breaking other things
<matthewd>
groups allow you to opt out of installing things, but the full dependency tree still has to be coherent
<SeepingN>
yes possibly (I asked them if it would be possible to update ssh and includ sftp or if I should pursue keeping separate ones for my needs)
dikaio has joined #ruby
<zacts>
hi rubyists
<SeepingN>
thx
Pumukel has joined #ruby
etetz has quit [Ping timeout: 276 seconds]
blackmesa has joined #ruby
dikaio has quit [Max SendQ exceeded]
kiba_ has joined #ruby
<matthewd>
SeepingN: If you just want to make it work, you'll need to modify your local Gemfile & re-bundle.. but yeah, I'd recommend finding a less fragile path
mrBen2k2k2k has quit [Max SendQ exceeded]
jgt has joined #ruby
Macaveli has joined #ruby
<havenwood>
zacts: hi
TomyLobo has quit [Read error: Connection reset by peer]
bad_ip has quit [Ping timeout: 240 seconds]
alfiemax has quit [Ping timeout: 258 seconds]
bad_ip has joined #ruby
peteykun has quit [Quit: Leaving]
LuckyABA has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<dminuoso>
postmodern came by the other day, asking about a definite source of third party requirements for Ruby. We eventually determined the definite source to be ruby-install's source code. :P
<siegy>
ah
<siegy>
sorry
<siegy>
need sleep too..
<havenwood>
for the latest versions and checksums it's just a: ruby-install --latest
<jhass>
it's VERIFY_PEER, I guess something sets it to NONE for you
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jeanlinux has quit [Ping timeout: 265 seconds]
<jhass>
there are only two modes relevant to client sockets
<PaulePanter>
Indeed.
Silthias has joined #ruby
leea has joined #ruby
<PaulePanter>
Is there a way to increase the debug level, why the error is thrown.
Pumukel has quit [Ping timeout: 258 seconds]
<PaulePanter>
?
<jhass>
that error has 3 popular reasons: 1) the cert is indeed invalid 2) your openssl/ruby didn't discover your system CA store 3) your server sends an incomplete certificate chain
CuriousMind has quit [Ping timeout: 264 seconds]
<jhass>
not that i'm aware of, but checking those three should get you a high chance to fix it
jeanlinux has joined #ruby
<PaulePanter>
:openssl_verify_mode=>nil
<PaulePanter>
… so it’s not set.
jeanlinu_ has quit [Ping timeout: 244 seconds]
Pumukel has joined #ruby
<jhass>
4) would be the server uses a custom (self signed) CA, though you may consider it a special case of 1)
<PaulePanter>
jhass: I checked with SWAKS (--tls-verify) and it worked.
nankyokusei has joined #ruby
<jhass>
5) would be the servers CA is not in your system CA bundle
tomphp has joined #ruby
<PaulePanter>
… then SWAKS would also fail.
<jhass>
it's probably 2 then
<PaulePanter>
Let me check with a known valid one. smtp.google.com for example.
Silthias has quit [Ping timeout: 240 seconds]
<PaulePanter>
*smtp.gmail.com
Alina-malina has quit [Ping timeout: 244 seconds]
jeanlinux has quit [Ping timeout: 244 seconds]
<jhass>
check if OpenSSL::X509::DEFAULT_CERT_FILE and/or OpenSSL::X509::DEFAULT_CERT_DIR returns a valid value for you
<jhass>
if so set ca_file/ca_path respectively to one
jeanlinux has joined #ruby
<jhass>
setting one of those is enough, dir overrules file
<jhass>
there should be a way to get a hold of the default cert store and call set_default_paths on it, but I can't find it anymore atm
Madplatypus has quit [Quit: Connection closed for inactivity]
<PaulePanter>
jhass: Very nice. Thank you for being awesome. ;-)
bronson has joined #ruby
<PaulePanter>
jhass: … and for helping me.
<jhass>
yw
<PaulePanter>
Good night everyone.
<jhass>
thanks for caring about TLS
a1fa has left #ruby [#ruby]
Pumukel has quit [Ping timeout: 260 seconds]
<PaulePanter>
One last remark, I think to remember, that in case of SMTP a lot of servers (MTAs) don’t check the certificate. Maybe because there are so many configured incorrectly.
Coldblackice has quit [Ping timeout: 250 seconds]
<PaulePanter>
So maybe that’s way, net/smtp does it too.
* PaulePanter
hopes it’ll change soon to be stricter.
jeanlinux has joined #ruby
<jhass>
LE should change it
<jhass>
also postfix is an early adopter for DANE
<jhass>
but long road till that reaches ruby
mikeliss has quit [Quit: mikeliss]
<jhass>
sadly
<dminuoso>
jhass: Today apeiros made me realize again why I need to start with crystal. if(string) ....
BTRE has quit [Quit: Leaving]
<dminuoso>
That clearly has this bizarre behavior of possibly not doing what you want if nil/false/true suddenly appear there. :|
Pumukel has joined #ruby
<dminuoso>
I cant bring myself to start with crystal, don't know what to do with it.
<jhass>
oh well, I'm afraid doesn't change much about it
jeanlinux has quit [Ping timeout: 240 seconds]
<jhass>
PaulePanter: one counter argument could be that I yet have to see a MUA that doesn't verify
marxarelli has joined #ruby
<jhass>
by default
lel has joined #ruby
Scient has joined #ruby
shinnya has joined #ruby
<jhass>
dminuoso: I mean you can restrict the type of each and every method argument if you want to, but if you don't you still have the same problem
Drumphet has joined #ruby
<jhass>
which isn't one IME too
moparisthebest has quit [Ping timeout: 265 seconds]
<dminuoso>
jhass: I just hold the stance that if(string.nil?) is better style than to rely on nil evaluating as false, simply because the code is not clear what you expect.
<dminuoso>
apeiros prefers the other route - but in the end what I really just long for is static typing.
mrBen2k2k2k has quit [Max SendQ exceeded]
marxarelli has quit [Read error: Connection reset by peer]
firstdayonthejob has quit [Ping timeout: 276 seconds]
<jhass>
yeah I don't like the truthiness inversion .nil? does either
Pumukel has quit [Ping timeout: 244 seconds]
<jhass>
it's less clear to me in fact, one step more in the mind
<jhass>
you either have to switch to unless (no elsif), add a ! (extra step in the mind) or swap the common case into the bottom branch
<jhass>
not worth it in practice IMO
<PaulePanter>
jhass: Agreed regarding MUA.
<dminuoso>
Well I dont really want to argue about which route is better. In the end the issue from my side is just that I prefer code to be explicit, which is why my kernel code always explicitly tests for (ptr == nullptr) rather rathan (ptr)
Pumukel has joined #ruby
<dminuoso>
And part of the problem in this case, is that I don't want to indicate that "false/true" could be there to influence the branch
tyang_ has quit [Quit: Leaving]
<dminuoso>
Static typing would solve that.
spudowiar has joined #ruby
<jhass>
yes, if you specify types
<dminuoso>
Yeah
<dminuoso>
asm>> 1
<ruby[bot]>
dminuoso: I have disassembled your code, the result is at https://eval.in/625321
mrBen2k2k2k has joined #ruby
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
zeroDi has quit [Quit: WeeChat 1.5]
Pumukel has quit [Ping timeout: 260 seconds]
Dimik has quit [Ping timeout: 260 seconds]
leea has quit [Quit: My Mac has gone to sleep. ZZZzzz…]