<Nilium>
In the meantime, capslock is now both control and escape.
<Nilium>
Tapping it is escape, holding it is control.
<Nilium>
Kind of convenient.
hiyosi has joined #ruby
fabrice31 has quit [Ping timeout: 272 seconds]
<volty>
i am very advanced on using key combinations, but you are advanced at defining them
emocakes__ has quit [Ping timeout: 272 seconds]
ghr has joined #ruby
musl has quit [Quit: WeeChat 0.4.3]
<Nilium>
I just have weird key combos.
<Nilium>
Particularly in any tool that lets me have multi-stroke ones.
fgo has quit [Ping timeout: 272 seconds]
HelperW____ has quit [Ping timeout: 272 seconds]
troulouliou_dev has joined #ruby
<volty>
I have yet to implement the damn script that gathers all of the global key combinations (under kde), for showing them in a win.
klaut has quit [Remote host closed the connection]
<Nilium>
I'm bad at learning existing key combinations, so I just end up creating my own
<volty>
It was much easier when you had the possibility to popup ...
<Nilium>
That way I don't have to learn them.
<volty>
but you are going to forget them, beleive me :)
<Nilium>
Haven't in the last ~5 years, so eh
zenojis has joined #ruby
hiyosi has quit [Ping timeout: 272 seconds]
ghr has quit [Ping timeout: 245 seconds]
Takle has joined #ruby
<Nilium>
The only ones I regularly forget are the vim ones I set 'cause I stopped using vim.
rgs has joined #ruby
matchaw has joined #ruby
<volty>
so ... take care to not go for a long holiday and forget all of the rest :)
kayloos_ has joined #ruby
<volty>
shevy: like? options? which compiler? where to install?
<Nilium>
I stopped using IntelliJ for about half a year and still remember those, so eh
spicerack has joined #ruby
emocakes__ has joined #ruby
kayloos has quit [Ping timeout: 260 seconds]
Takle has quit [Ping timeout: 260 seconds]
emocakes has quit [Ping timeout: 260 seconds]
matchaw has quit [Ping timeout: 272 seconds]
deathpuppy93 has joined #ruby
SqREL______ has joined #ruby
kayloos_ has quit [Ping timeout: 260 seconds]
lewix has joined #ruby
emocakes__ has quit [Client Quit]
centrx has quit [Ping timeout: 272 seconds]
SqREL________ has joined #ruby
seamon has joined #ruby
seamon has quit [Client Quit]
SqREL______ has quit [Ping timeout: 260 seconds]
Logomachist has quit [Ping timeout: 244 seconds]
SqREL________ has quit [Ping timeout: 250 seconds]
sepp2k1 has joined #ruby
phutchins has joined #ruby
mxrguspxrt has quit [Remote host closed the connection]
Logomachist has joined #ruby
sepp2k has quit [Ping timeout: 272 seconds]
<shevy>
volty everything - but not in cookbooks itself. the cookbooks project only provides and sanitizes all data that can be used for another project (ruby build tools) to compile/install
Mirubiri has quit []
<shevy>
I got tired of coupling the two
<shevy>
I mean, of having both in the same project
<shevy>
volty look at machomebrew - they tied the logic/description of their programs directly into .rb files
<shevy>
I don't think that is clean in itself
phutchins has quit [Ping timeout: 245 seconds]
mxrguspxrt has joined #ruby
<volty>
i see, ... have to think about
JoshGlzBrk has joined #ruby
Logomachist has quit [Ping timeout: 246 seconds]
benzrf|offline is now known as benzrf
miyako has joined #ruby
sepp2k1 has quit [Read error: Connection reset by peer]
jonr22 has joined #ruby
pwh has joined #ruby
tomeara_ has joined #ruby
thomasxie has quit [Remote host closed the connection]
<miyako>
rubie: when you run "my_dungeon = Dungeon.new("Fred Blogg")", it creates a new instance of Dungeon and runs the initialize function, passing in the string "Fred Blogg" as the player name
jasooon has quit [Ping timeout: 272 seconds]
endash has quit [Client Quit]
<miyako>
initialize then creates an instance of Player by calling "Player.new" and assigns the result to the variable "player"
skammer2 has joined #ruby
<miyako>
so the player that was just created is my_dungeon.player
humd1ng3r has quit [Read error: Connection reset by peer]
<rubie>
attr_accessor :player <-- goes here right?
Thomas_the_Tank has quit [Remote host closed the connection]
<miyako>
yeah, attr_accessor :player makes it so that you can read and write the value of player
<miyako>
Player, similarly, sets name to the name that was passed in to it's initializer, and makes that accessible
nonmadden has joined #ruby
<rubie>
does it read def initialize first or attr_accesssor?
<miyako>
rubie: I really have no idea if that's even defined by the language anywhere. I would assume that neither, from the programs standpoint both probably exist at object creation time
<miyako>
but honestly I barely know ruby at all
<miyako>
I'm here because I'm trying to get to know it better myself
<rubie>
so when you create a new instance of a class, in this case my_dungeon = Dungeon.new("Fred Blogg") it takes the argument "Fred Blogg" and passes it to the def initialize(player_name)
<rubie>
hey no problem :)
<rubie>
same reason im here
robustus|Off has quit [Ping timeout: 255 seconds]
sleepee has joined #ruby
<miyako>
rubie: yep
skammer2 has quit [Ping timeout: 272 seconds]
<miyako>
first it calls Dungeon::initialize, which calls Player::Initialize
<rubie>
what is that format?
bobishh has joined #ruby
<miyako>
so your call stack is: main -> (main -> Dungeon::initialize) -> (main -> Dungeon::initialize -> Dungeon::Player::initialize)
<rubie>
Class::method?
<miyako>
rubie: yeah, something I made up to try to communicate lol
<miyako>
I'm not sure how namespacing works in ruby really
<rubie>
oh because i see it a lot in books
jottr has quit [Ping timeout: 245 seconds]
nonmadden has quit [Ping timeout: 272 seconds]
<miyako>
well, I know it's used for Module::ClassName
robustus has joined #ruby
<miyako>
but I'm not sure if it's also used for ClassName::MethodName
<waxjar>
Class::method means Class.method, Class#method means Class.new.method (e.g. the method "method" on an instance of Class)
oleo__ has joined #ruby
oleo is now known as Guest85944
<rubie>
now it goes to the Player initialize because its being called at Play.new(player_name)
<miyako>
waxjar: good to know! :)
sleepee has quit [Client Quit]
<rubie>
what about attr_accessor :name, :location
<rubie>
it was never iniitalized, does that mean it won't work right now.
<rubie>
im sorry, what about :location* it was never initialized
<miyako>
I think it will just be nil
bobishh has quit [Ping timeout: 260 seconds]
HelperW____ has joined #ruby
bobishh has joined #ruby
<jhass>
it will
Guest85944 has quit [Ping timeout: 260 seconds]
<rubie>
does that mean it won't work right now?
mxrguspxrt has quit [Remote host closed the connection]
<jhass>
the code you posted works
sleepee has joined #ruby
<jhass>
not sure what exactly you mean with "it" here
<rubie>
sorry didn't see ur response jhass
<rubie>
:location
<jhass>
my_dungeon.location will return nil, whether you define that as working or not I'm not sure
<rubie>
ok, nil makes sense
jjasonclark has quit [Quit: jjasonclark]
<jhass>
* my_dungeon.player.location sorry
Wolland has joined #ruby
bobishh has quit [Ping timeout: 245 seconds]
HelperW____ has quit [Ping timeout: 260 seconds]
emocakes has quit []
jasooon has joined #ruby
HelperW____ has joined #ruby
sleepee has quit [Ping timeout: 272 seconds]
fgo has joined #ruby
jjasonclark has joined #ruby
c107 has joined #ruby
brushdemon has joined #ruby
Wolland has quit [Ping timeout: 240 seconds]
volty has quit [Quit: Konversation terminated!]
jottr has joined #ruby
VBlizzard has quit [Ping timeout: 258 seconds]
brushdemon is now known as brushy
VBlizzard has joined #ruby
jjasonclark has quit [Client Quit]
Xeago_ has quit [Remote host closed the connection]
krisquigley has joined #ruby
hiyosi has joined #ruby
fgo has quit [Ping timeout: 260 seconds]
marlorn has joined #ruby
geggam has quit [Remote host closed the connection]
HelperW____ has quit [Ping timeout: 260 seconds]
dtr has joined #ruby
dx7 has joined #ruby
startupality has joined #ruby
miyako has quit [Quit: WeeChat 1.0.1]
isthisreallife has quit [Quit: Leaving]
krisquigley has quit [Ping timeout: 246 seconds]
hiyosi has quit [Ping timeout: 260 seconds]
sleepee has joined #ruby
sleepee has quit [Read error: Connection reset by peer]
geggam has joined #ruby
dx7 has quit [Ping timeout: 272 seconds]
coderdad has joined #ruby
tkuchiki has joined #ruby
VBlizzard has quit [Ping timeout: 260 seconds]
grzywacz has joined #ruby
VBlizzard has joined #ruby
pwh has quit [Ping timeout: 272 seconds]
jasooon has quit [Ping timeout: 272 seconds]
coderdad has quit [Ping timeout: 245 seconds]
pwh has joined #ruby
tkuchiki has quit [Ping timeout: 244 seconds]
startupality has quit [Quit: startupality]
coderdad has joined #ruby
jimmyhoughjr has joined #ruby
deathpuppy93 has quit [Quit: Leaving]
goodenough has joined #ruby
jhass is now known as jhass|off
marlorn has quit [Remote host closed the connection]
jonr22 has quit [Remote host closed the connection]
spicerack has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
hiyosi has joined #ruby
tokik has joined #ruby
CodeBunny has joined #ruby
mastr_bennett[x] has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
jontmorehouse has joined #ruby
Fezzler has quit [Quit: Leaving]
JoshGlzBrk has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
sinequanon has joined #ruby
tomeara_ has joined #ruby
VBlizzard has quit [Ping timeout: 258 seconds]
VBlizzard has joined #ruby
VBlizzard has quit [Max SendQ exceeded]
VBlizzard has joined #ruby
tomeara_ has quit [Ping timeout: 245 seconds]
grzywacz has quit [Ping timeout: 272 seconds]
jasooon has joined #ruby
jonr22 has joined #ruby
skammer2 has joined #ruby
jon22 has joined #ruby
fabrice31 has joined #ruby
coderdad has quit [Remote host closed the connection]
coderdad has joined #ruby
mastr_bennett[x] has joined #ruby
skammer2 has quit [Ping timeout: 244 seconds]
jbueza has joined #ruby
mastr_bennett[x] has quit [Client Quit]
spyderman4g63 has joined #ruby
fabrice31 has quit [Ping timeout: 260 seconds]
jonr22 has quit [Remote host closed the connection]
wald0 has quit [Read error: Connection reset by peer]
wald0 has joined #ruby
AtumT has quit [Remote host closed the connection]
coderdad has quit [Ping timeout: 260 seconds]
HelperW____ has joined #ruby
SCHAAP137 has quit [Remote host closed the connection]
bobishh has joined #ruby
lampd1 has quit [Remote host closed the connection]
spyderman4g63 has quit [Ping timeout: 272 seconds]
arescorpio has joined #ruby
ereslibre has joined #ruby
Wolland has joined #ruby
seamon has joined #ruby
HelperW____ has quit [Ping timeout: 244 seconds]
nfk has quit [Quit: yawn]
HelperW____ has joined #ruby
fgo has joined #ruby
bobishh has quit [Ping timeout: 244 seconds]
sinequanon has quit [Remote host closed the connection]
jon22 has quit [Ping timeout: 260 seconds]
sinequanon has joined #ruby
Wolland has quit [Ping timeout: 246 seconds]
jon22 has joined #ruby
sinequanon has quit [Remote host closed the connection]
HelperW____ has quit [Ping timeout: 260 seconds]
fgo has quit [Ping timeout: 250 seconds]
SqREL________ has joined #ruby
ghr has joined #ruby
tyll_ has quit [Ping timeout: 258 seconds]
SqREL_________ has joined #ruby
tyll has joined #ruby
SqREL________ has quit [Ping timeout: 250 seconds]
willgo has quit [Remote host closed the connection]
ghr has quit [Ping timeout: 272 seconds]
SqREL_________ has quit [Ping timeout: 246 seconds]
kayloos has joined #ruby
lampd1 has joined #ruby
atomi has joined #ruby
jimmyhoughjr has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
kayloos has quit [Ping timeout: 240 seconds]
jakesyl has joined #ruby
<jakesyl>
Is there an official concise guide for going from python to ruby?
<lampd1>
lol
<lampd1>
aka a guide on how to ruby
<jakesyl>
lampd1 they can't be that different
<jakesyl>
I heard it's like perl to php
<lampd1>
lol.
jontmorehouse has quit [Ping timeout: 260 seconds]
<lampd1>
RTD
atomi has quit [Read error: Connection reset by peer]
j_mcnally has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mxrguspxrt has quit [Remote host closed the connection]
Takle has joined #ruby
jottr has quit [Ping timeout: 245 seconds]
bobishh has quit [Ping timeout: 244 seconds]
dawkirst has quit [Remote host closed the connection]
kenneth has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
kaspertidemann has quit []
GriffinHeart has joined #ruby
mylar has quit [Ping timeout: 250 seconds]
ctp has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
pdais has joined #ruby
ptrrr has joined #ruby
AlexRussia is now known as Interpol
Interpol is now known as Interpolex
ghr has joined #ruby
bluOxigen has joined #ruby
otherj has quit []
SqREL___________ has joined #ruby
tessi is now known as tessi_zz
fgo has quit []
teddyp1cker has quit []
ghr has quit [Ping timeout: 272 seconds]
otherj has joined #ruby
jasooon has joined #ruby
lockweel has quit [Remote host closed the connection]
SqREL___________ has quit [Ping timeout: 244 seconds]
jasooon has quit [Ping timeout: 272 seconds]
dtr has joined #ruby
pat777 has quit [Quit: WeeChat 0.4.2]
mxrguspxrt has joined #ruby
kaspertidemann has joined #ruby
HelperW______ has joined #ruby
dtr has quit [Ping timeout: 272 seconds]
Takle has quit [Remote host closed the connection]
mikecmpbll has quit [Quit: i've nodded off.]
Sylario has joined #ruby
grenierm has quit [Quit: grenierm]
thsig has joined #ruby
oleo__ has quit [Quit: Verlassend]
matchaw has joined #ruby
shelling_ has quit [Quit: Connection closed for inactivity]
yetanotherdave has joined #ruby
AtumT has joined #ruby
<cajone>
Guys I need to convert a string into a regex ie "regex = Regexp.new string" but if the string contains a ('.') dot I need it to literal anyone know if this is possible, I hope I described it correctly
jxf has joined #ruby
jds has joined #ruby
MaciejCzyzewski has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<pontiki>
Regexp.escape do what you need?
kaspertidemann has quit []
yetanotherdave has quit [Ping timeout: 272 seconds]
Darryl has joined #ruby
otherj has quit []
<cajone>
pontiki: a = ".rb" regexp = Regexp.new a => /.rb/ , a = "\.rb" regexp = Regexp.new a => /.rb/
postmodern has quit [Quit: Leaving]
MaciejCzyzewski has joined #ruby
<cajone>
pontiki: ah thanks miss read you there that will do it I think
jottr_ has quit [Ping timeout: 258 seconds]
<Wolland_>
cajone: try double \\
hrrz has joined #ruby
<Wolland_>
should work as well
tomeara_ has joined #ruby
lemur has quit [Read error: Connection reset by peer]
lemur has joined #ruby
<pontiki>
yeah, Regexp.escape(".rb") should produce "\\.rb" exactly
<pontiki>
note the .escape doesn't make a Regexp object, so you have to do Regexp.new(Regexp.escape(".rb")) to get that
oo_ has joined #ruby
jottr_ has joined #ruby
matchaw has quit [Ping timeout: 272 seconds]
GriffinHeart has quit [Remote host closed the connection]
tomeara_ has quit [Ping timeout: 258 seconds]
IrishGringo has joined #ruby
Advocation has quit [Quit: Advocation]
<apeiros>
::new_escaped would be nice
<apeiros>
(or ::escaped_new)
moritzs has joined #ruby
hamakn has joined #ruby
User458764 has quit [Ping timeout: 260 seconds]
SqREL___________ has joined #ruby
nfk has joined #ruby
_maes_ has joined #ruby
bobishh has joined #ruby
dx7 has joined #ruby
spyderman4g63 has joined #ruby
sinkensabe has joined #ruby
bmurt has joined #ruby
krisquigley has joined #ruby
sevenseacat has joined #ruby
wd413 has joined #ruby
<Hanmac>
apeiros & pontiki & Wolland_ & cajone hm seems Regexp.union does also what we want:
<pontiki>
it should be going down to the laboratory
snath has joined #ruby
havenwood has quit [Ping timeout: 264 seconds]
<Hanmac>
hm bad that i dont have enough money to build my own house ... something like that would be standard ,P
GinoMan has joined #ruby
ixx has joined #ruby
ixx is now known as Guest30624
miyako has joined #ruby
mikecmpbll has joined #ruby
yacks has quit [Quit: Leaving]
yacks has joined #ruby
pskosinski has joined #ruby
Xeago has joined #ruby
ghr has joined #ruby
User458764 has joined #ruby
User458764 has quit [Client Quit]
IrishGringo has quit [Ping timeout: 272 seconds]
eivindml has joined #ruby
<miyako>
without a static type checking phase what is the best way to ensure that the parameters you're getting in a function are valid- should you just let the underlying code throw an exception if you use the parameter in an uexpected way- check the things you need and throw an execption? check the parameter's type?
IrishGringo has joined #ruby
ghr has quit [Ping timeout: 250 seconds]
phao has joined #ruby
apeiros_ has joined #ruby
W0rmDr1nk has quit [Ping timeout: 245 seconds]
hrrz has quit [Quit: hrrz]
<apeiros_>
miyako: google duck-typing. the rigidness of other languages doesn't make as much sense in ruby as you might think
sinkensabe has quit [Remote host closed the connection]
cherwin has joined #ruby
<apeiros_>
we generally only perform argument checks if unchecked the exceptions would be hard to track. e.g. args which are stored and not immediately used.
<miyako>
apeiros_: I know what duck typing is, I'm just curious what the idiomatic ways of addressing it are in ruby
apeiros_ is now known as apeiros
pat777 has joined #ruby
<apeiros>
miyako: well, the idiomatic approach is: don't think too much about it. it's not as big a problem as most people tend to think.
shredding has quit [Quit: shredding]
<miyako>
apeiros: not worrying about it may be the hardest part of learning ruby for me then lol
<wasamasa>
miyako: the only thing rubyists worry about is nil
<pontiki>
miyako: read "Confident Ruby" by Avdi Grim
<miyako>
what I really need is a book titled "damnit, I guess I have to deal with ruby: I quickstart guide for programmers who like type systems a lot"
rshetty has joined #ruby
<jhass>
miyako: switch to crystal instead :P
<miyako>
jhass: honestly the literally only reason I'm learning ruby is because another developer at work quit and we no longer have enough people who can handle the ruby codebase without me having to touch it
<txdv>
crystal has types?
<jhass>
yes
<jhass>
typed variables even
<jhass>
ruby has types too
GinoMan has quit [Ping timeout: 272 seconds]
icedp has quit [Remote host closed the connection]
<txdv>
"private def func" is that only crystal, or does ruby support it also?
<apeiros>
jhass: there's an argument whether classes are types
<wasamasa>
miyako: what would you be writing instead at work?
<miyako>
wasamasa: haskell and C
<apeiros>
txdv: as of 2.1, that works
<apeiros>
txdv: in 2.1, def foo returns :foo
<wasamasa>
miyako: interesting
<wasamasa>
miyako: as long as you dislike void pointers in C, too :P
<eval-in_>
txdv => private method `test' called for #<Test:0x420cce38> (NoMethodError) ... (https://eval.in/201903)
<txdv>
nerdgasm
GriffinHeart has joined #ruby
fantazo has joined #ruby
<miyako>
but of course C's entire type system is a bit theoretical in so much as it's so weak it only theoretically exists lol
<pontiki>
i think chapter 5 of poodr also is good for coming to grips with typelessness
Wolland_ has quit [Remote host closed the connection]
<pontiki>
at least i think it's chapter 5...
<txdv>
jhass: where are the typed variables?
<jhass>
txdv: the compiler infers the type for you where it can
jxf has quit [Ping timeout: 240 seconds]
<jhass>
in crystal
<jhass>
ruby has no typed variables
Advocation has joined #ruby
<miyako>
what started this all was since I need to learn ruby for work I started working on a simple networked message bus and got to the first part of the code and was like "hmm, what's the idiomatic way to make sure the port number is [0-65535]
<txdv>
so what does it do for def add(a,b); a + b; end ?
<jhass>
txdv: that depends on what you call it with
<txdv>
so it analyzes the code
GriffinHeart has quit [Ping timeout: 244 seconds]
<jhass>
yes, that's called type interference
<txdv>
google spent a lot of money on v8 to get this kind of stuff right
<wasamasa>
miyako: you hope it isn't code that's callable from outside
<jhass>
for example if you call it with add(1, 1) and add("foo", "foo") it creates two functions behind the scenes
<wasamasa>
miyako: or rather, will always be called the right way
<jhass>
def add(a : Int, b : Int) and def add(a : String, b : String)
<txdv>
but you can declare a function like "add(a: Int, b : Int)" in crystal?
<jhass>
yes and thus it supports method overloading even
<miyako>
I think part of it is I feel like I need to code very defensively because I see how incredibly error prone and fragile the entire ruby part of our codebase is at work
IrishGringo has quit [Ping timeout: 240 seconds]
<txdv>
I remember being hyped about rubinius, but it was just a faster ruby, but this ...
<miyako>
but I have to also remind myself that it was written largely by junior developers and one mid-level developer who was completely checked out
__main__ has quit [Ping timeout: 260 seconds]
<miyako>
so it probably doesn't have quite as much to do with the language as I blame the language for
<txdv>
recently i've been pissed off by lack of types in code because you change one part and it blows up only on runtime
<jhass>
txdv: that's basically their goal, write code in ruby like syntax that blows up at compile time
<miyako>
txdv: yeah, the runtime failures for us are a huge problem because a process might run for 12 hours, be half-way done, then it blows up because someone passed the wrong type or typo-ed a variable name
<miyako>
I will say at least the people in this channel have largely alleviated one of my larger complaints about ruby which was how incredibly hostile and brogrammery the entire community seems from the outside
<txdv>
i have the same problem with javascript
<txdv>
typescript doesn't support async/await(generators), ecma6 doesn't support type annotations
<miyako>
although I do have a problem with every single book and tutorial being so incredibly pretentious that I just find myself focusing pure unadulterated hatred at the author
rpag has joined #ruby
fabrice31 has joined #ruby
<pontiki>
wow
<miyako>
I think why's poigent guide literally caused my eyes to burn a hole in my monitor with pure hatred
thsig_ has joined #ruby
shelling_ has joined #ruby
Xeago has quit [Remote host closed the connection]
<pontiki>
you've read very different things than i have
apeiros has quit []
thsig has quit [Ping timeout: 272 seconds]
yfeldblum has quit [Remote host closed the connection]
<pontiki>
although i have to admit, i don't know what brogrammery means
<sevenseacat>
i also rather disliked why's poignant guide
<Hanmac>
hah about code blowing up in your face, try to find the error on a double-free specially if it didnt seems to happen all the time ... thats ugly ... debuging an exception is nothing compared to that
<crome>
CHUNKY BACON!
<wasamasa>
pontiki: "A brogrammer (portmanteau of bro and programmer) is a macho programmer. A brogrammer self-describes as a sociable programmer.[1][2]"
<shevy>
txdv \o/
willgo has quit [Remote host closed the connection]
<pontiki>
your basic asshole, then?
<wasamasa>
pontiki: well, not quite
<miyako>
pontiki: a unique type of asshole compared to the normal ones we have in programming, think frat boy / gym rat mixed with programmer
<wasamasa>
pontiki: one doesn't need to be overtly misogynistic to be an asshole
sinkensabe has joined #ruby
shredding has joined #ruby
fabrice31 has quit [Ping timeout: 244 seconds]
hellangel7 has joined #ruby
<crome>
at this point it becomes important to describe what "sociable" means in the given context
<miyako>
I think it's really hard to describe them until you meet them, but it's sort of this combination of, as wasamasa said, overt misogyny combined with this "do you even node.js bro?" attitude
<crome>
ah, so it redirects the output
* crome
stands corrected
<miyako>
they tend to cluster together at hackathons and meetups
tomeara_ has joined #ruby
<Mon_Ouie>
It just does p (puts "liar"), so both get printed
<wasamasa>
miyako: so far I haven't met any
<txdv>
miyako: you just have counter them with: "do you even libuv bro?"
<pontiki>
well, i know the misogyny quite well, and the overt meritocracy of knowledge
<MaciejCzyzewski>
Hi folks.
<pontiki>
see, the thing is, ruby is one of the only places i haven't encountered that in absolute huge amounts
shredding has quit [Client Quit]
<pontiki>
as in the people who work in it, the books i've read, the conferences i've been to
<crome>
miyako: does it mean you generally despise meetups and hackathons?
sinkensabe has quit [Remote host closed the connection]
<pontiki>
whereas, i've had nearly nothing but that in C/C++, php, kernel hacking spaces, and so on
<txdv>
kernel hacking spaces?
<miyako>
crome: it depends, there are a couple of meetups I go to that are good, but I've stopped going to hackathons and stuff because I've just had too many really uncomfortable experiences
<pontiki>
unix and linux kernel hackers; i have several friends there
* sevenseacat
has not actually seen brogrammerism anywhere except in jokes
<txdv>
pontiki: what are they coding on?
<txdv>
and what other unix kernels?
<miyako>
pontiki: I guess I haven't spent much time interacting with other kernel hackers, but reading lkml I can definitely see that
<pontiki>
some deeply voodoo sci fi stuff
<crome>
sevenseacat: I agree
<miyako>
I've tended toward more FP and pure cs oriented meetups and stuff
tomeara_ has quit [Ping timeout: 240 seconds]
<crome>
there are shitloads of meetups around where I live but I usually avoid the geeky ones
MaciejCzyzewski has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<txdv>
i guess the implementation is not easy
<txdv>
but that is not voodoo imo
<shevy>
they even developed their own programming language
<shevy>
but I disliked the comment syntax so I left them
<shevy>
kthxbye
<crome>
haha
<crome>
lolcode is awesome
bobishh has joined #ruby
mikecmpbll has quit [Quit: i've nodded off.]
<txdv>
how do i compile that crystal :/
<jhass>
txdv: what machine are you on?
<txdv>
debian wheezy
<jhass>
64bit?
<txdv>
32
compuser_ has joined #ruby
<jhass>
sorry there are only 64bit packages for now
<txdv>
damn you
miyako has quit [Quit: WeeChat 1.0.1]
<jhass>
everything's early atm ;)
<crome>
txdv: we have changed millenia in case you haven't noticed
<crome>
now it starts with a 2
<crome>
:)
naftilos76 has quit [Remote host closed the connection]
<txdv>
crome: so?
<txdv>
i'm not running any application which needs more than 4gb ram
<jhass>
I mean you could potentially get one of the older 32bit binaries and git filter-branch your way up to a recent compile, but it's a bit too much work if you just start out ;)
<jhass>
that's the downside of needing crystal to compile crystal :P
<Hanmac>
jhass: while the "fun" writing with crystal is "fun" its not mighty enough as i want ... i prefer to write more C/C++ around so i have the control when something get freed or not
<jhass>
but in theory you could just call C's free :P
<jhass>
just need to take care the GC doesn't handle that
<rubie>
is there a better way to write this? .....if answer == "yes" or answer == "ya" or answer =="y" or answer =="sure"
<Hanmac>
jhass: for sample like i did with some of my classes in my rwx binding ... i store the ruby object inside the C++ object as a UserData or something ... with that the C++ can remember wich ruby object it was and can force the ruby object to stay alive even if the ruby object got out of scope in the ruby side
bmurt has quit [Client Quit]
Xeago has joined #ruby
slawrence00 has joined #ruby
ghr has joined #ruby
<havenwood>
rubie: %w[yes ya y sure].include? answer
mattstratton has joined #ruby
<rubie>
so u have to turn it into an array
<rubie>
not like .....if answer == "Ya" || "YES" || "sure"
lowandslow has quit [Remote host closed the connection]
GriffinHeart has joined #ruby
<waxjar>
you'd have to do answer == "ya" || answer == "yes" || ..., because
<jhass>
Hanmac: you should join #crystal-lang sometime, the main developers are very responsive and like to discuss such issues. Note they're from Argentina though, so timezone issues ;)
slawrence00 has left #ruby [#ruby]
moritzs has quit [Remote host closed the connection]
jasooon has joined #ruby
ghr has quit [Ping timeout: 246 seconds]
coderhs has joined #ruby
coderhs has quit [Remote host closed the connection]
_maes_ has quit [Read error: Connection reset by peer]
starkhalo has joined #ruby
Xeago has quit [Remote host closed the connection]
<jhass>
pagioss: nothing wrong there, targetValue probably just isn't what you think it is
CHVNX has joined #ruby
<CHVNX>
I need 1.9.1 and want to build it from source, but I see a bunch of different versions. Some are obvious rc's, and others are not so obvious. There are packages ending in p0, p1{numbers}, -preview, etc. There's no plain 1.9.1. http://cache.ruby-lang.org/pub/ruby/1.9/
krisquigley has quit [Ping timeout: 258 seconds]
otakbeku has quit [Client Quit]
<pagioss>
jhass: target value is getting truncated coz it contains an &
<shevy>
CHVNX p are later release versions, the higher p the better it should be
<jhass>
pontiki: SGML should be parsed with an SGML parser, that one tag can already come in so many variations that it'll be hard to write a regex for all of them
<havenwood>
pagioss: ^ nokogiri alternative
<shevy>
pagioss no idea, does awk regex understand the tokens listed at rubular.com ?
benzrf is now known as benzrf|offline
<shevy>
\s \S \d \D \w \W \b
<pontiki>
if he's only looking for one attribute out of that tag, it's still way overkill
<pagioss>
nokogiri thats japanese
mrsolo has joined #ruby
<shevy>
the name is
merqlove has quit [Quit: Connection closed for inactivity]
sinkensabe has quit [Read error: No route to host]
sinkensabe has joined #ruby
<havenwood>
nokogiri is front runner
<havenwood>
oga is a new contender
mary5030 has joined #ruby
<shevy>
hehehe
<shevy>
havenwood is always on the bleeding edge
sinkensa_ has joined #ruby
CHVNX has left #ruby ["☠"]
sinkensa_ has quit [Read error: Connection reset by peer]
silkfox has joined #ruby
sinkensa_ has joined #ruby
<havenwood>
shevy: If you prick us, do we not bleed?
Soda has joined #ruby
rshetty has joined #ruby
Hightower660 has joined #ruby
<shevy>
hey I am a teddy bear, I have no sharp edge
<shevy>
the main mystery is why you know so much havenwood!
lewix has quit [Remote host closed the connection]
<havenwood>
shevy: i just pretend to
sinkensabe has quit [Ping timeout: 240 seconds]
mdw has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<havenwood>
shevy: close your eyes and pretend hard enough...
yetanotherdave has quit [Ping timeout: 260 seconds]
fabrice31 has joined #ruby
ahhMichael has quit [Ping timeout: 256 seconds]
<havenwood>
shevy: oga's author, yorick, always hangs out in #ruby-lang
<Nilium>
It's hard convincing people their site is broken when they can't see the issue I'm telling them about
jasooon has joined #ruby
tlarevo has joined #ruby
<shevy>
screenshot!
<Nilium>
Even when I've got it happening in three browsers.
<shevy>
insult them
mijicd has quit [Remote host closed the connection]
<Nilium>
I sent them a screenshot, pointed them at the source of the issue, but they can't reproduce it because they're probably not on OS X
sinkensa_ has quit [Ping timeout: 240 seconds]
HelperW has quit [Quit: Computer has gone to sleep.]
codeurge has joined #ruby
doev has joined #ruby
<Nilium>
Seeing as it's a text rendering issue and OS X is probably the only system that's willing to go along with a web dev's insane fractional font sizes
HelperW has joined #ruby
endash has quit [Ping timeout: 272 seconds]
<Nilium>
Or, in Bootcamp's case, using 20/14 as a font size.
endash_ has joined #ruby
bobishh has joined #ruby
mijicd has joined #ruby
rpag has joined #ruby
fabrice31 has quit [Ping timeout: 240 seconds]
sethen has quit [Read error: Connection reset by peer]
sethen has joined #ruby
Azure has quit [Quit: My MBP went to sleep.]
jasooon has quit [Ping timeout: 245 seconds]
wolves_cs has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
freerobby has joined #ruby
MaciejCzyzewski has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Azure has joined #ruby
MaciejCzyzewski has joined #ruby
mikecmpbll has quit [Quit: i've nodded off.]
coderhs has joined #ruby
coderhs has quit [Client Quit]
lw has quit [Quit: s]
mikecmpbll has joined #ruby
mikecmpbll has quit [Max SendQ exceeded]
sethen has quit [Read error: Connection reset by peer]
mikecmpbll has joined #ruby
sethen has joined #ruby
Wolland has joined #ruby
GriffinHeart has joined #ruby
bricker`work has joined #ruby
BTRE has quit [Quit: Leaving]
dtr has joined #ruby
Wolland_ has joined #ruby
emmesswhy has quit [Quit: This computer has gone to sleep]
maletor_ has joined #ruby
GriffinHeart has quit [Ping timeout: 260 seconds]
astav has quit [Quit: astav]
Wolland has quit [Ping timeout: 240 seconds]
Wolland_ has quit [Ping timeout: 240 seconds]
goodenough has quit [Remote host closed the connection]
Stalkr_ has joined #ruby
otherj has joined #ruby
dtr has quit [Changing host]
russt has joined #ruby
dtr has joined #ruby
wolves_cs has joined #ruby
lw has joined #ruby
Rollabunna has quit [Remote host closed the connection]
|\|370 has joined #ruby
yfeldblum has joined #ruby
russt has quit [Client Quit]
danguita has joined #ruby
Avahey has joined #ruby
lw has quit [Client Quit]
luckyruby has quit [Remote host closed the connection]
MaciejCzyzewski has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
SqREL___________ has joined #ruby
yfeldblum has quit [Ping timeout: 240 seconds]
alem0lars has quit [Quit: AFK..]
coderdad has joined #ruby
otherj has quit []
zorak8 has joined #ruby
otherj has joined #ruby
<rubie>
hi all: anyone know why this doesn't work?
<rpag>
rubie, you probably want name=, then to define 'name' method
russt has joined #ruby
<rubie>
ya i dont understand why you have to do that
SqREL___________ has quit [Ping timeout: 245 seconds]
mattyohe has joined #ruby
<rubie>
i've never seen that before def name=(foo)
W0rmDr1nk has joined #ruby
<rubie>
what does it mean?
<rubie>
you define a method name
<rubie>
then im stuck
<rubie>
is foo an argument?
CodeBunny has joined #ruby
goodenough has joined #ruby
<jhass>
yes
shredding has joined #ruby
shredding has quit [Remote host closed the connection]
<jhass>
method's that end in = can be called like obj.name = 'foo'
mooru has quit [Ping timeout: 246 seconds]
shredding has joined #ruby
sevvie has joined #ruby
KC9YDN has joined #ruby
sinequanon has joined #ruby
hamakn has quit [Remote host closed the connection]
hamakn has joined #ruby
Takle has joined #ruby
niftylettuce has quit [Quit: Connection closed for inactivity]
MaciejCzyzewski has joined #ruby
mikecmpbll has quit [Quit: i've nodded off.]
<rubie>
jhass: thank you
russt has quit [Quit: russt]
hamakn has quit [Ping timeout: 258 seconds]
mary5030 has quit [Remote host closed the connection]
lxsameer has joined #ruby
bigmac_ has joined #ruby
<lxsameer>
hey guys, What is the conventions for publishing an alpha or beta gem ( I mean the version schema )
otakbeku has joined #ruby
sinkensabe has joined #ruby
alem0lars has joined #ruby
Tricon has joined #ruby
<banister>
lxsameer i use 0.1.0-pre1
byteoverfl0w has joined #ruby
<jhass>
don't think there really is something, I think x.y.z-pren is the most common but I've seen alpha, beta and rc as well
<lxsameer>
banister: it seems that I can't publish a gem with "-" in version string into rubygems
<banister>
lxsameer must be 0.1.0pre1 then
bluenemo has joined #ruby
<lxsameer>
ah thanks
Channel6 has quit [Quit: Leaving]
bigmac_ is now known as i8igmac
sanguisdex has joined #ruby
russt has joined #ruby
otherj has quit []
<havenwood>
rubie: commented on your gist
MaciejCzyzewski has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jasooon has joined #ruby
crazydiamond has joined #ruby
<rubie>
havenwood: thanks for that :)
<rubie>
digesting now
alem0lars has quit [Ping timeout: 260 seconds]
rshetty has quit [Remote host closed the connection]
sinequanon has quit [Remote host closed the connection]
bluenemo has quit [Ping timeout: 272 seconds]
yacks has joined #ruby
mxrguspxrt has quit [Read error: Connection reset by peer]
sinequanon has joined #ruby
ahhMichael has joined #ruby
dx7 has joined #ruby
MaciejCzyzewski has joined #ruby
pwh has joined #ruby
jasooon has quit [Ping timeout: 258 seconds]
goodenough has quit [Remote host closed the connection]
krisquigley has joined #ruby
sean_1 has joined #ruby
sean_1 has left #ruby ["Konversation terminated!"]
yakko has joined #ruby
GinoMan has joined #ruby
rshetty has joined #ruby
x1337807x has joined #ruby
pwh has quit [Client Quit]
matchaw has joined #ruby
pwh has joined #ruby
ahhMichael has quit [Ping timeout: 256 seconds]
dx7 has quit [Ping timeout: 244 seconds]
zorak8 has quit [Ping timeout: 245 seconds]
x1337807x has quit [Client Quit]
yakko has quit [Read error: Connection reset by peer]
AtumT has quit [Ping timeout: 272 seconds]
yakko has joined #ruby
astav has joined #ruby
sinequanon has quit [Remote host closed the connection]
claymore has joined #ruby
krisquigley has quit [Ping timeout: 260 seconds]
Takle has quit [Remote host closed the connection]
Scotteh_ has quit [Ping timeout: 246 seconds]
lewix has joined #ruby
ahmadajmi has quit [Remote host closed the connection]
lolmaus has joined #ruby
pwh has quit [Ping timeout: 245 seconds]
doev has quit [Quit: Verlassend]
froggy__ has joined #ruby
bluenemo has joined #ruby
GriffinHeart has joined #ruby
Wolland has joined #ruby
sinkensabe has quit [Remote host closed the connection]
kaspertidemann has joined #ruby
yakko has quit [Read error: Connection reset by peer]
froggy_ has quit [Ping timeout: 246 seconds]
<rubie>
in general what would kinds of things would you put in your attr_accessor?
yakko has joined #ruby
GinoMan has quit [Ping timeout: 244 seconds]
<rubie>
in general what kinds of things would you put in your attr_accessor?*
<Morrolan>
Things which need to be read and written. :D
russt has quit [Quit: russt]
AtumT has joined #ruby
GriffinHeart has quit [Ping timeout: 245 seconds]
Wolland has quit [Ping timeout: 240 seconds]
IrishGringo has joined #ruby
mxrguspxrt has joined #ruby
<rubie>
things that every instance of a class would need?
bmurt has joined #ruby
<Morrolan>
Not necessarily - if it's something they need only for themselves, then I wouldn't create accessors for it.
Takle has joined #ruby
Soda has quit [Remote host closed the connection]
yfeldblum has joined #ruby
hamakn has joined #ruby
Hightower660 has quit [Ping timeout: 244 seconds]
sinequanon has joined #ruby
christospappas has joined #ruby
christospappas has quit [Max SendQ exceeded]
MaciejCzyzewski has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mijicd has quit [Quit: leaving]
christospappas has joined #ruby
christospappas has left #ruby [#ruby]
lnormous has joined #ruby
zorak8 has joined #ruby
felipebalbi has joined #ruby
yfeldblum has quit [Ping timeout: 272 seconds]
MaciejCzyzewski has joined #ruby
silkfox has quit [Ping timeout: 260 seconds]
hamakn has quit [Ping timeout: 272 seconds]
<felipebalbi>
hi, I need some advice on how to go about writing a ruby app whose task is execute tests to USB devices. I plan on using thor (for the console interface) and libusb (to actually issue USB requests). The doubt is how to exactly ship the actual tests ? I thought about implementing them as rspec specifications but it feels kinda weird so I was thinking if anybody has a better idea.
p0sixpscl has joined #ruby
<felipebalbi>
heh, sorry for the long question :-)
byteoverfl0w has quit [Quit: Leaving... have a good one...]
pushpak has joined #ruby
<felipebalbi>
oh yeah, and I'll also be distributing it as a gem, of course
lw has joined #ruby
Sylario_ has joined #ruby
<pontiki>
i don't think there's anything particularly wrong with using rspec in that way
<pontiki>
it's unusual, but it seems quite fitting in your specific case
IrishGringo has quit [Ping timeout: 260 seconds]
<felipebalbi>
pontiki: alright... so then I'd need a runtime dependency on rspec
<pontiki>
or you could use mini_test
<pontiki>
but yeah
mindlessdemon has joined #ruby
<felipebalbi>
pontiki: any idea how I could have "mygemname test" execute my rspec specifications then ?
<felipebalbi>
looks like RSpec::Core::Runner.invoke is more fitting
<felipebalbi>
I'll play around with that, thanks pontiki
<pontiki>
sure
pwh has joined #ruby
<pontiki>
happy to offer encouragement when i can't offer actual help :D
havenwood has quit [Remote host closed the connection]
<felipebalbi>
pontiki: :_)
<felipebalbi>
:-)
sinequanon has quit [Remote host closed the connection]
geggam has quit [Ping timeout: 244 seconds]
rshetty has quit [Remote host closed the connection]
mindlessdemon has quit [Ping timeout: 245 seconds]
<pontiki>
any chance you're solving the USB malware problem, felipebalbi ?
shredding has quit [Quit: shredding]
<felipebalbi>
pontiki: no, just making my linux framework works fine... also tired of relying on windows for USB Command Verifier (yes, I'm a kernel junkie)
MaciejCzyzewski has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
LekeFly has joined #ruby
LekeFly has quit [Max SendQ exceeded]
<felipebalbi>
pontiki: that malware issue, btw, has nothing to do with USB itself. USB does not specify how a firmware upgrade is supposed to happen (well, there's DFU but let's not go there)
<felipebalbi>
pontiki: for Linux (and perhaps Mac) systems, I don't think that's a big deal of a problem
MaciejCzyzewski has joined #ruby
tkuchiki has quit [Ping timeout: 260 seconds]
<felipebalbi>
pontiki: you'd need admin permissions to fiddle with most of system configuration anyway
dtr_ has joined #ruby
<felipebalbi>
pontiki: it would also be pretty easy to find a hacked device
<pontiki>
well, that's good to know. my understanding from reading ARS was that every system was vulnerable
dtr has quit [Ping timeout: 260 seconds]
<felipebalbi>
pontiki: it's pretty clear when a USB Mass Storage device advertises itself with a HID interface ;-)
<felipebalbi>
pontiki: ARS tends to overblow issues like that :-)
<pontiki>
but i do not know hardware, really, at all
<pontiki>
and my only kernel hacking was on HP-UX before USB was invented.... so long ago....
zartoosh has quit [Remote host closed the connection]
<felipebalbi>
pontiki: heh, I barely, know ruby and have next to nothing knowledge on e.g. HTTP protocol :-)
<felipebalbi>
pontiki: oh sexy... hp-ux :-)
bluehavana has joined #ruby
sinequanon has joined #ruby
zartoosh has joined #ruby
pwh has quit []
sanguisdex has quit [Ping timeout: 272 seconds]
fabrice31 has joined #ruby
silkfox has joined #ruby
<pontiki>
heh, we connected everything with HP-IB back then
Scotteh_ has joined #ruby
<felipebalbi>
nice :-)
<felipebalbi>
those were the days :-)
<pontiki>
back in the days when nothing was really portable
<felipebalbi>
yup :-)
<felipebalbi>
but anyway, thanks for confirming shipping rspec specs in production isn't really all that weird :-)
<felipebalbi>
gotta go now
<felipebalbi>
monday I'll have stuff to do
<pontiki>
have fun
<felipebalbi>
cheers pontiki
<felipebalbi>
ttyl
sinequanon has quit [Ping timeout: 244 seconds]
wolves_cs has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
SilkFox_ has joined #ruby
St_Marx has quit [Remote host closed the connection]
fabrice31 has quit [Ping timeout: 272 seconds]
St_Marx has joined #ruby
silkfox has quit [Ping timeout: 272 seconds]
dnordstrom1 has quit [Read error: Connection reset by peer]
omosoj has joined #ruby
louism2wash has joined #ruby
SilkFox_ has quit [Ping timeout: 244 seconds]
dnordstrom1 has joined #ruby
pcp135 has joined #ruby
sandelius has joined #ruby
jasooon has joined #ruby
maletor_ has quit [Quit: Computer has gone to sleep.]
coderdad has quit [Remote host closed the connection]
dorei has joined #ruby
JBreit has joined #ruby
mary5030 has joined #ruby
mrsolo has quit [Quit: This computer has gone to sleep]
<rubie>
i just did that so i could see the methods and classes
LekeFly has joined #ruby
<shevy>
third step - I would build from the smallest aspect of that game, the smallest class first, and test that it works, then I will buildup to more complicated tasks aspects
jasooon has quit [Ping timeout: 272 seconds]
<dorei>
rubie: i guess you need user input, i guess readline would be a good start
<shevy>
also, always identify code that can be reused or lives in more than one class
<rubie>
thats a good idea, this is way to much...its from a book
<shevy>
you need to interconnect the parts little by little
ZarduX has joined #ruby
<shevy>
it is not good to just write code that you have not tested to ensure it works
<shevy>
you'll need to setup a proper base environment, that includes proper loading of the files through require statements
LekeFly has quit [Read error: Connection reset by peer]
<rubie>
ok i will start from scratch
MaciejCzyzewski has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mary5030 has quit [Ping timeout: 250 seconds]
<shevy>
in small steps
<shevy>
one class per file is something that works well for many people
<shevy>
then you can write a UserInput class or something like that, or perhaps GameLogic or simply class Game
<shevy>
that will load up the other .rb files, and fetch user input like so:
<shevy>
loop { break unless fetch_user_input }
<shevy>
where fetch_user_input is a method that could have a check like: if use_readline? # use readline, else use simply $stdin.gets.chomp
<shevy>
and it would return true or false, so that the main loop works
<shevy>
there are many different ways for the above
<shevy>
I often do: exit if game_over?
<shevy>
or, break - depends on the overall setup
HelperW has quit [Quit: Computer has gone to sleep.]
<rubie>
humm im not sure what you mean by that
<rubie>
UserInput class
HelperW has joined #ruby
mooru has joined #ruby
timonv_ has joined #ruby
sinequanon has joined #ruby
<shevy>
the name is not important
<shevy>
you want to get user input
<shevy>
but what then? what are you going to do with it
<rubie>
use it somehow
<rubie>
so im creating
<rubie>
a Player class
<rubie>
and im getting the user to give their player a name
dideler has joined #ruby
<rubie>
and maybe a weapon
dtr_ has quit [Quit: leaving]
<shevy>
good
<shevy>
so you simply fetch user input from the player to setup your classes
<shevy>
now the user gave you the name
<shevy>
what happens then
Wolland has joined #ruby
HelperW has quit [Ping timeout: 260 seconds]
GriffinHeart has joined #ruby
<rubie>
initialize it in the Player class
bengan_42 has joined #ruby
sinequanon has quit [Ping timeout: 260 seconds]
MaciejCzyzewski has joined #ruby
astav has quit [Quit: astav]
yfeldblum has joined #ruby
<shevy>
yeah sure but then what happens
bMalum has joined #ruby
<shevy>
will your program exit?
<rubie>
i wouldn't want it to
mooru has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
compuser_ has joined #ruby
Wolland has quit [Ping timeout: 260 seconds]
havenwood has joined #ruby
MaciejCzyzewski has quit [Client Quit]
GriffinHeart has quit [Ping timeout: 260 seconds]
<shevy>
ok then you need a loop
mxrguspxrt has quit [Ping timeout: 244 seconds]
<rubie>
humm
Morkel_ has joined #ruby
yfeldblum has quit [Ping timeout: 240 seconds]
SqREL___________ has joined #ruby
<rubie>
im having a hard time grasping this
Morkel has quit [Ping timeout: 245 seconds]
Morkel_ is now known as Morkel
compuser_ has quit [Client Quit]
bengan_42 has quit [Quit: leaving]
<shevy>
well, finish writing the foundation first then
kenneth has joined #ruby
compuser has joined #ruby
<shevy>
you said you need a weapon etc... so finish those classes in a stand-alone fashion
spastorino has quit [Quit: Connection closed for inactivity]
nrsk has joined #ruby
mxrguspxrt has joined #ruby
<pontiki>
maybe you should start with the loop. that's the very very basic core function of the program, to read and respond to user's input
LordAlveric has quit [Ping timeout: 240 seconds]
SilkFox_ has joined #ruby
LordAlveric has joined #ruby
klaut has joined #ruby
zorak8 has quit [Ping timeout: 250 seconds]
bricker`work has quit [Quit: leaving]
SqREL___________ has quit [Ping timeout: 272 seconds]
nrsk has quit [Read error: Connection reset by peer]
nrsk has joined #ruby
compuser has quit [Quit: Computer has gone to sleep.]
SilkFox_ has quit [Ping timeout: 272 seconds]
louism2wash has quit [Quit: This computer has gone to sleep]
<shevy>
hmm should my hash have only string or only symbol entries? it has about 30 different keys
<shevy>
the original dataset comes from a simple yaml file
<shevy>
so it has keys that are all strings
<pontiki>
stay with strings then
sinequanon has joined #ruby
<shevy>
ok
nrsk has quit [Read error: Connection reset by peer]
pushpak has quit [Ping timeout: 250 seconds]
timonv_ has quit [Remote host closed the connection]
<ilhami>
You need to prefix the gem command with sudo because /var/lib/gems is owned by root. You could also take a look at RVM which allows really easy installation and management of gems and Ruby versions. Best part, it's all in your home dir!
Asher2 has quit [Ping timeout: 245 seconds]
<jhass>
do you have a specific question about it?
<CodeBunny>
Whats your question
<jhass>
there's little sense in just rephrasing it
<ilhami>
"gem install jekyll" I ran this command but it is giving me permission denied. How do I solve that?
<rpag>
ilhami, prefix sudo
<ilhami>
I could put sudo in front but is that the best way to do it?
<CodeBunny>
sudo
<CodeBunny>
yes
<rpag>
nah its not
<ilhami>
I heard using sudo when installing is bad?
<rpag>
a user-local install is better
<rpag>
but if youre in a bind or a hurry, its just fine
<rubie>
shevy: since we already assigned a weapon to the hero, im not sure what a hero class would do
<ilhami>
well I want to learn the best way.
<jhass>
ilhami: you said you installed rvm
<havenwood>
ilhami: gems can be installed in a system location where you'd need to use sudo or in a user local location where you don't
<CodeBunny>
Do you have rvm installed?
MaciejCzyzewski has joined #ruby
<ilhami>
CodeBunny, yes
<shevy>
rubie that depends on your game. it could keep attributes of the weapon for now ... name of the weapon, damage output... perhaps cost
<CodeBunny>
excellent
<rubie>
shevy: since we already assigned a weapon to the hero, im not sure what a weapon* class would do
bluenemo has joined #ruby
<ilhami>
CodeBunny, so how do I install jekyll using RVM?
luckyruby has joined #ruby
<shevy>
rubie the more important thing is that you define precisely what your game should do, ideally write this down into a separate design document, that will help you immensely
<CodeBunny>
gem install gemset <newgensetname>
<shevy>
rubie you only assigned a string ;)
<rubie>
shevy: okay
<CodeBunny>
gemset use <gemsetname>
<shevy>
a weapon would be like this rubie:
<CodeBunny>
then you can sudo to your hearts content
<jhass>
CodeBunny: why you need gemsets?
mdw has joined #ruby
<havenwood>
ilhami: debian opted for a system location where distros like fedora opted for user local location
<jhass>
ilhami: just rvm default 2.1 and gem install jekyll should work
<CodeBunny>
Because then you dont have stray gems muddying up the works, and you can do handy dandy things like gemset emppty, and bundle again
<shevy>
rubie the idea about OOP is that you can abstract stuff, and ask the object directly for its data
<havenwood>
ilhami: RVM allows either but strongly recomends user local. rbenv only does user local afaik. chruby does either.
<jhass>
CodeBunny: I just use bundle clean
<ilhami>
after I installed I am trying to run "gem install jekyll" again
<ilhami>
is that enough?
<havenwood>
ilhami: One question might be whether you're sharing the gems with other users. If not, consider user-local.
<ilhami>
I am not sharing with anybody havenwood
<ilhami>
it still gives me permission denied.
<ilhami>
ERROR: While executing gem ... (Errno::EACCES)
<havenwood>
ilhami: well, that's how your system Ruby is set up
<jhass>
ilhami: did you do rvm default 2.1 yet?
<ilhami>
rvm default 2.1? should I run this?
<jhass>
yes
<CodeBunny>
jhass: you can do that if you just have one project, but it gets cumbersome if you have several
<havenwood>
ilhami: you can change it to user-local with a configuration setting or by passing a flag. though.. you mentioned RVM which would make this irrelevant.
<ilhami>
ruby-2.1.3 is not installed.
<ilhami>
To install do: 'rvm install ruby-2.1.3'
<ilhami>
should I just do that?
<jhass>
CodeBunny: not really, you just rebundle in all projects if you're feeling desperate about cleaning up
<havenwood>
ilhami: So first decide if you want to use the apt-get package or RVM. :P If RVM don't sudo.
MaciejCzyzewski has quit [Client Quit]
mdw has quit [Client Quit]
<jhass>
CodeBunny: I rather keep out duplicate installs
<havenwood>
ilhami: rvm get stable && rvm install ruby
<jhass>
of the same version
<ilhami>
so I should remove the apt-get package
<ilhami>
?
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<jhass>
ilhami: you don't need to
<havenwood>
ilhami: Your choice. It's fine to use the package manager provided Ruby. If you do, just remember to install the dev package too because of debian's packaging.
<CodeBunny>
jhass: When I flipp back and forth between projects with conflicting gemsets several times an hour, this is not a tenable solution
<jhass>
CodeBunny: I just use bundler everywhere
<ilhami>
but someone wrote here it's bad to have duplicate installs.
kaspertidemann has quit []
<CodeBunny>
rebundling would literally make this impossable
andrewlio has joined #ruby
<ilhami>
is it "sudo apt-get purge ruby" ?
<jhass>
ilhami: ignore our other noise, that's about something else ;)
<havenwood>
ilhami: it's fine to leave system ruby alone
<ilhami>
oh ok.
<jhass>
CodeBunny: I'm sorry?
GriffinHeart has joined #ruby
Sylario has joined #ruby
<ilhami>
havenwood, I am running your command.
<ilhami>
rvm get stable && rvm install ruby
lkba has joined #ruby
jack_rabbit has joined #ruby
<havenwood>
ilhami: that just grabs the latest stable rvm then installs the latest stable ruby
lw has quit [Quit: s]
<ilhami>
cool!
<ilhami>
it's installing now.
<havenwood>
ilhami: then set your default to that newly minted 2.1.3 and you're good to go
<jhass>
CodeBunny: how is this impossible while I do it?
MaciejCzyzewski has joined #ruby
<CodeBunny>
jhass: I have multiple projects with conflicting gemsets. It is not bad to have seppetate gemsets for sepperate projects. It keeps you from having to bundle all the fucking time
<jhass>
I don't
<ilhami>
can we stop using the word fuc****?
<jhass>
CodeBunny: I said if I feel the need (I rarely do) to "clean up" you can just bundle clean --force in one project and rebundle in all others
<ilhami>
is it this command I have to run after the install?
<CodeBunny>
jhass: Why would I do that when I can have a gemset for project x with gem thing 2.1 and leave it alone, and a gemset for project y gem thing 2.2, and leave it alone too.
<havenwood>
ilhami: dunno, but i bet RVM will correct you if it isn't :P
timonv_ has joined #ruby
<ilhami>
cool.
<havenwood>
ilhami: the #rvm channel is quite helpful for such stuff
<jhass>
CodeBunny: because turns out most projects still do share the majority of dependencies, I see no need to install them n times
<ilhami>
haha I didn't know such channel existed. :D
<shevy>
hey guys... I got one yaml file and it has entries for a license
GriffinHeart has quit [Ping timeout: 245 seconds]
<shevy>
license: GPLv2 # or should I rather use ... license: GPL 2 ... or just license: GPL
astav has joined #ruby
skaflem has quit [Quit: Leaving]
<CodeBunny>
maybe for your case this is true, but that is not true for a lot of people. So your take that gemsets are bad is just poor logic. The feature exists for a reason and thousands of developers, such as myself, and well, every developer I work with, use it to great effect every day.
MaciejCzyzewski has quit [Client Quit]
astav has quit [Client Quit]
<CodeBunny>
Just because it isn't nessasary for you doesn't meake it wrong
<havenwood>
shevy: GPLv3
<havenwood>
shevy: :P
<jhass>
CodeBunny: gemsets where invented back when we didn't have bundler, back then it was the only way to have projects with conflicting sets of dependencies. But bundler made gemsets obsolete
<shevy>
havenwood yeah; I have almost 2700 yaml files with optional license entries
<jhass>
*were
<shevy>
I figure GPL 2 is most oftenly used, but I wonder whether I should enforce uniform and consistent entries how to call them
<shevy>
I guess I will drop the 'v' there
tectonic has joined #ruby
bMalum_ has joined #ruby
<havenwood>
shevy: GPLv2 GPLv3
<CodeBunny>
jhass: the bundler team uses gemsets. I've sat in the room with the developers on the bundler team, with them using gemsets. I call bullshit
<shevy>
hmm
daniel3 has left #ruby ["Leaving"]
<shevy>
come on guys, one day it will all be assimilated into gem itself anyway
Jackneill has quit [Remote host closed the connection]
<havenwood>
shevy: i think GPLv1, GPLv2 and GPLv3 since those are the offical abbreviations
<shevy>
how can a pledge for an updated mac port of htop raise that much
bMalum has quit [Ping timeout: 272 seconds]
bMalum_ is now known as bMalum
<ilhami>
so now that I have installed RVM and installed ruby with it.. can I then to "gem install jekyll"?
<ilhami>
do*
<havenwood>
ilhami: yes, that'd local install the gem
<shevy>
havenwood aaaah ok, that helps me immensely, then I can simply adopt the official variant rather than having to make a decision :) thanks!
<jhass>
CodeBunny: I don't want to talk you out of using gemsets if that feels like the right thing for you. It's just certainly not needed anymore as one of the first things somebody new to ruby needs to learn
JoshGlzBrk has joined #ruby
<ilhami>
last time I checked in this channel there was no activity.. Now there is a lot. and all are experts so to speak.
thsig has quit [Ping timeout: 245 seconds]
sanguisdex has quit [Ping timeout: 244 seconds]
<havenwood>
CodeBunny: what would you use gemsets for?
<jhass>
CodeBunny: especially if that somebody just wants to get something like jekyll running
knebber has joined #ruby
<knebber>
anyone here know php?
<ilhami>
eeeh #php? :D
<havenwood>
CodeBunny: the only case i'm used to seeing is to add additional user-specific development gems to the bundle
<ilhami>
I feel like you came to the wrong channel hahaha
<ilhami>
do I need to add gemsets? what is it?
<knebber>
php is invite only
<CodeBunny>
jhass: how about instead of argueing with me, You actually help said newbie. Like I was doing when you decided to attack me
<havenwood>
ilhami: no, you don't need gemsets
<ilhami>
knebber, get registered.
<knebber>
i don't know how to do that
<jhass>
knebber: no, just registered only, see /msg NickServ help
thsig has joined #ruby
<havenwood>
CodeBunny: i'm interested in legitmate uses for gemsets
<knebber>
how do i ignore users in irc?
<jhass>
CodeBunny: I already did before that, and sorry if you felt attacked, I tried to have a discussion
<knebber>
like make it so they don't show up any more
<CodeBunny>
For one thing, knowing when you have conflicting gems. for another, not tromping on top of a working gemset when your fucking around
<knebber>
for me
<Wolland>
/ignore <user>
<ilhami>
knebber you can use the /ignore function.
atmosx has joined #ruby
<knebber>
thanks
<CodeBunny>
they are great, ESPECIALLY for newbies
<havenwood>
CodeBunny: i'd worry they'd be especially confusing for newbies
<knebber>
will ignored people still see my comments?
<Wolland>
es
<ilhami>
yes unless they ignored you as well.
<shevy>
knebber sure, you only can not see what they do
<knebber>
ok cool thanks
<shevy>
knebber of course they could also ignore you :)
boxmein has joined #ruby
<CodeBunny>
I find once they get thier head around 3 commands, it clears up a lot of confusions
<CodeBunny>
Gemsets are not hard
<ilhami>
why should someone ever use gemsets?
<ilhami>
what is it for?
<shevy>
gemsets are as unnecessary as is bundler itself
jontmorehouse has joined #ruby
<knebber>
so im trying to build a website
<knebber>
that needs a database and some functions
<havenwood>
CodeBunny: isn't it better practice to edit the Gemfile and use Bundler to add your development dependencies? is the gemset command really actually easier than using Bundler?
<wasamasa>
knebber: and for that you need to /ignore people?
<CodeBunny>
Yeh. so are glasses and plates, but we tend to use both at dinner
<ilhami>
knebber, cool. Are you building in ruby?
<rpag>
havenwood, i think there were more legit cases before bundler arrived
<havenwood>
rpag: for sure, handled a big problem
<knebber>
i need to /ignore people because a lot of programmers are abrasive and unhelpful to beginners
<CodeBunny>
You use the gemfile, and bundler, and a gemset
<shevy>
hey I know people who do use eye surgery or contact lenses or just use their hands
<knebber>
but will still waste your time with pointless arguments
<CodeBunny>
gemset is just another tool
<Wolland>
gemsets are probably easier than writing gemfile with exact versions of all gems you want
<shevy>
knebber sounds as if you have a use case for rails
<ilhami>
knebber, you can use ruby on rails :D
<CodeBunny>
with gemset you can 'gem list' and get just the gems in your gemset instead of every gem you ever installed
<Wolland>
and then maintaining it
ptrrr has quit [Quit: ptrrr]
dx7 has joined #ruby
<CodeBunny>
and you can clean just you gemset, and start over.
<jhass>
shevy: knebber or maybe just sinatra or something similarly lightweight, hard to tell from "website with db and few functions" ;)
<knebber>
and then forwarding that to my email
<CodeBunny>
you get less conflicts
<knebber>
ilhami shevy i may, i copy pasted a simple php function for passing an email form on the website to the server mail
<havenwood>
CodeBunny: but i just don't think i'd use it for anything other than adding a couple default gems to my Bundles, which i'd prefer to do otherwise
<ilhami>
or bundler?
<CodeBunny>
what if you need x version of that gem for project foo, and y version of that gem for project y
<shevy>
ilhami it came from the pits of hell aka the rails-ecosystem
hiyosi has quit [Ping timeout: 240 seconds]
<knebber>
and am reading php syntax so i can interact with a function that turns images into scaled thumbnails of 100x 100 px
<ilhami>
I see some people are not fond of it in here. :D
<jhass>
ilhami: no, please ignore gemsets and bundler for now, you don't need them (yet)
<CodeBunny>
you have project y in one terminal, and project x in another terminal
<havenwood>
ilhami: a gem is a package of Ruby software that has a library and maybe even executable binaries. bundler is one such gem.
timonv_ has joined #ruby
<ilhami>
havenwood, cool.
govg has quit [Ping timeout: 245 seconds]
skammer2 has joined #ruby
<shevy>
havenwood are they really binaries? :D
<CodeBunny>
you load your gemsets and your ruby version in each terminal to match the project you are workin on
<havenwood>
CodeBunny: isn't that exactly Bundler's use case?
<CodeBunny>
no
tyll_ has joined #ruby
<Wolland>
ilhami: gemsets are a way to isolate a set of gems into its own "space"
<ilhami>
Wolland, good explanation. Thanks.
<CodeBunny>
bundler installs the gems in your gemfil in your current gemset
<jhass>
knebber: so copy pasting some php scripts together? Nice, started the same way. Just don't call it programming or think it's secure ;P
<CodeBunny>
rvm ALWAYS has a gemset
knebber_ has joined #ruby
<havenwood>
CodeBunny: though you can use RVM without gemsets
<CodeBunny>
by default it is <default>
shredding has joined #ruby
<CodeBunny>
nope
<havenwood>
CodeBunny: even without MRVM you can opt out
<havenwood>
yup
<knebber_>
so im open to using rails
<havenwood>
internet disagreement! \o/
govg has joined #ruby
<CodeBunny>
you can run without rvm... but rvm always useses a gemset...
<ilhami>
:D I think I shouldn't confuse myself too much for now.
<knebber_>
i am apparently here twice somehow
<jhass>
CodeBunny: installing gems is only part of bundlers functionality, it's core functionality is actually restricting the $LOAD_PATH to said gems
<knebber_>
one serious concern is which is worth learning long term for doing other work contracts
<knebber_>
im doing this pro bono for the learning experience
carraroj has quit [Quit: Konversation terminated!]
tyll has quit [Ping timeout: 250 seconds]
<shevy>
havenwood simply does know everything
claymore has quit [Read error: Connection reset by peer]
<knebber_>
so as far as specifics, its a real estate website that will have a map that shows a bunch of locations, plus images of the properties; this will be on the homepage
<ilhami>
is bundler like composer? :D
tylersmith has joined #ruby
knebber has quit [Ping timeout: 246 seconds]
<wasamasa>
knebber_: rails is useful to know
<shevy>
knebber_ dunno, the railsers are mostly on #rubyonrails - if you don't mind manual glue code on your own, you can use sinatra + binding to something like mysql, sqlite or postgresql or mariadb or whatever
<wasamasa>
"Unleash the weapons of spam destruction on to the world."
<ilhami>
I didn't know you could register with such a mail. LOL
<jhass>
knebber_: I'd still be interested why you're afraid of giving away your real mail to a service like freenode
anaeem1 has joined #ruby
<ilhami>
Freenode = NSA, maybe he thinks that?
<wasamasa>
hahaha
<havenwood>
his mail might get haunted by a freenode ghost
<knebber_>
like i said
<Wolland>
maybe he is in pakistan or some country where people get killed for talking
<knebber_>
if you're willing to give me money ill talk about that kind of thing
<ilhami>
Wolland, eeeh they aren't?
Adran has joined #ruby
<ilhami>
knebber_, LOL
<knebber_>
otherwise id like to keep it focused on technical subjects
<wasamasa>
knebber_: I still don't understand why money == email address
anaeem1 has quit [Read error: Connection reset by peer]
<knebber_>
money = discussing things that are irrelevant to the things im working on
<Wolland>
money == email is 45$/hour
<Wolland>
can we all pitch in and find out? $5 each?
<jhass>
knebber_: so I got that right, you don't want to answer such a simple personal(!)(=not work related) question, but expect us to help you with your work(!) pro bono?
<ilhami>
what does pro bono mean btw?
<Wolland>
free of charge
<havenwood>
ilhami: free as in beer
<ilhami>
oh
HelperW_ has quit [Ping timeout: 260 seconds]
<ilhami>
what is your favorite editor?
shredding has quit [Quit: shredding]
<jhass>
:(
<jhass>
troll question
<jhass>
let's pretend you didn't ask
<Wolland>
ilhami: you are asking all the questions to start a fight
<ilhami>
hahaha ok sorry.
<ilhami>
no I am not
JoshGlzBrk has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
sandelius has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
GriffinHeart has quit [Ping timeout: 250 seconds]
decoponio has quit [Quit: Leaving...]
sanguisdex has quit [Ping timeout: 244 seconds]
postmodern has joined #ruby
afhammad has joined #ruby
nettoweb has joined #ruby
nettoweb has quit [Read error: Connection reset by peer]
anaeem1 has joined #ruby
nettoweb has joined #ruby
MaciejCzyzewski has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
SqREL___________ has joined #ruby
tuelz has joined #ruby
Takle has joined #ruby
sinkensabe has quit [Ping timeout: 272 seconds]
mattstratton has joined #ruby
orangerobot has joined #ruby
mattstratton has quit [Max SendQ exceeded]
codeurge has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<orangerobot>
hello there. I'm writing a gem and I would like to add some methods to builtin classes (just to make my own code simpler, not my interface).. what would be the best place to write that code?
robbyoconnor has joined #ruby
mattstratton has joined #ruby
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<jhass>
orangerobot: in theory refinements are invented for that purpose
SqREL___________ has quit [Ping timeout: 245 seconds]
<orangerobot>
you mean subclassing?
<orangerobot>
jhass: ^
<jhass>
no refinements, you need to decide on your own whether you like them or not, they're certainly better than polluting core classes for everybody
<orangerobot>
jhass the class in question (the one I want to add methods to)is Proc. It's a special class inasmuch as it is passed in a different manner than other arguments
<orangerobot>
I wish ruby would remove this distinction
<orangerobot>
but I can also use refinements for that, right?
<jhass>
yes for any class
msx has quit [Ping timeout: 272 seconds]
<jhass>
but that sounds like you're confusing a few things
<jhass>
there's the & operator for converting procs to blocks and vice versa
<jhass>
but the Proc class itself is not passed in a special way
dh64 has quit [Quit: Konversation terminated!]
freerobby has quit [Quit: Leaving.]
<orangerobot>
when I pass a block to a function can I access it in any way other than giving it a name via & ?
<jhass>
yes, using yield
<jhass>
you could also capture it with Proc.new without further arguments, but I find that ugly personally
<orangerobot>
But only if the block is the last param
<lolmaus>
How do i select all even-indexed or all odd-indexed elements of an array?
<orangerobot>
right?
<lolmaus>
There's no select_with_index...
<jhass>
orangerobot: what do you mean? blocks are in a special slot outside the regular parameter list
<jhass>
lolmaus: select.with_index
aspires has quit []
hiyosi has joined #ruby
dorei has quit []
<lolmaus>
jhass: oh, right.. enumerators.
<lolmaus>
jhass: thx. ^_^
russt has joined #ruby
<jhass>
lolmaus: yeah, each_with_index.select should work too
startupality has quit [Quit: startupality]
<orangerobot>
jhass: correct. what I think I mean is that I wish blocks were first-class citizens in ruby
compuser has joined #ruby
<jhass>
I think they are
lxsameer has quit [Quit: Leaving]
<orangerobot>
well they should have a special slot in the parameter list then
<orangerobot>
they should be with the other arguments
<jhass>
orangerobot: some things you can only get objects that represent them, Proc for blocks, Method for methods for example
lw has joined #ruby
<orangerobot>
yeah.. do you think it's a 'smell' to pass blocks around like normal arguments?
<orangerobot>
i mean, hidden in an object
dx7 has quit [Remote host closed the connection]
dx7 has joined #ruby
<orangerobot>
as if ruby were a functional language I guess
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<havenwood>
orangerobot: it's pretty typical to pass a block around
<orangerobot>
i know, but not like a normal argument
<havenwood>
orangerobot: whats abnormal about it?
<orangerobot>
for one thing you can only pass one block to a function
<orangerobot>
if you don't encapsulate it in an object
<benzrf>
man i see more help vampires in #ruby than anywhere else i think
msx has joined #ruby
<havenwood>
orangerobot: you can pass dozens of blocks to a function :P
<jhass>
benzrf: mmh, I'd expect something like #php to have more :P
hiyosi has quit [Ping timeout: 244 seconds]
sinequanon has quit [Remote host closed the connection]
<benzrf>
well i dont go there
<benzrf>
im sure it has horrible amounts
<jhass>
neither do I
<benzrf>
amazingly i see almost none in #haskell
govg has quit [Ping timeout: 258 seconds]
<havenwood>
orangerobot: as procs
<benzrf>
i think haskell's outward rep tends to attract help vampires less than ruby's
<atmosx>
help vampires?
maletor_ has quit [Quit: Computer has gone to sleep.]
sevvie has joined #ruby
dx7 has quit [Ping timeout: 260 seconds]
<atmosx>
shit pow doesn't work again argh
govg has joined #ruby
<havenwood>
orangerobot: it works out quite well
HelperW_ has joined #ruby
silkfox has quit [Ping timeout: 272 seconds]
sinequanon has joined #ruby
pwh has joined #ruby
shredding has quit [Quit: shredding]
startupality has joined #ruby
shelling_ has quit [Quit: Connection closed for inactivity]
freerobby has joined #ruby
afhammad has quit []
dx7 has joined #ruby
freerobby has quit [Client Quit]
codecop has quit [Remote host closed the connection]
<havenwood>
orangerobot: just a binding
shredding has joined #ruby
HelperW_ has quit [Ping timeout: 244 seconds]
bluOxigen has quit [Ping timeout: 244 seconds]
HelperW_ has joined #ruby
<orangerobot>
havenwood: no there's no catch at all when using Procs as just regular arguments to functions? I mean def mymethod(a,b,c,d) and pass ints to a and b and procs to c and d?
<havenwood>
orangerobot: procs/lambdas can be passed around as normal arguments
<havenwood>
orangerobot: the block syntax sugar is limited but useful for the typical case
krisquigley has joined #ruby
<orangerobot>
that a single (optional) block will be passed
sinequanon has quit [Remote host closed the connection]
ilhami has joined #ruby
<ilhami>
I have a problem. Why does jekyll not run after I closed the terminal?
<havenwood>
orangerobot: just one lambda as a regular argument there, but you can just pass lamdas/procs around like any other object
<orangerobot>
>> def example a, b, c; puts b.call(a); c.call(a) end; example 'yup', ->(word){ word.capitalize}, &:upcase
HelperW_ has quit [Ping timeout: 250 seconds]
<orangerobot>
>> def example a, b, c; puts b.call(a); c.call(a) end; example 'yup', ->(word){ word.capitalize}, &:upcase
<eval-in_>
orangerobot => wrong number of arguments (2 for 3) (ArgumentError) ... (https://eval.in/201984)
fantazo has quit [Ping timeout: 272 seconds]
<ilhami>
(Note that this assumes the default keybinding/shortcut Control-Alt-L. If you have remapped it you'll need to adjust these instructions accordingly)
krisquigley has quit [Ping timeout: 260 seconds]
<havenwood>
orangerobot: as a proc: &:upcase.to_proc
Tricon has quit [Quit: Leaving...]
anaeem1 has quit [Remote host closed the connection]
<ilhami>
jhass, my keybinding is Ctrl + alt + T
Tricon has joined #ruby
seamon has quit [Quit: Zzzzzzz]
gregf has quit [Quit: WeeChat 1.0]
<jhass>
ilhami: sorry I don't use RVM myself and I think that "only source in the profile" was one of their more impractical changes, which is shown by the fact that basically all default configs have to be changed for it to work
<ilhami>
so what should I change this to ? lxterminal -e "bash -il
bmurt has quit []
hamakn has quit [Ping timeout: 240 seconds]
<jhass>
ilhami: I think that page I lined has a paragraph about the keybinding though?
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
michaeldeol has joined #ruby
timonv_ has joined #ruby
mary5030 has joined #ruby
<ilhami>
(Note that this assumes the default keybinding/shortcut Control-Alt-L. If you have remapped it you'll need to adjust these instructions accordingly) what should I change the il to?
<ilhami>
anyway let me try. brb
<havenwood>
>> def example a, b, c; [b.call(a), c.call(a)] end; example 'yup', ->(w){ w.capitalize }, ->(w){ w.upcase }
<benzrf>
rubie: a Class is just a template for an Object
<rubie>
the way this is going I would make methods for all the rooms
<benzrf>
rubie: make a class when you think you will want some objects that work similarly
TommeHo has quit [Ping timeout: 272 seconds]
<shevy>
rubie you are not using a class there
<benzrf>
rubie: an object is something with state and behavior
<shevy>
rubie think of a class as that whenever you use "def", you add a method to that class
<atmosx>
rubie: a class is a sensible way to gather many methods that have something in common (e.g. same arguments).
<benzrf>
rubie: do you know any other languages?
<shevy>
then you can invoke it via object.name
<rubie>
python i could have built something like this
<shevy>
in python you use classes too, so it is really the same
<atmosx>
shevy: let's start a startup!
<shevy>
atmosx omg I have 4 exams this week, I don't know how I could do anything else right now
<atmosx>
shevy: what exams?
Morkel has quit [Quit: Morkel]
<atmosx>
I'll re-start writing my thesis tomorrow morning
<rubie>
atmosx: so would creating a rooms class be a good idea in my case
<shevy>
tomorrow "processes in the life science industry", wednesday one about general applied biotechnology, thursday one about advanced cell biology, and friday a simple one about genetics (or I could skip that one and go for a tiny chemistry one for just 1.0 ECTS)
tlarevo has joined #ruby
<atmosx>
shevy: omg
<shevy>
the cell biology one I dread
hiyosi has joined #ruby
<atmosx>
rubie: yes, in your case the entire program could be in 1 class.
<shevy>
one part includes the proteins that constitute a nuclear pore complex
cajone has joined #ruby
<atmosx>
rubie: but even rooms could be in one class yes
fabrice31 has quit [Ping timeout: 260 seconds]
<shevy>
did you know that the filaments that protrude on one side from the NPC are made up of repeats of Phenylalanine-Glycine?
<rubie>
what would the Rooms atrributes be :north :east :south :west?
lnormous has joined #ruby
<atmosx>
shevy: no, I had no idea.
<havenwood>
rubie: just for fun: require 'abbrev'; direction = Abbrev.abbrev(%w[north east south west])[gets.chomp.downcase]
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
pwh has quit []
<shevy>
neither had I :-) I wonder how I can manage to get all that new stuff into my brain in just a few days
<atmosx>
shevy: what are the other side filaments made of?!
<Wolland>
rainbows
<shevy>
atmosx no real idea and it is only one small detail among a subtopic of that lecture about nuclear trafficking in general
<havenwood>
>> require 'abbrev'; Abbrev.abbrev %w[north east south west]
<atmosx>
shevy: I'm studying pharmacology lately and I really forgot most things about molecular biology :-/ I mean expect a very narrow domain of the thesis, I can't recall much else.
<shevy>
hehehe
pwh has joined #ruby
<shevy>
cool
<shevy>
so you know what "area under the curve" means right? as part of pharmacodynamics (or kinetics, not sure)
<atmosx>
sure
<atmosx>
AUC :-)
<shevy>
hopefully that question will come tomorrow
<shevy>
yeah
mooru has joined #ruby
pwh_ has joined #ruby
<shevy>
there is also legislation crap, I hate that... EU regulation, US regulation, why do I have to learn that :(
<shevy>
technical documentation
tlarevo has quit [Ping timeout: 260 seconds]
<atmosx>
it's kinetics
dx7 has quit [Remote host closed the connection]
<shevy>
for medical devices... reminds me of agile technique hehe
tlarevo has joined #ruby
<atmosx>
it's concentraion (in plasma) over time. HAlf-life and shit like that
<shevy>
yeah
hiyosi has quit [Ping timeout: 260 seconds]
<shevy>
actually, that pharmacy stuff is significantly more interesting than the legalese crap that I also have to learn, you should consider yourself lucky that you have to study the biological aspects of pharmacology atmosx :-)
lampd1__ is now known as lampd1
<shevy>
atmosx do you have an idea for a startup?
<atmosx>
shevy: yeah, might be :-) ...
bMalum has quit [Quit: bMalum]
Wolland has quit [Remote host closed the connection]
Darryl has quit [Quit: Connection closed for inactivity]
<atmosx>
shevy: not really. I'm working on a side-project lately that has all the attributed (in my mind at least) Sam Altman gave to your average 'good' idea for a startup: doesn't make sense enough, has a possibly small (niche) market and so on.
<atmosx>
we'll see, if I can make it work in our pharmacy.
spicerack has joined #ruby
<shevy>
ok but you already have an idea for a niche
Guest96667 is now known as marahin
<atmosx>
I mean if it will add any real value
marahin has quit [Changing host]
marahin has joined #ruby
<atmosx>
then I might turn it into a *real product*
<shevy>
I only have grand visionnaire ideas but no idea how to market anything
pwh has quit [Ping timeout: 246 seconds]
<havenwood>
rubie: if you want to do just pressing "w" for west without an enter, there's a handy way to do that: require 'io/console'; direction = STDIN.getch
<atmosx>
of course, when you work in any segment (I think) you get ideas
kayloos has quit []
<shevy>
yeah that is true
HelperW_ has joined #ruby
<atmosx>
for startups or automation which would behelpful, but first needs to be tested in a real-world env and luckily I have that too.
<havenwood>
rubie: STDIN.getch will just capture the first character
mooru has quit [Ping timeout: 245 seconds]
pwh_ has quit [Ping timeout: 260 seconds]
<rubie>
i'm going to take a note of that but right now i need to understand classes and objects better
MaciejCzyzewski has joined #ruby
aspires has joined #ruby
bricker`LA has joined #ruby
<shevy>
rubie I suggest you simply start to write more classes, you already did write a few classes before right? and now in your current code, you totally forgot classes
<atmosx>
rubie: TO do that, you need to either expand your program, make it more dynamic or write a new application.
<shevy>
it's as if your brain jumped off suddenly and forgot the rest
<shevy>
yeah
<atmosx>
shevy: happens tome alot :-P
<shevy>
write something new and put that current thing on halt
<shevy>
atmosx to me too, I often get dumber while especially rewriting
<shevy>
and then when I leave the area before my computer, suddenly I get clear ideas again
<atmosx>
shevy: yeah hehe
<shevy>
the computer is distracting :\
coderdad has joined #ruby
<shevy>
I have 5 tabs open with science lectures right now, in firefox
tkuchiki has joined #ruby
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<shevy>
but I can't watch or listen as they would distract me... but I also dont want to close the tabs either...
<atmosx>
rubie: try to write a catalog program, where you add names/surnames/phone numbers using classes.
<rubie>
ok
michaeldeol has joined #ruby
<atmosx>
shevy: yeap but that's bad. You should try to focus on one thing at a time.
<shevy>
yeah
<shevy>
simply for practice rubie, write more and more and more
<atmosx>
shevy: that's a good quality, to be able to focus on *something*
<shevy>
atmosx I know, I totally lack that ability :(
<atmosx>
shevy: I think you just don't try hard enough.
<shevy>
but on the good side... I finally reached a step in rewriting a project where things go very smoothly now
HelperW_ has quit [Ping timeout: 240 seconds]
<rubie>
for the catalog program is there just one class?
<atmosx>
shevy: you're good, you can do it easily.
<atmosx>
rubie: yeap. 1 class
klaut has quit [Remote host closed the connection]
dx7 has joined #ruby
<shevy>
rubie see, that is the thing - you need to reach a point where you don't have to ask such a question anymore
<shevy>
because your brain translates the problem domain directly into "what code do I need in ruby to achieve xyz"
<rubie>
i agree
<rubie>
:)
seamon has quit [Quit: Zzzzzzz]
<shevy>
simply start writing
<shevy>
you'll soon see where you'll have a problem
HelperW_ has joined #ruby
<shevy>
atmosx didn't you have several other exams about pharmacy before that you already passed?
<shevy>
I remember when you once asked a question while having an exam hehehe
<rubie>
does each class need an attr_accessor and to be initialized/
<shevy>
rubie do you understand attr_accessor ?
<shevy>
def initialize is available for all classes
<rubie>
sort of
tkuchiki has quit [Ping timeout: 240 seconds]
<rubie>
its lets you access attributes outside the class
<shevy>
not completely true
tlarevo has quit [Remote host closed the connection]
codeurge has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
phutchins has joined #ruby
migimunz has joined #ruby
coderdad has quit [Remote host closed the connection]
entrenador has joined #ruby
phutchin1 has joined #ruby
<migimunz>
Hello. I need to write a server (so to speak), which consists of a bunch of workers that work on messages they get from rabbitq. However, there also needs to be a small web interface to the workers. I'm thinking of using sinatra and a threadpool of some sort for the workers. Could anyone give any ideas as to what I could use to accomplish this?
lampd1 has joined #ruby
bobishh has quit [Ping timeout: 260 seconds]
<centrx>
migimunz, What features is the web interface to the workers supposed to have?
kinduff has joined #ruby
<centrx>
migimunz, What manages the worker processes?
tomeara__ has joined #ruby
jasooon has joined #ruby
<migimunz>
centrx, the web interface would allow the user to simply push another task to the workers, though it might be a better idea for the web part to simply push it to the message queue, from which the workers would fetch it.
tomeara__ has quit [Client Quit]
<migimunz>
centrx, for the second one, I'm not sure, that's what I need advice about
<centrx>
migimunz, The web interface would not be an interface to the workers, it would be an interface to add things to the message queue that the workers read from?
<migimunz>
pretty much, yes
<migimunz>
I suppose I could just create a separate sinatra app just for that
kinduff has quit [Read error: Connection reset by peer]
<migimunz>
god looks interesting, I'll read the docs to see what it's about
sinkensabe has joined #ruby
jasooon has quit [Ping timeout: 260 seconds]
tomeara__ has quit [Ping timeout: 245 seconds]
x1337807x has joined #ruby
tomeara__ has joined #ruby
sinkensabe has quit [Ping timeout: 258 seconds]
solo__ has joined #ruby
entrenador has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
larissa has quit [Quit: Leaving]
davasaurous has quit [Remote host closed the connection]
larissa has joined #ruby
freezey has joined #ruby
davasaurous has joined #ruby
ctp has quit [Read error: Connection reset by peer]
ctp has joined #ruby
startupality has quit [Quit: startupality]
SqREL___________ has joined #ruby
c107 has joined #ruby
fabrice31 has joined #ruby
GriffinHeart has quit [Remote host closed the connection]
aspires has quit []
davasaurous has quit [Remote host closed the connection]
<jhass>
migimunz: I find it hard to believe that there's no premade solution for this that uses rabbitmq. If there really is nothing I'd consider writing some bridge code that just pushes the jobs to something like sidekiq
<jhass>
s/rabbitmq/zeromq in general/
aspires has joined #ruby
<migimunz>
jhass, I'm sure there are, I just don't know of them, which I why I asked here
<migimunz>
but I didn't know of sidekiq either, so that helped too :)
GriffinHeart has joined #ruby
fabrice31 has quit [Ping timeout: 272 seconds]
davasaurous has joined #ruby
rpag has quit [Ping timeout: 258 seconds]
JavaTheHut has joined #ruby
rpag has joined #ruby
JavaTheHut has left #ruby ["ERC Version 5.3 (IRC client for Emacs)"]
<migimunz>
bunny is a ruby client form rabbitmq, yeah, but I'm looking for something akin to python's twisted, but which uses rabbitmq messages instead of... whatever else
<migimunz>
basically, 1) listen 2) when something comes up, spawn a worker to deal with it 3) goto 1
<migimunz>
I mean, I can do it manually, but I wondered if there was an easier solution
<finisherr>
If I add a value to an array (particulary a value from the command line via getops), it is no longer accessible elsewhere. Is there a way for me to copy the values into an array so I can still have access to the getopts values elsewhere?
larsam has quit [Quit: Exit]
coderdad has quit [Remote host closed the connection]
lampd1 has quit [Ping timeout: 244 seconds]
<centrx>
finisherr, I would recommend using OptionParser instead
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<finisherr>
right now i’m working on someone elses code and don’t want to meddle too much
sepp2k has quit [Read error: Connection reset by peer]
<centrx>
finisherr, Are you looking for the #dup method?
<finisherr>
i actually tried dup
yakko has joined #ruby
<finisherr>
but i still can’t access the options after i’ve fed them to an array
<finisherr>
it’s kinda weird
<centrx>
Is it a real array?
<finisherr>
i did opt_array = Array[val1, val2, val3]