apeiros changed the topic of #ruby-lang to: Ruby 2.1.0-p0; 2.0.0-p353; 1.9.3-p484: http://ruby-lang.org|| Paste >3 lines of text on http://gist.github.com || RubyConf 2013 at http://www.justin.tv/confreaks
vlad_starkov has joined #ruby-lang
vlad_starkov has quit [Remote host closed the connection]
vlad_starkov has joined #ruby-lang
saarinen has quit [Client Quit]
<Wardrop> pipecloud: Why do I want to do what, define local variables with a proc, or why bother writing Scorched?
vlad_starkov has quit [Remote host closed the connection]
<Wardrop> pipecloud: I assume your judgement of "junk and glue" is based on the fact that you don't like the idea of defining local variables after-the-fact within Proc's?
vlad_starkov has joined #ruby-lang
<Wardrop> anyway, I've got to duck out for the moment. Will be back in half an hour or so. Happy to discuss further if interested.
jtw has quit []
stonerfish has quit [Quit: Leaving.]
<pipecloud> Wardrop: Why are you using procs in this way, and since you are why are you doing with the locals?
lsegal has quit [Read error: Connection reset by peer]
<pipecloud> Wardrop: Secondarily, why would anyone use scorched over sinatra or any of the other microframeworks, libraries, and tools?
<Wardrop> I'd just like to add that defining local variables like I've been discussing is just an idea I wanted to play with. I don't think it's as "
thisirs has quit [Read error: Connection reset by peer]
<Wardrop> ..."ugly" as one might assume, despite the fact it certainly sounds ugly.
<Wardrop> pipecloud: Have a look at the README (homepage) and maybe check out the About page: http://scorchedrb.com
lsegal has joined #ruby-lang
<Wardrop> Scorched is an evolution of Sinatra, and if you read about it you'll hopefully see that.
<Wardrop> Anyway, like I said, I'll be back
mistym has joined #ruby-lang
<pipecloud> Ah, I see. It looks neat. I'd likely not use it, but I'll give things a read and see if it interests me.
Yuuvee has quit [Quit: Leaving...]
lsegal has quit [Read error: Connection reset by peer]
lsegal has joined #ruby-lang
lsegal has quit [Client Quit]
lsegal has joined #ruby-lang
mistym has quit [Ping timeout: 272 seconds]
<apeiros> Wardrop: "Scorched aims to be raw and transparent. Magic has no place." - lol? :)
<apeiros> "let's inject lvars, because that's not magic!"
relix has joined #ruby-lang
VTLob has quit [Quit: VTLob]
<pipecloud> apeiros: Please ignore the man behind the curtain.
* apeiros dresses up his red slippers and goes back to kansas
MrZYX is now known as MrZYX|off
<apeiros> oh, ruby slippers even
MrZYX|off is now known as MrZYX
quizzicol has joined #ruby-lang
CodeBunny has quit [Quit: CodeBunny got lost. Send help!]
quizzicol has quit [Ping timeout: 260 seconds]
thmzlt has quit [Remote host closed the connection]
charliesome has joined #ruby-lang
charliesome has quit [Client Quit]
daikan has joined #ruby-lang
_TheRev_ has quit []
thmzlt_ has joined #ruby-lang
kith has quit [Ping timeout: 260 seconds]
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<imjacobclark> Hi, can anybody give me any pointers on how to improve my Rakefile here: https://github.com/imjacobclark/vela/blob/master/Rakefile
<imjacobclark> I'm a little lost on how to run Sinatra whilst also be able to run my tests, I resorted to running rackup as a deamon (rackup -D)
relix has joined #ruby-lang
benanne has quit [Quit: kbai]
<Wardrop> apeiros: I was waiting for someone to point that out :)
<Wardrop> There's always room for exceptions if they benefits are there. As I said, local variables is an interesting idea that would make route Proc's DRY'er. As well as not being a fan of magic, I'm also a big fan of DRY which Scorched implements heavily. It's a matter of which takes precedence in instances like these.
<Wardrop> if the* benefits are there
MrZYX is now known as MrZYX|off
Lewix_ has quit [Remote host closed the connection]
<Wardrop> apeiros: I also like to have my ideas and opinions challenged. It ensures my ideas are well thought through, and opinions justified. Alas, local variable injection is perhaps looking less appealing.
<apeiros> Wardrop: I think you misunderstood what DRY means
<apeiros> s/DRY/shorter/ here
MrZYX|off is now known as MrZYX
<Wardrop> get('/::title/::id') { |title, id| # not dry }
<Wardrop> get('/::title/::id') { |captures| p captures[:title] # better }
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
francisfish has joined #ruby-lang
<Wardrop> get('/::title/::id') { p title # DRY, though a little magical }
<apeiros> seriously, that has nothing to do with DRY.
<Wardrop> With local variable injection, there's exactly zero repetition. With the second example, you could argue there's also no repetition, but it's certainly more verbose.
<apeiros> you should educate yourself on what DRY means. it's not a synonym for "shorter code"
<apeiros> it also does not mean "you must not use the same variable multiple times". that's not the kind of repetition DRY refers to.
<Wardrop> apeiros: It's absolutely DRY. Naming the capture `title` within the pattern string itself, then naming it again as an argument is not completely DRY.
<apeiros> you. abuse. that. word. really.
<apeiros> stop it.
jonahR has joined #ruby-lang
<Wardrop> aperios: DRY is about not repeating logic or configuration/wiring. Convention over configuration is a form of DRY. It prevents you from repeating yourself BETWEEN projects.
francisfish has quit [Ping timeout: 272 seconds]
quizzicol has joined #ruby-lang
<apeiros> Wardrop: hint, use tab completion for nicks. avoids misspelling them.
<MrZYX> also you don't repeat yourself that much in a conversation
<apeiros> and I full well know what DRY is. your above examples of code having nothing to do with it.
<MrZYX> scnr
vlad_sta_ has joined #ruby-lang
<Wardrop> apeiros: Not everyone uses an editor with tab completion FYI.
<apeiros> Wardrop: about every irc client supports tab completion
<apeiros> and if yours doesn't, it's probably a rather shitty client :-p
<Wardrop> Oh sorry, you meant nick names
<Wardrop> apeiros: I honestly didn't know that, thanks.
<apeiros> yw
<Wardrop> apeiros: Perhaps you can elaborate on your definition of DRY
<apeiros> Wardrop: I'm quite certain C2 and WP have good definitions of it. your wording after certainly came closer to what DRY is.
vlad_sta_ has quit [Remote host closed the connection]
vlad_starkov has quit [Read error: Operation timed out]
<Wardrop> Defining a name twice when you can avoid it, is not DRY. That's what this shows: get('/::title/::id') { |title, id| # not dry }
<Wardrop> The second example is DRY, just a little more verbose than the last example.
<apeiros> Wardrop: wrong.
<apeiros> just. plain. wrong.
<Wardrop> apeiros: Banana
<apeiros> variable repetition has *nothing* to do with DRY/not DRY
<Wardrop> apeiros: We're not talking about repeating variables within application logic when they're actually referenced. I'm talking about naming them multiple times. In that example I gave, you're naming a capture twice. Once within the pattern `/::id/::title` and once within the proc, `{ |id, title| }`
<apeiros> C2 states it rather bluntly (http://c2.com/cgi/wiki?DontRepeatYourself): "It's okay to have mechanical, textual duplication"
<apeiros> Wardrop: yes. still *zero* linkage to DRY.
<Wardrop> apeiros: I could point you to the first sentence of the Wikipedia article "a principle aimed at reducing repetition of information of all kinds"
<apeiros> Wardrop: yes, and that's why you use it that way, because you stop reading there.
<apeiros> Wardrop: I'm curious, do you always only read the first sentence in a definition?
<apeiros> your understanding of this world must certainly be rather funny then…
<Wardrop> apeiros: Of course not, I was just demonstrating how I can reference material online that supports my definition of DRY.
<apeiros> anyway, up to you whether you want to abuse the word/principle and refuse to learn its meaning.
<apeiros> it's 0200 here and I'll go afk now.
<Wardrop> No worries
<apeiros> Wardrop: dude, if you want to make up "your definition" of DRY, go ahead. it's just not *the* definition of DRY. which means you're out of synch with, um, everybody else…
* apeiros off
<Wardrop> I think our definitions are the same. It's a matter of interpretation I believe.
brettweavnet has joined #ruby-lang
brettweavnet has quit [Client Quit]
MrZYX is now known as MrZYX|off
quizzicol has quit [Quit: Leaving.]
<Wardrop> apeiros: I don't think it's possible to prove which of us has made the most correct or best interpretation of a concept that's never been formalised.
marr has quit [Ping timeout: 252 seconds]
mbj has quit [Ping timeout: 272 seconds]
CodeBunny has joined #ruby-lang
Jacky has quit [Ping timeout: 272 seconds]
tylersmith has joined #ruby-lang
heftig has quit [Quit: Quitting]
Johz has quit [Quit: Leaving]
heftig has joined #ruby-lang
AKASkip has quit [Ping timeout: 272 seconds]
tylersmith has quit [Read error: Connection reset by peer]
tylersmith has joined #ruby-lang
diegoviola has joined #ruby-lang
jtw has joined #ruby-lang
ender_ has joined #ruby-lang
mbj has joined #ruby-lang
cnivolle has quit [Remote host closed the connection]
jalcine has joined #ruby-lang
ender__ has quit [Ping timeout: 260 seconds]
quizzicol has joined #ruby-lang
tylersmith has quit [Remote host closed the connection]
tylersmi_ has joined #ruby-lang
DefV has quit [Ping timeout: 260 seconds]
DefV has joined #ruby-lang
tylersmi_ has quit [Ping timeout: 260 seconds]
shinnya has joined #ruby-lang
CodeBunny has quit [Quit: CodeBunny needs a carrot. Be back later.]
hahuang61 has joined #ruby-lang
apeiros has quit [Remote host closed the connection]
apeiros has joined #ruby-lang
dorei has joined #ruby-lang
hahuang61 has quit [Ping timeout: 272 seconds]
Lewix has joined #ruby-lang
mbj has quit [Read error: Operation timed out]
mbj has joined #ruby-lang
elia has quit [Quit: Computer has gone to sleep.]
mistym has joined #ruby-lang
elia has joined #ruby-lang
mistym has quit [Ping timeout: 259 seconds]
jalcine is now known as Jacky
prc has quit [Ping timeout: 252 seconds]
imjacobclark has quit [Remote host closed the connection]
deens has joined #ruby-lang
deens has quit [Remote host closed the connection]
quizzicol has quit [Quit: Leaving.]
fijimunkii has joined #ruby-lang
quizzicol has joined #ruby-lang
bzalasky has joined #ruby-lang
quizzicol has quit [Ping timeout: 265 seconds]
dorei has quit []
daikan has quit [Remote host closed the connection]
deens has joined #ruby-lang
bzalasky has quit [Remote host closed the connection]
tylersmith has joined #ruby-lang
dorei has joined #ruby-lang
francisfish has joined #ruby-lang
yatish27 has joined #ruby-lang
tylersmith has quit [Ping timeout: 265 seconds]
francisfish has quit [Ping timeout: 272 seconds]
fijimunkii has quit [Ping timeout: 252 seconds]
fijimunkii has joined #ruby-lang
quizzicol has joined #ruby-lang
bzalasky has joined #ruby-lang
codebauss has quit [Ping timeout: 245 seconds]
charliesome has joined #ruby-lang
Barrin6 has joined #ruby-lang
quizzicol has quit [Ping timeout: 265 seconds]
quizzicol has joined #ruby-lang
bzalasky has quit [Remote host closed the connection]
bzalasky has joined #ruby-lang
quizzicol1 has joined #ruby-lang
quizzicol has quit [Read error: Connection reset by peer]
shinnya has quit [Ping timeout: 246 seconds]
fijimunkii has quit [Ping timeout: 252 seconds]
mbj has quit [Ping timeout: 272 seconds]
mbj has joined #ruby-lang
mykoweb has joined #ruby-lang
imjacobclark has joined #ruby-lang
<Lewix> Is there a better way to do this Date.new(1).strftime("%B")
fijimunkii has joined #ruby-lang
imjacobclark has quit [Ping timeout: 246 seconds]
<Lewix> I want to get the month based on the 0-based number
Cakey has joined #ruby-lang
yfeldblum has quit [Ping timeout: 252 seconds]
mucker has quit [Remote host closed the connection]
mucker has joined #ruby-lang
<Lewix> Date.new(1,i,1).strftime("%B") -> Jan
<Lewix> Date.new(1,2,1).strftime("%B") -> FEb
amclain has joined #ruby-lang
<Lewix> Date.new(1,3,1).strftime("%B") -> Mar
mbj has quit [Ping timeout: 272 seconds]
<Xuisce> hey Lewix
mucker has quit [Ping timeout: 260 seconds]
<Lewix> Xuisce:
<Xuisce> yep
thmzlt_ has quit [Remote host closed the connection]
<heftig> Lewix: %w{Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec}[i]
<heftig> assuming you don't care about locales
<heftig> (and that array should probably be in a constant somewhere)
r0bgleeson has quit [Quit: WeeChat 0.4.2]
<Lewix> heftig: really? that's the best way you could think of
<heftig> Lewix: Date::ABBR_MONTHNAMES
<heftig> there's that array i was looking for
Cakey has quit [Ping timeout: 248 seconds]
<Lewix> heftig: for the first time im dissapointed with ruby
<heftig> you can think of something better than Date::ABBR_MONTHNAMES[i] ?
RomAbptTHN has joined #ruby-lang
RomAbptTHN has left #ruby-lang [#ruby-lang]
Cakey has joined #ruby-lang
mistym has joined #ruby-lang
symm- has quit [Ping timeout: 248 seconds]
mistym has quit [Ping timeout: 272 seconds]
quizzicol1 has quit [Quit: Leaving.]
daikan has joined #ruby-lang
rue_XIW has joined #ruby-lang
<Lewix> heftig: ah thanks!
<Lewix> heftig: how did you find out
<Lewix> heftig: I don't want the ABBR
<heftig> then just use MONTHNAMES
mykoweb has quit [Remote host closed the connection]
<Lewix> ah ruby i still love you
rue|w has quit [Ping timeout: 272 seconds]
mykoweb has joined #ruby-lang
<Lewix> heftig: how did you find out for future references
quizzicol has joined #ruby-lang
lsegal has quit [Quit: Quit: Quit: Quit: Stack Overflow.]
<heftig> Date.constants
daikan has quit [Ping timeout: 264 seconds]
Cakey has quit [Ping timeout: 272 seconds]
mykoweb has quit [Ping timeout: 272 seconds]
yfeldblum has joined #ruby-lang
rahul_j has joined #ruby-lang
<Lewix> heftig: smart move
<Lewix> Is there a useful gem to summarize statistics
<Lewix> I don't want to reinvent the wheel
yfeldblum has quit [Remote host closed the connection]
yfeldblum has joined #ruby-lang
simi has joined #ruby-lang
Wardrop has left #ruby-lang [#ruby-lang]
mehlah has quit [Quit: Leaving...]
dorei has quit []
Barrin6 has quit [Quit: Leaving]
mykoweb has joined #ruby-lang
rahul_j has quit [Quit: rahul_j]
rahul_j has joined #ruby-lang
bjh13 has joined #ruby-lang
francisfish has joined #ruby-lang
thmzlt has joined #ruby-lang
francisfish has quit [Ping timeout: 272 seconds]
danijoo has quit [Read error: Connection reset by peer]
thmzlt has quit [Ping timeout: 252 seconds]
danijoo has joined #ruby-lang
ahmedelgabri has joined #ruby-lang
ahmedelgabri has quit [Remote host closed the connection]
ahmedelgabri has joined #ruby-lang
deens has quit [Remote host closed the connection]
mykoweb has quit [Remote host closed the connection]
diegoviola has quit [Quit: WeeChat 0.4.2]
mykoweb has joined #ruby-lang
deens has joined #ruby-lang
daikan has joined #ruby-lang
mykoweb has quit [Ping timeout: 272 seconds]
deens has quit [Ping timeout: 260 seconds]
centrx has joined #ruby-lang
daikan has quit [Ping timeout: 252 seconds]
bzalasky has quit [Remote host closed the connection]
lfox has joined #ruby-lang
Kabaka has quit [Ping timeout: 264 seconds]
Rylee has quit [Ping timeout: 252 seconds]
simi has quit [Ping timeout: 252 seconds]
Rylee has joined #ruby-lang
imjacobclark has joined #ruby-lang
Kabaka has joined #ruby-lang
toretore has joined #ruby-lang
<Lewix> I need a pair of fresh eyes to give me feedbacks on this https://gist.github.com/6ewis/87377431f766a6ad1195
imjacobclark has quit [Ping timeout: 260 seconds]
<Lewix> I'd like to refactor it (look at line 68 to 76, 83, or 112). I'm sure it can be improved
zIWYIiWPIS has joined #ruby-lang
zIWYIiWPIS has left #ruby-lang [#ruby-lang]
<centrx> Lewix, You could use a lot more dynamic method calls to simplify the code
deens has joined #ruby-lang
diegoviola has joined #ruby-lang
<centrx> [:unique_customers, :customers_with_electricity, :customers_with_gas].each do |meth|
deens has quit [Read error: Connection reset by peer]
deens has joined #ruby-lang
<centrx> define_method "show_#{meth}" { format_show meth }
<centrx> end
<centrx> or just def show(type); format_show type; end
<Lewix> good pair of eye.
<centrx> Thanks
<Lewix> i don;t understand the later though - what do you mean by def show type
<Lewix> latter*
<centrx> show(:customers_with_electricity) would call format_show self.send(:customers_with_electricity)
jtw has quit []
deens has quit [Ping timeout: 252 seconds]
<centrx> def show(group)
<centrx> self.send(group)
<centrx> end
<centrx> oops
<centrx> format_show self.send(group)
r0bgleeson has joined #ruby-lang
<Lewix> centrx: I still don't get it. I just used define_method
<Lewix> hi r0bgleeson
sepp2k has quit [Read error: Connection reset by peer]
marcofernandez has quit [Ping timeout: 252 seconds]
thmzlt has joined #ruby-lang
thmzlt has quit [Ping timeout: 272 seconds]
<Lewix> centrx: got you. it's not as staightforward and not as clean
<Lewix> as define_method
red_menace has quit [Quit: peer reset by connection]
<centrx> Some would say it is cleaner :)
mistym has joined #ruby-lang
marcofernandez has joined #ruby-lang
mybotsection has joined #ruby-lang
nisstyre has quit [Ping timeout: 260 seconds]
mistym has quit [Ping timeout: 264 seconds]
daikan has joined #ruby-lang
mybotsection has left #ruby-lang [#ruby-lang]
<r0bgleeson> hey Lewix
heftig has quit [Ping timeout: 272 seconds]
alagujeeva has joined #ruby-lang
heftig has joined #ruby-lang
nisstyre has joined #ruby-lang
daikan has quit [Ping timeout: 264 seconds]
fijimunkii has quit [Ping timeout: 252 seconds]
fijimunkii has joined #ruby-lang
alagujeeva has quit []
bzalasky has joined #ruby-lang
dragonkh has joined #ruby-lang
bzalasky has quit []
<Lewix> r0bgleeson: howdy
dragonnkh has quit [Ping timeout: 276 seconds]
<centrx> nice
imjacobclark has joined #ruby-lang
<Lewix> line 125
<Lewix> im not sure where the blank lines in the output are coming from
<centrx> you have a bunch of new lines before and after the print?
<Lewix> centrx: its only specific to line 124 and 126
<Lewix> i mean the blank lines are between those two
imjacobclark has quit [Ping timeout: 264 seconds]
fijimunkii has quit [Ping timeout: 252 seconds]
marcofernandez has quit [Ping timeout: 246 seconds]
<centrx> Lewix, Hard to say, I doubt that is caused by changing to use define_method
<Lewix> centrx: yea i had it before
lfox has quit [Quit: ZZZzzz…]
fijimunkii has joined #ruby-lang
<centrx> Lewix, It must be from format_show, if the space between show_unique_customers and show_customers_with_gas is really different than the space between show_customers_with_gas and show_customers_with_electricity
ahmedelgabri has quit [Remote host closed the connection]
<Lewix> centrx: sorry the space is between show_all_data and show_unique_customers
<centrx> :(
yatish27 has quit [Remote host closed the connection]
yatish27 has joined #ruby-lang
<centrx> Lewix, I bet there are customers with no data, but the puts still outputs a new line for them
nisstyre has quit [Quit: Leaving]
ridget has joined #ruby-lang
fijimunkii has quit [Read error: Connection reset by peer]
<centrx> Lewix, I would do it this way: https://gist.github.com/anonymous/8501384
<centrx> The outer unless foo.empty? you have does nothing, because [].map does nothing
<centrx> mapping an empty array is already "skipped"
<centrx> in the outer loop, but in the inner loop, the puts outputs anyway, which is an empty new line
yatish27 has quit [Remote host closed the connection]
yatish27 has joined #ruby-lang
fijimunkii has joined #ruby-lang
francisfish has joined #ruby-lang
tbuehlmann has joined #ruby-lang
amerine has quit [Quit: Textual IRC Client: www.textualapp.com]
thmzlt has joined #ruby-lang
yatish27 has quit [Remote host closed the connection]
yatish27 has joined #ruby-lang
francisfish has quit [Ping timeout: 252 seconds]
thmzlt has quit [Ping timeout: 272 seconds]
<Lewix> centrx: I thought that I was checking foo.empty? - and if it was false foo.map {} wouldn't even be called
<centrx> The puts is called
deens has joined #ruby-lang
<Lewix> centrx: seems like i forgot the ending bracket - im surprised the interpreter didn't catch that
<Lewix> centrx: grr never mind what i just said
deens has quit [Ping timeout: 265 seconds]
<Lewix> centrx: why did you think puts was called
<Lewix> centrx: i believe it's working exactly as the code you suggested (which is better by the way - thanks)
<centrx> You were checking foo.empty? not customer.data.empty?
<Lewix> foo.map {|customer| puts customer.data.map { |item| item.to_s.center output_size}.join'|'} unless foo.empty?
<Lewix> centrx: same result though - both ways work
diegoviola has quit [Ping timeout: 252 seconds]
<Lewix> if foo is not empty customer.data won't be - your way is more precise
<centrx> No, foo can have customers which have no data
<centrx> customer.data can still be empty if foo is not empty
<Lewix> centrx: how?
<centrx> customer is an element of foo
<centrx> customer has its own attributes
<Lewix> centrx: the way my struct is build wont allow it
<centrx> okay
amerine has joined #ruby-lang
<Lewix> centrx: i take back what i said :)
<Lewix> centrx: thanks
<centrx> I have to go
<Lewix> centrx: i think it's even better to check customer.empty? instead od customer.data?
daikan has joined #ruby-lang
<Lewix> s/od/of
<centrx> Okay
<Lewix> centrx: what do you think
<centrx> but if customer were empty in your (test) data, customer.data would throw an error
<Lewix> centrx: that's why i wanna check that it's not empty
<centrx> I think that Struct does not have an empty? method
amclain has quit [Quit: Leaving]
<Lewix> centrx: ah i think too much, i think thats fine
bjh13 has quit [Quit: leaving]
<Lewix> centrx: thanks for the suggestion. it's a big improvement
<centrx> Glad to be of help
<Lewix> centrx: but apparently it wasn
<centrx> Good night
centrx has quit [Quit: Leaving]
<Lewix> wasn't related to the bad output
<Lewix> night ;)
daikan has quit [Ping timeout: 260 seconds]
rue|w has joined #ruby-lang
Onixs_ has joined #ruby-lang
jonahoffline has joined #ruby-lang
jonahoffline has quit [Client Quit]
charlies_ has joined #ruby-lang
ged_ has joined #ruby-lang
csaunders_ has joined #ruby-lang
yorickpeterse1 has joined #ruby-lang
csaunders has quit [Ping timeout: 264 seconds]
rue_XIW has quit [Ping timeout: 264 seconds]
zastern has quit [Ping timeout: 264 seconds]
sluukkonen has quit [Ping timeout: 264 seconds]
tubbo has quit [Ping timeout: 264 seconds]
LanceHaig has quit [Ping timeout: 264 seconds]
fijimunkii has quit [Ping timeout: 264 seconds]
Onixs has quit [Ping timeout: 264 seconds]
yorickpeterse has quit [Ping timeout: 264 seconds]
igalic has quit [Ping timeout: 264 seconds]
lucas has quit [Ping timeout: 264 seconds]
ged has quit [Ping timeout: 264 seconds]
dumfries has quit [Ping timeout: 264 seconds]
error404 has quit [Ping timeout: 264 seconds]
Joni_79 has quit [Ping timeout: 264 seconds]
error404_ has joined #ruby-lang
charliesome has quit [Ping timeout: 264 seconds]
jonahR has quit [Ping timeout: 264 seconds]
supyo has quit [Ping timeout: 264 seconds]
tubbo` has joined #ruby-lang
dumfries has joined #ruby-lang
ahmedelgabri has joined #ruby-lang
fijimunkii has joined #ruby-lang
igalic has joined #ruby-lang
igalic has quit [Changing host]
igalic has joined #ruby-lang
zastern has joined #ruby-lang
lucas has joined #ruby-lang
Joni_79 has joined #ruby-lang
supyo has joined #ruby-lang
sluukkonen has joined #ruby-lang
Xuisce has quit [Quit: adios Amigos]
Olipro has quit [Ping timeout: 246 seconds]
AKASkip has joined #ruby-lang
Olipro has joined #ruby-lang
imjacobclark has joined #ruby-lang
imjacobclark has quit [Ping timeout: 272 seconds]
Elico has quit [Quit: Elico]
fijimunkii has quit [Read error: Connection reset by peer]
yatish27 has quit [Remote host closed the connection]
rippa has joined #ruby-lang
thmzlt has joined #ruby-lang
hahuang61 has joined #ruby-lang
vlad_starkov has joined #ruby-lang
thmzlt has quit [Ping timeout: 248 seconds]
hahuang61 has quit [Ping timeout: 264 seconds]
vlad_starkov has quit [Ping timeout: 252 seconds]
yatish27 has joined #ruby-lang
yatish27 has quit [Remote host closed the connection]
yatish27 has joined #ruby-lang
mistym has joined #ruby-lang
ahmedelgabri has quit [Remote host closed the connection]
yatish27_ has joined #ruby-lang
yatish27 has quit [Read error: Connection reset by peer]
mistym has quit [Ping timeout: 264 seconds]
r0bgleeson has quit [Ping timeout: 272 seconds]
daikan has joined #ruby-lang
daikan has quit [Read error: Connection reset by peer]
daikan has joined #ruby-lang
daikan has quit [Ping timeout: 260 seconds]
stonerfish has joined #ruby-lang
AKASkip has quit [Ping timeout: 252 seconds]
imjacobclark has joined #ruby-lang
imjacobclark has quit [Read error: Operation timed out]
marcofernandez has joined #ruby-lang
lsegal has joined #ruby-lang
elia has quit [Quit: Computer has gone to sleep.]
andschwa has joined #ruby-lang
elia has joined #ruby-lang
andschwa has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
francisfish has joined #ruby-lang
mistym has joined #ruby-lang
andschwa has joined #ruby-lang
relix has joined #ruby-lang
thmzlt has joined #ruby-lang
vlad_starkov has joined #ruby-lang
francisfish has quit [Ping timeout: 252 seconds]
vlad_starkov has quit [Read error: Connection reset by peer]
thmzlt has quit [Ping timeout: 246 seconds]
ender_ has quit [Ping timeout: 260 seconds]
yatish27_ has quit [Remote host closed the connection]
yatish27 has joined #ruby-lang
stonerfish has quit [Quit: Leaving.]
yatish27 has quit [Ping timeout: 272 seconds]
daikan has joined #ruby-lang
GarethAdams has quit [Ping timeout: 252 seconds]
yatish27 has joined #ruby-lang
|jemc| has quit [Ping timeout: 252 seconds]
yatish27 has quit [Remote host closed the connection]
yatish27 has joined #ruby-lang
tsou has quit [Quit: off]
daikan has quit [Ping timeout: 252 seconds]
GarethAdams has joined #ruby-lang
yatish27 has quit [Ping timeout: 264 seconds]
phansch has joined #ruby-lang
huma has joined #ruby-lang
yatish27 has joined #ruby-lang
imjacobclark has joined #ruby-lang
yatish27 has quit [Remote host closed the connection]
yatish27 has joined #ruby-lang
benanne has joined #ruby-lang
imjacobclark has quit [Ping timeout: 265 seconds]
yatish27 has quit [Ping timeout: 252 seconds]
wallerdev has quit [Quit: wallerdev]
Wardrop has joined #ruby-lang
<Wardrop> Eager to hear what some of you think about this feature suggestion for Ruby: https://bugs.ruby-lang.org/issues/9428
JasmeetQA has joined #ruby-lang
JasmeetQA has left #ruby-lang [#ruby-lang]
yatish27 has joined #ruby-lang
yatish27 has quit [Remote host closed the connection]
yatish27 has joined #ruby-lang
mistym has quit [Remote host closed the connection]
yatish27 has quit [Ping timeout: 272 seconds]
apeiros has quit [Read error: Connection reset by peer]
hahuang61 has joined #ruby-lang
apeiros has joined #ruby-lang
thmzlt has joined #ruby-lang
cnivolle has joined #ruby-lang
thmzlt has quit [Ping timeout: 260 seconds]
lsegal has quit [Quit: Quit: Quit: Quit: Stack Overflow.]
hahuang61 has quit [Ping timeout: 276 seconds]
yatish27 has joined #ruby-lang
yatish27 has quit [Remote host closed the connection]
cnivolle has quit [Remote host closed the connection]
marr has joined #ruby-lang
<hopkins83> Would you guys like to see this:
<hopkins83> rvm latest --ruby latest --gemset myapp
<hopkins83> instead of this?
<hopkins83> echo "insecure" > .curlrc && curl -L https://get.rvm.io | bash && source .rvm/scripts/rvm && rvm install 2.0.0-p353 && rvm use 2.0.0-p353 && rvm gemset create myapp && rvm use ruby-2.0.0-p353@myapp --default
<Wardrop> I much prefer the later example
<hopkins83> :(
<apeiros> hopkins83: huh? the second one also install rvm, the first one doesn't, no?
<Wardrop> Of course everyone would prefer the first example. Does it need to be asked :)
<hopkins83> apeiros: The first one is just a dream. I feel that rvm's existence is threatened by chruby. Maybe if rvm were to radically simplify its UI, it'd have a greater chance of survival.
<hopkins83> Wardrop: Hehe thanks man :)
<apeiros> hopkins83: I understood, that the first is an idea. but your second line is obviously something that works already.
<apeiros> hopkins83: and I'd assume that the idea and the reality are supposed to do the same thing
<whitequark> yorickpeterse1: "I'm on github" ?
<whitequark> also yes, that's going to happen Real Soon™
daikan has joined #ruby-lang
<apeiros> hopkins83: but the reality one installs rvm - and I don't see how you could install rvm, by using the rvm command - which isn't on the system before installing it…
kith has joined #ruby-lang
yatish27 has joined #ruby-lang
yatish27 has quit [Remote host closed the connection]
yatish27 has joined #ruby-lang
<hopkins83> apeiros: Good point
<hopkins83> apeiros: Spoke to the author though, seems simpler commands are coming for rvm2
daikan has quit [Ping timeout: 272 seconds]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
quizzicol has quit [Quit: Leaving.]
yatish27 has quit [Ping timeout: 260 seconds]
JoshuaPaling has joined #ruby-lang
r0bgleeson has joined #ruby-lang
yatish27 has joined #ruby-lang
imjacobclark has joined #ruby-lang
yatish27 has quit [Remote host closed the connection]
ahmedelgabri has joined #ruby-lang
yatish27 has joined #ruby-lang
r0bgleeson has quit [Ping timeout: 248 seconds]
imjacobclark has quit [Ping timeout: 272 seconds]
yatish27 has quit [Ping timeout: 272 seconds]
<hopkins83> Wouldn't it be great if rvm2 could be as simple as this? https://gist.github.com/kakekake89/8503118
marr has quit [Ping timeout: 246 seconds]
marcofernandez has quit [Quit: 전 이만 갑니다.]
<whitequark> or if there was no rvm2. we have bundler now, no need for gemsets
<tbuehlmann> also, chruby++
<hopkins83> whitequark: rvm is obsolete then?
<hopkins83> tbuehlmann: Yeah I was hoping rvm could simplify itself a little so it can take up the fight against chruby :)
<hopkins83> tbuehlmann: So you too are saying rvm is obsolete?
<apeiros> dunno, I never found rvm to be complex
<apeiros> rvm install 2.1 # about as simple as it can get
<hopkins83> apeiros: Me neither, just a bit noisy. Expecting a lot of user input just to get it up and running.
<apeiros> hopkins83: hu?
<hopkins83> apeiros: Yeah but there's a lot of stuff you gotta type before and after rvm install 2.1.
<whitequark> hopkins83: I do think so
<apeiros> hopkins83: `\curl -sSL https://get.rvm.io | bash -s stable`
<apeiros> that's not "a lot"
yatish27 has joined #ruby-lang
<hopkins83> apeiros: Well you gotta refresh the shell
<hopkins83> apeiros: Make that Ruby the default one
<apeiros> rvm install 2.1 --default
<apeiros> don't remember having to refresh the shell, but maybe
<hopkins83> Yeah that's a nice shortcut.
<hopkins83> But still the user shouldn't have to do all that. Imo it would be great if rvm could do all that.
<apeiros> what's "all that"?
<apeiros> you sound as if there was tons of things to do. I don't see those tons of things.
yatish27 has quit [Remote host closed the connection]
<hopkins83> Forcing the user to involve curl and bash, setting defaults, refreshing the shell
<hopkins83> No they're not tons of things
daikan has joined #ruby-lang
imjacobclark has joined #ruby-lang
<toretore> you still on about this
<apeiros> hopkins83: I didn't see how you made installing rvm itself simpler
<apeiros> hopkins83: I mean your fantasy of `rvm latest` can't possibly work, since rvm isn't there when you want to install it…
<hopkins83> apeiros: Still working on that :)
<hopkins83> theres gotta be a way.. hmmm
francisfish has joined #ruby-lang
<apeiros> hopkins83: and while yes, you could change the default of rvm install to assume --default, and require an explicit --no-default, I don't see how you can make `rvm install 2.1` any simpler without sacrificing clarity
thmzlt has joined #ruby-lang
<toretore> somebody has yet to have their day ruined by automagic i see
yatish27 has joined #ruby-lang
quizzicol has joined #ruby-lang
tbuehlmann has quit [Ping timeout: 252 seconds]
<apeiros> I could also imagine using `latest[ engine]` as a value to install the lastest ruby version. funny enough, that's longer than just 2.1 :)
<apeiros> e.g.: `rvm install latest`, `rvm install latest jruby`
VTLob has joined #ruby-lang
imjacobclark has quit [Remote host closed the connection]
quizzicol has quit [Ping timeout: 252 seconds]
MrZYX|off is now known as MrZYX
mucker has joined #ruby-lang
Lewix has quit [Remote host closed the connection]
AKASkip has joined #ruby-lang
yatish27 has quit [Remote host closed the connection]
yfeldblum has quit [Ping timeout: 252 seconds]
yatish27 has joined #ruby-lang
yatish27 has quit [Remote host closed the connection]
yatish27 has joined #ruby-lang
abf has quit [Quit: Leaving]
ahmedelgabri has quit [Remote host closed the connection]
quizzicol has joined #ruby-lang
<apeiros> hopkins83: one thing I could imagine being improved:
<apeiros> $ cd somedir
<apeiros> ruby-1.9.3-p362 is not installed.
<apeiros> To install do: 'rvm install ruby-1.9.3-p362'
<apeiros> this could be changed to: "ruby-1.9.3-p362 is not installed. Install now? [yN]"
<hopkins83> Yeah definitely prettier :)
<hopkins83> maybe drop by #rvm and tell it to mpapis?
<apeiros> being ahead of you ;-)
mehlah has joined #ruby-lang
<hopkins83> lol
Wardrop has quit [Quit: Wardrop]
Mon_Ouie has quit [Ping timeout: 272 seconds]
daikan has quit [Remote host closed the connection]
sidormih has joined #ruby-lang
sidormih has left #ruby-lang [#ruby-lang]
arBmind has joined #ruby-lang
yorickpeterse1 has quit [Quit: The NSA took my baby]
yorickpeterse has joined #ruby-lang
mbj has joined #ruby-lang
ahmedelgabri has joined #ruby-lang
knu has quit [Ping timeout: 252 seconds]
daikan has joined #ruby-lang
mistym has joined #ruby-lang
ridget has quit [Quit: Textual IRC Client: www.textualapp.com]
mistym has quit [Ping timeout: 272 seconds]
Johz has joined #ruby-lang
daikan has quit [Remote host closed the connection]
rahul_j has quit [Quit: rahul_j]
rahul_j has joined #ruby-lang
knu has joined #ruby-lang
benlovell has joined #ruby-lang
yfeldblum has joined #ruby-lang
quizzicol has quit [Quit: Leaving.]
wolfsoul has joined #ruby-lang
yfeldblum has quit [Ping timeout: 272 seconds]
imjacobclark has joined #ruby-lang
imjacobclark has quit [Ping timeout: 260 seconds]
wolfsoul has quit [Quit: Leaving]
JoshuaPaling has quit [Quit: Textual IRC Client: www.textualapp.com]
rahul_j has quit [Quit: rahul_j]
rahul_j has joined #ruby-lang
DouweM has joined #ruby-lang
mbj has quit [Ping timeout: 246 seconds]
setmeaway has joined #ruby-lang
DouweM has quit [Ping timeout: 252 seconds]
DouweM has joined #ruby-lang
quizzicol has joined #ruby-lang
vinhbachsy has joined #ruby-lang
vinhbachsy has quit [Client Quit]
bin7me has joined #ruby-lang
quizzicol has quit [Ping timeout: 252 seconds]
symm- has joined #ruby-lang
mbj has joined #ruby-lang
MartynKeigher has quit [Quit: Bye for now!]
daikan has joined #ruby-lang
daikan has quit [Ping timeout: 272 seconds]
caral has joined #ruby-lang
shinnya has joined #ruby-lang
elia has quit [Quit: Computer has gone to sleep.]
Paradox has quit [Ping timeout: 245 seconds]
quizzicol has joined #ruby-lang
yfeldblum has joined #ruby-lang
Paradox has joined #ruby-lang
MartynKeigher has joined #ruby-lang
yfeldblum has quit [Ping timeout: 260 seconds]
imjacobclark has joined #ruby-lang
hackndoes has joined #ruby-lang
imjacobclark has quit [Ping timeout: 265 seconds]
vlad_starkov has joined #ruby-lang
vlad_starkov has quit [Remote host closed the connection]
quizzicol has quit [Ping timeout: 260 seconds]
vlad_starkov has joined #ruby-lang
thmzlt has quit []
imjacobclark has joined #ruby-lang
rahul_j has quit [Quit: rahul_j]
Lewix has joined #ruby-lang
stac_ has joined #ruby-lang
stac_ has quit [Client Quit]
stac_ has joined #ruby-lang
huma has quit [Ping timeout: 265 seconds]
Johz has quit [Quit: Leaving]
stac_ has left #ruby-lang [#ruby-lang]
stac47 has joined #ruby-lang
yatish27 has quit [Remote host closed the connection]
stac47 has left #ruby-lang [#ruby-lang]
yatish27 has joined #ruby-lang
yatish27_ has joined #ruby-lang
yatish27 has quit [Ping timeout: 246 seconds]
yfeldblum has joined #ruby-lang
stac47 has joined #ruby-lang
yatish27_ has quit [Remote host closed the connection]
stac47 has left #ruby-lang [#ruby-lang]
yatish27 has joined #ruby-lang
yfeldblum has quit [Ping timeout: 252 seconds]
yatish27 has quit [Ping timeout: 272 seconds]
mistym has joined #ruby-lang
stac47 has joined #ruby-lang
<stac47> Hello
<stac47> Hope everybody is fine
daikan has joined #ruby-lang
<stac47> I have a question regarding curses
<stac47> If I don't write "include Curses", curses is not working (for instance, clearing the screen fails) although when I include it it works
quizzicol has joined #ruby-lang
mistym has quit [Ping timeout: 246 seconds]
<stac47> I wonder if this a normal behaviour by the way
<MrZYX> include includes a Module into a class/object, even the top level scope in ruby is an object
quizzicol has quit [Read error: Connection reset by peer]
quizzicol1 has joined #ruby-lang
<apeiros> stac47: your description is vague. what does 'fails' mean?
ahmedelg_ has joined #ruby-lang
<apeiros> do you get an exception? does it just not clear the screen? anything else?
yatish27 has joined #ruby-lang
ahmedelgabri has quit [Ping timeout: 246 seconds]
<stac47> yep
<stac47> there is no error
<stac47> the screen is simply not cleared
<apeiros> that sounds odd and unexpected
<stac47> you can take the sample "hello.rb", remove the include and add Curses. infront of each curses methods
ahmedelg_ has quit [Ping timeout: 272 seconds]
<stac47> I am using ruby 2.1.0 and installed the curses gem
<stac47> installation is ok
yatish27 has quit [Remote host closed the connection]
shinnya has quit [Ping timeout: 248 seconds]
yatish27 has joined #ruby-lang
heftig has quit [Ping timeout: 245 seconds]
heftig has joined #ruby-lang
benlovell has quit [Ping timeout: 260 seconds]
PaulePanter has quit [Quit: leaving]
PaulePanter has joined #ruby-lang
kurko_ has joined #ruby-lang
yatish27 has quit [Remote host closed the connection]
yatish27 has joined #ruby-lang
rippa has joined #ruby-lang
prc has joined #ruby-lang
vlad_sta_ has joined #ruby-lang
pabloh has joined #ruby-lang
yatish27 has quit [Remote host closed the connection]
yatish27 has joined #ruby-lang
vlad_starkov has quit [Ping timeout: 260 seconds]
yatish27 has quit [Remote host closed the connection]
yatish27 has joined #ruby-lang
phansch has quit [Remote host closed the connection]
enebo has joined #ruby-lang
hackndoes has quit [Remote host closed the connection]
phansch has joined #ruby-lang
<Lewix> when the method select on an array takes two arguments, what is the second argument
sepp2k has joined #ruby-lang
yatish27 has quit [Remote host closed the connection]
yatish27 has joined #ruby-lang
<MrZYX> Let's look it up!
<MrZYX> don't see it taking an argument at all...
DEac- has quit [Read error: Connection reset by peer]
yfeldblum has joined #ruby-lang
<Lewix> >> [[1, "a"], [1, "d"], [3, "c"], [2, "b"]].select { |c, _| c > 1}
<eval-in> Lewix => [[3, "c"], [2, "b"]] (https://eval.in/91745)
yatish27 has quit [Remote host closed the connection]
yatish27 has joined #ruby-lang
<hopkins83> Hey Lewix :)
<MrZYX> that's two parameters in the block passed to select
<MrZYX> and what you see here is array decomposition at work
<Lewix> MrZYX: sorry that's what I meant
<MrZYX> it's basically the same as a, b = ["a", "b"]
<Lewix> hopkins83: hello there
<hopkins83> Lewix: Thanks for last time!
<hopkins83> Lewix: I remember you helped me with some stuff a while back.
<MrZYX> select iterates over the outer array, passing each inner array to the block
<MrZYX> that decomposes the two element arrays, writing the first element into c and ignoring the second one (calling a variable _ says I don't care about it)
r0bgleeson has joined #ruby-lang
<MrZYX> so it's a feature of how blocks work, not how select works
<Lewix> MrZYX: beautiful explanation
<Lewix> hopkins83: anytime
yfeldblum has quit [Ping timeout: 248 seconds]
<Lewix> MrZYX: thanks
<MrZYX> yw
johnmilton has joined #ruby-lang
<MrZYX> Lewix: it can get a lot more complex than that, if you want to dig deeper google array decomposition
<Lewix> MrZYX: I'll pass. I tend to go in the rabbit hole a lot - I was just on my way out of it
<hopkins83> lol
* hopkins83 is on his way to only using his computer /smartphone during weekends :P
metalbot has joined #ruby-lang
yatish27 has quit [Remote host closed the connection]
yatish27 has joined #ruby-lang
<Lewix> hopkins83: what else did you use before
<Lewix> MrZYX: https://gist.github.com/6ewis/8a22b91758e06511b666 - in this example, on line 4, reverse is not needed right?
hahuang61 has joined #ruby-lang
<hopkins83> Lewix: i cant remember :)
<Lewix> MrZYX: I saw it online, i believe it's a mistake
<MrZYX> it'd make sense if you sort_by {|count,_| count }, then it'll make the difference between being sorted by count ascending or descending
<Lewix> why sort then reverse
yatish27 has quit [Remote host closed the connection]
yatish27 has joined #ruby-lang
<Lewix> MrZYX: sort_by {|count,_| count} and sort yield the same result in this instance
hahuang61 has quit [Ping timeout: 245 seconds]
<MrZYX> hm, okay I wasn't sure on the behavior of Array#<=>
prc has quit [Ping timeout: 264 seconds]
<MrZYX> so it's making sure it's sorted by count descending
ahmedelgabri has joined #ruby-lang
<Lewix> MrZYX: ascending
<MrZYX> sort is ascending, sort.reverse is descending
kurko_ has quit [Quit: Computer has gone to sleep.]
<Lewix> MrZYX: ah you're right, I assumed it that reverse would sort then reverse
<Lewix> s/it/" "
<MrZYX> it does
<MrZYX> >> Array.new(5) {[rand(10), rand(10)] }.sort
<eval-in> MrZYX => [[2, 0], [6, 3], [6, 3], [6, 3], [9, 0]] (https://eval.in/91775)
<MrZYX> >> Array.new(5) {[rand(10), rand(10)] }.sort.reverse
<eval-in> MrZYX => [[8, 8], [6, 1], [3, 7], [2, 0], [0, 2]] (https://eval.in/91776)
<Lewix> >> [1,3,2].reverse
<eval-in> Lewix => [2, 3, 1] (https://eval.in/91777)
<Lewix> >> [1,3,2].sort.reverse
<eval-in> Lewix => [3, 2, 1] (https://eval.in/91779)
<MrZYX> ah you meant reverse would sort
<Lewix> yup
<MrZYX> sorry misunderstood that :)
<Lewix> that's why i thought it wasn't needed
<Lewix> but I was wrong
ahmedelgabri has quit [Remote host closed the connection]
ahmedelgabri has joined #ruby-lang
vlad_sta_ has quit [Remote host closed the connection]
ahmedelgabri has quit [Ping timeout: 252 seconds]
daikan has quit [Remote host closed the connection]
benanne has quit [Quit: kbai]
daikan has joined #ruby-lang
benanne has joined #ruby-lang
danijoo has quit [Read error: Connection reset by peer]
danijoo has joined #ruby-lang
vlad_starkov has joined #ruby-lang
sandbags has joined #ruby-lang
yatish27 has quit [Remote host closed the connection]
yatish27 has joined #ruby-lang
mistym has joined #ruby-lang
ahmedelgabri has joined #ruby-lang
<apeiros> luckily, reverse only does what it advertises to do: reverse the order :)
prc has joined #ruby-lang
mistym has quit [Ping timeout: 248 seconds]
ender_ has joined #ruby-lang
spuk has quit [Ping timeout: 260 seconds]
ender__ has joined #ruby-lang
ahmedelgabri has quit [Ping timeout: 252 seconds]
ahmedelgabri has joined #ruby-lang
Elico has joined #ruby-lang
ender_ has quit [Ping timeout: 272 seconds]
kurko_ has joined #ruby-lang
ahmedelg_ has joined #ruby-lang
albertgrala has joined #ruby-lang
AKASkip has quit [Ping timeout: 272 seconds]
ahmedelgabri has quit [Ping timeout: 252 seconds]
daikan has quit [Remote host closed the connection]
tkuchiki has quit [Remote host closed the connection]
tkuchiki has joined #ruby-lang
tkuchiki has quit [Ping timeout: 272 seconds]
rahul_j has joined #ruby-lang
Onixs_ has quit [Read error: Connection reset by peer]
albertgrala has quit [Quit: Leaving]
spuk has joined #ruby-lang
Onixs has joined #ruby-lang
DEac- has joined #ruby-lang
elia has joined #ruby-lang
TheMoonMaster has quit [Excess Flood]
huma has joined #ruby-lang
TheMoonMaster has joined #ruby-lang
vlad_starkov has quit [Remote host closed the connection]
vlad_starkov has joined #ruby-lang
<apeiros> whitequark: that espruino thing - is that a bad joke? :)
<whitequark> apeiros: no. the author even wrote me re: foundry, and, iirc, insisted his project can and should be used for production
<whitequark> I mean, it's a nice toy, but to think you should use this for serious work requires some impressive amount of self-delusion.
camilleldn has joined #ruby-lang
<apeiros> with 8KB of ram, it could have a max. of 200 objects
<whitequark> don't forget how arrays and objects use *two* cells per element
<apeiros> ruby -e 'p ObjectSpace.count_objects[:TOTAL]' # -> 28533
<apeiros> yeah, linked lists are not arrays…
atmosx has joined #ruby-lang
<apeiros> I find it appalling that people abuse terms like that. if it's a linked list, call it a linked list.
<whitequark> it's just actively harmful in this case, JS code assumes arrays
<apeiros> oh I see. haven't read the about. it's a JS interpreter… I see…
<apeiros> IMO could do a lot better than 20byte/O
<apeiros> I mean JS has very few real basic object types
pmarsceill has joined #ruby-lang
phansch_ has joined #ruby-lang
<whitequark> it's a source interpreter even. comments inside functions make it slower (!!!)
phansch has quit [Read error: Connection reset by peer]
camilleldn has quit [Remote host closed the connection]
<apeiros> whitequark: curious, can LLVM be used for such small systems?
benanne has quit [Quit: kbai]
camilleldn has joined #ruby-lang
<whitequark> apeiros: define "used". as a JIT? hell no, statically built LLVM+ARM backend is somewhere around 120MB of executable code
pmarsceill has quit [Read error: Connection reset by peer]
pmarscei_ has joined #ruby-lang
<whitequark> well, maybe half of that if you do a release build
<whitequark> not to think of how horribly slow and bloated it is for a JIT compiler
<apeiros> oh
setmeaway has quit [Quit: Leaving]
<apeiros> that's a scary size for such a system
<whitequark> there's much better options for jitting. say luajit
<whitequark> but practical applicaiton of luajit still requires ~32MB of RAM (see tessel.io... the problem they solved is horrible, but they did solve it nicely)
setmeaway has joined #ruby-lang
<apeiros> llvm can also generate binaries, no?
<whitequark> sure, in this case it's already used
<apeiros> or is it another tool which can compile llvm bytecode to a binary?
phansch_ is now known as phansch
<whitequark> when you use clang or rust or ... to build code for an embedded system
<whitequark> llvm includes such a tool... llc
<apeiros> ok. so those reach a reasonably small size then?
<Lewix> How do you balance short method name with making sense what the method does
<whitequark> it depends on the source language then
<apeiros> Lewix: I don't
<whitequark> for example microcontrollers have been programmed in C for decades
<apeiros> Lewix: I go with the long name and shit on people who fail to use a proper editor with tab completion
<Lewix> How do you balance short method names with making sense of what the method does
<whitequark> sure, clang would be as capable of that as other C compilers... sometimes better
camilleldn has quit [Remote host closed the connection]
<Lewix> apeiros: i like this idea better
<apeiros> a lot of what the method does should be evident from context, though (class name, e.g.)
r0nin has joined #ruby-lang
<apeiros> whitequark: have you played with emscripten?
<whitequark> apeiros: somewhat
<apeiros> enough to have an opinion on it? :)
<whitequark> emscripten is fine if you have a truckload of legacy code you need to have running NOW
<whitequark> e.g. something like scummvm with lots of C-dependent, tricky simulation code, and SDL output
<whitequark> but it's really a last-resort tool more useful for prototypes and digital archiving than something you'd actually want (as opposed to have) to use.
<apeiros> hm, and with new code, which targets llvm?
<whitequark> you can technically compile new code with emscripten, but think about this:
<apeiros> i.e., if you already have something which emits llvm bytecode
<whitequark> how do you interact with outside world? remember, there's no DOM inside emscripten
<whitequark> there's a fake filesystem and you can kinda execute calls, except you need to manually handle ABI wrapping and basically work on a level *lower than C*
<whitequark> *execute functions
<apeiros> hm
<whitequark> now, how do you debug emscripten-generated code? right, you don't
EngierkO has joined #ruby-lang
<apeiros> hmmm
<apeiros> I see
<apeiros> can't/doesn't it use the same hooks for debugging which have been created for coffee script?
|jemc| has joined #ruby-lang
<apeiros> called codemapping or something like that, don't remember
EngierkO has quit [Read error: Connection reset by peer]
<whitequark> no
EngierkO has joined #ruby-lang
<whitequark> source maps assume there's a nearly 1:1 correspondence between generated code and source
<whitequark> perhaps some expressions reshuffled around
<apeiros> ok, so not feasible
<whitequark> with emscripten, you have a truckload of very complex optimizations by LLVM, combined with an emulated x86-like environment inside JS
<whitequark> debuggers or VMs have absolutely no idea about most of that. in theory you could write emscripten-gdb, but afaik no such thing exists
<whitequark> it would be miserable either way
<apeiros> I understand. thanks :)
<whitequark> also think about this: optimized builds result in tens or hundreds of megabytes of JS sources. now imagine actually loading a debug build in the browser.
EngierkO_ has joined #ruby-lang
<whitequark> it'll burst and send the streams of bits gushing all around
<apeiros> aaahaha, ouch, yes
<apeiros> user will burst out in tears and hit cancel :D
<whitequark> kill -9 more likely
nisstyre has joined #ruby-lang
EngierkO has quit [Ping timeout: 265 seconds]
<whitequark> chromium used to hang very hard when you simply tried to look at 1MB of text in a single line
<apeiros> ^^
camilleldn has joined #ruby-lang
<apeiros> whitequark: what about asm.js?
<whitequark> apeiros: asm.js = pattern-matching javascript code inside firefox
<whitequark> er, pattern-matching emscripten-generated
EngierkO_ has quit [Ping timeout: 248 seconds]
<whitequark> outside of that tiniest domain it's useless
<apeiros> I thought more of code explicitly targeting asm.js
EngierkO has joined #ruby-lang
<whitequark> that still applies
<whitequark> asm.js is a formalization of the code emscripten generates
<whitequark> code patterns
<whitequark> you'd need to be in the same domain as emscripten to use asm.js
<whitequark> also, v8 manages to squeeze out comparable performance without looking at "use asm" and without forbidding you to use DOM and other browser APIs
<apeiros> hm
<whitequark> I maintain an opinion that asm.js is useless and perhaps harmful in long run
<whitequark> this v8 engineer elaborates: http://mrale.ph/blog/2013/03/28/why-asmjs-bothers-me.html
benlovell has joined #ruby-lang
<apeiros> well, I thought the asm.js subset could potentially allow one to implement a more efficient VM for embedded systems. an embedded system doesn't have a DOM either anyway
camilleldn has quit [Remote host closed the connection]
<apeiros> i.e., js by not having anything but floats for numbers makes space efficient math difficult
EngierkO has quit [Read error: Connection reset by peer]
<apeiros> asm.js somewhat alleviates that
<whitequark> we already have such a target
<whitequark> it's called, surprise, machine code
<apeiros> but I just looked it up and it only offers 4byte ints
EngierkO has joined #ruby-lang
<whitequark> emscripten internally emulates something that looks very much like x86, well, you could say, a typical consumer-grade 32-bit processor
<apeiros> yeah, sure. but I think the point of "JS for embedded" interpreters is to provide access to embedded systems to a wider audience
<whitequark> see, asm.js is not JS in the slightest
<whitequark> none of the stuff you know about JS will help you if you have something that executes asm.js
<apeiros> and I'd think that it'd get a lot more feasible if one would not go for ECMAScript, but a subset. i.e., let it look mostly like JS, but have some ways to be more efficient.
<whitequark> "It can’t allocate normal JavaScript objects or access normal JavaScript properties. No JavaScript strings. Only arithmetic and typed arrays (a single one actually with multiple views). It can’t call arbitrary JavaScript functions, only those that you imported explicitly into your code, and it can only pass numbers into them and get a number out.
EngierkO has quit [Read error: Connection reset by peer]
<whitequark> Essentially OdinMonkey is a hammer that targets performance sweet spot that is narrower than anything we had before in JavaScript. It hits the spot perfectly but here is the catch, the first danger that I sense: OdinMonkey is a hammer that will kill incentive to optimize JavaScript that humans write."
camilleldn has joined #ruby-lang
<whitequark> there's no "js" in "asm.js"
EngierkO has joined #ruby-lang
<whitequark> and the "asm" part is ridiculous too, in that you actually need to optimize the code before it'll run any fast
<whitequark> and it doesn't even have an escape hatch or any link with the semantics of the underlying platform, which simply doesn't fly with embedded
camilleldn has quit [Remote host closed the connection]
charlies_ has quit [Ping timeout: 252 seconds]
charliesome has joined #ruby-lang
camilleldn has joined #ruby-lang
<apeiros> pretty damning
<whitequark> to me, it is absurd to watch people liking asm.js. they either have absolutely no idea on what it actually is, or happen to have a problem for which asm.js is a sweet spot, that is, a bunch of emscripten-generated code
<whitequark> even then it's not required to get good performance out of it, as v8 demonstrates
fijimunkii has joined #ruby-lang
kurko_ has quit [Quit: Computer has gone to sleep.]
<pipecloud> whitequark: That or they really do think JavaScript is close to the metal.
<whitequark> see "have absolutely no idea"
camilleldn has quit [Remote host closed the connection]
daikan has joined #ruby-lang
camilleldn has joined #ruby-lang
yfeldblum has joined #ruby-lang
daikan has quit [Ping timeout: 265 seconds]
yfeldblum has quit [Ping timeout: 272 seconds]
benlovell has quit [Ping timeout: 272 seconds]
mistym has joined #ruby-lang
camilleldn has quit [Remote host closed the connection]
jerrytgarcia has quit [Quit: WeeChat 0.4.2]
camilleldn has joined #ruby-lang
yatish27 has quit [Remote host closed the connection]
yatish27 has joined #ruby-lang
vlad_sta_ has joined #ruby-lang
vlad_sta_ has quit [Remote host closed the connection]
vlad_sta_ has joined #ruby-lang
mistym has quit [Ping timeout: 272 seconds]
benlovell has joined #ruby-lang
kurko_ has joined #ruby-lang
vlad_starkov has quit [Ping timeout: 260 seconds]
yatish27 has quit [Read error: Connection reset by peer]
elia has quit [Quit: Computer has gone to sleep.]
Barrin6 has joined #ruby-lang
camilleldn has quit [Remote host closed the connection]
deens has joined #ruby-lang
mistym has joined #ruby-lang
fijimunkii has quit [Ping timeout: 252 seconds]
simi has joined #ruby-lang
fijimunkii has joined #ruby-lang
zzak has quit [Ping timeout: 245 seconds]
deens has quit [Ping timeout: 272 seconds]
camilleldn has joined #ruby-lang
zzak has joined #ruby-lang
phansch has quit [Read error: Connection reset by peer]
mucker has quit [Ping timeout: 272 seconds]
AmericanJetStory has joined #ruby-lang
AmericanJetStory has quit [Client Quit]
phansch has joined #ruby-lang
CaptainJet has joined #ruby-lang
symm- has quit [Ping timeout: 260 seconds]
jtw has joined #ruby-lang
deens has joined #ruby-lang
pmarscei_ has quit []
camilleldn has quit [Remote host closed the connection]
spuk has quit [Read error: Connection reset by peer]
camilleldn has joined #ruby-lang
camilleldn has quit [Remote host closed the connection]
camilleldn has joined #ruby-lang
EngierkO has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
symm- has joined #ruby-lang
camilleldn has quit [Remote host closed the connection]
jerrytgarcia has joined #ruby-lang
camilleldn has joined #ruby-lang
seanlinsley has quit [Quit: …]
stac47 has left #ruby-lang [#ruby-lang]
EngierkO has joined #ruby-lang
EngierkO has quit [Read error: Connection reset by peer]
deens has quit [Remote host closed the connection]
seanlinsley has joined #ruby-lang
elia has joined #ruby-lang
benlovell has quit [Ping timeout: 252 seconds]
toretore has quit [Quit: This computer has gone to sleep]
rahul_j has quit [Quit: rahul_j]
spuk has joined #ruby-lang
deens has joined #ruby-lang
fijimunkii has quit [Read error: Connection reset by peer]
daikan has joined #ruby-lang
r0nin has quit [Remote host closed the connection]
mbj has quit [Read error: Operation timed out]
daikan has quit [Ping timeout: 272 seconds]
dorei has joined #ruby-lang
benlovell has joined #ruby-lang
camilleldn has quit [Remote host closed the connection]
camilleldn has joined #ruby-lang
yfeldblum has joined #ruby-lang
Austin__ has joined #ruby-lang
kurko_ has quit [Quit: Computer has gone to sleep.]
seanlinsley has quit [Quit: …]
seanlinsley has joined #ruby-lang
vlad_starkov has joined #ruby-lang
hahuang61 has joined #ruby-lang
vlad_sta_ has quit [Ping timeout: 246 seconds]
camilleldn has quit [Remote host closed the connection]
mbj has joined #ruby-lang
hahuang61 has quit [Ping timeout: 276 seconds]
camilleldn has joined #ruby-lang
bougyman has quit [Remote host closed the connection]
mykoweb has joined #ruby-lang
dorei has quit []
AKASkip has joined #ruby-lang
camilleldn has quit [Ping timeout: 248 seconds]
dorei has joined #ruby-lang
camilleldn has joined #ruby-lang
danijoo has quit [Read error: Connection reset by peer]
danijoo has joined #ruby-lang
enebo has quit [Quit: enebo]
Austin__ has quit [Ping timeout: 264 seconds]
cnivolle has joined #ruby-lang
xybre has joined #ruby-lang
xybre has quit [Quit: bbiab]
lsegal has joined #ruby-lang
bougyman has joined #ruby-lang
jtw has quit []
vlad_starkov has quit [Remote host closed the connection]
MrZYX is now known as MrZYX|off
vlad_starkov has joined #ruby-lang
MrZYX|off is now known as MrZYX
mistym_ has joined #ruby-lang
mistym has quit [Ping timeout: 252 seconds]
xybre has joined #ruby-lang
xybre has joined #ruby-lang
benlovell has quit [Ping timeout: 246 seconds]
Johz has joined #ruby-lang
camilleldn has quit [Remote host closed the connection]
pabloh has quit [Read error: Connection reset by peer]
camilleldn has joined #ruby-lang
prc has quit [Ping timeout: 272 seconds]
Lewix has quit [Remote host closed the connection]
deens has quit [Remote host closed the connection]
Lewix has joined #ruby-lang
Lewix has quit [Remote host closed the connection]
deens has joined #ruby-lang
dorei has quit []
camilleldn has quit [Remote host closed the connection]
daikan has joined #ruby-lang
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
Minimalist has joined #ruby-lang
Minimalist has quit [Client Quit]
Tech has joined #ruby-lang
daikan has quit [Ping timeout: 252 seconds]
Tech is now known as Guest48093
Minimalist has joined #ruby-lang
Minimalist has quit [Client Quit]
Guest48093 has quit [Client Quit]
dorei has joined #ruby-lang
tuttinator has joined #ruby-lang
sandbags has quit []
danijoo has quit [Read error: Connection reset by peer]
danijoo has joined #ruby-lang
<imjacobclark> Hi, can anybody take a look at my Rakefile and point me in a direction of an improved Rakefile... ha! (new to Ruby/Rake)
benanne has joined #ruby-lang
setmeaway has quit [Ping timeout: 272 seconds]
aleatorik has joined #ruby-lang
aleatorik has quit [Client Quit]
camilleldn has joined #ruby-lang
Lewix has joined #ruby-lang
camillel_ has joined #ruby-lang
camilleldn has quit [Ping timeout: 252 seconds]
ahmedelg_ has quit [Read error: Connection reset by peer]
<r0bgleeson> imjacobclark: if you paste the Rakefile sure
<r0bgleeson> imjacobclark: try https://gist.github.com
<imjacobclark> Ah sorry yes
<r0bgleeson> looks fine to me
<imjacobclark> Thanks :)!
<imjacobclark> New to Ruby, new to Rake, wasn't sure if the system() commands were recomended
vondruch has quit [Ping timeout: 248 seconds]
centrx has joined #ruby-lang
vondruch has joined #ruby-lang
<r0bgleeson> rake provides "sh" for that
<r0bgleeson> sh "bundle XX"
vondruch has quit [Client Quit]
<r0bgleeson> not really sure what the difference is to be honest
<r0bgleeson> sh(*cmd, &block)
<r0bgleeson> Run the system command cmd. If multiple arguments are given the command is not run with the shell (same semantics as Kernel::exec and Kernel::system).
<MrZYX> imjacobclark: doing require './app' is not so nice, if you can't setup your load path use require_relative
vlad_starkov has quit [Remote host closed the connection]
<imjacobclark> Thanks :)
daikan has joined #ruby-lang
simi has quit [Ping timeout: 272 seconds]
canton7 has quit [Remote host closed the connection]
canton7 has joined #ruby-lang
symm- has quit [Ping timeout: 260 seconds]
patriciomacadden has joined #ruby-lang
danijoo has quit [Read error: Connection reset by peer]
danijoo has joined #ruby-lang
patriciomacadden has quit [Client Quit]
patriciomacadden has joined #ruby-lang
yfeldblum has quit [Read error: Connection reset by peer]
prc has joined #ruby-lang
simi has joined #ruby-lang
nisstyre has quit [Quit: Leaving]
phansch has quit [Quit: Leaving]
symm- has joined #ruby-lang
bzalasky has joined #ruby-lang
elia has quit [Quit: Computer has gone to sleep.]
canton7 has quit [Remote host closed the connection]
kurko_ has joined #ruby-lang
canton7 has joined #ruby-lang
camilleldn has joined #ruby-lang
dorei has quit []
jtw has joined #ruby-lang
camillel_ has quit [Ping timeout: 252 seconds]
jtw has quit []
dorei has joined #ruby-lang
x0f has joined #ruby-lang
x0f_ has quit [Read error: Operation timed out]
jtw has joined #ruby-lang
deens has quit [Remote host closed the connection]
knu has quit [Ping timeout: 252 seconds]
nisstyre has joined #ruby-lang
kurko__ has joined #ruby-lang
bzalasky has quit [Remote host closed the connection]
kurko_ has quit [Ping timeout: 248 seconds]
jerrytgarcia has quit [Quit: WeeChat 0.4.2]
mbj has quit [Quit: leaving]
jtw has quit []
jtw has joined #ruby-lang
hopkins83 has quit [Quit: leaving]
mbj has joined #ruby-lang
mbj has quit [Client Quit]
FiXato|IkkeHer has joined #ruby-lang
yfeldblum has joined #ruby-lang
vlad_starkov has joined #ruby-lang
marr has joined #ruby-lang
vlad_starkov has quit [Read error: Connection reset by peer]
buranshe has quit [Quit: ZNC - http://znc.in]
FiXato|IkkeHer has left #ruby-lang [#ruby-lang]
bin7me has quit [Quit: Leaving]
patriciomacadden has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
elia has joined #ruby-lang
RobertBirnie has joined #ruby-lang
bzalasky has joined #ruby-lang
RobertBirnie has quit [Client Quit]
jtw has quit []
woollyams has joined #ruby-lang
<pipecloud> r0bgleeson: I prefer open3.
<r0bgleeson> whats this in reference to?
lcdhoffman has joined #ruby-lang
patriciomacadden has joined #ruby-lang
huma has quit [Ping timeout: 252 seconds]
kurko_ has joined #ruby-lang
kurko__ has quit [Ping timeout: 260 seconds]
kurko_ has quit [Quit: Computer has gone to sleep.]
vlad_starkov has joined #ruby-lang
deens has joined #ruby-lang
vlad_starkov has quit [Read error: Connection reset by peer]
mykoweb has quit [Remote host closed the connection]
mykoweb has joined #ruby-lang
fijimunkii has joined #ruby-lang
AKASkip has quit [Ping timeout: 272 seconds]
mykoweb has quit [Ping timeout: 245 seconds]
Kabaka has quit [Ping timeout: 260 seconds]
hahuang61 has joined #ruby-lang
kotk1 has joined #ruby-lang
hahuang61 has quit [Ping timeout: 252 seconds]
MrZYX is now known as MrZYX|off
arBmind has quit [Quit: Leaving.]
kotk has quit [Ping timeout: 246 seconds]
Kabaka has joined #ruby-lang
deens has quit [Remote host closed the connection]
MrZYX|off is now known as MrZYX
kurko_ has joined #ruby-lang
amclain has joined #ruby-lang
Lewix has quit [Remote host closed the connection]
deens has joined #ruby-lang
kurko_ has quit [Client Quit]
robmiller has quit [Quit: robmiller]
bcjordan has joined #ruby-lang
deens has quit [Remote host closed the connection]
styped has joined #ruby-lang
Johz has quit [Quit: Leaving]
benanne has quit [Quit: kbai]
styped_ has joined #ruby-lang
styped_ has quit [Client Quit]
styped_ has joined #ruby-lang
deens has joined #ruby-lang
rulip1 has joined #ruby-lang
MrZYX is now known as MrZYX|off
knu has joined #ruby-lang
atmosx has quit [Quit: Lost in trance]
mehlah has quit [Quit: Leaving...]
deens has quit [Ping timeout: 272 seconds]
vlad_starkov has joined #ruby-lang
mehlah has joined #ruby-lang
vlad_starkov has quit [Read error: Connection reset by peer]
VTLob has quit [Quit: VTLob]
rulip1 has left #ruby-lang [#ruby-lang]
deens has joined #ruby-lang
vlad_starkov has joined #ruby-lang
deens has quit [Ping timeout: 248 seconds]