ChanServ changed the topic of #ruby-lang to: Ruby 1.9.3-p125: http://ruby-lang.org | Paste >3 lines of text on http://pastie.org or use a gist
cantonic has quit [Client Quit]
cantonic has joined #ruby-lang
rdavila has quit [Read error: No route to host]
Hakon has quit [Quit: Leaving...]
anannie has quit [Read error: Connection reset by peer]
cantonic has quit [Quit: cantonic]
anannie has joined #ruby-lang
havenn has joined #ruby-lang
rararadar has joined #ruby-lang
sora_h is now known as s0ra_h
ttilley has quit [Ping timeout: 276 seconds]
anannie has quit [Read error: Connection reset by peer]
anannie has joined #ruby-lang
qwerxy has quit [Quit: offski]
sepp2k1 has quit [Read error: Connection reset by peer]
tenderlove has joined #ruby-lang
Axsuul has quit [Ping timeout: 276 seconds]
Axsuul has joined #ruby-lang
enebo has quit [Quit: enebo]
JoshWines has joined #ruby-lang
tenderlove has quit [Ping timeout: 244 seconds]
jperry2 has quit [Ping timeout: 276 seconds]
totallymike has joined #ruby-lang
lfurrea has joined #ruby-lang
lfurrea has quit [Client Quit]
lfurrea has joined #ruby-lang
Banistergalaxy has joined #ruby-lang
guns has joined #ruby-lang
s0ra_h is now known as sora_h
towski has quit [Remote host closed the connection]
replore has joined #ruby-lang
<Erlkoenig> i would like to have my own 'Hash' class with one method, specific to my application, added. If I just derive from the Hash class, i can't instantiate it the neat way original ruby hashes are created (like "{:a => 1, :b => 2}"). Is there any way to make my own Hash, which has a nice way to create, and my custom instance method?
sailias has quit [Ping timeout: 268 seconds]
<canton7> you could always monkey-patch Hash: re-open it and add your method inside
<Erlkoenig> hm, i'd certainly dislike having my own special method in a general-purpose-hash...
<Erlkoenig> i'm writing some library code, and the lib users might have fun with that one
<heftig> class Foo < Hash; end; Foo[:foo,1,:bar,2]
<canton7> make Foo accept a Hash? Foo.new({:my => 'hash'}). Or make a method: Foo({:my => 'hash'})
<heftig> Foo.new.merge({foo: 1, bar: 2})
<Erlkoenig> canton7: then i had to copy, somewhat unelegant
<Erlkoenig> (03:08:22) heftig: class Foo < Hash; end; Foo[:foo,1,:bar,2] <--- that works... but why?! :D
<heftig> works like Hash[1,2,3,4]
<heftig> Hash#[] is smart enough to use self.new, so it works if you subclass it
<Erlkoenig> aah.. genius
<Erlkoenig> thanks, thats goood
JoshWines has quit [Remote host closed the connection]
josh^ has quit [Remote host closed the connection]
sora_h is now known as s0ra_h
lsegal has joined #ruby-lang
josh^ has joined #ruby-lang
anannie has quit [Read error: Connection reset by peer]
anannie has joined #ruby-lang
havenn has quit [Remote host closed the connection]
Nisstyre has joined #ruby-lang
<MouseTheLuckyDog> I'm not sure whether to ask hear or in #rails, but I think this is a question.more appropriately held here. I want to use ActiveRecord to create classes that can be accessed from one of two database programs.
<MouseTheLuckyDog> To be a little clearer I want some classes to be used to access sqlite, and a group of other classes to access postgresql.
anannie has quit [Read error: Connection reset by peer]
dous has quit [Remote host closed the connection]
anannie has joined #ruby-lang
rararadar has quit [Remote host closed the connection]
Nisstyre has quit [Quit: Leaving]
rararadar has joined #ruby-lang
anannie has quit [Read error: Connection reset by peer]
jtoy has joined #ruby-lang
anannie has joined #ruby-lang
Nisstyre has joined #ruby-lang
havenn has joined #ruby-lang
jtoy has quit [Quit: jtoy]
anannie has quit [Read error: Connection reset by peer]
anannie has joined #ruby-lang
RORgasm has joined #ruby-lang
havenn has quit [Remote host closed the connection]
RORgasm has quit [Remote host closed the connection]
RORgasm has joined #ruby-lang
dfr|sf has joined #ruby-lang
anannie has quit [Read error: Connection reset by peer]
anannie has joined #ruby-lang
Nisstyre has quit [Quit: Leaving]
cantonic has joined #ruby-lang
Nisstyre has joined #ruby-lang
s0ra_h is now known as sora_h
cantonic has quit [Client Quit]
rararadar has quit [Ping timeout: 246 seconds]
Nisstyre has quit [Quit: Leaving]
Nisstyre has joined #ruby-lang
CarlB_the_great has joined #ruby-lang
tyro has joined #ruby-lang
sora_h is now known as s0ra_h
sailias has joined #ruby-lang
s0ra_h is now known as sora_h
guns has quit [Quit: guns]
sailias has quit [Quit: Leaving.]
tyro has quit [Quit: tyro]
pr0ton has joined #ruby-lang
replore has quit [Remote host closed the connection]
lun_ has quit [Remote host closed the connection]
replore_ has joined #ruby-lang
banisterfiend has joined #ruby-lang
jtoy has joined #ruby-lang
CarlB_the_great has quit [Remote host closed the connection]
ananna has joined #ruby-lang
Banistergalaxy has quit [Ping timeout: 252 seconds]
dous has joined #ruby-lang
dous has quit [Changing host]
dous has joined #ruby-lang
rdavila has joined #ruby-lang
anannie has quit [Ping timeout: 276 seconds]
lcdhoffman has quit [Quit: lcdhoffman]
dous has quit [Ping timeout: 246 seconds]
dfr|sf has quit [Remote host closed the connection]
mistym has quit [Remote host closed the connection]
cantonic has joined #ruby-lang
Bosox20051 has joined #ruby-lang
mk03 has quit [Ping timeout: 252 seconds]
lfurrea has quit [Quit: leaving]
arooni-mobile has joined #ruby-lang
jtoy has quit [Quit: jtoy]
ananna has quit [Read error: Connection reset by peer]
anannie has joined #ruby-lang
tenderlove has joined #ruby-lang
tenderlove has quit [Remote host closed the connection]
Nisstyre has quit [Quit: Leaving]
<zzak> what happened to redcarpet on github?
<zzak> oh, tanoku renamed to vmg
etan has quit []
banisterfiend has quit [Remote host closed the connection]
Banistergalaxy has joined #ruby-lang
drumond19 has joined #ruby-lang
bhrgunatha has joined #ruby-lang
Bosox20051 has quit [Read error: Connection reset by peer]
rdavila has quit [Quit: rdavila]
musl has quit [Read error: Connection reset by peer]
musl has joined #ruby-lang
igotnolegs has joined #ruby-lang
mistym has joined #ruby-lang
bhrgunatha has quit [Quit: ChatZilla 0.9.88.2 [Firefox 15.0/20120827221415]]
Erlkoenig has quit [Quit: Leaving.]
codewrangler has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
anannie has quit [Read error: Connection reset by peer]
anannie has joined #ruby-lang
Nisstyre-laptop has joined #ruby-lang
chimkan_ has joined #ruby-lang
dous has joined #ruby-lang
dous has quit [Changing host]
dous has joined #ruby-lang
<chimkan_>
<chimkan_> hey
<chimkan_> I've just made a simple ruby gem to fetch threads from 4chan
ConstantineXVI has joined #ruby-lang
ConstantineXVI has quit [Excess Flood]
gsav has joined #ruby-lang
gsav_ has joined #ruby-lang
Banistergalaxy has quit [Ping timeout: 246 seconds]
Banistergalaxy has joined #ruby-lang
anannie has quit [Read error: Connection reset by peer]
anannie has joined #ruby-lang
anannie has quit [Read error: Connection reset by peer]
flori has quit [Ping timeout: 260 seconds]
guns has joined #ruby-lang
pr0ton has quit [Remote host closed the connection]
flori has joined #ruby-lang
pr0ton has joined #ruby-lang
pr0ton has quit [Client Quit]
jakob-_ has quit [Quit: Linkinus - http://linkinus.com]
towski has joined #ruby-lang
imajes has quit [Excess Flood]
imajes has joined #ruby-lang
gsav_ has quit [Read error: Connection reset by peer]
gsav has quit [Read error: Connection reset by peer]
chimkan_ has left #ruby-lang [#ruby-lang]
pablo_ has joined #ruby-lang
flori has quit [Ping timeout: 240 seconds]
burgestrand has joined #ruby-lang
flori has joined #ruby-lang
flori has quit [Ping timeout: 244 seconds]
chendo_ has quit [Ping timeout: 244 seconds]
Elico1 has joined #ruby-lang
burgestrand has quit [Quit: Leaving.]
wpaulson has joined #ruby-lang
flori has joined #ruby-lang
chendo_ has joined #ruby-lang
dous has quit [Ping timeout: 246 seconds]
wpaulson has quit [Client Quit]
anannie has joined #ruby-lang
flori has quit [Ping timeout: 248 seconds]
arooni-mobile has quit [Ping timeout: 246 seconds]
macmartine has joined #ruby-lang
macmartine has quit [Read error: Connection reset by peer]
flori has joined #ruby-lang
mistym has quit [Remote host closed the connection]
macmartine has joined #ruby-lang
MouseTheLuckyDog has quit [Quit: Leaving]
anannie has quit [Read error: Connection reset by peer]
flori has quit [Ping timeout: 260 seconds]
yxhuvud has joined #ruby-lang
replore_ has quit [Remote host closed the connection]
andoyasushi has joined #ruby-lang
andoyasushi has quit [Excess Flood]
lcdhoffman has joined #ruby-lang
pablo_ has quit [Ping timeout: 264 seconds]
lcdhoffman has quit [Client Quit]
countdigi has quit [Ping timeout: 252 seconds]
robbyoconnor has joined #ruby-lang
jackhammer2022 has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
areil has joined #ruby-lang
robbyoconnor has quit [Read error: No route to host]
pr0ton has joined #ruby-lang
<pr0ton> ok, very noob question. i'm pretty good at python and i want to learn ruby as quickly as i can
<pr0ton> pretty good -> little over being a noob
lsegal has quit [Quit: Quit: Quit: Quit: Stack Overflow.]
flori has joined #ruby-lang
<rue> pr0ton: I don’t see a question!
yats has joined #ruby-lang
|Vargas| has joined #ruby-lang
|Vargas| has quit [Changing host]
|Vargas| has joined #ruby-lang
dous has joined #ruby-lang
dous has quit [Changing host]
dous has joined #ruby-lang
nXqd has joined #ruby-lang
macmartine has quit [Quit: Computer has gone to sleep.]
anannie has joined #ruby-lang
kartouch has quit [Ping timeout: 246 seconds]
drollwit has joined #ruby-lang
<pr0ton> rue, i want a quick way to learn ruby
<pr0ton> any suggestions?
<pr0ton> i know to program pretty decently in java and python
<pr0ton> so i dont want to go through the whole "oh this is a while loop" bullshit
towski has quit [Remote host closed the connection]
drollwit has quit [Remote host closed the connection]
andoyasushi has joined #ruby-lang
anannie has quit [Read error: Connection reset by peer]
anannie has joined #ruby-lang
ramonmaruko has quit [Remote host closed the connection]
runeb- has joined #ruby-lang
runeb- is now known as runeb
<rue> corundum: books?
<corundum> books is "The Ruby Programming Language", "Eloquent Ruby", "Programming Ruby 1.9” (‘Pickaxe’) or see http://ruby-doc.org/bookstore/
<rue> pr0ton: Hrm, thought it’d have links or ISBNs. The first one, anyway.
ramonmaruko has joined #ruby-lang
solars has joined #ruby-lang
replore_ has joined #ruby-lang
Madis has joined #ruby-lang
runeb has quit [Ping timeout: 246 seconds]
nXqd has quit [Ping timeout: 260 seconds]
<pr0ton> k thx
nXqd has joined #ruby-lang
banisterfiend has joined #ruby-lang
Banistergalaxy has quit [Ping timeout: 276 seconds]
anannie has quit [Read error: Connection reset by peer]
kitallis has joined #ruby-lang
anannie has joined #ruby-lang
jtoy has joined #ruby-lang
<rking> zenspider: You around by any chance? I'm working on pry-docmore, and I'd like permission to shamelessly thieve of your quickref.
stepnem has joined #ruby-lang
replore_ has quit [Remote host closed the connection]
pablo_ has joined #ruby-lang
yxhuvud has quit [Ping timeout: 244 seconds]
dous has quit [Ping timeout: 272 seconds]
anannie has quit [Read error: Connection reset by peer]
anannie has joined #ruby-lang
zmack has joined #ruby-lang
ruurd has joined #ruby-lang
tonni has quit [Remote host closed the connection]
tonni has joined #ruby-lang
workmad3 has joined #ruby-lang
ramonmaruko has quit [Remote host closed the connection]
lun_ has joined #ruby-lang
rue|w has joined #ruby-lang
ramonmaruko has joined #ruby-lang
justinmcp has quit [Remote host closed the connection]
ruurd_ has joined #ruby-lang
ruurd_ is now known as Guest32067
thone_ has joined #ruby-lang
wallerdev has quit [Quit: wallerdev]
anannie has quit [Read error: Connection reset by peer]
ruurd has quit [Ping timeout: 246 seconds]
anannie has joined #ruby-lang
Asher has quit [Quit: Leaving.]
Asher has joined #ruby-lang
thone has quit [Ping timeout: 264 seconds]
charliesome has joined #ruby-lang
ryanf has joined #ruby-lang
workmad3 has quit [Ping timeout: 240 seconds]
RORgasm has quit [Remote host closed the connection]
jtoy has quit [Quit: jtoy]
justinmcp has joined #ruby-lang
runeb has joined #ruby-lang
dous has joined #ruby-lang
dous has quit [Changing host]
dous has joined #ruby-lang
<yorickpeterse> Morning
robotmay has quit [Remote host closed the connection]
banisterfiend has quit [Remote host closed the connection]
Banistergalaxy has joined #ruby-lang
futurechimp has joined #ruby-lang
jxie has joined #ruby-lang
kitallis has quit [Quit: Computer has gone to sleep.]
qwerxy has joined #ruby-lang
kitallis has joined #ruby-lang
hollymann has joined #ruby-lang
<mfn> ditto
qwerxy has quit [Quit: offski]
Theueip has joined #ruby-lang
_malte has joined #ruby-lang
lun_ has quit [Ping timeout: 272 seconds]
lun__ has joined #ruby-lang
gianlucadv has quit [Ping timeout: 272 seconds]
Banistergalaxy has quit [Remote host closed the connection]
sandbags has joined #ruby-lang
sandbags has quit [Changing host]
sandbags has joined #ruby-lang
jbsan has quit [Quit: jbsan]
jbsan has joined #ruby-lang
lun_ has joined #ruby-lang
lun__ has quit [Read error: Connection reset by peer]
igotnolegs has quit [Quit: Computer has gone to sleep.]
gianlucadv has joined #ruby-lang
pablo_ has quit [Ping timeout: 264 seconds]
andoyasushi has quit [Ping timeout: 246 seconds]
krz has quit [Quit: krz]
tbuehlmann has joined #ruby-lang
pablo__ has joined #ruby-lang
Xzyx987X has quit [Quit: Leaving]
Xzyx987X has joined #ruby-lang
Criztian has joined #ruby-lang
ryanf has quit [Quit: leaving]
banisterfiend has joined #ruby-lang
lun_ has quit [Ping timeout: 260 seconds]
lun__ has joined #ruby-lang
mylordangus has joined #ruby-lang
toretore has joined #ruby-lang
gianlucadv_ has joined #ruby-lang
Criztian has quit [Remote host closed the connection]
gianlucadv has quit [Read error: Connection reset by peer]
robotmay has joined #ruby-lang
stardiviner has quit [Quit: my website: http://stardiviner.dyndns-blog.com/]
nXqd has quit [Read error: Connection reset by peer]
dous has quit [Ping timeout: 246 seconds]
vlad_starkov has joined #ruby-lang
nXqd has joined #ruby-lang
cdt has joined #ruby-lang
judofyr has joined #ruby-lang
banisterfiend has quit [Ping timeout: 252 seconds]
guns has quit [Quit: guns]
<judofyr> anyone here?
<judofyr> or, anyone who knows about set_trace_func here?
andoyasushi has joined #ruby-lang
Hakon has joined #ruby-lang
qwerxy has joined #ruby-lang
workmad3 has joined #ruby-lang
<Mon_Ouie> I used it in this: https://github.com/Mon-Ouie/pry_debug
snafoo has joined #ruby-lang
snafoo has quit [Changing host]
snafoo has joined #ruby-lang
diegoviola has quit [Quit: leaving]
<judofyr> Mon_Ouie: I have a plan!
<judofyr> Mon_Ouie: LiveTracer: tracing Rack-applications in production
Criztian has joined #ruby-lang
<judofyr> so it starts as a "regular" profiler: showing you that this action took 100ms
<judofyr> and maybe profiling some other stuff (like SQL-calls)
<judofyr> but then it also gives you the possibility to trace anything else
rue|w has quit [Remote host closed the connection]
<judofyr> so if you see that 50ms is spent in an action (excluding SQL calls etc) you can trace it and see how long method calls take time
rue|w has joined #ruby-lang
rolfb has joined #ruby-lang
dous has joined #ruby-lang
dous has quit [Changing host]
dous has joined #ruby-lang
_malte has quit [Remote host closed the connection]
_malte has joined #ruby-lang
justinmcp has quit [Remote host closed the connection]
rohit has joined #ruby-lang
Hakon has quit [Quit: Leaving...]
<manveru> judofyr: y u hate threads? :P
justinmcp has joined #ruby-lang
<judofyr> manveru: hm? thinking about sampling?
banisterfiend has joined #ruby-lang
<manveru> if your server runs more than one thread, how you gonna figure out which call comes from where?
<judofyr> manveru: my web app is single-threaded :)
<judofyr> besides, there's Thread#set_trace_func
<manveru> oh :)
<manveru> i was already using the binding.eval('Thread.current') to figure it out, but that's even nicer
mylordangus has quit [Ping timeout: 244 seconds]
countdigi has joined #ruby-lang
<darix> set_trace_func is a bit verbose
hollymann has quit [Ping timeout: 260 seconds]
meise has joined #ruby-lang
banisterfiend has quit [Ping timeout: 244 seconds]
banisterfiend has joined #ruby-lang
hollymann has joined #ruby-lang
andoyasushi has quit [Ping timeout: 255 seconds]
banisterfiend` has joined #ruby-lang
x0F_ has joined #ruby-lang
x0F has quit [Disconnected by services]
x0F_ is now known as x0F
banisterfiend has quit [Ping timeout: 246 seconds]
Hakon has joined #ruby-lang
seoaqua has joined #ruby-lang
seoaqua has quit [Client Quit]
Hakon has quit [Client Quit]
lun__ has quit [Remote host closed the connection]
_malte has quit [Remote host closed the connection]
_malte has joined #ruby-lang
sandbags has quit [Remote host closed the connection]
replore_ has joined #ruby-lang
banisterfiend` has quit [Ping timeout: 240 seconds]
seoaqua has joined #ruby-lang
banisterfiend has joined #ruby-lang
Guest32067 has quit [Quit: Leaving...]
vlad_starkov has quit [Remote host closed the connection]
seoaqua has quit [Client Quit]
jxie_ has joined #ruby-lang
jxie has quit [Ping timeout: 246 seconds]
vlad_starkov has joined #ruby-lang
seoaqua has joined #ruby-lang
vlad_starkov has quit [Remote host closed the connection]
seoaqua has quit [Killed (idoru (Spam is off topic on freenode.))]
dous has quit [Ping timeout: 244 seconds]
seoaqua has joined #ruby-lang
Xzyx987X has quit [Ping timeout: 244 seconds]
banisterfiend has quit [Ping timeout: 246 seconds]
banisterfiend` has joined #ruby-lang
<manveru> better too much output than too little... at least for features like that :)
banisterfiend has joined #ruby-lang
sandbags has joined #ruby-lang
sandbags has quit [Changing host]
sandbags has joined #ruby-lang
Xzyx987X has joined #ruby-lang
banisterfiend` has quit [Ping timeout: 276 seconds]
GeekOnCoffee has quit [Ping timeout: 244 seconds]
ruurd has joined #ruby-lang
rohit has quit [Read error: No route to host]
dhruvasagar has joined #ruby-lang
fgomez has joined #ruby-lang
cantonic_ has joined #ruby-lang
emanon_ has joined #ruby-lang
Hakon has joined #ruby-lang
replore_ has quit [Remote host closed the connection]
banisterfiend` has joined #ruby-lang
banisterfiend has quit [Ping timeout: 272 seconds]
cantonic has quit [Ping timeout: 268 seconds]
cantonic_ is now known as cantonic
sush24 has joined #ruby-lang
Hakon has quit [Quit: Leaving...]
ruurd has quit [Quit: Leaving...]
dhruvasagar has quit [Remote host closed the connection]
burgestrand has joined #ruby-lang
seoaqua has quit [Ping timeout: 244 seconds]
mwjcomputing has joined #ruby-lang
futurechimp has left #ruby-lang [#ruby-lang]
_malte_ has joined #ruby-lang
burgestrand has quit [Quit: Leaving.]
burgestrand has joined #ruby-lang
dous has joined #ruby-lang
dous has quit [Changing host]
dous has joined #ruby-lang
_malte has quit [Ping timeout: 264 seconds]
s1n4 has joined #ruby-lang
totallymike has quit [Quit: WeeChat 0.3.7]
burgestrand has quit [Quit: Leaving.]
GeekOnCoffee has joined #ruby-lang
kvirani has joined #ruby-lang
burgestrand has joined #ruby-lang
guns has joined #ruby-lang
fgomez has quit [Read error: No route to host]
mylordangus has joined #ruby-lang
meise has quit [Quit: leaving]
meise has joined #ruby-lang
stardiviner has joined #ruby-lang
meise has quit [Client Quit]
meise has joined #ruby-lang
burgestrand has quit [Quit: Leaving.]
burgestrand has joined #ruby-lang
sepp2k has joined #ruby-lang
burgestrand has quit [Quit: Leaving.]
Elico1 has quit [Quit: Elico1]
tyro has joined #ruby-lang
Elico1 has joined #ruby-lang
burgestrand has joined #ruby-lang
mylordangus has quit [Quit: ZzzZzz...]
fgomez has joined #ruby-lang
s1n4 has left #ruby-lang ["leaving"]
Hakon has joined #ruby-lang
burgestrand has quit [Quit: Leaving.]
tonni has quit [Remote host closed the connection]
Jay_Levitt has quit [Quit: Jay_Levitt]
seoaqua has joined #ruby-lang
mistym has joined #ruby-lang
mistym has quit [Changing host]
mistym has joined #ruby-lang
tonni has joined #ruby-lang
Hakon has quit [Quit: Leaving...]
Criztian has quit []
lele|w has joined #ruby-lang
dous has quit [Ping timeout: 246 seconds]
Criztian has joined #ruby-lang
pablo__ has quit [Ping timeout: 260 seconds]
Axsuul has quit [Ping timeout: 268 seconds]
seoaqua has quit [Ping timeout: 268 seconds]
sailias has joined #ruby-lang
mistym has quit [Remote host closed the connection]
emanon_ has quit [Read error: Connection reset by peer]
jxie_ has quit [Quit: leaving]
Hakon has joined #ruby-lang
Erlkoenig has joined #ruby-lang
burgestrand has joined #ruby-lang
hollymann has quit [Quit: hollymann]
chendo_ has quit [Ping timeout: 244 seconds]
runeb has quit [Remote host closed the connection]
<Erlkoenig> does the ruby license in any way restrict the usage of my program's source (.rb) files and the files used and generated by my program? As far as I got it, i may do whatever i want with these files, like proprietary commercial software or whatever, is that correct?
burgestrand has quit [Quit: Leaving.]
<darix> Erlkoenig: it does not
tyro has left #ruby-lang [#ruby-lang]
<darix> also embedding the ruby in a commercial program shouldnt be an issue.
<Erlkoenig> oh great, thanks
<darix> Erlkoenig: fun can start with some C extensions for ruby which link libraries with funny licenses
<darix> readline extension linking GPLed libreadline e.g.
<darix> or openssl
yats has quit [Read error: Connection reset by peer]
<darix> also you should watch out for licenses of the gems you use
<Erlkoenig> uhm. i'm using "stock" ruby and trollop, which uses the same license as ruby. Does that contain any such libraries?
<darix> as i said ... readline could be an issue
<darix> or openssl
<darix> :)
<Erlkoenig> they are included in "stock" ruby? or just referenced (as in you have to install them seperately)?
<rue|w> Someone mentioned that leaving out OpenSSL causes all kinds of problems
emanon_ has joined #ruby-lang
<rue|w> But you *can* build without
<rue|w> And the restriction would really only apply if you’re bundling Ruby into a product you’re offering
<Erlkoenig> oh good, i'm not planning to do that
rindolf has joined #ruby-lang
Hakon has quit [Quit: Leaving...]
<rindolf> Hi all. http://paste.debian.net/188417/ - this code gives me «./binary_puzzle_solver.rb:292: syntax error, unexpected ')' (SyntaxError)» - why?
<Erlkoenig> well in fact my program will be opensource and just .rb files (probably a gem), but it might be used to develop proprietary commercial software, and i would like to make sure that those who do that don't have to fear license problems from ruby...
<Erlkoenig> rindolf: because you have a , before your )
ryez has joined #ruby-lang
<rindolf> Erlkoenig: oh.
<rue|w> If they’re concerned, they’ll be familiar enough with licences to make the determination
codewrangler has joined #ruby-lang
Hakon has joined #ruby-lang
<rindolf> Erlkoenig: it sucks that Ruby does not support it.
<rindolf> Erlkoenig: I think Perl and Python do.
<rindolf> Erlkoenig: and it does not handle it gracefully either. :-(
<rindolf> Erlkoenig: why not put it under a permissive licence or a weak copyleft licence then?
elux has joined #ruby-lang
tyro has joined #ruby-lang
<Erlkoenig> rindolf: that's why i'm using a permissive license, but i wanted to make sure that the ruby license wouldn't cause any problems
<Erlkoenig> rue|w: probably... but it might be nice to be able to advertise "licensing of #{my_program} and it's dependencies suitable for commercial use" or something
<rue|w> You don’t want to make claims like that without a lawyer.
<rue|w> You’ll find yourself establishing shit you can‘t back up at some point :P
m3nd3s_ has joined #ruby-lang
<rindolf> Erlkoenig: it's dual-licensed with the 2-clause BSDL.
<Erlkoenig> i know i know i just wanted to make sure i got it right
robotmay_ has joined #ruby-lang
robotmay has quit [Ping timeout: 246 seconds]
guns has quit [Quit: guns]
dfr|sf has joined #ruby-lang
yats has joined #ruby-lang
kvirani has quit [Remote host closed the connection]
yats has quit [Read error: Connection reset by peer]
ryez has quit [Ping timeout: 245 seconds]
yats has joined #ruby-lang
ruurd has joined #ruby-lang
sailias has quit [Ping timeout: 246 seconds]
postmodern has quit [Quit: Leaving]
nXqd has quit [Read error: Connection reset by peer]
nXqd has joined #ruby-lang
lele|w has quit [Remote host closed the connection]
dfr|sf has quit [Remote host closed the connection]
lele|w has joined #ruby-lang
Hakon has quit [Quit: Leaving...]
charliesome has quit [Quit: Textual IRC Client: www.textualapp.com]
jperry2 has joined #ruby-lang
justinmcp has quit [Remote host closed the connection]
ruurd has quit [Quit: Leaving...]
enebo has joined #ruby-lang
burgestrand has joined #ruby-lang
burgestrand has quit [Client Quit]
<erikh> rindolf: fwiw, it supports it in data structures, but not in call arguments
<erikh> and that's a recent change -- you'll see that it works in 1.9.2 but not 1.9.3
<rindolf> erikh: what?
<erikh> your trailing comma
<rindolf> erikh: I'm using ruby-1.8.7
<erikh> oh, weird. maybe they broke it in 1.9.2 then :P
bubonicpestilenc has joined #ruby-lang
<andrewvos> Yesterday, I wrote an entire project without tests. What a failure that was.
sailias has joined #ruby-lang
<andrewvos> Spent so much time tracing down stupid little bugs.
<andrewvos> Also, I had to open the site over and over again to retest everything
<Erlkoenig> you wrote an entire project in one day? :D
<andrewvos> Quite the learning experience.
<andrewvos> Erlkoenig: Small project. I often do small projects.
<andrewvos> Deploying to heroku and using sinatra speeds things up a lot.
<Erlkoenig> so not a problem then :P :P
<andrewvos> Erlkoenig: I think I would have done it in half the time without the tests.
<andrewvos> Sorry, *with* the tests.
<lianj> why did you choose not to?
<andrewvos> lianj: As a learning excercise I guess.
<lianj> projects without tests, it will be fun they said
zmack has quit [Remote host closed the connection]
outoftime has joined #ruby-lang
<andrewvos> Yeah
<andrewvos> What a load of shit
<andrewvos> Can't believe I used to do that full time.
<andrewvos> Also, life without capybara integration tests is just silly.
<lianj> yea, but i sometimes hate it for beeing slow, although for what it does it already quite fast
judofyr has quit [Remote host closed the connection]
<erikh> maybe if the web wasn't such a flaming pile of shit you wouldn't need as many tests
<Erlkoenig> the web contains /b/. any questions :D
<erikh> I mean HTTP particularly, not any specific site
<rue|w> HTTP is fine
<erikh> rue|w: now I know you're trolling.
<rue|w> I don’t think I’ve ever written a test for HTTP
runeb has joined #ruby-lang
<erikh> never written an integration test?
<rue|w> Has to do with HTTP?
<erikh> sure, in a rails context at least
<rue|w> What are the problematic parts?
<erikh> eh, javascript mostly I guess, unless you're testing etags, or keepalive boundaries, or cache headers
<erikh> or websockets I guess, but I don't know much about those
<erikh> pipelining, CORS
mistym has joined #ruby-lang
mistym has quit [Changing host]
mistym has joined #ruby-lang
<erikh> pretty much everything short of the host header that is the change difference between http/1.0 and http/1.1
runeb has quit [Ping timeout: 245 seconds]
<rue|w> That sounds like application logic
Hakon has joined #ruby-lang
<erikh> yes, but that's like suggesting you can test a SMTP server without testing BSD sockets.
rue|w has quit [Remote host closed the connection]
ruurd has joined #ruby-lang
Hakon has quit [Client Quit]
sandbags has quit [Remote host closed the connection]
sandbags has joined #ruby-lang
sandbags has quit [Changing host]
sandbags has joined #ruby-lang
<zzak> andrewvos: writing tests for sinatra is fun
gsav has joined #ruby-lang
rolfb has quit [Quit: Linkinus - http://linkinus.com]
gsav_ has joined #ruby-lang
<andrewvos> zzak: hahah yeah
<zzak> what are you using to test?
<andrewvos> I think what you are trying to say erikh is that HTML is fucking shit shitty shit shit.
<andrewvos> zzak: MiniTest
<erikh> HTML has nothing to do with it
CarlB_the_great has joined #ruby-lang
<erikh> it's the stateless nature of the web and the fact that it's been patched to do all the things it does as a rote part of delivery now
<erikh> it was never even remotely expected to do what the common use case is these days
<zzak> andrewvos: i've used minitest::spec for a sinatra app: https://github.com/zzak/glorify/blob/master/spec/glorify_spec.rb
<zzak> andrewvos: but check out the tests for sinatra itself, they are a great source for inspiration
<andrewvos> zzak: I'm over all this "spec" shit. Don't like it anymore.
<andrewvos> zzak: Anyway, back to topic... I see you're using nokogiri?
<zzak> andrewvos: for xpath on the response body, that was rue's idea actually
<andrewvos> I like that.
<andrewvos> Just had a phone interview now
<zzak> since redcarpet or whatever will wrap the content in a class="highlight" div
<zzak> gl
<andrewvos> Turns out it was more a QA role.
<andrewvos> My agent failed to inform me.
<andrewvos> Well, he straight out lied really.
bryancp has joined #ruby-lang
ruurd has quit [Quit: Leaving...]
<injekt> :/
macmartine has joined #ruby-lang
<injekt> zzak: what's with the require_relative rescue require?
<zzak> injekt: i still have bad habits from 1.8
chendo_ has joined #ruby-lang
rindolf has quit [Quit: Yay! I'm a llama again. http://www.shlomifish.org/]
<injekt> zzak: I was more curious why you didn't JUST use the 1.8 side
ruurd has joined #ruby-lang
bubonicpestilenc has quit [Quit: My blog @ http://bubonicpestilence.ru/]
coryf has joined #ruby-lang
dous has joined #ruby-lang
dous has joined #ruby-lang
dous has quit [Changing host]
Dreamer3 has quit [Ping timeout: 248 seconds]
Jay_Levitt has joined #ruby-lang
sora_h is now known as s0ra_h
s0ra_h is now known as sora_h
sora_h is now known as s0ra_h
s0ra_h is now known as sora_h
sora_h is now known as s0ra_h
s0ra_h is now known as sora_h
dous has quit [Ping timeout: 260 seconds]
jakob- has joined #ruby-lang
rins has joined #ruby-lang
<zzak> i like making things more complicated than they have to be
<zzak> injekt: patches welcome :)
<Erlkoenig> zzak: better than not being able to do it otherways. :D
<injekt> :D
<injekt> zzak: keep reading it as 'gloryhole' :S
cmaxw has quit [Read error: Operation timed out]
bubonicpestilenc has joined #ruby-lang
yats has quit [Read error: Connection reset by peer]
yats has joined #ruby-lang
<zzak> injekt: lets keep it pg
Dreamer3 has joined #ruby-lang
rins has quit [Quit: leaving]
lcdhoffman has joined #ruby-lang
josh^ has quit [Remote host closed the connection]
savage- has joined #ruby-lang
pdm has joined #ruby-lang
|Vargas| has quit [Quit: ...]
lcdhoffman has quit [Client Quit]
<pdm> hi, is there a way to make PStore not start the file from scratch every time, or is this just how PStore works? (sorry if question is not appropriate for here)
ruurd has quit [Quit: Leaving...]
lcdhoffman has joined #ruby-lang
<pdm> OH n/m, typing things into irc often helps on its own
jakob- has quit [Quit: jakob-]
<matti> Hehe
Dreamer3 has quit [Quit: Computer has gone to sleep.]
dfr|sf has joined #ruby-lang
Dreamer3 has joined #ruby-lang
gsav_ has quit [Quit: Lost terminal]
rolfb has joined #ruby-lang
anannie has quit [Read error: Connection reset by peer]
nXqd has quit [Ping timeout: 272 seconds]
anannie has joined #ruby-lang
rue|w has joined #ruby-lang
havenn has joined #ruby-lang
yats has quit [Ping timeout: 240 seconds]
coryf has quit [Remote host closed the connection]
anannie has quit [Read error: Connection reset by peer]
anannie has joined #ruby-lang
dfr|sf has quit [Remote host closed the connection]
rue|w has quit [Ping timeout: 240 seconds]
Criztian has quit []
kitallis has quit [Quit: Computer has gone to sleep.]
sush24 has quit [Quit: This computer has gone to sleep]
anannie has quit [Read error: Connection reset by peer]
dfr|sf has joined #ruby-lang
anannie has joined #ruby-lang
kvirani has joined #ruby-lang
totallymike has joined #ruby-lang
fgomez has quit [Ping timeout: 272 seconds]
anannie has quit [Read error: Connection reset by peer]
anannie has joined #ruby-lang
Criztian has joined #ruby-lang
qwerxy has quit [Quit: offski]
anannie has quit [Read error: Connection reset by peer]
anannie has joined #ruby-lang
sush24 has joined #ruby-lang
headius has joined #ruby-lang
anannie has quit [Read error: Connection reset by peer]
anannie has joined #ruby-lang
PatrixCR has joined #ruby-lang
PatrixCR has left #ruby-lang [#ruby-lang]
robotmay_ has quit [Remote host closed the connection]
<anannie> Hi I'm trying to build a small text adventure game. As it's all driven by numerical options, I wrote this small program ( git://gist.github.com/3667368.git ) to extract numbers from whatever the user types in. Can someone please help me convert it into idiomatic ruby? I want to learn how to think in ruby.
Skif has quit [Ping timeout: 240 seconds]
<anannie> or alternatively; https://gist.github.com/3667368
<rue> What, I had an idea?
<anannie> rue: ?
<rue> Some scuttlebutt is claiming I’ve had ideas
<matti> ?!
<rue> anannie: Totally unrelated to whatever you were saying, I’m about 1000 lines in scrollback :)
<matti> Haha
<anannie> rue: Ah I see. Good luck :)
Criztian has quit [Remote host closed the connection]
x0F has quit [Read error: Connection reset by peer]
<wnd> without knowing whether or not it's idiomatic, I'd do this: def getnums(str); str.split('').select{|s| /\d/.match(s)}.map{|s| s.to_i}; end
Criztian has joined #ruby-lang
<wnd> umm, that would be def extractnum(str) etc.
replore_ has joined #ruby-lang
<rue> anannie: A simple thing: rename checkifnum to number?
<lianj> wnd: "some 12, 1o2 100@ 100.200".scan(/\d+/).map(&:to_i) ?
<rue> anannie: Realistically, you’d probably use something like Integer() and/or regexps
<wnd> ah, scan, obviously
<rue> anannie: Rather than for…in, use #each (works for all Enumerables)
Jake232 has joined #ruby-lang
anannie has quit [Read error: Connection reset by peer]
anannie has joined #ruby-lang
<matti> def is_numeric?(value) value.is_a?(String) && value.match(/^-?(?:(?:\d+)(?:\.\d+){1}|\d+)$/) ? true : false
<matti> end
<matti> Ops
<matti> rue: Like that?
<matti> Should work for floats +/-, and integers +/-.
<Mon_Ouie> Doesn't work for multiline strings
mrsolo has joined #ruby-lang
<Mon_Ouie> (though you only need to change the anchors for that)
anannie has quit [Read error: Connection reset by peer]
<matti> True, but then multiline string were not the case here? :)
anannie has joined #ruby-lang
<rue> matti: I’d just match . and punt to Float/Integer. And #numeric?, the is_ is unnecessary.
<matti> rue: And you have to rescue.
<matti> rue: I dislike that.
<matti> But then again, I am not a Ruby developer ;d
qpingu has quit [Ping timeout: 268 seconds]
<whitequark> (rue is probably talking about this: http://irclog.whitequark.org/ruby-lang/2012-09-07#1347027678)
<anannie> wnd: Can you please explain?
dfr|sf has quit [Remote host closed the connection]
rolfb has quit [Quit: Linkinus - http://linkinus.com]
<rue> erikh: The fundamental problem is that people don’t know how to write code
havenn has quit [Remote host closed the connection]
anannie has quit [Read error: Connection reset by peer]
yats has joined #ruby-lang
anannie has joined #ruby-lang
<rue> Her connection is way too flaky :P
<anannie> rue: Yup.
<anannie> rue: And you won't believe what I pay for this.
coryf has joined #ruby-lang
jstemmer has quit [Quit: leaving]
macmartine has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<rue> That’s single digits, though, not multi-digit numbers.
Hakon has joined #ruby-lang
<wnd> lianj's suggestion is even neater and handlers multi-digit numbers
<rue> Yes
<wnd> handles, even
<rue> str.scan(/\d+/).map(&:to_i)
lcdhoffman has quit [Quit: lcdhoffman]
<rue> So, scan the string for sequences of one or more digits, extract each individual sequence, and then use the String#to_i method to convert each into an actual number
yats has quit [Ping timeout: 272 seconds]
<anannie> \d+ is essentially a placeholder for any pattern that resembles a number?
<canton7> "one of the digits 0-9 one or more times"
<anannie> rue: Yeah that's what I was doing, but my code wasn't as neat and dense as yours. How do you get from my https://gist.github.com/3667368 to str.scan(/\d+/).map(&:to_i)
lcdhoffman has joined #ruby-lang
lcdhoffman_ has joined #ruby-lang
<anannie> It's quite neat, can you please explain how you figured out the implementation in ruby? It seems like an opaque magical process to me
<rue> lianj’s code in this case; most of it is simply knowledge of what the language gives you: the #scan method, regexps, and the #map method
<wnd> or even str.scan(/-?\d+/).map(&:to_i) if you need negatives
<anannie> rue: Will this book Eloquent Ruby that I plan to read next teach me that?
<rue> anannie: The iteration idiom (#map in this case) is important. It could actually be used to improve your original code, too. Where you use the for…in construct, you could use the #each method instead. It works for any Enumerable
<anannie> wnd: what does the ? in -? signify? That the - is conditional?
<rue> It’s optional
ylluminate has quit [Quit: Bye!]
<rue> -> store
lcdhoffman_ has quit [Client Quit]
<injekt> pick me up some cheetos please rue
havenn has joined #ruby-lang
<rue> OK. Should I grab a multicolour refill too?
lcdhoffman has quit [Ping timeout: 240 seconds]
<injekt> sure let's make it a party
qwerxy has joined #ruby-lang
<rue> anannie: It’ll give you the tools to start considering these things, yes
<wnd> anannie, you may want to read more about regexps (or regular expressions) if you need to extract pieces from text or do non-trivial string matching
<anannie> rue: Okay. I'll work my way through that next.
<anannie> wnd: I'll do that as well
RegEchse has joined #ruby-lang
macmartine has joined #ruby-lang
<wnd> but you'll do fine without regexps. regexps can get very dirty very easily.
<rue> Try out map (and other Enumerable methods) in irb/pry for fun. [1,2,3].map {|i| i + 10 } # etc. Now, seriously, store
<anannie> rue: Thank you
<anannie> wnd: I'd rather learn something that important than ignore it
<injekt> [1,2,3].map(&method(:puts))
sepp2k1 has joined #ruby-lang
<anannie> what the &method do over here?
<injekt> anannie: just dont put regexp to the top of the learn list, ensure you get grips on the language first
<anannie> and why have you inserted the : before puts?
<anannie> injekt: Noted.
<injekt> method(:puts) try that in irb
<injekt> :puts is a symbol
sepp2k has quit [Ping timeout: 276 seconds]
anannie has quit [Read error: Connection reset by peer]
<injekt> method(:puts).call("hello")
anannie has joined #ruby-lang
<injekt> heh
<anannie> injekt: Sorry about that, spotty connection. By symbols you mean something that shares the same address? Isn't puts a function?
<injekt> anannie: yes, if you're just learning ruby now I highly recommend ignoring that and coming back to it later
<anannie> injekt: That makes sense if it was just a variable, but what does that mean for a function?
<anannie> injekt: I'm curious now... I know I probably won't understand it, but I would love to take a crack at it. Is there a resource I can read?
<injekt> dont use function :) ruby has methods because all function type things are bound to an object (so they're methods)
jxie has joined #ruby-lang
<injekt> anannie: method(:puts) calls the method 'method' and passes the Symbol object :puts to it, this method returns an instance of the Method class
<Erlkoenig> i'd like to allow my program's users to specify some sort of Hash(where both key and value are Strings) on the command line, where one ARGV[] entry is one complete hash, perhaps something like "ruby prog.rb name:jack,place:home" ---> {"foo" => "blubb", "bar" => "bla"}.
<Erlkoenig> I now need some code to parse this String representation of my Hash, to get an actual ruby Hash. What's the most easy way to do that, while being able to use escape characters to also specify "," in the value-strings (like "ruby prog.rb name:john\,jack,place:work")?
<injekt> "ruby prog.rb name:jack,place:home" ---> {"foo" => "blubb", "bar" => "bla"}
<injekt> how does that work
<Erlkoenig> argh
<Erlkoenig> sorry
dous has joined #ruby-lang
dous has quit [Changing host]
dous has joined #ruby-lang
<Erlkoenig> "ruby prog.rb name:jack,place:home" --> {"name" => "jack", "place" => "home" }
<injekt> >> Hash["name:jack,place:home".split(',').map { |x| x.split(':') }]
<injekt> => {"name"=>"jack", "place"=>"home"}
<Erlkoenig> i modified my example and failed...
<Erlkoenig> ah nice, but now what if the name contains a comma?
<injekt> ...
<Erlkoenig> some sort of escaping is needed, so \, can be specified
<darix> injekt: you have to many whitespaces in that line ;p
<darix> Erlkoenig: and you need better parsing.
<darix> be creative
<injekt> darix: habit
<injekt> I always separate { and |
<Erlkoenig> is there no easy standard way to do it? i know how to do it myself, but i'm too lazy
havenn has quit [Remote host closed the connection]
<injekt> ...
<injekt> well now I'm definitely not helping you
<darix> i think i know your problem
<anannie> injekt: I'm afraid I don't understand.
havenn has joined #ruby-lang
<injekt> anannie: we expected that. Continue learning Ruby and all will make sense
goshakkk has joined #ruby-lang
<anannie> injekt: Okay, back to it then
<Erlkoenig> injekt: what? i thought that there might be an easy fast way to do it, rather than writing a complete parser on my own
sush24 has quit [Quit: This computer has gone to sleep]
Hakon has quit [Quit: Leaving...]
<darix> Erlkoenig: stating that you are just too lazy and expect us to write the code to solve your problem is like telling the girl you just want sex without the date hazzle and it usually only works for Barney.
<darix> hassle even
<injekt> i like hazzle
<Erlkoenig> wah, i didn't want anybody to write a lot of code for me, i just wanted to know whether there is a 2-line-solution that you could give me
<darix> now i want chocolate
Dreamer3__ has joined #ruby-lang
Dreamer3 has quit [Ping timeout: 246 seconds]
<injekt> Erlkoenig: if you want to split on , but also ignore , then you need something more than a hacky 2 liner
Dreamer3__ is now known as Dreamer3
<Erlkoenig> yes, it could have been possible that ruby already has support for something like that
<injekt> ok
<Erlkoenig> e.g. String#parse_with_escapes or something...
<injekt> right
tenderlove has joined #ruby-lang
<Erlkoenig> in this case, i'll just leave a "# TODO - better parsing here." and look at the more important parts...
workmad3 has quit [Ping timeout: 252 seconds]
<darix> or you could ban "," in names
<Erlkoenig> well the thing with names was just an example to make it easier, in fact any character can appear...
<darix> or use a regexp with split
<darix> and use backtracking in the regexp to check if the , is after a \
<Erlkoenig> but what about "foobar\\," ? :D
sandbags has quit [Remote host closed the connection]
* darix hands Erlkoenig a gun and points it on Erlkoenig's foot. > now pull the trigger
havenn has quit [Remote host closed the connection]
<injekt> the thing is, adding the escapes wont help
havenn has joined #ruby-lang
towski has joined #ruby-lang
<injekt> ~% ruby -e 'p ARGV.first' foo:b\ar
<injekt> "foo:bar"
<injekt> ~% ruby -e 'p ARGV.first' foo:b,ar,baz:etc
<injekt> "foo:b,ar,baz:etc"
Hakon has joined #ruby-lang
<injekt> good luck finding those out
<Erlkoenig> injekt: that's because of the shell. i assumed the shell has no escape system to simplify things here
<darix> injekt: it could work with ruby -e 'p ARGV.first' 'foo:b\ar'
<injekt> ~% ruby -e 'str = "foo:b\,ar,baz:etc"; p str'
<injekt> "foo:b,ar,baz:etc"
<injekt> okay.jpg
<injekt> darix: yeah :P
<injekt> ~% ruby -e "str = 'foo:b\,ar,baz:etc'; p str"
<injekt> "foo:b\\,ar,baz:etc"
<injekt> ah much nicer
<injekt> :D
<injekt> and yeah yeah that's inspect output
<injekt> still shows this is silly
SysSU_ has joined #ruby-lang
<injekt> now it makes sense, until you say a key can include a :
<Erlkoenig> i can fortunately define that this shouldn't happen
SysSU_ has quit [Client Quit]
<Erlkoenig> but the values can be anything, as they are passed to an other program that could need any weird input
s1n4 has joined #ruby-lang
lun_ has joined #ruby-lang
<injekt> then what help are the separators? just use spaces instead
Criztian has quit [Ping timeout: 268 seconds]
<injekt> foo:ba,dkakh baz:stuff
<whitequark> use, I dunno, yaml
<whitequark> it has somewhat similar syntax and all the escaping you'd ever need
<injekt> wut
Criztian has joined #ruby-lang
spectra has quit [Ping timeout: 246 seconds]
<Erlkoenig> injekt: also spaces could be contained in the values
<Erlkoenig> a complete escaping syntax and parses solves that issue completely, but i don't feel like writing one right now
<whitequark> ah, so you have a predefined format
<whitequark> Erlkoenig: try ragel for generating at least lexer
<whitequark> the parser would be trivial in your case
sakkemo has quit [Ping timeout: 244 seconds]
adgar has quit [Ping timeout: 240 seconds]
<whitequark> an example of how this could be done
Jake232 has quit [Quit: Computer has gone to sleep.]
freedrull has quit [Ping timeout: 248 seconds]
yellow5 has quit [Quit: time to go!]
levicole has quit [Quit: ZNC - http://znc.sourceforge.net]
blowmage has quit [Ping timeout: 252 seconds]
<Erlkoenig> ah very nice, that's what i was looking for
<whitequark> ragel is pretty awesome, it also has nice docs
<whitequark> note through that it's an abstraction for a state machine
levicole has joined #ruby-lang
<whitequark> you might think that it's a parser at times because it has somewhat similar grammar syntax
<whitequark> it is not
yellow5 has joined #ruby-lang
<whitequark> and that's important
<whitequark> e.g. it does not have an (implicit) stack
<whitequark> it has explicit commands for manipulating the stack, through
<elux> hey guys..
blowmage has joined #ruby-lang
<zzak> what's a good way to determine 32bit or 64bit os, so i can include the appropriate binary
<elux> my app uses ActiveSupport.. but I really want it to stop overriding ::JSON or whatever it is doing because its using its json encoding/decoding instead of mine.. very annoying.. any suggestions?
<drbrain> zzak: 1.size
<Erlkoenig> oh well thanks, i'll look at it. luckily the license states "Use of Ragel makes no requirements about the license of generated code. " ...
<drbrain> well, it'll tell you how your ruby was compiled
<whitequark> drbrain: ewwww
<whitequark> implementation detail
<Erlkoenig> drbrain: that's no good
icooba has quit [Quit: Computer has gone to sleep.]
spectra has joined #ruby-lang
<whitequark> zzak: it depends on what you're trying to do
<whitequark> if MRI ext, then extconf.rb would already generate the right binary
<zzak> include a 64bit statically compiled binary
<drbrain> the best way is to probably use cpuid
<whitequark> if FFI, then FFI has a field
adgar has joined #ruby-lang
<zzak> or fall back to 32bit
<whitequark> drbrain: wrong
<whitequark> drbrain: you can use 32-bit OS on 64-bit CPU
<whitequark> or you can even use 32-bit userspace on 64-bit CPU
<drbrain> whitequark: yup
<whitequark> there are valid reasons for that.
<darix> for some more ragel examples you can also see http://redmine.lighttpd.net/projects/lighttpd2/repository/revisions/master/entry/src/main/http_request_parser.rl (and other files in the repos) ;)
<darix> moin drbrain
flori has quit [Remote host closed the connection]
<drbrain> hi darix
freedrull has joined #ruby-lang
jtoy has joined #ruby-lang
wallerdev has joined #ruby-lang
bubonicpestilenc has quit [Quit: My blog @ http://bubonicpestilence.ru/]
<zzak> drbrain: whitequark: i guess i can just include the 32bit binary and it should work either way
<whitequark> zzak: indeed
<zzak> not a big deal, just using wkhtmltopdf to generate a pdf
m3nd3s has joined #ruby-lang
<injekt> trololol
<Erlkoenig> what if < or > are included in the input string?
<injekt> it doesn't matter, unless they have 2 numbers between them ;)
<zzak> whitequark: i think heroku is amd64, i386 will work right?
benanne has joined #ruby-lang
m3nd3s_ has quit [Ping timeout: 260 seconds]
naz has quit [Read error: Connection reset by peer]
<injekt> :D
<injekt> now, after that absolute disgrace. I'm heading out
<injekt> good day
<Erlkoenig> wah :D
<Erlkoenig> sounds like the perfect phase-of-the-moon-bug :D
<injekt> that code is as stupid as what you're looking for
<injekt> so it works well
<injekt> :D
flori has joined #ruby-lang
<Erlkoenig> why is what i'm looking for stupid?
cdt has quit [Quit: Ex-Chat]
wallerdev has quit [Quit: wallerdev]
anannie has quit [Read error: Connection reset by peer]
anannie has joined #ruby-lang
butchanton has joined #ruby-lang
arooni-mobile has joined #ruby-lang
bradland has joined #ruby-lang
chimkan has joined #ruby-lang
NOKAH has joined #ruby-lang
Hakon has quit [Ping timeout: 240 seconds]
goshakkk has quit [Quit: Computer has gone to sleep.]
anannie has quit [Read error: Connection reset by peer]
anannie has joined #ruby-lang
<bradland> this seems like it should be possible without the ljust call, but i'm not terribly good with sprintf. any suggestions?
<bradland> "%s at %s" % [msg.ljust(75, '_'), time_diff]
msaffitz has quit [Quit: Textual IRC Client: www.textualapp.com]
ivanoats has joined #ruby-lang
ivanoats has quit [Remote host closed the connection]
gorelative has joined #ruby-lang
ivanoats has joined #ruby-lang
gorelative has left #ruby-lang [#ruby-lang]
yats has joined #ruby-lang
ndboost has joined #ruby-lang
ndboost has quit [Client Quit]
<elux> hrmm
<lianj> bradland: really want '_'
<elux> does anyone know how to make the JSON gem work with Time..? ie. require 'json'; Time.now.to_json .. ends in "Stack level too deep"
<bradland> lianj: i could live with - or .
<bradland> just need something to follow across with my eye
<lianj> elux: works fine here.
<lianj> bradland: " " would be easy :D
<bradland> indeed :)
<bradland> %75s and i'm done
<bradland> well %-75s
<elux> hrmm yes.. works here too.. shitty... must be a bunch of overriding or some bs that broke it
yats has quit [Ping timeout: 272 seconds]
goshakkk has joined #ruby-lang
<outoftime> this is kind of obscure, but is there a way in a rescue block to instruct the interpreter to move on to the next matching rescue?
emanon_ has quit [Quit: Leaving]
mwjcomputing has quit [Quit: Leaving]
totallymike has quit [Quit: WeeChat 0.3.7]
<drbrain> outoftime: no, other than by nesting
<outoftime> drbrain: got it. just wanted to make sure there wasn't something clever i was missing : )
<drbrain> … or putting common exception handling logic in methods
anannie has quit [Read error: Connection reset by peer]
anannie has joined #ruby-lang
<rue> outoftime: What’s your use case? Sounds a little smelly
thedarkone_ has joined #ruby-lang
Nisstyre-laptop has quit [Quit: Leaving]
adgar has quit [Ping timeout: 252 seconds]
spectra has quit [Ping timeout: 240 seconds]
adgar has joined #ruby-lang
<elux> is there a way to un-define a class.. method, etc.. ? ..
spectra has joined #ruby-lang
s1n4 has left #ruby-lang ["leaving"]
jtoy has quit [Quit: jtoy]
dfr|sf has joined #ruby-lang
dfr|sf has quit [Remote host closed the connection]
<outoftime> rue: I'm sure it does. I'm catching an exception that wraps another exception. I want to do one thing if the wrapped exception is one type, and otherwise do something else. the "something else" also applies to more generalized exceptions than the one I'm catching.
dfr|sf has joined #ruby-lang
dfr|sf has quit [Remote host closed the connection]
NOKAH has quit [Ping timeout: 240 seconds]
<rue> Couldn’t you define more wrappers?
<outoftime> rue: I'm not the wrapper
<outoftime> rue: from a different library
<rue> That’s never stopped anyone!
qpingu has joined #ruby-lang
<rue> elux: No. You can do Const = nil, but that still leaves the object around, included, extended etc.
<outoftime> I'm not about to monkey-patch excon just so my exception handling is slightly more elegant : )
<rue> Do it because their way sounds terrible
<outoftime> i would if this were app code, but the code i'm working on is also library code
<outoftime> I am a pretty strong believer in not screwing with code you don't own in libraries.
goshakkk has quit [Quit: Computer has gone to sleep.]
pr0ton_ has joined #ruby-lang
<rue> Screw ’em
<outoftime> heh
lun_ has quit [Remote host closed the connection]
lun_ has joined #ruby-lang
CoverSlide has joined #ruby-lang
pr0ton_ has quit [Quit: pr0ton_]
bradland has quit [Quit: bradland]
dfr|sf has joined #ruby-lang
programR has joined #ruby-lang
anannie has quit [Read error: Connection reset by peer]
anannie has joined #ruby-lang
lcdhoffman has joined #ruby-lang
macmartine has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
qwerxy has quit [Quit: offski]
wallerdev has joined #ruby-lang
goshakkk has joined #ruby-lang
programR has quit [Quit: Leaving]
programR has joined #ruby-lang
areil has quit [Remote host closed the connection]
Bosox20051 has joined #ruby-lang
Bosox20051 has quit [Read error: Connection reset by peer]
lcdhoffman has quit [Quit: lcdhoffman]
rippa has joined #ruby-lang
chimkan has quit [Quit: chimkan]
havenn_ has joined #ruby-lang
chimkan has joined #ruby-lang
ttilley has joined #ruby-lang
havenn has quit [Remote host closed the connection]
dfr|sf has quit [Remote host closed the connection]
tyro has left #ruby-lang [#ruby-lang]
ericwood has quit [Ping timeout: 252 seconds]
coryf has quit [Remote host closed the connection]
tenderlove has quit [Remote host closed the connection]
tenderlove has joined #ruby-lang
tenderlove has quit [Remote host closed the connection]
m3nd3s has quit [Remote host closed the connection]
Erlkoenig has quit [Quit: Leaving.]
replore_ has quit [Remote host closed the connection]
jtoy has joined #ruby-lang
jtoy has quit [Client Quit]
CoverSlide has quit [Ping timeout: 264 seconds]
jtoy has joined #ruby-lang
_malte has joined #ruby-lang
Axsuul has joined #ruby-lang
_malte_ has quit [Ping timeout: 246 seconds]
faces has quit [Ping timeout: 245 seconds]
diegoviola has joined #ruby-lang
jtoy has quit [Quit: jtoy]
ruurd has joined #ruby-lang
_malte_ has joined #ruby-lang
m3nd3s has joined #ruby-lang
_malte has quit [Ping timeout: 246 seconds]
lun_ has quit [Ping timeout: 260 seconds]
sandbags has joined #ruby-lang
sandbags has quit [Changing host]
sandbags has joined #ruby-lang
ruurd has quit [Quit: Leaving...]
leocassarani has joined #ruby-lang
<whitequark> zzak: yes
lun_ has joined #ruby-lang
tbuehlmann has quit [Remote host closed the connection]
_malte has joined #ruby-lang
ericwood has joined #ruby-lang
_malte_ has quit [Read error: Connection reset by peer]
tenderlove has joined #ruby-lang
banisterfiend` has quit [Remote host closed the connection]
chimkan has quit [Quit: chimkan]
icooba has joined #ruby-lang
lcdhoffman has joined #ruby-lang
Jake232 has joined #ruby-lang
<rue> Pshaw. I was bashing failed-witty _why-wannabe gem authors before it was cool
lcdhoffman has quit [Read error: Connection reset by peer]
Criztian has quit [Remote host closed the connection]
<whitequark> haha
<whitequark> well, for most of the (popular/usable) gems it's either tolerable or actually funny and unobtrustive
butchanton has quit [Quit: Leaving.]
<whitequark> but I would never understand the reasons of someone calling their gem "cocaine" and someone else adding a sister gem "methadone"
<matti> rue: Everyone wants to be a Superhero.
<whitequark> and, ehm, I always feel a little guilty writing require "trollop" in yet another CLI tool.
chimkan_ has joined #ruby-lang
<matti> rue:Norrmal folk fall for Batman et al
lcdhoffman has joined #ruby-lang
<matti> rue: In Ruby world thats_why for yoy ;-)
<matti> I wanted to be like matz
<matti> but then foynd a picture of him in python tshirt
<matti> xhildhood dream lost there
<matti> ;)
ryanf has joined #ruby-lang
havenn_ has quit [Remote host closed the connection]
havenn has joined #ruby-lang
<whitequark> matti: and he was _smiling_. :)
<zzak> rue: some people enjoy zshing them instead
<matti> Yes
<matti> Dear god
<matti> bad memories
<matti> all back
<rue> zzak: Oh my
<matti> *cries*
<matti> ;-)
<matti> Hi hi zzak
<zzak> but i still use bash
<zzak> i like my ubiquitous tools
elux has quit [Quit: Bye!]
_malte_ has joined #ruby-lang
havenn has quit [Ping timeout: 244 seconds]
_malte has quit [Read error: No route to host]
goshakkk has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
lcdhoffman has quit [Read error: Connection reset by peer]
workmad3 has joined #ruby-lang
lcdhoffman has joined #ruby-lang
Nisstyre-laptop has joined #ruby-lang
icooba has quit [Quit: Computer has gone to sleep.]
<yorickpeterse> whitequark: "tranny", "crack", etc
sailias has quit [Quit: Leaving.]
kvirani has quit [Remote host closed the connection]
havenn has joined #ruby-lang
<zzak> yorickpeterse: please keep it pg
<rue> It’s more of a M channel, really
rippa has quit [Ping timeout: 244 seconds]
cored has joined #ruby-lang
cored has joined #ruby-lang
cored has quit [Changing host]
<yorickpeterse> http://rubygems.org/gems/ftp this one is still my favourite
<darix> yorickpeterse: let me guess it installs a binary named ftp?
<yorickpeterse> nfi
m3nd3s has quit [Remote host closed the connection]
workmad3 has quit [Ping timeout: 246 seconds]
<eam> yorickpeterse: I said to myself "fuck the police?" then I looked in the gem :D
justinmcp has joined #ruby-lang
kvirani has joined #ruby-lang
m3nd3s has joined #ruby-lang
<yorickpeterse> it's quite sad really
<rue> eam: You were wrong, obviously
krz has joined #ruby-lang
m3nd3s has quit [Remote host closed the connection]
m3nd3s has joined #ruby-lang
<eam> rue: nuh unh
qwerxy has joined #ruby-lang
m3nd3s has quit [Ping timeout: 255 seconds]
s0ber has quit [Read error: Connection reset by peer]
s0ber has joined #ruby-lang
banisterfiend has joined #ruby-lang
codewrangler has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
shellox has left #ruby-lang [#ruby-lang]
codewrangler has joined #ruby-lang
Erlkoenig has joined #ruby-lang
<Erlkoenig> http://dablog.rubypal.com/2007/4/17/the-l-in-dsl-langue-ou-langage how does the "with" construct mentioned there work? how to use it in own code?
<drbrain> corundum: regexp?
<corundum> regexp is learnable interactively at http://rubular.com/ or http://www.zenspider.com/Languages/Ruby/QuickRef.html#11
banisterfiend has quit [Remote host closed the connection]
<drbrain> Erlkoenig: it's typically: def with(obj, &block) instance_eval(&block) end
outoftime has quit [Remote host closed the connection]
<Erlkoenig> aaah that's it. thanks :)
chimkan_ has quit [Quit: chimkan_]
robbyoconnor has joined #ruby-lang
robbyoconnor has quit [Read error: Connection reset by peer]
hramrach has quit [Ping timeout: 276 seconds]
<drbrain> oops, obj.instance_eval(&block)
<cored> hello
<cored> I'm tyring to make a port of a mongomapper app to ruby 1.9.2
<cored> but I'm getting a bunch of validation errors from my specs
<cored> do I need to upgrade mongomapper to latest or something?
<cored> I'm using 0.8.6 now
chimkan has joined #ruby-lang
hramrach has joined #ruby-lang
<drbrain> cored: what validation errors?
<cored> wait
<cored> those errors
CarlB_the_great has quit [Remote host closed the connection]
lcdhoffman has quit [Quit: lcdhoffman]
Nisstyre-laptop has quit [Remote host closed the connection]
<canton7> looks like you're passing an argument to something that isn't expecting one
<canton7> and how did you come to the conclusion those were validation errors?
<drbrain> ^^
<cored> well
<whitequark> well, "crack" _might_ mean something not related to substances
<cored> the line that the error from the specs is pointing is in the validation call I hvae
<cored> let me show you
gsav has quit [Quit: Lost terminal]
<cored> there you go
<cored> the line pointed is the second one
<cored> the stack trace is a little bit confusing
leocassarani has quit [Quit: leaving]
<cored> this tests are brittle bad
<whitequark> drbrain: https://rubygems.org/gems/Sphincter < this is not funny. or clever. really.
arooni-mobile has quit [Ping timeout: 244 seconds]
lcdhoffman has joined #ruby-lang
<drbrain> ok?
<whitequark> well, I dunno. each time I think that there should be some kind of rubygems policy to prevent names like "trollop" actually happening to nice gems, I arrive to the realization that it'd make the situation worse
<whitequark> it's censorship, it's unclear who'll be applying the policy, etc.
<zenspider> wow. what horseshit
<whitequark> but I wonder why doesn't e.g. CPAN contain that
<drbrain> a sphincter is a a ring of muscle, you have something like 60 of them
<whitequark> yeah I know
<drbrain> that's a long way from "trollop"
qwerxy has quit [Quit: offski]
<zenspider> trollop is just an irc bot that annoys the ops... I don't see how it's offensive.
<whitequark> I was overgeneralizing. for some reason people tend to choose strange names for gems
<whitequark> zenspider: erm, it's a nice CLI parser
<zenspider> quite frankly, the puritanical notion that everything in the world needs to be intellectually nerfed needs to die.
<whitequark> it causes outbursts from time to time. eg this: http://idle.slashdot.org/story/11/07/11/1315217/when-software-offends
<whitequark> none of these names actually offend me, but I'd like to avoid the kind of issues like described in the /. article.
<whitequark> maybe I'm wrong after all.
<whitequark> but I don't see why would you name your project (which is presumably was written to be popular) in a controversive way
<whitequark> to cause rants?
mistym has quit [Remote host closed the connection]
<drbrain> the good name was taken
<whitequark> english contains, I dunno, ~20k often used words?
<whitequark> through there are 43k gems
justinmcp has quit [Remote host closed the connection]
wpaulson has joined #ruby-lang
wpaulson has quit [Client Quit]
_malte_ has quit [Remote host closed the connection]
<Erlkoenig> whitequark: the names in that article are maybe a bit unlucky, but names like "firefox" are probably better to remember - and make nicer "brand" names - then "opensource-web-browser"... applies to gems too
imajes has quit [Excess Flood]
imajes has joined #ruby-lang
<whitequark> Erlkoenig: I don't say that you only should select boring and descriptive names for your gems; I don't think so
<whitequark> but I do think that one should avoid controversional ones
<whitequark> I don't see any reason not to.
<Erlkoenig> well people tend do like to mess up conventions... so some like to give their projects "funny" names... like libsexy or something
<Erlkoenig> I'd just say let them do what they want, if you don't like the name, don't use the lib/app. so if you got a really bad name, nobody will use your lib/app and you might consider using a friendlier one...
<whitequark> that doesn't work when a gem becomes a rails dependency or something like that
shyouhei has quit [Quit: Tiarra 0.1+svn-39036: SIGTERM received; exit]
<Erlkoenig> the idea is to have the "market" rule that out... if it has a weird name, it probably won't become a rails dep
<whitequark> to name an example, paperclip, a quite popular attachment management gem, depends on cocaine
<whitequark> and I guess that thoughtbots won't really take that as an issue if they added this dependency in first place
<whitequark> and, well, more often than not the gem is really great, it's just the name which sucks
<Erlkoenig> hum... the opensource community is large and diverse... you probably can't avoid such things really, and rather just live with them
<Erlkoenig> it's something like the cost for a shitload of libs and apps that do every crazy thing you can imagine
<whitequark> try searching for such names on CPAN
<whitequark> which is bigger than rubygems
<eam> stupid module names is a problem fairly unique to the ruby community
<whitequark> ^ that
<drbrain> I've had a bigger problem with poor organization inside gems with good names than with bad gem names
<eam> in fact, I name my modules reasonably when I distribute them for other languages (but not for ruby)
<drbrain> (speaking of stupid module names)
<eam> just to fit in
<eam> drbrain: yeah, that's a big issue as well
<eam> lots of clever, little of standardization and best practices
<whitequark> well, that problem is quite global to every language which is actually used at present moment
<eam> whitequark: the clever, or the module structure?
<whitequark> eam: both I'd say
<eam> I think most languages have a reasonable module structure. Perl has this mostly figured out, as does C
<whitequark> lol C
<eam> ?
<eam> C's structure is arguably the best
<whitequark> there isn't even a cross-platform way to build a shared object in C, and now we talk about module structure
<Erlkoenig> eam: nonexistant? :D
<whitequark> C doesn't have modules to be precise.
solars has quit [Ping timeout: 245 seconds]
<eam> Erlkoenig: eh? I'd take ld.so and dlopen() over require any day
<eam> whitequark: sure it does
<whitequark> eam: I'm pretty sure that ld.so and dlopen are not parts of C standard
<eam> you have object files, static and shared libraries
<eam> they're part of the C standard library, bro
<whitequark> there isn't even a single way to build a shared library across different Unices
<eam> it's how the C standard library is implemented
benanne has quit [Quit: kbai]
<eam> whitequark: that's by design, it's called abstraction
<whitequark> not to talk about different platforms
<eam> and you'll find similar abstraction in ruby
<Erlkoenig> (00:43:06) eam: they're part of the C standard library, bro <--- dlopen() doesn't exist on windows
<whitequark> eam: they're not part of the C standard library
<whitequark> they're part of POSIX indeed
<eam> implemented using the exact same mechanisms in fact
<whitequark> but that has nothing to do with C stdlib
<eam> whitequark: you're saying dlopen is not part of libc?
<whitequark> eam: write me a cross-platform way to load a shared object
<eam> don't confuse ANSI C with the C standard library
lcdhoffman has quit [Quit: lcdhoffman]
<eam> they are different
qwerxy has joined #ruby-lang
<eam> Erlkoenig: and it does, btw
<whitequark> eam: are you trolling?
<Erlkoenig> maybe in the cygwin runtime, but not when using "plain" C
<eam> no, do you not understand how C handles modules?
<Erlkoenig> windows has LoadLibrary which is part of the Win32API... but not dlopen()
<whitequark> as per dlopen, search MSDN for it
<whitequark> windows definitely doesn't have dlopen
deryl has joined #ruby-lang
<eam> Erlkoenig: you're saying win32 doesn't have dlopen, sure. but posix on windows does
<whitequark> is not part of Windows
<eam> it is
<Erlkoenig> posix on windows works until Windows NT or something?
<whitequark> because you cannot call Win32 subsystem from the POSIX on Windows
<whitequark> due to the way it interacts with csrss
<eam> sure
<whitequark> and now I'm sure that you are trolling
<eam> I'm trolling? you're the one saying C object files aren't the way that C implements modules
<eam> and you're focusing on dlopen() and ignoring object files or archives
<whitequark> again: C language doesn't have modules, it has translation units which are a completely different story
<eam> this conversation is ridiculous
<Erlkoenig> c object files are something like modules, but lack namespaces
<eam> whitequark: C has object files
<eam> Erlkoenig: not all languages have namespaces
<Erlkoenig> and without namespaces things are getting... intereseting
<eam> modules != namespaces
<whitequark> yes. so? object file doesn't contain all information you need to interface with it
<whitequark> you need at least a complementary header
<eam> whitequark: that's right, that's how C does it
<eam> I'm glad you finally agree (can't believe this is an argument)
<Erlkoenig> eam: so what exactly are you calling a module?
<whitequark> and there, for example, isn't a portable way to manage headers/object files for different versions of the same library
<whitequark> every one does it in their own way
<whitequark> compare, for example, Qt, zlib and glib
<eam> Erlkoenig: 15:42 < eam> you have object files, static and shared libraries
tenderlove has quit [Remote host closed the connection]
<whitequark> to speak about standartization
<eam> this is seriously off topic guys
<eam> my comment was not contentious
<Erlkoenig> whitequark: yep, and that's very very evil
qwerxy has quit [Quit: offski]
<eam> the point is that C's version of modular code is very well structured
<whitequark> Erlkoenig: indeed, and I don't understand how anyone would call the crutch C has instead of proper modules "reasonable"
<Erlkoenig> well in the end it's a question about the definition of "module"...
deryl has quit [Client Quit]
<whitequark> more like "completely unusable"
<eam> whitequark: I said it had a better defined structure, and culturally does not suffer from the disjoint hodgepodge going on in the ruby module space -- and I don't see you submitting evidence to the contrary
iamlacroix has joined #ruby-lang
<Erlkoenig> hehe... try to compile a C++ GTKmm application for Win32, on Linux...
deryl has joined #ruby-lang
<whitequark> ok. what should a module system provide, in your opinion?
<eam> I see you arguing that C isn't modular, which is a bizarre stance
<whitequark> I would say namespacing and isolation
<drbrain> if namespacing is not provided by the language you probably don't have "modules"
<whitequark> it has neither
<drbrain> eam: "modular" is not the same as "having modules"
<eam> whitequark: you are suggesting libraries do not have private symbols?
<eam> that would be incorrect
<Erlkoenig> eam: symbols of different libraries can mix up
deryl has quit [Client Quit]
<eam> Erlkoenig: exported symbols yes
<whitequark> eam: they do, but public symbols are not isolated from each other
<Erlkoenig> if two libraries have a public symbol with the same name
<Erlkoenig> and that's what i'd call "interesting" :D
<eam> whitequark: the same is true of ruby, if two modules touch Kernel
deryl has joined #ruby-lang
<eam> it's perfectly possible to have isolation in C
deryl is now known as Guest39894
<whitequark> eam: but ruby has namespacing, and C does not
<Mon_Ouie> I guess that's part of why people want refinements in Ruby
<eam> whitequark: sure
<Erlkoenig> by prefixing every method with the module name... but not everyone does that
Guest39894 has quit [Client Quit]
<whitequark> and we're back at the "standartization" part. no, C modules are absolutely not consistent across the ecosystem
<Erlkoenig> also specifying the module's name this way a thousand times is not fun
<whitequark> way less consistent than ruby ones
ryez has joined #ruby-lang
<eam> all these nitpicks don't change the fact that the culture of building C libraries is very well structured -- perhaps moreso than any subsequently developed language environment
<eam> which is the topic we're discussing, btw
<Erlkoenig> what?! no
<whitequark> ... would you also say that autotools are good?
<Erlkoenig> e.g. how do you link against gtk libraries?
erichmenge has joined #ruby-lang
<Erlkoenig> and how do you link against zlib?
havenn has quit [Remote host closed the connection]
erichmenge has quit [Client Quit]
<eam> whitequark: autotools aren't part of any library interfaes
<eam> that's something completely different
<whitequark> and if you it's "well structured", then why do we have "$PKGNAME-config" in some cases, "pkg-config -l $PKGNAME" in another, and a thousand of other incompatible methods ?
<whitequark> autotools are supposed to fix what's broken with C modules, namely that there is no standard way to do anything with them
<Erlkoenig> and - why does pkg-config only supply lib/inc flags suitable for GCC - what if i wanted to write a GTK application using e.g. the MS Compiler?
<whitequark> for example, there is no standard way to build a shared object on Unix
<eam> you're confusing portability with language structure
postmodern has joined #ruby-lang
<eam> again, that is not what I'm talking about
<whitequark> if language actually is modular, it should enforce interoperability across implementations
<whitequark> otherwise it isn't.
<eam> that's silly
<Erlkoenig> well the core language itself might be nicely structured... but all of the neccessary eco system around it has some... problems
<eam> and patently false
cored has quit [Quit: Lost terminal]
<whitequark> you can as well call each implementation a different language; that's true about C in some degree
<whitequark> each compiler has its own set of incompatible extensions
<whitequark> and tons of flags to enforce compatible behavior
alexkira has quit [Remote host closed the connection]
<eam> Erlkoenig: when I look in /usr/lib, or across the swath of libraries in yum, I do not see the mess that I see on rubygems in terms of module structure, organization, and implementation
<eam> that is my point
<eam> I did not mean for you guys to get so ratholed on the particulars
iamlacroix has quit [Remote host closed the connection]
<Erlkoenig> what structure are you seeing in /usr/lib ?
<whitequark> eam: there isn't even a consistent way to name a shared object.
<eam> Erlkoenig: interface in /usr/include, clear functional delineation between libraries
<whitequark> libopencv_video.so.2.3.1 vs libopenjpeg-2.1.3.0.so libindicate-gtk.so.3.0.3
<eam> whitequark: there is, though not everyone follows it
<eam> jesus dude stop trolling
<whitequark> you are contradicting itself
<Erlkoenig> and where do you see it on windows C:\Program Files\Application 1\lib\, C:\Program Files\Application 2\lib, C:\Program Files (x86)\Application3\lib ... etc :D
<whitequark> *yourself
<eam> there are exceptions in every language environment
<whitequark> and now you're proving that C isn't any better than Ruby with your own words
<eam> the point is that there are certain issues rampant in the ruby communtiy which are rare in C or other language environments
<eam> whitequark: no, you are seriously confused and hearing what you want to hear
<whitequark> eam: which particular issues are you talking about?
<eam> I'm not going to repeat myself; this is not productive
<whitequark> you never told one
<Erlkoenig> (00:58:35) eam: Erlkoenig: interface in /usr/include, clear functional delineation between libraries <- regarding the files themselves, maybe. but just finding and providing the neccessary include paths to the compiler is problematic again
<whitequark> except Kernel monkey-patching, but it's not a modularity issue
<eam> the logs tell another tale and I suggest you re-read them if you're still confused. I'm done with this
<whitequark> you can do LD_PRELOAD in C as well, doesn't mean it's any better
<zenspider> ok. this is bullshit noise. ruby or stfu
<Erlkoenig> censorship :o
<zenspider> yup. welcome to a topic oriented channel.
<zenspider> go to #hottub or #bullshit
<eam> thank you
<drbrain> ##c
snorkdude has joined #ruby-lang
tenderlove has joined #ruby-lang
havenn has joined #ruby-lang
havenn has quit [Remote host closed the connection]
havenn has joined #ruby-lang
<whitequark> https://github.com/libgit2 the repo list nicely displays the issue with gem names
enebo has quit [Quit: enebo]
<eam> I agree
snorkdude has quit [Remote host closed the connection]
<whitequark> I wonder how did this happen in first place
<eam> in most other environments I see some attempt at a hierarchy (even in languages without namespaces, it's attempted with prefixes)
workmad3 has joined #ruby-lang
<eam> the idea of cute, flat names is something I haven't seen anywhere else
<whitequark> ah, THAT's what you are talking about.
<Erlkoenig> hmm... just recall what "gtk" means :D
<eam> bro
<whitequark> yes, rubygems definitely differ a lot with cpan
<eam> whitequark: it is why I was trying to emphasise the difference between logical structure, and particular implementation
<Erlkoenig> GNU's not unix image manipulation program ToolKit
<eam> the culture part is what interests me
ivanoats has quit [Remote host closed the connection]
<whitequark> eam: I'd say that this has nothing to do at all with C itself, it's a completely different issue
<eam> I'd agree
<whitequark> ruby had attempts at replication of perl's hierarchical naming
<whitequark> net-sftp, etc.
<whitequark> but it did not take off
<eam> whitequark: yeah but it clearly didn't catch on
<eam> whereas I can't think of another language environment without some strong conventions
<eam> regardless of the implementation detail
<whitequark> hm, could you show me some C libs structured in a similar way?
<whitequark> the names are definitely uncute, but flat
<whitequark> except for "plugins" (libxmlrpc_server and so on), but ruby also has hierarchical conventions for plugins
toretore has quit [Quit: Leaving]
seanstickle has joined #ruby-lang
<whitequark> I'm also not really sure that strong structuring like CPAN's actually provides some value except for eyecandy
<whitequark> if you know what SFTP is, you'd also know that it's for Net. otherwise, why would you care?
<eam> whitequark: generally I'd say anything with matching substrings, eg libgtk, libX, libpg ...
<eam> really would rather not digress though
<eam> the bigger issue in my opinion is that the labels are descriptive of function
<whitequark> well, see above, ruby also has that convention and it's used a lot
<whitequark> as per descriptive names, yeah, I agree
<eam> none of the stuff we're talking about is an absolute
<eam> I'm only speaking to the overwhelming behavior of each community
<whitequark> ok
<zenspider> generalizations about a programming language's libraries being "uncute" will always be disproven. libiberty, for example
<whitequark> ... or the fact that binary formats are called ELF and DWARF for no apparent reason
<whitequark> (DWARF doesn't even have a backronym)
jtoy has joined #ruby-lang
<Erlkoenig> what's the problem about ELF? it's perfectly reasonableß
<eam> zenspider: only if they're absolute generalizations, which mine was explicitly not
<eam> the comments about prevalent behavior are well supported
billyoc has joined #ruby-lang
mistym has joined #ruby-lang
mistym has quit [Changing host]
mistym has joined #ruby-lang
<amerine> zenspider: I was one of the people who read your talk description and worried that it was going to be bad. I just watched it and I thought you gave a great talk. Thank you.
jtoy has quit [Quit: jtoy]
tenderlove has quit [Remote host closed the connection]
kuja_ is now known as kuja
coryf has joined #ruby-lang