<jzh>
Like this puts "Global variable in Class2 is #$global_variable"
<apeiros>
jzh: then whatever you're reading is wrong.
mtkd has quit []
<jzh>
Ah
<apeiros>
"you CAN access value of any variable or constant" - no, you can't access constants and you can't access locals with just a # in front of it.
<jzh>
apeiros: only used in string interpretations correct?
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<apeiros>
yes. note that regex and Kernel#` can also use string interpolation
mtkd has joined #ruby
<FernandoBasso>
How do I locally read stuff about RbConfig? RbConfig shows just a few things. How would I know what RbConfig::CONFIG['bindir'] is all about, for instance?
<FernandoBasso>
I mean, ri RbConfig
<FernandoBasso>
And ri RbConfig::CONFIG says 'nothing known about...'
careta has joined #ruby
BaroMeter has joined #ruby
<careta>
hey guys, I want to spawn a process that receives a netcat shell, and write something to the pipe (like '/bin/ls') and then allow the user to fully interact with it as it was a normal shell. Any code snippets I can have a look at?
<FernandoBasso>
Looks like the file rbconfig.rb itself doesn't contain much explanation, and that is why ri doesn't say much about it.
drale2k_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<dminuoso>
FernandoBasso: Like basically anything that has to do with ruby itself there's no official documentation or resources.
<FernandoBasso>
dminuoso, So, the post "Learn to Read the Source, Luke" is especially true for Ruby, huh?
<FernandoBasso>
And thanks for the info and the link.
<FernandoBasso>
That one looks very useful.
<dminuoso>
FernandoBasso: Generally yes. Ruby programs and library in general have incredibly poor and bad documentation, if at all.
<FernandoBasso>
What if we start threatening developers?
<Zarthus>
chances are they'll tell you "prs welcome" ;)
<FernandoBasso>
(don't think it would work anyway)
<FernandoBasso>
Zarthus, :)
<FernandoBasso>
If almost all things ruby are poorly or not documented, I just think it is a bad "community habit", or something like that.
<Zarthus>
it's a FOSS problem in general
<Zarthus>
you're not paid to write documentation, donations are rare.
<FernandoBasso>
I think so, yeah. Anyway, I should like to learn how to really understand how to use tools by reading their source code.
<jzh>
apeiros: thanks
<Zarthus>
(I typically do write some docs for my programs, but in general, it's not worth my time to write anything more than a README)
dogweather has quit [Ping timeout: 264 seconds]
<Zarthus>
problem is also documentation needs maintaining
<Zarthus>
it's so easy to be outdated.
<FernandoBasso>
I more or less agree with the post "If It Isn't Documented, It Doesn't Exist"
<dminuoso>
Zarthus: At least Ruby itself should be documented. But large parts of it are not.
<FernandoBasso>
Zarthus, Yeah, docs needs maintaining, but the way ruby does (by scanning the sources) should make it easier. It is not like, docs in one place, sources in other place.
<Zarthus>
dminuoso: this I fully agree with.
<Zarthus>
api docs aren't really documentation that's useful
<Zarthus>
well, it's useful, but in a different way
<dminuoso>
Zarthus: Having dived into Haskell I can say how incredibly helpful just type annotations of any API functions are. *know* what kind of things a function accepts and what they return often says a lot already.
<FernandoBasso>
(I have a bad habit of questioning such things in irc channels and starting these sort of discussions...)
<Zarthus>
even just rubydocs (# @param [...]) isn't used that commonly in ruby, yeah.
<dminuoso>
It's a habit that translated to Ruby - so each method gets decorated by as implistic: # foo : User ~> username -> User
<Zarthus>
In PHP, Java it's all done by the IDE: you type /** */ and most of it is generated for you
<FernandoBasso>
type annotations help a LOT!
<Zarthus>
but there's no good IDE for ruby to begin with
<dminuoso>
Its one of the things that really annoys me about Rails. Regardless of the method, I cant know what kind of parameters it accepts in what position.
<dminuoso>
So to figure out "how to use this public API method" I have to basically either follow the call tree of the method for 15 minutes, of dig through dozens of stackoverflow/reddit responses where people have done it already, and posted examples of other arguments
<dminuoso>
Having to consult stackoverflow just to figure out what possible parameters a method could accept is annoying.
<Zarthus>
there's a reason i don't write ruby using big frameworks, and just using it as a scripting language
<Zarthus>
programming languages developed alongside an IDE (Visual Studio, Clojure) rock the park.
User458764 has joined #ruby
<dminuoso>
I have come to the conclusion that the differentiation of "scripting language" tends to be a useless one.
<Zarthus>
fine, I just use it for files less than 500 lines long :P
<Zarthus>
s/files/projects/
psychicist__ has joined #ruby
jzhu has joined #ruby
ciscam has quit [Ping timeout: 256 seconds]
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
ciscam has joined #ruby
zapata has joined #ruby
OneNeptune has joined #ruby
conta has quit [Ping timeout: 264 seconds]
Guest77337 has quit [Read error: Connection reset by peer]
Nicmavr has joined #ruby
Nicmavr is now known as Guest98487
conta has joined #ruby
blackmesa1 has joined #ruby
ciscam has quit [Ping timeout: 256 seconds]
AJA4350 has joined #ruby
ciscam has joined #ruby
herbmillerjr has joined #ruby
phenom has joined #ruby
sonOfRa has quit [Remote host closed the connection]
sonOfRa has joined #ruby
phenom has quit [Ping timeout: 248 seconds]
karapetyan has joined #ruby
phenom has joined #ruby
sonOfRa has quit [Ping timeout: 256 seconds]
herbmillerjr has quit [Quit: Konversation terminated!]
DoubleMalt has joined #ruby
sonOfRa has joined #ruby
jzhu has quit [Quit: Leaving]
shinnya has quit [Ping timeout: 256 seconds]
beilabs has joined #ruby
DoubleMalt has quit [Ping timeout: 264 seconds]
Mrgoose2 has quit [Ping timeout: 276 seconds]
lunarkitty7 has quit [Ping timeout: 245 seconds]
Mrgoose has joined #ruby
User458764 has joined #ruby
lunarkitty7 has joined #ruby
mtkd has quit []
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
OneNeptune has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ciscam has quit [Ping timeout: 256 seconds]
ciscam has joined #ruby
OneNeptune has joined #ruby
karapetyan has quit [Remote host closed the connection]
<darix>
dminuoso: differentiation of programming languages
GodFather has joined #ruby
<dminuoso>
darix: Differentiation on what basis?
GodFather has quit [Max SendQ exceeded]
<darix>
dminuoso: "you cant do X with language Y" style I guess based on your discussion before
GodFather has joined #ruby
<dminuoso>
darix: Are you talking about the term "scripting languages"?
User458764 has joined #ruby
rippa has joined #ruby
zautomata has quit [Quit: WeeChat 1.9.1]
Zaab1t has joined #ruby
<darix>
yeah
<dminuoso>
darix: So what does it mean for a language to be a scripting language exactly?
<dminuoso>
What is this "scripting" as opposed to "programming"?
<darix>
dminuoso: that I wouldnt limit your statement to scripting languages only :P
<dminuoso>
darix: Oh I now understand what you said.
<dminuoso>
darix: The act of differentiating languages based on some property can be a useful one, but "scripting" is not a well defined term. And the definitions that people *do* fling about tend to be silly.
<dminuoso>
Most of "scripting" tends to mean "writing small programs".
chamar has joined #ruby
apparition has joined #ruby
t0xik has quit [Quit: Connection closed for inactivity]
GodFather has quit [Ping timeout: 265 seconds]
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<konsolebox>
scripting as how i see it means interpreted and by default not subject to being converted to machine code or a virtual code.
<dminuoso>
konsolebox: What does the execution model have to do with the program really? And every language is subject to interpretation.
<dminuoso>
Ruby code is not run on an AST interpreter, its bytecode that runs on a VM just like Java.
<dminuoso>
Machine code is not run directly on hardware, its macrocode run on a pseudo-vm on die.
OneNeptune has joined #ruby
<dminuoso>
Besides, how is that distinction useful? If anything it just adds complexity
mtkd has joined #ruby
OneNeptune has quit [Read error: Connection reset by peer]
OneNeptune has joined #ruby
<apeiros>
I think "scripting language" is not supposed to be strict nor well defined term. it's in the same league as "web language". it's more a description of what a language is often used for rather than a specification
<dminuoso>
apeiros: "what a language is often used for" - and what is that exactly for scripting languages? :-)
<apeiros>
scripting :-p (and yes, that's not well defined either, and doesn't need to be)
<dminuoso>
That sounds just like another term for "programming"
cyberg has joined #ruby
<apeiros>
it is. a vague subset of it.
omth_ has quit [Quit: Leaving]
<konsolebox>
and that's what i meant by my quick use of the word default. there are to obvious ways to break the general idea, like ones you mentioned. programming used to mean creating software that interacts with the machine, but now it also mean just about anything. creating instructions on how interpreted languages or environments would work is also now considered programming. that may be acceptable today, but whether the i accept this generalization or not
<konsolebox>
is mine to decide. scripting originally meant interpreted as how i see it.
<dminuoso>
konsolebox: I fail to see what the execution model has to do with anything.
omth_ has joined #ruby
BaroMeter has quit [Quit: Leaving]
<dminuoso>
konsolebox: Is there a set of programs that is better solved in a langauge that runs on an AST interpreter?
<havenwood>
I was just debating whether I should do coding, scripting or programming today. Votes?
User458764 has joined #ruby
<havenwood>
I guess it mostly depends on whether you want to end up being a programmer, a coder or a scripter.
<havenwood>
We don't really say "scripter," for whatever reason. ¯\_(ツ)_/¯
<havenwood>
JavaScripter maybe.
<dminuoso>
konsolebox: What properties does an AST interpreter have to justify classifying a field of programming that uses that said interpreter?
<havenwood>
Node is nodelers?
<havenwood>
Yes, checks out.
<dminuoso>
AST interpreters are slow. That's the only remarkable feature of an AST interpreter.
blackmesa1 has quit [Quit: WeeChat 2.1]
User458764 has quit [Client Quit]
<dminuoso>
konsolebox: Because clearly "scripting" would mean writing a program implemented in a language that uses an AST interpreter. But that says absolutely nothing about the kind of programs you write, the kind of features the languages have, etc.
<dminuoso>
konsolebox: You can write an AST interpreter for C. Would writing a C program be scripting now if I used that AST interpreter?
<havenwood>
It seems we're entering an era where compiled languages can be interpreted, and vice versa.
<dminuoso>
havenwood: That era began 60 years ago yes.
<dminuoso>
The idea of an AST interpreter is the most simplistic one.
<dminuoso>
And yet -to-machine-code compilers have existed for about 40 years now?
<dminuoso>
Using some word for which everybody has a different meaning for is a good way of ensuring miscommunication.
<dminuoso>
It's why I avoid "big data" or "IoT"
<dminuoso>
Or "cloud" even
<apeiros>
do you use the term "TV"?
<dminuoso>
apeiros: Not really why?
<apeiros>
I wanted to use it as an example that about all terms we use are vague :)
<apeiros>
but since you don't bite :D
<dminuoso>
apeiros: Since we market TV products, I carefully distinguish between analog TV products, IPTV products and TV sets.. :P
<apeiros>
so you make more subcategories. they'll still be vague ;-)
Es0teric has joined #ruby
Es0teric has quit [Max SendQ exceeded]
<dminuoso>
apeiros: I get your point though.
Es0teric has joined #ruby
<apeiros>
ok :)
<apeiros>
I found that one of the biggest revelations when learning my first foreign language
<apeiros>
before starting with that, I thought it would be like "for every word, there's one precise pendant in the other language"
<dminuoso>
Heh yeah
<dminuoso>
Sometimes you cant even translate an idea :)
<dminuoso>
Schadensfreude is something that takes a mouthful to translate to English for example
<apeiros>
and before that, I considered communication problems stemming from words being vague to be a problem with learning. "they didn't learn the exact meaning of the word" or "they were too lazy to find the word with the most precise meaning"
<dminuoso>
*Schadenfreude
dionysus69 has quit [Ping timeout: 260 seconds]
<dminuoso>
apeiros: Nowadays in meetings I usually ask for clarifications on ambiguous terms, and then settle for their definitions. In the end it's just important that you establish a common meaning, whether you accept it for personal usage or not. :)
<apeiros>
similar
<apeiros>
not just in meetings :)
<dminuoso>
accept that definition or not is irrelevant
<dminuoso>
uh
<dminuoso>
RIght
<dminuoso>
I just never see people outside meetings!
<apeiros>
hah
<apeiros>
you do it too ;-) or do you consider IRC one big meeting? :D
shinnya has joined #ruby
<apeiros>
language is a fascinating thing. given how vague and informal everything is, I'm often fascinated how well we can communicate at all.
<dminuoso>
apeiros: I stepped into this understanding through religion actually - having become an ignosticist I've learned to appreciate that it's very necessary to establish common understandings of ambiguous words before a meaningful communication takes place.
<dminuoso>
It's so bizarre that you can talk with someone about a topic using completely different definitions for hours sometimes.
<apeiros>
indeed
<apeiros>
and now you made me look up "ignosticist" - and there I thought I knew all kinds of religious leanings :D
<apeiros>
interesting
karapetyan has joined #ruby
mtkd has quit []
karapetyan has quit [Ping timeout: 264 seconds]
ciscam has quit [Ping timeout: 276 seconds]
ciscam has joined #ruby
karapetyan has joined #ruby
User458764 has joined #ruby
megamos has joined #ruby
Es0teric has quit [Quit: Computer has gone to sleep.]
apparition has quit [Quit: Bye]
drale2k_ has joined #ruby
beilabs has quit [Remote host closed the connection]
Puffball has joined #ruby
drale2k_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
careta has quit [Quit: Leaving]
fmcgeough has joined #ruby
ellcs has joined #ruby
tty has joined #ruby
quobo has joined #ruby
Mike11 has joined #ruby
white_lilies has joined #ruby
drale2k_ has joined #ruby
ellcs has quit [Ping timeout: 260 seconds]
garyserj has quit [Ping timeout: 260 seconds]
Dimik has joined #ruby
JamJam_kid has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
fmcgeough has quit [Quit: fmcgeough]
ciscam has quit [Ping timeout: 248 seconds]
ciscam has joined #ruby
hightower3 has joined #ruby
Dimik has quit []
orbyt_ has joined #ruby
white_lilies has quit [Ping timeout: 256 seconds]
desperek has quit [Quit: xoxo]
megamos has quit [Ping timeout: 245 seconds]
shinnya has quit [Ping timeout: 260 seconds]
akaiiro has joined #ruby
dogweather has joined #ruby
dionysus69 has joined #ruby
dogweather has quit [Ping timeout: 264 seconds]
dogweather has joined #ruby
akaiiro has quit [Remote host closed the connection]
dionysus69 has quit [Ping timeout: 256 seconds]
dogweather has quit [Ping timeout: 245 seconds]
dogweather has joined #ruby
dogweather has quit [Ping timeout: 240 seconds]
User458764 has joined #ruby
DoubleMalt has joined #ruby
mtkd has joined #ruby
mtkd has quit [Remote host closed the connection]
mtkd has joined #ruby
FernandoBasso has quit [Quit: Leaving]
<zxq2>
in C you can set a socket as nonblocking. in ruby in seems there are only methods that use an Socket object in a nonblocking manner. is it possible to make a Socket object nonblocking analogous to setting the nonblocking flag on a socket in C?
hanmac has joined #ruby
drale2k_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
reber__ has joined #ruby
alex`` has joined #ruby
megamos has joined #ruby
reber has quit [Ping timeout: 276 seconds]
dogweather has joined #ruby
dogweather has quit [Ping timeout: 264 seconds]
armyriad has quit [Quit: Leaving]
quobo has quit [Quit: Connection closed for inactivity]
brodul has joined #ruby
DoubleMalt has quit [Ping timeout: 240 seconds]
ogres has joined #ruby
AJA4350 has quit [Quit: AJA4350]
fmcgeough has joined #ruby
lystra_ has quit [Ping timeout: 268 seconds]
lystra_ has joined #ruby
dionysus69 has joined #ruby
DoubleMalt has joined #ruby
fmcgeough has quit [Quit: fmcgeough]
OneNeptune has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
OneNeptune has joined #ruby
JamJam_kid has quit [Quit: Leaving]
icarus has quit [Ping timeout: 265 seconds]
User458764 has joined #ruby
lystra_ has quit [Ping timeout: 260 seconds]
OneNeptune has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
lystra_ has joined #ruby
suukim has quit [Quit: Konversation terminated!]
karapetyan has quit [Remote host closed the connection]
karapetyan has joined #ruby
nythalcrow has joined #ruby
andikr has joined #ruby
nythalcrow has quit [Client Quit]
nythalcrow has joined #ruby
mtkd has quit []
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
roamingdog has quit [Remote host closed the connection]
roamingdog has joined #ruby
alex`` has quit [Quit: WeeChat 2.1]
mtkd has joined #ruby
User458764 has joined #ruby
dogweather has joined #ruby
alex`` has joined #ruby
dogweather has quit [Ping timeout: 240 seconds]
donofrio has joined #ruby
karapetyan has quit [Remote host closed the connection]
karapetyan has joined #ruby
gil_ has quit [Ping timeout: 260 seconds]
gil_ has joined #ruby
gil_ has joined #ruby
gil_ has quit [Changing host]
megamos has quit [Remote host closed the connection]
dogweather has joined #ruby
mtkd has quit []
TinkerT has quit [Read error: Connection reset by peer]
akaiiro has joined #ruby
TinkerT has joined #ruby
dogweather has quit [Ping timeout: 260 seconds]
mtkd has joined #ruby
cheetah has joined #ruby
jzh has quit [Quit: Connection closed for inactivity]
lytol has joined #ruby
pabs has quit [Quit: leaving]
desperek has joined #ruby
cheetah has quit [Remote host closed the connection]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]