InternetFriend has quit [Ping timeout: 240 seconds]
ahuman_ is now known as ahuman
trosborn has quit [Quit: trosborn]
shanemcd has joined #ruby
<Ox0dea>
I suppose SIZEOF_UINTPTR_T is more likely to be the correct value on more systems, but this is otherwise a pretty "robust" way to do it, scarily enough.
trosborn has joined #ruby
<Ox0dea>
Internally, RClass is just an RBasic immediately followed by a VALUE, the latter being a pointer to the superclass.
agent_white has quit [Quit: backlater]
<Ox0dea>
I don't think that's liable to have changed since 1.0 or so.
<Ox0dea>
s/pointer/reference/
bMalum has joined #ruby
Bugboy1028 has quit [Ping timeout: 240 seconds]
<shevy>
that reminds me of evil.rb
mattwildig has quit [Ping timeout: 248 seconds]
sondr3 has quit [Ping timeout: 248 seconds]
Bugboy1028 has joined #ruby
bMalum has quit [Client Quit]
<Ox0dea>
evil.rb was the hardcore mode that Fiddle softened up quite nicely.
chouhoulis has joined #ruby
Uber|Dragon has left #ruby [#ruby]
Uber|Dragon has joined #ruby
<Ox0dea>
Now that I think on it, why on earth isn't Fiddle::SIZEOF_VALUE a thing?
shanemcd has quit [Ping timeout: 244 seconds]
moeabdol has joined #ruby
baweaver has quit [Remote host closed the connection]
Vingador has quit [Ping timeout: 244 seconds]
youch has joined #ruby
kenndel_ has quit [Read error: Connection reset by peer]
Contigi has quit [Read error: Connection reset by peer]
<shevy>
how many bug or issue trackers would exist for ruby? I know of redmine I think... but is there something simpler? ideally web-interface too but I mostly just need a sorta "todo list manager". my todo files right now are mostly just plain .md files
astrobun_ has quit [Remote host closed the connection]
ensyde_ has joined #ruby
<antranigv>
may I ask, which part of Ruby is influenced by Ada? :)
astrobun_ has joined #ruby
devbug has quit [Ping timeout: 240 seconds]
<shevy>
its girly side
<antranigv>
shevy: lol:D
blackmesa has joined #ruby
aryaching has quit [Ping timeout: 276 seconds]
baweaver has quit [Remote host closed the connection]
ensyde_ has quit [Ping timeout: 248 seconds]
LoneHerm_ has joined #ruby
tristanp has quit [Read error: Connection reset by peer]
tristanp has joined #ruby
pawnbox has quit [Remote host closed the connection]
<antranigv>
File.open("file.txt", "r") do |f|
<antranigv>
what does |f| do?
intrigueD has quit [Remote host closed the connection]
blackmesa has quit [Ping timeout: 250 seconds]
pawnbox has joined #ruby
mattwildig has joined #ruby
amclain has quit [Quit: Leaving]
fullofcaffeine has quit [Remote host closed the connection]
chipotle has joined #ruby
eregi has quit [Ping timeout: 260 seconds]
scepticulous has joined #ruby
trosborn has quit [Quit: trosborn]
mattwildig has quit [Ping timeout: 260 seconds]
<djellemah>
antranigv: |f| is a parameter to the block of code between do and end
bronson has joined #ruby
trosborn has joined #ruby
tvw has joined #ruby
Mon_Ouie has joined #ruby
thevaliantx has quit [Quit: Leaving]
tjbiddle has quit [Quit: tjbiddle]
JohnBat26 has joined #ruby
adgtl has quit [Remote host closed the connection]
trosborn has quit [Client Quit]
neuraload has joined #ruby
chouhoulis has joined #ruby
trosborn has joined #ruby
trosborn has quit [Client Quit]
trosborn has joined #ruby
trosborn has quit [Client Quit]
<hk238>
Hello I just started learning ruby on 'codeacademy' website, there's a task that asks me to print out each word from a user's input into the console, as far as I can tell, that's exactly what's happening, but the website doesnt accept that as an answer... So I'm probably doing something wrong ^^
<hk238>
`text = gets.chomp` `words=text.split(" ")` `words.each do |word|` `puts words` `end` , should work?
Ishido has joined #ruby
_whitelogger has quit [Excess Flood]
_whitelogger has joined #ruby
chouhoulis has quit [Ping timeout: 250 seconds]
tjbiddle has joined #ruby
nando293921 has quit [Ping timeout: 244 seconds]
LoneHerm_ has quit [Remote host closed the connection]
Bugboy1028 has quit [Ping timeout: 248 seconds]
dnewkerk has quit [Quit: dnewkerk]
Dimik has joined #ruby
chipotle has quit [Ping timeout: 248 seconds]
the_drow has quit [Quit: This computer has gone to sleep]
lvn has joined #ruby
Bugboy1028 has joined #ruby
htmldrum has joined #ruby
uglybandersnatc- has quit [Ping timeout: 276 seconds]
devbug has joined #ruby
pawnbox has quit [Remote host closed the connection]
fedexo has quit [Ping timeout: 248 seconds]
voker57 has quit [Read error: Connection reset by peer]
ohcibi has quit [Read error: Connection reset by peer]
firstdayonthejob has joined #ruby
_whitelogger has quit [Excess Flood]
_whitelogger has joined #ruby
voker57 has joined #ruby
voker57 has quit [Changing host]
voker57 has joined #ruby
htmldrum has quit [Ping timeout: 244 seconds]
anisha has joined #ruby
ohcibi has joined #ruby
steffkes has quit [Ping timeout: 250 seconds]
jayc0b0 has quit [Ping timeout: 240 seconds]
<SebastianThorn>
hk238: puts word
andikr has joined #ruby
<hk238>
oh sorry, I did actually do `puts word` but by accident wrote `words` into irc ^^
czerasz has joined #ruby
<SebastianThorn>
ahh, ok :P
<SebastianThorn>
well there is many ways of doing that task, so they might have a different solution
astrobun_ has quit [Remote host closed the connection]
adac has joined #ruby
mlehrer has quit [Remote host closed the connection]
<adac>
what is the difference between "||=" and "||" not sure how these are called so a google search is a bit a problem :)
symm- has quit [Ping timeout: 250 seconds]
<apeiros>
one does an assignment, the other does not
<apeiros>
`a ||= b` expands to `a || a = b`
SenpaiSilver has quit [Quit: Leaving]
<Bish>
assuming i don't have an MTA, is it stupid to directly deliver the mail with ruby?
<apeiros>
i.e., assign b to a, if a is falsy
djbkd has joined #ruby
Gasher has quit [Quit: Leaving]
<Bish>
i tried doing that but i keep getting "relay access denied", i sniffed on the connection i can't see the difference in the protocol
<apeiros>
Bish: you'll most likely never be able to do so
<Bish>
apeiros: why?
<apeiros>
or well, depends actually a bit. do you do it from the server which has the dns entries for MX?
<Bish>
yep, well atleast right now
<Bish>
for testing
norc has quit [Ping timeout: 252 seconds]
<Bish>
same server, tried to send with postfix=>works,ruby directly=>doesn't work
<Bish>
can't see the difference in the protocol (smtp)
<apeiros>
hm
<apeiros>
not sure then
eregi has joined #ruby
public_class is now known as jdockz
ilyaman has quit [Quit: Leaving.]
skade has quit [Quit: Computer has gone to sleep.]
<apeiros>
my initial response was quite a bit driven by our own infrastructure, where the mail handling is on a different server than web, and ruby is on the webservers. so we'd lack proper dns entries for other mta's to accept the connection.
jaruga has quit [Ping timeout: 240 seconds]
<Bish>
but in theory there is nothing wrong to skip postfix for outgoing mails?
<Bish>
there are people who do that?
momomomomo has quit [Quit: momomomomo]
djbkd has quit [Ping timeout: 244 seconds]
darkxploit has joined #ruby
<apeiros>
no idea. I wouldn't do it since postgres handles all the cases.
<adac>
apeiros, thanks!
<apeiros>
i.e. things like that it should try up to 72h, trying second mx server etc.
<apeiros>
and all those things are being used in order to thwart spammers
decoponio has joined #ruby
<apeiros>
err, s/postgres/postfix/
<Bish>
yeah my problem are deferred mails, i don't want them to pile up in postfix queue
<apeiros>
fingers on cruise control ;-)
<apeiros>
configure your queue accordingly? my knowledge is limited, but iirc postfix was highly configurable.
bmn has quit [Ping timeout: 260 seconds]
mary5030 has joined #ruby
<Bish>
yeah it is, but i hate the fact postfix is like "okay, i will deliver this mail"
<Bish>
and a week later it tells me "whopsie, it bounced"
<apeiros>
but that's according to the standard
mary5030 has quit [Remote host closed the connection]
eregi has quit [Ping timeout: 276 seconds]
whippythellama has joined #ruby
<apeiros>
but yeah, IMO that standard should get overhauled. the prescribed latencies are ridiculous in todays envs.
n008f4g_ has joined #ruby
mary5030 has joined #ruby
<Bish>
ofc i can shorten the queue length, but then it will be bounced instantly
bmn has joined #ruby
<Bish>
sure postfix is highly configureable, but you cannot work with it programaticially, that kinda sucks
vikas027 has joined #ruby
<Bish>
postfix people be like "it's easy, just invoke these 100 prozesses in a bash script"
<Bish>
apeiros: "that standard" as in mail?
<apeiros>
as in smtp
<apeiros>
and you can replace every component of postfix with a custom process ;-)
<adaedra>
opensmtpd ftw
<Bish>
yeah right, but that's crazy :D
<apeiros>
in general, I'm pretty sure you'll be better off adapting postfix than delivering directly from ruby.
volty_ has joined #ruby
<Bish>
yeah i figured
volty has quit [Ping timeout: 244 seconds]
momomomomo has joined #ruby
<apeiros>
I'm not sure it's more crazy than delivering from ruby :-p
momomomomo has quit [Client Quit]
<apeiros>
but my smtp/postfix knowledge is limited and somewhat dated. so take it with a chunk of salt.
jdockz has quit [Quit: Leaving]
vikas027 has left #ruby [#ruby]
public_class has joined #ruby
<volty_>
require 'Qt'; require 'nokogiri'; Qt::Application.new(ARGV); Qt::Widget.new().show(); $qApp.exec(); // the program always segfaults, no matter what order, no matter code. So it probably has to do with cleanup code of qt and/or nokogir. What I am asking for is hints, ideas, where to look at. what to test. if possible to dispose nokogiri stuff before disposing the Qt application
mlehrer has joined #ruby
amargherio has joined #ruby
mlehrer has quit [Client Quit]
p0p0pr37 has joined #ruby
mlehrer has joined #ruby
<volty_>
in alternative — do you think it would be too difficult/laborious to implement a drb nokogiri server ? i do not have clear ideas at the moment.
rodfersou is now known as rodfersou|lunch
mattwildig has joined #ruby
Guest44753 is now known as James
IrishGringo has quit [Ping timeout: 248 seconds]
makenoise has joined #ruby
James is now known as Guest12899
skweek has quit [Ping timeout: 250 seconds]
anagha_ has quit [Quit: Connection closed for inactivity]
Respek has joined #ruby
skweek has joined #ruby
skweek has quit [Remote host closed the connection]
tulak has quit [Remote host closed the connection]
neuraload has quit [Quit: neuraload]
Respek has quit [Client Quit]
tulak has joined #ruby
Rickmasta has joined #ruby
Rickmasta has quit [Max SendQ exceeded]
hxegon has quit [Quit: BRB]
<Bish>
apeiros: but what could go wrong, when sending my emails without going over postfix
<Bish>
i mean, i cannot come up with something
<apeiros>
Bish: google for a list of anti-spam measures and check whether ruby sending mails would handle that.
diegoviola has joined #ruby
tulak_ has joined #ruby
IrishGringo has joined #ruby
tulak_ has quit [Remote host closed the connection]
<shevy>
volty_ come join me! come to ruby-gtk :D
<apeiros>
when you're through that, google for a list of possible mail sending failures, and then check whether ruby sending mails would handle those.
tulak has quit [Read error: Connection reset by peer]
agent_white has joined #ruby
tulak_ has joined #ruby
codecop has joined #ruby
aufi has quit [Ping timeout: 276 seconds]
hxegon_AFK has joined #ruby
hxegon_AFK has quit [Client Quit]
<volty_>
shevy: no way, the difference is orders of magnitude (I'm saying this without even trying gtk-bindings)
aegis3121 has quit [Ping timeout: 264 seconds]
<Bish>
apeiros: well i cannot find anything except for deferring mail / greylisting, which is the exact thing i want to countermeasue
<Bish>
by handling mails on my own
baweaver has joined #ruby
hxegon has joined #ruby
sandstrom has quit [Quit: My computer has gone to sleep.]
wilbert has joined #ruby
<apeiros>
do you handle multiple mx where the primary is non-responsive?
<apeiros>
(that's one cheap thing I do to counter spams)
davedev24 has joined #ruby
<Bish>
well i could do that
<apeiros>
lets hope the list ends with that. I doubt it :)
Chagel has quit [Ping timeout: 244 seconds]
<Bish>
okay, maybe you're right
<Bish>
stupid protocol
<apeiros>
yeah, not just the protocol by now. stupid spammers ruining it for everybody.
flak has joined #ruby
flak has quit [Read error: Connection reset by peer]
flak has joined #ruby
x0f has quit [Ping timeout: 276 seconds]
nettoweb has joined #ruby
synthroid has joined #ruby
nettoweb has quit [Client Quit]
melter has joined #ruby
Rickmasta has joined #ruby
eregi has quit [Ping timeout: 250 seconds]
shanemcd has quit [Remote host closed the connection]
<Bish>
well the protocol ist stupid because spammers can use it
dhollinger has joined #ruby
<Bish>
!!!
shinnya has joined #ruby
<Bish>
but maybe modifying the smtp binary is the way
rippa has quit [Ping timeout: 260 seconds]
momomomomo_ has joined #ruby
bougyman has quit [Ping timeout: 276 seconds]
<Bish>
syscall tracing with ruby on the smtp executable
bougyman has joined #ruby
<Bish>
THAT SOUNDS LIKE A GOOD IDEA
x0f has joined #ruby
momomomomo has quit [Ping timeout: 248 seconds]
momomomomo_ is now known as momomomomo
baweaver has quit [Remote host closed the connection]
ljames has joined #ruby
tjohnson has joined #ruby
idefine has quit [Ping timeout: 244 seconds]
sneakerhax has quit [Ping timeout: 248 seconds]
bronson has joined #ruby
hannelita has joined #ruby
idletask has joined #ruby
<idletask>
Hello
<idletask>
I'm a super beginner and there is something which I'd like to know
bronson has quit [Remote host closed the connection]
<idletask>
In print "foo", is print a function or a builtin command?
<Bish>
idletask: just ask or your question will remain an idletask
<idletask>
Or is it just a function which is provided with Ruby?
idefine has joined #ruby
momomomomo has quit [Quit: momomomomo]
<idletask>
Same for puts etc
decoponio has quit [Quit: Leaving...]
hxegon has quit [Quit: BRB]
<Bish>
idletask: don't think about it in C-Style, it's a method(function whatever) of the kernel object, the kernel objects gets included in EVERY object, that's why you're able to call it from everyhwere
<idletask>
apeiros: OK, that is useful information, thanks!
Rickmast_ has quit [Max SendQ exceeded]
<apeiros>
and 3rd party is of course stuff you have to install additionally and load explicitly.
<apeiros>
idletask: if you want a list of keywords (which might be considered "built-ins" - even though that doesn't fit IMO), then take a look at the quickref:
<idletask>
Strangely enough there isn't a viable Sonar plugin out there for the language
<idletask>
So, my first objective is to tokenize it correctly...
Rodya_ has joined #ruby
<kgirthofer>
has anyone set up gem in a bucket? I'm having issues authenticating the aws secret/access keys
eurialo has joined #ruby
nerium has quit [Quit: nerium]
<kgirthofer>
Error fetching s3:///: credentials needed in s3 source, like s3://key:secret@bucket-name/
<kgirthofer>
I've configured my /etc/gemrc a local ~/.gemrc and also have my .aws credentials available for the aws-sdk gem
karapetyan has joined #ruby
<idletask>
kgirthofer: it just looks like you have empty strings somewhere, that URI of yours looks... Well... Empty
<kgirthofer>
I deleted my bucket name
<idletask>
Legal, but empty
nettoweb has joined #ruby
<kgirthofer>
sudo gem sources --add s3://my-gems/ Error fetching s3://my-gems/: credentials needed in s3 source, like s3://key:secret@bucket-name/ (s3://my-gems/specs.4.8.gz)
tulak_ has quit [Remote host closed the connection]
chipotle has joined #ruby
idefine has quit [Read error: Connection reset by peer]
idefine has joined #ruby
adac has quit [Ping timeout: 244 seconds]
Sucks has joined #ruby
Rodya_ has quit [Ping timeout: 240 seconds]
nettoweb has quit [Client Quit]
karapetyan has quit [Remote host closed the connection]
karapetyan has joined #ruby
BSaboia has quit [Ping timeout: 240 seconds]
pawnbox has quit [Remote host closed the connection]
Xeago has joined #ruby
chipotle has quit [Client Quit]
rdark_ has quit [Ping timeout: 244 seconds]
pawnbox has joined #ruby
blackgoat has joined #ruby
diegoviola has quit [Quit: WeeChat 1.4]
<idletask>
<-- idling on the channel and keeping an eye to learn things
rdark_ has joined #ruby
<apeiros>
idletask: eh, 95% in here are idling, so not even necessary to announce that ;-)
<SebastianThorn>
and looking smart the next day when someone asks the same thing
mattwildig has quit [Remote host closed the connection]
rcvalle has joined #ruby
SCHAAP137 has quit [Remote host closed the connection]
shanemcd has joined #ruby
<idletask>
Ah, well, I have a question...
Xeago has quit [Ping timeout: 264 seconds]
<adaedra>
Then ask.
n008f4g_ has quit [Ping timeout: 248 seconds]
<idletask>
In irb, if I type __ = 2, then p 2, the return value is 2
<idletask>
But with puts, it's nil
<idletask>
Why the difference?
Es0teric has quit [Quit: Computer has gone to sleep.]
<adaedra>
because puts returns nil and p returns the parameter value
<idletask>
OK, a choice of implementation, then?
<apeiros>
p is a tool for inspection
<adaedra>
^
<havenwood>
idletask: the return value of #puts is always nil, that's what they chose for it to return since its purpose is printing not the return value
<apeiros>
and as such it was thought that it is convenient if it can be put inside expressions
B1n4r10 has quit [Ping timeout: 246 seconds]
<idletask>
Ah, p is not the same as print?
Snowy has quit [Remote host closed the connection]
<idletask>
I thought it was a shorthand
<apeiros>
like x = (p some_expression)
<adaedra>
p inspects
<idletask>
OK
<havenwood>
idletask: the return value for #p makes it so you can inspect print for debugging without changing the return value
<idletask>
Is it usable in "real code", too?
<apeiros>
you generally shouldn't
<havenwood>
idletask: use #p for debugging
<apeiros>
it's really an inspection/development/debugging tool
<idletask>
apeiros: good, I have a candidate for a rule already :)
DaniG2k_ has joined #ruby
<adaedra>
idletask: also, if you have complex values to print, take a look at pp.
<adaedra>
(for inspection in debugging, still.)
coe has joined #ruby
krobzaur has quit [Quit: WeeChat 0.4.2]
ramfjord has joined #ruby
<coe>
Hi guys, can I know where is the rails channel or can I ask something about rails here?
synthroid has quit [Remote host closed the connection]
<apeiros>
?rails coe
<ruby[bot]>
coe: Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
<apeiros>
also #rails and #ror
<apeiros>
hard to miss, really.
<coe>
I've tried to joun rails but the server told me that that channel was erased
<volty_>
could hard to try :)
<volty_>
be
karapetyan has quit [Remote host closed the connection]
<apeiros>
coe: the server certainly didn't tell you any such thing
rdark_ has quit [Ping timeout: 240 seconds]
karapetyan has joined #ruby
<coe>
You've tried to join an unavailable channel. The channel you may be attempting to join may be in a different namespace (try ##channel) or not on this network. Please see http://freenode.net/policy.shtml#channelnaming for more information about on-topic usage and channel naming, and '/msg ALIS help' for help with finding channels on freenode.
DaniG2k has quit [Ping timeout: 248 seconds]
<havenwood>
coe: /join #rubyonrails
<coe>
now I know, thank you havenwood
<coe>
apeiros are you bored or you are just an asshole?
<havenwood>
!rude coe
fullofcaffeine has joined #ruby
decoponio has joined #ruby
<apeiros>
wow, they actually dropped the redirect
n008f4g_ has joined #ruby
shanemcd has quit [Remote host closed the connection]
<apeiros>
only on #rails, though. #ror still redirects.
<apeiros>
thanks @ havenwood
rodfersou|lunch is now known as rodfersou
steffkes has quit [Ping timeout: 264 seconds]
<havenwood>
I wonder why the #rails redirect was dropped?
<apeiros>
same
momomomomo has joined #ruby
nyandoge has joined #ruby
<volty_>
but imho 'asshole' wasn't that heavy
DaniG2k_ has quit [Quit: leaving]
ramfjord has quit [Ping timeout: 248 seconds]
terlar has quit [Ping timeout: 244 seconds]
<apeiros>
volty_: it's inacceptable.
diegoviola has joined #ruby
fullofca_ has quit [Ping timeout: 248 seconds]
<volty_>
yap, but I would have told him that before silencing. and if he persist, then ok. but nm, just mho
<havenwood>
volty_: Just an hour mute for overt rudeness.
shanemcd has joined #ruby
<apeiros>
volty_: experienced showed that telling people is futile. consequences have a better success ratio.
danjam has quit [Ping timeout: 260 seconds]
<apeiros>
in the opposite. telling people simply leads to them arguing the righteousness of their behavior.
<volty_>
one can die in an hour, too much. I would 'rude' with levels, 1 min for easy, 5 for medium, 60 for persistence :)
<volty_>
ah ok, got it
<idletask>
volty_: if you let "small things" slip, more small things will slip and it ends up being unmanageable... Look at the spelling
Guest12899 is now known as James
James is now known as Guest69041
darkxploit has quit [Quit: Leaving]
nettoweb has joined #ruby
User458764 has joined #ruby
baroquebobcat has joined #ruby
baroquebobcat has quit [Client Quit]
stardiviner has joined #ruby
fostertheweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
hxegon is now known as hxegon_AFK
AlphaAtom has joined #ruby
<adaedra>
I notice there was no questions asked to RoR :o)
ixti has joined #ruby
<idletask>
Uhm, so global variables do not seem to follow the same rules as other identifiers with regards to naming :/
Jardayn has joined #ruby
synthroid has joined #ruby
momomomomo has quit [Quit: momomomomo]
The_Phoenix has joined #ruby
<idletask>
$/ <-- legal
jeanlinux has joined #ruby
siaw has joined #ruby
yos7ph has quit [Quit: Leaving]
[Butch] has joined #ruby
amclain has joined #ruby
<volty_>
special, you cant $/\/\ = 3
schickung has quit [Quit: schickung]
nando293921 has joined #ruby
coe has left #ruby [#ruby]
<volty_>
but they follow the same rules when you create a global var. don't they?
jeanlinux has quit [Read error: Connection timed out]
m0rph84 has joined #ruby
momomomomo has joined #ruby
SOLDIERz has quit [Ping timeout: 244 seconds]
norc has joined #ruby
Alayde has joined #ruby
<idletask>
The syntax page I have doesn't tell the rules for globals, so I have no idea :/
<idletask>
Right now the rule I have is return sequence('$', oneOrMore(noneOf(" \t\r\n")));
Alayde has left #ruby [#ruby]
<idletask>
That'll have to do for the moment
The_Phoenix1 has joined #ruby
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
The_Phoenix has quit [Ping timeout: 244 seconds]
Rodya_ has joined #ruby
Rodya_ has quit [Remote host closed the connection]
Couch has quit [Ping timeout: 260 seconds]
IrishGringo has quit [Ping timeout: 250 seconds]
<volty_>
the rules for globals aren't listed because they are the same. Const starts with upper, global with '$', instance with @, syms end with ':', for the rest apply the constraints
KensoDev has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
brendan- has quit [Ping timeout: 244 seconds]
humblespoon has joined #ruby
shanemcd has quit [Remote host closed the connection]
Zarthus_ is now known as Zarthus
SCHAAP137 has joined #ruby
<volty_>
Ox0dea: yes, I saw it. Tried with letters that aren't yet associated with a dynamic value (like $-b). But to me It seems that those are reserved by means of hard-coding, for dynamic, ENV-like purposes.
<Ox0dea>
volty_: They're meant for holding command-line arguments provided to the interpreter.
humblespoon has quit [Client Quit]
<volty_>
I do not follow you. Which ones? $-b? $-9?
wilbert has quit [Ping timeout: 240 seconds]
Internet1riend has quit [Ping timeout: 260 seconds]
jmignault has quit [Remote host closed the connection]
djbkd has joined #ruby
<Ox0dea>
$ ruby -I . -e 'p $-I.first'
<Ox0dea>
"/home/dea"
<Ox0dea>
volty_: Like that. ^
InternetFriend has joined #ruby
<Ox0dea>
There are only a handful of them ($-I, $-w), but all of the letters are valid because it's just easier to not make them syntax errors.
makenoise has quit []
ferr has quit [Quit: WeeChat 1.4]
IrishGringo has quit [Ping timeout: 240 seconds]
wilbert has joined #ruby
<Ox0dea>
$-0 is something from awk, and I suspect similar reasoning can be applied to justify the validity of $-1 to $-9.
czerasz has joined #ruby
jmignault has joined #ruby
andikr has quit [Remote host closed the connection]
borodin has joined #ruby
<idletask>
Ox0dea: if you are not allergic to Java then I may use your help in the near future :p
<Ox0dea>
A psychic!
wldcordeiro has quit [Ping timeout: 250 seconds]
sandstrom has joined #ruby
djbkd has quit [Ping timeout: 240 seconds]
binaryplease has joined #ruby
kalopsian has joined #ruby
pandaant has quit [Remote host closed the connection]
karapetyan has quit [Remote host closed the connection]
czerasz has quit [Ping timeout: 240 seconds]
<volty_>
yap, I see. I call them env-like
The_Phoenix1 has quit [Read error: Connection reset by peer]
karapetyan has joined #ruby
baweaver has joined #ruby
<Ox0dea>
But they're totally different things. :P
karapetyan has quit [Remote host closed the connection]
mdw has joined #ruby
<Ox0dea>
You can even see it in the signature of main(): int main(int argc, char **argv, char **environ)
ramfjord has quit [Ping timeout: 252 seconds]
momomomomo has joined #ruby
<Ox0dea>
Conflating ARGV and ENV is slightly terrifying; please don't. ;)
<volty_>
opinion, for me they set / change the env, and (expected) behaviour through env-defined
mikecmpbll has quit [Ping timeout: 268 seconds]
<volty_>
that's why env-like, and not env/ they are local env for ruby
<eam>
I mean really, what's the difference
<eam>
they're both char**
<idletask>
Ox0dea: that's an idea for another rule you gave me
<idletask>
eam: they are VERY different
<eam>
scoff
<idletask>
C requires a huge amount of discipline :p
<volty_>
same with ruby, or whatever else
trosborn has quit [Quit: trosborn]
openstruct has quit [Remote host closed the connection]
<idletask>
Especially C, though; errors are sanctioned much more seriously
<volty_>
sorry, but I can't see it that way. in c (some) errors are sanctioned at compile time, while (some) in ruby at runtime. sanction by refuse vs sanction by undesired behavour
miah_ is now known as miah
Guest69041 is now known as James
James is now known as Guest55780
Sucks has quit [Quit: No Ping reply in 180 seconds.]
humblespoon has joined #ruby
baweaver has quit [Remote host closed the connection]
shanemcd has joined #ruby
Sucks has joined #ruby
shanemcd has quit [Remote host closed the connection]
<idletask>
Ox0dea: OK, bear with me, I'm going to ask some questions about the code you produce... What I guess of it anyway
kalopsian has quit [Quit: leaving]
<idletask>
128.times --> iterates from 1 to 128 (or is that 0?)
<havenwood>
>> 128.times.first
<idletask>
.map(&:chr): applies the chr function (?) to the argument (1 to 128)
<idletask>
But then .reject()... Is that to send the result to a function and ignore the return value?
<volty_>
>> 128.times
devbug has joined #ruby
<havenwood>
volty_: => #<Enumerator: ...>
<volty_>
>> 128.times..to_a
nettoweb has joined #ruby
<havenwood>
volty_: !> NameError: undefined local variable or method `to_a' for main:Object
dfockler has joined #ruby
<havenwood>
volty_: :P
<volty_>
>> 128.times.to_a
igam has quit [Ping timeout: 244 seconds]
<volty_>
:)
<idletask>
>> 3.times.join(",")
<ruby[bot]>
idletask: # => undefined method `join' for #<Enumerator: 3:times> (NoMethodError) ...check link for more (https://eval.in/529681)
ziyadb has joined #ruby
<idletask>
Ahwell, I'll have tried
<volty_>
>> 10.times.reject(&:even)
<havenwood>
idletask: 3.times.to_a.join
<EdwardIII>
hey, if you have your own collection i.e. implement Enumerable, what's the right way to make sure when people call stuff like .select and .reject they get the same kind of instance, not just a raw Array?
casadei has joined #ruby
krz has quit [Quit: WeeChat 1.2]
<havenwood>
volty_: 10.times.reject(&:even?)
<EdwardIII>
just override those and return like new(@items.select(params))?
<volty_>
>> 10.times.reject(&:even?)
<EdwardIII>
or is there something more magical?
symm- has quit [Ping timeout: 252 seconds]
<havenwood>
volty_: => [1, 3, 5, 7, 9]
<volty_>
havenwood: you have a big big lag
<havenwood>
volty_: I am a mere mortal.
leksster has quit [Read error: Connection reset by peer]
<havenwood>
My internal Ruby interpreter is on old hardware.
momomomomo has quit [Quit: momomomomo]
volty_ is now known as volty
<havenwood>
old wetware*
idefine has quit [Remote host closed the connection]
mfaeh has quit []
<volty>
somebody blocked me or the reason is that i'm not authenticated with the server ?
<havenwood>
volty: not authed
schickung has joined #ruby
mlehrer has quit [Remote host closed the connection]
<volty>
EdwardIII: the only way is implementing those methods in your enumerator
fullofca_ has joined #ruby
jeanlinux has joined #ruby
hahuang65 has joined #ruby
<EdwardIII>
volty: righty ho then
<volty>
- you add filters, so the each produces with those filters. but I find that solution quite weird
wldcordeiro has joined #ruby
darkf has quit [Quit: Leaving]
nb_bez___ has joined #ruby
<Ox0dea>
EdwardIII: Just a second.
<volty>
Ox0dea will come with something anew, as usual
fullofcaffeine has quit [Ping timeout: 246 seconds]
* EdwardIII
headsplode
brendan- has joined #ruby
B1n4r10 has joined #ruby
<EdwardIII>
what even...
<EdwardIII>
Enumerable.instance_methods.each isn't inside a method?
<EdwardIII>
i'm not all that familiar with ruby yet i should point out heh
<volty>
ops, right, he said the 'same kind of instance'. while I erronously read 'same instance'
<volty>
same class
jeanlinux has quit [Ping timeout: 250 seconds]
<EdwardIII>
yeah that would perhaps have been clearer, sorry
<Ox0dea>
EdwardIII: This just does what volty suggested (overwrite the methods to return your new type), but programmatically.
<Ox0dea>
*metaprogrammatically
system64 has joined #ruby
<EdwardIII>
but like... i can just put code anywhere in my class and it'll get executed at instantiation-time?
<Ox0dea>
Oui.
f4cl3y has quit [Ping timeout: 276 seconds]
<EdwardIII>
unrelated to this particular question heh
<Ox0dea>
Classes are executed. :)
binaryplease has quit [Ping timeout: 244 seconds]
<Ox0dea>
Er, no, at definition time, not instantiation time.
<EdwardIII>
so this is... monkey patching Enumerable?
<Ox0dea>
You only have to put the methods in place once.
<Ox0dea>
No.
<volty>
Да. да. конечна
hahuang65 has quit [Ping timeout: 248 seconds]
firstdayonthejob has joined #ruby
rhg135 has quit [Ping timeout: 244 seconds]
deuxclique has joined #ruby
voidDotClass has joined #ruby
<EdwardIII>
i kind of see why it works, it looks like it overrides every single instance method on enumerable to wrap the retval in my class, which is neat
<EdwardIII>
but i don't really understand Enumerable.instance_methods.each
<EdwardIII>
Enumerable.instance_methods... which instance?
<voidDotClass>
I'm getting the error 'ArgumentError: wrong number of arguments (given 1, expected 0)' when I try to do foo = Foo.new(someArg) . In Foo's initialize method I am expecting an argument.
<volty>
of your object
<voidDotClass>
Any ideas?
<Ox0dea>
voidDotClass: Did you misspell "initialize"?
rhg135 has joined #ruby
sepp2k has quit [Read error: Connection reset by peer]
<EdwardIII>
volty: of my class, no? self.class.new(*ret)
<voidDotClass>
Ox0dea, no: def initialize(token)
<Ox0dea>
voidDotClass: You'll have to post code.
<volty>
sorry, I am fuzzy
<EdwardIII>
but the bit that's confusing me is the Enumerable.instance_methods bit
<Ox0dea>
EdwardIII: Module#instance_methods just... returns that Module's instance methods. :P
stannard has quit [Remote host closed the connection]
<EdwardIII>
but how does it know which enumerable to do that to?
<volty>
EdwardIII: Enumerable.instance_methods are the methods that Enumerable add to the object you include Enumerable in (or already included, in case of Array for example)
<Ox0dea>
It's doing it to *the* Enumerable, the Module.
maletor has joined #ruby
<EdwardIII>
right that's why i confusedly asked if it's monkey patching
gizmore has joined #ruby
<EdwardIII>
although i kind of knew it wasn't, because you wouldn't suggest that
kevinfagan has joined #ruby
<Ox0dea>
Monkey-patching would be if it were overriding those methods.
bronson has joined #ruby
<Ox0dea>
It's just "leveraging" them.
<EdwardIII>
e.g. why not @values.instance_methods ?
troulouliou_div2 has quit [Remote host closed the connection]
<EdwardIII>
i don't see how ruby knows i mean only the Enummerable on Collection, what stops it from doing it for the next time i create a normal array or a collection that includes Enumerable but doesn't have this metaprogramming bit in it?
baweaver has joined #ruby
bronson has quit [Remote host closed the connection]
<volty>
because you said you want select called on your class instance, not on your (internal) @values
<EdwardIII>
volty: just by virtue of the fact it's definied inside my class?
idefine has joined #ruby
<EdwardIII>
ah wait... i think i've misunderstood
stannard has joined #ruby
<Ox0dea>
voidDotClass: Must be autoload's fault. :/
<EdwardIII>
where it says define_method, maybe it would help me to think of that as self.define_method?
<volty>
you have your object (instance), beloning to your class that includes Enumerable, you want the Enumerable's methods to return a result of the same class, so you have to act on the methods that come from Enumerable
<Ox0dea>
^
<Ox0dea>
In this case, that's done by defining #each and delegating to `super`.
gregf has left #ruby [#ruby]
<EdwardIII>
so Enumerable.instance_methods.each is just a convenienet way of getting a list of all the methods, we're actually not touching Enumerable itself
<Ox0dea>
Right.
<EdwardIII>
got it
<EdwardIII>
that's neat
<EdwardIII>
how would you share that between your classes?
gregf_ has joined #ruby
<volty>
that's Ox0dea specialized in on-fly redefinitions
<Ox0dea>
EdwardIII: Make it a Module and #include it.
<EdwardIII>
include SelfReplicatingEnumerable
<Ox0dea>
EdwardIII: And hey, it already uses `self.class` instead of hard-coding `Collection`.
Rodya_ has quit [Remote host closed the connection]
baweaver has quit [Remote host closed the connection]
<EdwardIII>
sweet as a nut
idefine has quit [Ping timeout: 240 seconds]
<volty>
but now you tell us why you need to return the same class (just curiosity)
arup_r has joined #ruby
bronson has joined #ruby
<EdwardIII>
volty: thinking of a situation where you want to do something like mycollection.select({|x|x.sexy == true}).custom_method('biscuits')
<Ox0dea>
It's a perfectly reasonable thing to do.
Rodya_ has joined #ruby
<volty>
absolutely. I do it. was just curious :)
adac has joined #ruby
<EdwardIII>
always worth checking
<EdwardIII>
x,y problems abound
<volty>
I find that 'sexy', in front of specialized method, is an art
aegis3121 has joined #ruby
mdw has quit [Ping timeout: 244 seconds]
<EdwardIII>
heh ladies love my specialised methods
kevinfagan has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<volty>
heh, but == true is superflous (unless nils there)
howdoi has quit [Quit: Connection closed for inactivity]
ramfjord has quit [Ping timeout: 240 seconds]
dasher^0_o has quit [Ping timeout: 276 seconds]
Lorn has joined #ruby
Lorn has quit [Changing host]
Lorn has joined #ruby
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
kirillzh has quit [Ping timeout: 244 seconds]
konsolebox has quit [Quit: Leaving]
sandstrom has quit [Quit: My computer has gone to sleep.]
blandflakes has joined #ruby
makenoise has joined #ruby
neohunter has joined #ruby
idefine has joined #ruby
<Ox0dea>
`def nil.sexy?` even.
tvw has quit [Ping timeout: 246 seconds]
dasher^0_o has joined #ruby
baweaver has quit [Remote host closed the connection]
djbkd has joined #ruby
x77686d has joined #ruby
baweaver has joined #ruby
Mekkis_ has quit [Ping timeout: 246 seconds]
jaruga has quit [Quit: jaruga]
Mekkis has joined #ruby
baweaver has quit [Remote host closed the connection]
freerobby1 has quit [Quit: Leaving.]
m0rph84 has joined #ruby
Guest55780 is now known as James
<norc>
idletask, the most horrific thing about Ruby is not parsing but lexing honestly.
jeffk4 has quit [Remote host closed the connection]
James is now known as Guest27655
rdw200169 has joined #ruby
nettoweb has joined #ruby
volty has quit [Quit: Konversation terminated!]
last_staff has joined #ruby
blackmesa has joined #ruby
hamed_r has quit [Quit: Leaving]
Papierkorb has joined #ruby
schickung has quit [Quit: schickung]
baweaver has joined #ruby
karapetyan has joined #ruby
momomomomo has joined #ruby
Gasher has quit [Quit: Leaving]
adac has quit [Ping timeout: 244 seconds]
niksrc has quit [Remote host closed the connection]
tim_s007 has quit [Ping timeout: 248 seconds]
TeresaP has joined #ruby
triangles has joined #ruby
but3k4 has joined #ruby
dfockler has quit [Quit: Leaving]
dfockler has joined #ruby
_3by8 has joined #ruby
nerium has joined #ruby
baweaver has quit [Remote host closed the connection]
jeanlinux has joined #ruby
wilbert has quit [Quit: quit]
kirillzh has joined #ruby
<_3by8>
I have someone asking me out of the blue to build them some software to interface with a USB thermometer for food temperature recording. I don't really know a whole lot about the process but it looks like there's a decent amount of documentation online. My experience with Ruby is limited to Rails and I guess my question is, with that in mind, how possible is this going to be for me? I see that Chrome has a USB API that I might be able use.
sp4rrow has joined #ruby
deuxclique has quit [Remote host closed the connection]
<_3by8>
Or should I spend the time learning something like Shoes to just build a native Win32 app?
jeanlinux has quit [Ping timeout: 248 seconds]
dionysus69 has quit [Ping timeout: 276 seconds]
troulouliou_div2 has joined #ruby
snockerton has joined #ruby
stannard has quit [Remote host closed the connection]
fostertheweb has joined #ruby
stannard has joined #ruby
<dfockler>
_3by8: It depends a lot on the driver for the USB, but I'm guessing Shoes would be a lot of work
TheHodge has quit [Quit: Connection closed for inactivity]
<_3by8>
dfockler: why is that?
krobzaur has joined #ruby
snockerton has quit [Client Quit]
ramfjord has joined #ruby
baweaver has joined #ruby
benlieb has joined #ruby
<dfockler>
Just figuring out how to interface between Ruby and the USB, and then connect it up to Shoes
uglybandersnatch has joined #ruby
<_3by8>
dfockler: I see.
<dfockler>
Just my opinion
solars_ has joined #ruby
<_3by8>
They need the ability to print also and I'm not seeing that for shoes...
<ruby-lang509>
I fell like the help class is doing too much
idefine has quit [Remote host closed the connection]
idefine has joined #ruby
flughafen_ has quit [Ping timeout: 240 seconds]
Rodya_ has quit [Remote host closed the connection]
adac has joined #ruby
FooMunki has quit [Quit: FooMunki]
idefine has quit [Remote host closed the connection]
FooMunki has joined #ruby
flughafen_ has joined #ruby
<aegis3121>
Something to handle the Add functionality might be a good idea. And, potentially, a class for each type of action as applicable. But especially Add, since it requires the valid_priority? and valid_title? sections.
Rodya_ has joined #ruby
ur5us has quit [Remote host closed the connection]
spider-mario has joined #ruby
<ruby-lang509>
awesome thanks for the feedback
sgambino has joined #ruby
x77686d has joined #ruby
godzillaenlacasa has joined #ruby
Rodya_ has quit [Remote host closed the connection]
Limix has joined #ruby
<aegis3121>
Really it seems like help.rb is actually an input collector which then delegates to a bunch of various actions. Why not try and build it out like that? So help.rb becomes something like input_collector.rb, takes the inputs, and creates the appropriate class for the kind of action they want to take. Each action would then know about what it needs to function and that only. Any shared functionality between those could be handled afterwards.
dfockler has quit [Ping timeout: 246 seconds]
sp4rrow has joined #ruby
baweaver has joined #ruby
ta_ has joined #ruby
Guest11806 is now known as James
<ruby-lang509>
Yeah that sound like a better idea, that file was getting out of control, becoming a bloody mess, so I stop to rethink but I come from php I'm not too object oriented
James is now known as Guest88637
<aegis3121>
Couldn't #valid_task? be defined on the Task object? It seems like you should be able to have a Task#valid? and try to fetch then call that on it. The fetch should handle telling you if something wasn't found and either raising some kind of error, or...not sure what.
kirun has joined #ruby
pawnbox has joined #ruby
nickjj has quit [Read error: Connection reset by peer]
Rodya_ has joined #ruby
nickjj has joined #ruby
Zggb has quit [Quit: Connection closed for inactivity]
Rodya_ has quit [Remote host closed the connection]
Internet1riend has joined #ruby
InternetFriend has quit [Ping timeout: 268 seconds]
pawnbox has quit [Ping timeout: 248 seconds]
n008f4g_ has quit [Ping timeout: 244 seconds]
makenoise has quit [Remote host closed the connection]
djbkd has quit [Remote host closed the connection]
<shevy>
I myself tend to do the full part for custom classes... if input.is_a? BigGangster::DeadlyGangster::RookieGangster
cdg has joined #ruby
Rodya_ has quit [Remote host closed the connection]
chipotle has quit [Quit: cheerio]
n008f4g_ has joined #ruby
<Limix>
ok I might need to do that too thank you shevy
<aegis3121>
a = Blah::Bang::Foobar.new; a.class.to_s.include? 'Blah::Bang' ?
Shaboum has quit [Quit: WeeChat 1.4]
Rodya_ has joined #ruby
deuxclique has joined #ruby
idefine has joined #ruby
Rodya_ has quit [Remote host closed the connection]
<grill>
why is this invalid ruby? @optionally_enabled.each_with_index do |(flag, value), i| { if (i < @optionally_enabled.length - 1) then "'#{flag.to_s}': #{value},\n" else "'#{flag.to_s}': #{value}\n" end }
djbkd has joined #ruby
<aegis3121>
why is there a brace at the end ?
<aegis3121>
I think you've switched your brace and end
B1n4r10 has quit [Ping timeout: 260 seconds]
B1n4r10 has joined #ruby
<aegis3121>
wait, why is there a brace at all?
stannard_ has joined #ruby
stannard has quit [Read error: Connection reset by peer]
<grill>
should it be a double end?
<aegis3121>
You've already used do...end, there's no need to use braces as well
<aegis3121>
grill: yes, I think so
<grill>
there's the each_with_index loop
<aegis3121>
the first end is for your if..else..end, the second one has to end the do...end that started #each_with_index
<grill>
that encloses the other statement with brackets
Rodya_ has joined #ruby
<grill>
oh
benlieb has joined #ruby
phredus has quit [Remote host closed the connection]
swills has joined #ruby
deuxclique has quit [Ping timeout: 276 seconds]
<shevy>
aegis3121 hey did you not have another nick before
<shevy>
hmm
<shevy>
ok
lemur has joined #ruby
<aegis3121>
no?
<aegis3121>
Why do you ask?
<aegis3121>
I've been this as long as I've been in Freenode.
<aegis3121>
my block was definitely executed, but nothing was done with the result. Likewise, <%= some ruby code %> prints whatever the result of that ruby code is
<aegis3121>
something like that which returns a string is more like what you want, I would imagine
codecop has quit [Remote host closed the connection]
<aegis3121>
it returns a string, so the result will be printed appropriately.
hannelita has quit [Ping timeout: 246 seconds]
hahuang65 has joined #ruby
DmitryBochkarev has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
benlieb has quit [Quit: benlieb]
Ishido has quit [Quit: Roads? Where We're Going We Don't Need Roads.]
<grill>
interesting
eregi has quit [Ping timeout: 250 seconds]
SenpaiSilver has joined #ruby
eregi has joined #ruby
casadei has quit [Remote host closed the connection]
sp4rrow has joined #ruby
chipotle has joined #ruby
<aegis3121>
you acutally dont' need that #to_a call
<aegis3121>
Ignore that, but beyond that lol
mikeatgl has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
DmitryBochkarev has quit [Quit: This computer has gone to sleep]
<Ox0dea>
Yes, Hash is Enumerable. :P
johnmilton has quit [Remote host closed the connection]
system64 has quit [Quit: Connection closed for inactivity]
mikeatgl has joined #ruby
mikeatgl has left #ruby [#ruby]
Sucks has quit [Remote host closed the connection]
davedev24 has quit []
futilegames has joined #ruby
gizmore has joined #ruby
m0rph84 has quit [Quit: Leaving]
antgel has quit [Ping timeout: 264 seconds]
chipotle has quit [Quit: cheerio]
fullofcaffeine has joined #ruby
gizmore|2 has joined #ruby
gizmore|2 has quit [Client Quit]
FernandoBasso has joined #ruby
gizless has quit [Ping timeout: 260 seconds]
Xeago has quit [Read error: Connection reset by peer]
pawnbox has joined #ruby
norc has quit [Ping timeout: 244 seconds]
troulouliou_div2 has quit [Read error: Connection reset by peer]
gizmore has quit [Ping timeout: 260 seconds]
pawnbox has quit [Ping timeout: 246 seconds]
snockerton has joined #ruby
<shevy>
long live ruby!
futilegames has quit [Quit: futilegames]
IrishGringo has joined #ruby
treehug88 has quit [Ping timeout: 260 seconds]
Guest38 has joined #ruby
idefine has quit [Remote host closed the connection]
nogic has joined #ruby
idefine has joined #ruby
idefine has quit [Remote host closed the connection]
poguez_ has quit [Quit: Connection closed for inactivity]
n008f4g_ has quit [Ping timeout: 240 seconds]
jgpawletko has quit [Quit: jgpawletko]
antgel has joined #ruby
johnmilton has joined #ruby
Guest88637 is now known as James
guardian has joined #ruby
James is now known as Guest21721
idefine_ has joined #ruby
cjk101010_ is now known as cjk101010
synthroid has quit []
n008f4g_ has joined #ruby
Snowy has quit [Remote host closed the connection]
last_staff has quit [Quit: last_staff]
snockerton has quit [Quit: Leaving.]
ropeney has joined #ruby
karapetyan has joined #ruby
johnmilton has quit [Ping timeout: 276 seconds]
sondr3 has joined #ruby
_whitelogger_ has joined #ruby
<binaryplease>
thinking about writing a console multi messenger. first idea was to make a client for libpurple but every gem for ruby bindings seem to be unmantained. Any tips which direction to go?
karapetyan has quit [Ping timeout: 276 seconds]
_whitelogger has quit [Ping timeout: 260 seconds]
voker57 has joined #ruby
voker57 has joined #ruby
sondr3 has quit [Ping timeout: 276 seconds]
kappy has quit [Quit: Lost terminal]
binaryplease has quit [Remote host closed the connection]
binaryplease has joined #ruby
jeanlinux has joined #ruby
idefine has quit [Remote host closed the connection]
binaryplease has quit [Remote host closed the connection]
mary5030 has quit [Remote host closed the connection]
idefine has joined #ruby
binaryplease has joined #ruby
despai has quit [Quit: This computer has gone to sleep]
kirillzh has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
binaryplease has quit [Remote host closed the connection]
dfinninger has joined #ruby
idefine has quit [Remote host closed the connection]
trabulmonkee has joined #ruby
<drbrain>
unmaintained doesn't necessarily mean they're broken
Jardayn_two has joined #ruby
<adaedra>
and if they're broken, fork and fix them!
<adaedra>
?pr
<ruby[bot]>
You think this is broken, could be done better, or have a good feature idea? Submit an issue on the concerned project, or even better, fix it and submit a Pull Request! ;)
<adaedra>
\o/
DmitryBochkarev has joined #ruby
Rickmasta has joined #ruby
safe has joined #ruby
Jardayn has quit [Disconnected by services]
Jardayn_two is now known as Jardayn
devbug has quit [Ping timeout: 248 seconds]
phansch has quit [Quit: Connection closed for inactivity]
antgel has quit [Ping timeout: 260 seconds]
Sembei has joined #ruby
jeanlinux has quit [Ping timeout: 276 seconds]
nettoweb has quit [Max SendQ exceeded]
elaptics`away is now known as elaptics
antgel has joined #ruby
<drbrain>
well, fixing bindings to a C extension gets pretty challenging pretty quick
Pisuke has quit [Ping timeout: 276 seconds]
grill has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
nettoweb has joined #ruby
BtcBen has joined #ruby
hahuang65 has joined #ruby
<shevy>
he did not stay for long :\
johnmilton has joined #ruby
sp4rrow has quit [Quit: The Internet needs a break and I need a cookie]
binaryplease has joined #ruby
baweaver has joined #ruby
B1n4r10 has quit [Ping timeout: 244 seconds]
hannelita has joined #ruby
sp4rrow has joined #ruby
marxarelli is now known as marxarelli|afk
casadei has joined #ruby
eurialo has quit [Remote host closed the connection]
x77686d has quit [Quit: x77686d]
sandstrom has quit [Quit: My computer has gone to sleep.]
baweaver has quit [Ping timeout: 250 seconds]
duckpuppy has quit [Ping timeout: 244 seconds]
Internet1riend has quit [Ping timeout: 276 seconds]
<kgirthofer>
what gem does rackup come with?
hannelita has quit [Ping timeout: 248 seconds]
<adaedra>
rack
<kgirthofer>
I did gem install rack
<kgirthofer>
bash: rackup: command not found
<adaedra>
how did you install ruby and rack?
skweek has joined #ruby
agent_white has joined #ruby
<kgirthofer>
yum install ruby ruby-devel rubygems
<kgirthofer>
and gem install rack
jenrzzz has joined #ruby
<adaedra>
kgirthofer: can you show the output of `echo $PATH` and `gem env` please?
SCHAAP137 has quit [Remote host closed the connection]
<adaedra>
You work as root?
<kgirthofer>
not normally lol
devbug has joined #ruby
<adaedra>
Yeah, you should not.
<kgirthofer>
I'm aware
<adaedra>
Do you intend to use the gems as root or as a normal user?
<kgirthofer>
when I build this for real the gems will be used by the service account only
<adaedra>
(But, for now, you seem to be lacking /usr/local/bin from your $PATH)
<kgirthofer>
this server isn't going anywehre
ramortegui has quit [Quit: Ex-Chat]
workmad3 has joined #ruby
<kgirthofer>
thanks
<adaedra>
Ah, chef.
justbleed has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Azure has joined #ruby
antgel has quit [Ping timeout: 276 seconds]
<kgirthofer>
!
<adaedra>
If this is just a server for deploy, I'd advise to look at how to install gems locally with bundler (bundle install --path), which would ease things
Lucky_ABA has joined #ruby
<kgirthofer>
I need to start hosting gems for chef
Pumukel has quit [Quit: ChatZilla 0.9.92 [Firefox 44.0.2/20160210153822]]
pawnbox has quit [Ping timeout: 260 seconds]
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
nb_bez___ has quit [Quit: Connection closed for inactivity]
wldcordeiro has quit [Ping timeout: 240 seconds]
DmitryBochkarev has quit [Quit: This computer has gone to sleep]
johnmilton has quit [Ping timeout: 276 seconds]
_whitelogger_ has quit [Excess Flood]
_whitelogger has joined #ruby
<kgirthofer>
Yea lol
<kgirthofer>
not a fan?
<adaedra>
Never tried it personally, I settled with salt for now.
<kgirthofer>
cool - vice versa
<kgirthofer>
I'm great with chef - just not the whole ruby part
<kgirthofer>
new to setting up my own gems and stuff
<adaedra>
Just that it's a different, special case, where things are to be taken care of differently
uglybandersnatch has quit [Ping timeout: 250 seconds]
kirillzh has joined #ruby
casadei has quit [Remote host closed the connection]
mondok has joined #ruby
_whitelogger has quit [Excess Flood]
_whitelogger has joined #ruby
antgel has joined #ruby
DmitryBochkarev has joined #ruby
<nerium>
Is there a way to normalize UTF8 in Ruby? I tired activesupport, i18n and UnicodeUtils, but non of them manage to do the conversion
skweek has quit [Remote host closed the connection]
<apeiros>
nerium: you mean C & D normalization?
nfk has quit [Quit: Try memory.free_dirty_pages=true in about:config]
Rodya_ has quit [Remote host closed the connection]
<nerium>
apeiros: compose or decompose?
sp4rrow has quit [Quit: The Internet needs a break and I need a cookie]
ruby-lang509 has quit [Ping timeout: 252 seconds]
<apeiros>
I only remembered the abbreviation. but that would make sense. so probably yes.
amargherio has quit [Ping timeout: 250 seconds]
<nerium>
apeiros: I’m not sure what the difference are
<apeiros>
um, ok. let's get back to: I'm asking you what precisely you mean.
antgel has quit [Ping timeout: 248 seconds]
<nerium>
apeiros: I need to map/convert chars like (U+63348) to e (for example)
shanemcd has quit [Ping timeout: 268 seconds]
sp4rrow has joined #ruby
allcentury has quit [Ping timeout: 244 seconds]
antgel has joined #ruby
_whitelogger has quit [Excess Flood]
_whitelogger has joined #ruby
<apeiros>
are you making something up here? because U+63348 sounds like a rather high codepoint…
<apeiros>
or can you gist the output of PDFToTxt.new("my.pdf").to_txt.unpack("U*")?
<nerium>
apeiros: The char being shown in the gist is searchable in the pdf, so I would say it works
<apeiros>
hm, might be that pdftotxt gets pdf's charset wrong. iirc it has a special charset (all I remember is that I considered it to be rather weird)
<apeiros>
interesting. packing that again gives a different string
<apeiros>
.pack("C*").unpack("U*") your last gist gives ArgumentError: malformed UTF-8 character
<apeiros>
which makes me wonder how you managed to unpack("U*") it
<apeiros>
(in the second last gist, that is)
voidDotClass has left #ruby ["Leaving"]
<apeiros>
this is quite weird and I have no idea what's going on :)
wldcordeiro has joined #ruby
haylon has quit [Ping timeout: 240 seconds]
<nerium>
apeiros: to_txt.unpack("U*").pack("C*") works
<nerium>
the output is a bit strange, like ”f\xF6rsv\xE5ras"
<idletask>
apeiros: missing the encoding, probably
<idletask>
Anyway, you can't use strings for binary data
<apeiros>
idletask: that doesn't matter. unpack("C*") treats it as binary and gives you the individual bytes.
<apeiros>
idletask: um, yes. you can. and in ruby it's how you store binary data.
<idletask>
That is, excuse me, but a design mistake
<nerium>
apeiros: I ran uniq.sort on the output otherwise it would be unread able
<apeiros>
idletask: I see no point in arguing about this with you. doesn't change that strings are how you store binary data in ruby.
Azure has quit [Quit: Oops.]
eregi has quit [Read error: Connection reset by peer]
<apeiros>
nerium: oh. ok, that renders my try to analyze it useless.
n008f4g_ has joined #ruby
haylon_ has quit [Ping timeout: 248 seconds]
Azure has joined #ruby
<idletask>
So, it means there is a way to retrieve the binary content of any file as a Ruby string, regardless of the defined character coding? That is, there is a way to actually read the contents of a file as a binary input rather than an input which will be interpreted by a character coding (UTF-8, ISO-8859-15, EBCDIC, whatever)?
<apeiros>
nerium: anyway, I bet with you that the result of to_txt is not utf-8.
FooMunki has quit [Quit: FooMunki]
<apeiros>
but you're treating it as utf-8.
<apeiros>
idletask: yes
FooMunki has joined #ruby
<apeiros>
idletask: all strings are binary + encoding-flag.
<apeiros>
the encoding-flag is used by ruby to determine character based operations.
<idletask>
apeiros: OK, that is strange
shakes has joined #ruby
<apeiros>
no, it's not. it makes sense. it has certain advantages and certain disadvantages over other approaches.
eregi has joined #ruby
<idletask>
Just to get technical here, but that is not how Java does things; in Java, string literals are independent of the character coding
<apeiros>
yes. but ruby isn't java.
<idletask>
Yes, I understand that :)
Asher has quit [Read error: Connection reset by peer]
idefine has joined #ruby
<idletask>
I just want to understand the differences :)
mary5030 has joined #ruby
<nerium>
apeiros: thanks, I’ll do some experimenting
binaryplease has joined #ruby
<idletask>
But then, if your file contains text in a given character coding, how do you tell ruby to use that character coding and no other?
<idletask>
Say, you have a file with text content in UTF-32 LE?
<apeiros>
main problem with encodings is still that devs have no clue about them and fail to design file formats which contain encoding information :-/
devbug has quit [Read error: Connection reset by peer]
uglybandersnatch has joined #ruby
<apeiros>
anyway, as said, midnight, so: good night :)
<idletask>
apeiros: agreed; in fact, there are still a lot of Java devs which believe that Java strings have an attached encoding; they do not
<idletask>
But that is unlike Ruby, I see
benlieb has joined #ruby
devbug has joined #ruby
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
A124 has quit [Read error: Connection reset by peer]
Gasher has quit [Ping timeout: 240 seconds]
A124 has joined #ruby
baweaver has joined #ruby
biberu has quit []
SenpaiSilver has quit [Quit: Leaving]
schickung has quit [Quit: schickung]
Vingador has joined #ruby
FLeiXiuS` has quit [Quit: Leaving]
<idletask>
apeiros: I saw a technical mistake in your gist :p
<idletask>
Well, I'll talk about this tomorrow
<apeiros>
for real?
<idletask>
Yes
<apeiros>
(reading yours atm btw.)
<idletask>
In your "encodings" section, you somehow mistake the role of the BOM with regards to UTF-8
<idletask>
UTF-8 is impervious to endianness
<apeiros>
ah, no. it's just the abbreviated version.
<idletask>
The BOM is in fact U+FEFF
<apeiros>
in the longer one I explain that ;-)
diegoviola has quit [Quit: WeeChat 1.4]
<apeiros>
(the "TL;DR edition")
<apeiros>
but if you have a nice way to word it without adding length, I'll gladly improve that
<idletask>
And one technical mistake slipped in my post, as well
maletor has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<idletask>
Well, I'd link to fileformat.info
<apeiros>
actually not "without adding length", but rather "without adding complexity"
<idletask>
As to my post, the technical mistake is that "big, fat question mark"
<idletask>
In fact, it is nothing else than U+FFFD
<apeiros>
that's probably a good idea in any case (linking to fileformat.info)
<apeiros>
"and this default charset depends on your JRE/OS environment." seems like java and ruby made the same bad mistake :)
<apeiros>
luckily ruby rectified this at least for literals. I'm not sure about Encoding.default_external, though. I think there it's still making that mistake.
<idletask>
They make it differently however
shakes has quit [Quit: Leaving]
FooMunki has quit [Quit: FooMunki]
Spami has quit [Quit: Leaving]
<idletask>
In Java, a String literal is a String literal; whatever the encoding of your source file, in byte code, those will be bona fide chars
<idletask>
But Java has InputStream/Reader vs OutputStream/Writer
<idletask>
And the misuse of those is fatal
zenguy_pc has joined #ruby
<darix>
that said ... use UTF-8 everywhere. TIA
<apeiros>
utf-8 has performance issues for a couple of operations
<apeiros>
but yeah, 99.9% of all cases I fully agree
jeanlinux has joined #ruby
dgncn has quit [Quit: Leaving]
dopamean1 has joined #ruby
dopamean_ has quit [Ping timeout: 260 seconds]
<apeiros>
idletask: your article seems to be a good read, thanks :) ("seems" because I'm not a java coder, last time I touched it is years ago, so I'm not fit to truly judge)
<apeiros>
gn8
<idletask>
As to your page, I'd say that "Unicode defines what is called the BOM (Byte Order Mark). In multibyte encodings where endianness matters, text files thus encoded will include the BOM, which will allow programs reading those files to correctly decode the contents. Note however that for historical reasons, several mainstream Windows programs add a BOM in UTF-8 files even though the encoding theoretically does not require it (among t
<idletask>
hem, Excel)"
Gasher has joined #ruby
<darix>
apeiros: read mine tomorrow... it is fun how much joy you get from just counting chars
rew has joined #ruby
SenpaiSilver has joined #ruby
saneax_AFK is now known as saneax
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
stannard_ has quit [Remote host closed the connection]
<idletask>
(and then link to fileformat.info which shows that the bom is u+feff etc)
diegoviola has joined #ruby
fullofcaffeine has quit [Remote host closed the connection]
Vingador has quit [Ping timeout: 246 seconds]
fullofcaffeine has joined #ruby
deuxclique has joined #ruby
icarus has joined #ruby
stannard has joined #ruby
pdoherty has quit [Remote host closed the connection]
idefine has joined #ruby
trosborn_ has quit [Quit: trosborn_]
trosborn has joined #ruby
Coldblackice has quit [Ping timeout: 248 seconds]
Gasher has quit [Quit: Leaving]
dfinninger has quit []
rmulligan has joined #ruby
icarus has quit [Client Quit]
stannard has quit [Ping timeout: 240 seconds]
kirun has quit [Quit: Client exiting]
uglybandersnatch has quit [Ping timeout: 260 seconds]
Rodya_ has joined #ruby
Vingador has joined #ruby
kirillzh has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
idefine has quit [Ping timeout: 260 seconds]
[Butch] has quit [Quit: I'm out . . .]
makenoise has quit [Remote host closed the connection]
htmldrum has joined #ruby
Vingador has quit [Client Quit]
riceandbeans has left #ruby [#ruby]
rmulligan has quit [Remote host closed the connection]
machinewar has quit []
idefine_ has joined #ruby
DmitryBochkarev has quit [Quit: This computer has gone to sleep]
danjam has quit [Quit: Leaving.]
Brando753 has quit [Read error: Connection timed out]
Rodya_ has quit [Ping timeout: 248 seconds]
Brando753 has joined #ruby
deuxclique has quit [Remote host closed the connection]
rmulligan has joined #ruby
maletor has joined #ruby
davedev24 has joined #ruby
ur5us has joined #ruby
kam270 has joined #ruby
nerium has quit [Quit: nerium]
kirillzh has joined #ruby
decoponio has quit [Quit: Leaving...]
aegis3121 has quit [Ping timeout: 240 seconds]
uglybandersnatch has joined #ruby
fullofca_ has joined #ruby
dopamean1 has quit [Ping timeout: 246 seconds]
fullofcaffeine has quit [Ping timeout: 252 seconds]
idefine_ has quit [Remote host closed the connection]
Guest46589 is now known as James
jgpawletko has quit [Quit: jgpawletko]
idefine has joined #ruby
casadei has joined #ruby
James is now known as Guest5732
B4daBing73 has joined #ruby
B4daBing73 has quit [Max SendQ exceeded]
B4daBing73 has joined #ruby
deuxclique has joined #ruby
mattwildig has quit [Remote host closed the connection]
intrigueD has quit [Remote host closed the connection]
haylon_ has joined #ruby
uglybandersnatch has quit [Ping timeout: 250 seconds]