<zenspider>
Tarkers34: I saw your gist. your claims don't make sense in any iterator/enumerator system I've ever used
<zenspider>
kb3ien: big pastes should use gist or something
<zenspider>
path should point to the lib dir
KrzaQ has joined #ruby
<zenspider>
usually bundler will do all this for you
roolo has joined #ruby
n008f4g_ has quit [Ping timeout: 256 seconds]
roolo_ has quit [Ping timeout: 246 seconds]
balazs has joined #ruby
idiocrash has quit [Remote host closed the connection]
cir0x has quit [Quit: Leaving.]
<jhass>
kb3ien: /var/www/site/path/vendor/bundle/ruby/2.1.0/gems/ebsco-discovery-service-api-1.0.4 and try actually removing the version from the .gemspec name
cir0x has joined #ruby
MatthewsFace has joined #ruby
sharpmachine has joined #ruby
thalassa has joined #ruby
nahtnam has joined #ruby
kkeuning_ has joined #ruby
balazs has quit [Ping timeout: 246 seconds]
kkeuning has quit [Quit: This computer has gone to sleep]
kkeuning_ has quit [Client Quit]
cir0x has quit [Client Quit]
JDiPierro has quit [Remote host closed the connection]
sharpmachine has quit [Ping timeout: 264 seconds]
kkeuning has joined #ruby
kkeuning_ has joined #ruby
shazaum_ has joined #ruby
kkeuning has quit [Client Quit]
kkeuning_ is now known as kkeuning
sudoku has joined #ruby
sudoku has left #ruby [#ruby]
axsuul has joined #ruby
Musashi007 has quit [Quit: Musashi007]
kb3ien has quit [Ping timeout: 246 seconds]
marr has quit [Ping timeout: 246 seconds]
serivich has joined #ruby
Limix has quit [Quit: Limix]
drew0 has quit [Ping timeout: 255 seconds]
Akagi201 has quit [Remote host closed the connection]
bruno- has joined #ruby
serivich has quit [Ping timeout: 246 seconds]
EllisTAA has quit [Quit: EllisTAA]
kb3ien has joined #ruby
kb3ien has left #ruby [#ruby]
kb3ien has joined #ruby
<kb3ien>
what will cause the re-reading of the Gemfile, do I need to just restart passenger, or is there more to it than that?
<zenspider>
I wish Float had close_to?(n)
bruno- has quit [Ping timeout: 246 seconds]
Lucky_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Limix has joined #ruby
kkeuning has quit [Remote host closed the connection]
sharpmachine has joined #ruby
havenwood has joined #ruby
nobitanobi has quit [Remote host closed the connection]
Musashi007 has joined #ruby
jhass has quit [Excess Flood]
roolo has quit [Ping timeout: 256 seconds]
icebourg has joined #ruby
jhass has joined #ruby
coffeeju1 has quit [Ping timeout: 265 seconds]
PaulePanter has quit [Ping timeout: 265 seconds]
zly has quit [Ping timeout: 248 seconds]
PaulePanter has joined #ruby
zly has joined #ruby
coffeeju1 has joined #ruby
djbkd has quit [Quit: My people need me...]
Lucky_ has joined #ruby
yfeldblum has joined #ruby
jlast has quit [Ping timeout: 246 seconds]
<Ox0dea>
Is there a way to pluck the class itself out of a singleton class?
lordkryss has quit [Quit: Connection closed for inactivity]
<al2o3-cr>
Ox0dea: if there is, it'll be you that finds out :P
<Ox0dea>
Internally, it's carried around on an instance variable called "__attached__", no leading @, so I figure they thought it best not to expose it, but I can't imagine why.
<Ox0dea>
al2o3-cr: Heh, I have an idea about how to get to it with Fiddle, but I was hoping for something a little less finicky.
<jhass>
Ox0dea: .ancestors[1] ?
dgutierrez1287 has quit [Remote host closed the connection]
symm- has quit [Read error: Connection reset by peer]
<jhass>
not 100% guaranteed though I guess
<Ox0dea>
jhass: That'll be another singleton class.
sharpmachine has quit [Read error: Connection reset by peer]
<al2o3-cr>
>> Class::Object
symm- has joined #ruby
<jhass>
>> class Foo; end; Foo.new.singleton_class.superclass
<ruboto>
al2o3-cr # => /tmp/execpad-4ae7f53f3575/source-4ae7f53f3575:2: warning: toplevel constant Object referenced by Cla ...check link for more (https://eval.in/392106)
m3_del has quit [Remote host closed the connection]
<atomiccreeper>
I doubt this is a thing, but if it is, please inform me. Would being able to dissect a ruby statement into OO (like Parser.parse("def foo bar; return x; end").methods (returning objects)) So what I'm asking is there an effective Ruby syntax parser for ruby, if i want to inspect logic represented in ruby?
<atomiccreeper>
or would I have to cannibalize the MRI insides for this?
<atomiccreeper>
If so, what would the terminology for it be?
sharpmachine has quit [Read error: Connection reset by peer]
<atomiccreeper>
other than describing it as "Ruby parsings for ruby"
<pontiki>
thanks, Ox0dea, you were faster
<Ox0dea>
I mean, it's parsing no matter how you slice it.
<Ox0dea>
You get back an abstract syntax tree representing the Ruby code.
<Ox0dea>
It's still on you to interpret the S expressions as fits your needs.
<atomiccreeper>
Thanks, i think i found what i need
A205B064 has joined #ruby
<Ox0dea>
atomiccreeper: I think you're probably just looking for eval?
zachk has quit [Quit: WeeChat 0.4.2]
finisherr has quit [Quit: finisherr]
<atomiccreeper>
0x0dea: No
t_ has quit [Ping timeout: 255 seconds]
<sphex>
Ox0dea: I was wondering... can ruby be parsed without executing it? I noticed it has BEGIN blocks...
<Ox0dea>
sphex: Parsing is just transforming a big string of code into meaningful tokens.
t_ has joined #ruby
<Ox0dea>
BEGIN and END have no bearing on that process.
<Nilium>
Well, that's lexing/tokenizing
<Nilium>
Parsing usually means getting meaning out of the token stream
<Ox0dea>
Yes, I could've worded a bit better.
sharpmachine has joined #ruby
<sphex>
Ox0dea: perl cannot be parsed without executing its BEGIN blocks, because they can modify the package symbol tables (e.g. when exporting subs), which in turns affects parsing. I guess ruby doesn't allow that to happen.
mfranzwa has quit [Quit: mfranzwa]
<Ox0dea>
Aye, the running joke is that only Perl can parse Perl.
<atomiccreeper>
0x0dea: so, perl must be written in perl than
<Ox0dea>
No, the joke is merely that.
<sphex>
hehe.. yeah. ruby being sane must really help with having multiple implementations like that.
<Ox0dea>
> ruby sane
micalexander has quit [Quit: Leaving...]
abyss has quit [Ping timeout: 256 seconds]
<Ox0dea>
It's saner than Perl, to be sure, but that's not saying much. :P
havenwood has quit [Ping timeout: 256 seconds]
sarkyniin has joined #ruby
jlast has quit [Remote host closed the connection]
<atomiccreeper>
I've actually been googling this question my self for quite a while. googled it this second and it was so obvious :(
ohaibbq has joined #ruby
atomiccreeper has quit [Quit: Page closed]
Limix has quit [Quit: Limix]
bootstrappm has joined #ruby
renderful has joined #ruby
<sphex>
It's pretty neat how ruby's metaprogramming features are not macro/template-based, and do not seem to ever affect parsing. I'm still trying to understand them properly... :/
dgutierrez1287 has quit [Remote host closed the connection]
JDiPierro has quit [Remote host closed the connection]
bf4 has joined #ruby
<Ox0dea>
The elegance of the ancestor chain and how it influences method lookup is certainly something to behold.
nfk has quit [Quit: yawn]
mfranzwa has joined #ruby
tkuchiki has joined #ruby
<Ox0dea>
It's arguably the best and worst part of Ruby; it gives you remarkable control over the behavior of your objects, but also gives you an overabundance of opportunities to invalidate the method cache and slow things way down.
<sphex>
and how Kernel becomes "part of" objects. was that also a smalltalk thing? maybe reading up on smalltalk.
jpfuentes2 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tkuchiki has quit [Remote host closed the connection]
renderful has quit [Ping timeout: 255 seconds]
<sphex>
Ox0dea: oh yeah.. I'll always aim to not modify classes past a certain "setup" phase in my programs (assuming I'll even know when I'm modifying them, meh :/)
bf4 has quit [Ping timeout: 264 seconds]
jpfuentes2 has joined #ruby
Tarkers34 has quit [Ping timeout: 246 seconds]
idafyaid has joined #ruby
tno has quit [Remote host closed the connection]
jaygen has quit [Read error: Connection reset by peer]
bootstrappm has quit [Ping timeout: 252 seconds]
jaygen has joined #ruby
<Ox0dea>
sphex: The open/closed principle *should* be followed religiously, but it needn't be the final say in all situations.
<El3ktra>
I feel decently prepared, but I was wondering if there was anything that I should look at that people would suggest
Hobogrammer has quit [Ping timeout: 264 seconds]
<stoodfarback>
El3ktra: Assuming you're good with both ruby and rails, maybe catch up on what's new in rails master. Could give you some impressive-sounding tidbit.
<wmoxam>
El3ktra: It's really dependant on the actual position. In my experience these sorts of positions range from backend heavy, to full stack, to front end focused with a little bit of backend
devbug_ has joined #ruby
ryba has quit [Ping timeout: 264 seconds]
<wmoxam>
El3ktra: when I have interviewed people I haven't focused too much on Rails itself at all :p
<El3ktra>
he he "splat"
<El3ktra>
I am still giggling about the Object method "taint"
<El3ktra>
wmoxam, yeah, I go get the feeling that they are going to be asking ruby questions
Hobogrammer_ has quit [Ping timeout: 264 seconds]
<El3ktra>
it's a phone intervew, then I will get about 45m to work on a programming problem
fgo has joined #ruby
<El3ktra>
have you guys played around on codewars?
serivich has joined #ruby
<wmoxam>
El3ktra: nope
PlasmaStar has joined #ruby
ohaibbq has quit [Remote host closed the connection]
<El3ktra>
wmoxam, yeah, that's why I am asking here :P
aryaching has quit [Ping timeout: 248 seconds]
<coffeecupp>
is anyone here using emacs??
<wmoxam>
it can be 'do clever thing X that you would know if you went to the same school as me'
JDiPierro has quit [Remote host closed the connection]
devbug has quit [Ping timeout: 255 seconds]
<El3ktra>
yeah, I got a question like that during an interview
michael_mbp has quit [Excess Flood]
<wmoxam>
and at the opposite end it can be "here's a problem that we often run across in this job"
<El3ktra>
It was an algerba question that had a devide by zero in it, which apparently is covered in nearly every math class nowadays
nobitanobi has quit [Remote host closed the connection]
<stoodfarback>
coffeecupp: Yep.
dik_dak has joined #ruby
<coffeecupp>
You wouldn't happen to be using robe mode would you?
<El3ktra>
the sucky thing is that I really want this job. The last two interviews I didn't get, but they were for jobs that I didn't really feel that I was a good fit for
<stoodfarback>
coffeecupp: Nope.
<coffeecupp>
gawd damn.
JDiPierro has joined #ruby
dik_dak has quit [Max SendQ exceeded]
<coffeecupp>
Well could you think of any reason that ruby couldn't find bundler in the gem path
dik_dak has joined #ruby
michael_mbp has joined #ruby
karpuragauram has joined #ruby
JDiPierro has quit [Ping timeout: 250 seconds]
vivekananda has quit [Ping timeout: 246 seconds]
chihhsin has joined #ruby
Mia has quit [Read error: Connection reset by peer]
<slash_nick>
baweaver: how can I run your Foo#bar Foo#baz examples?
charliesome has joined #ruby
tkuchiki has joined #ruby
adamski2600 has joined #ruby
<baweaver>
haven't pushed the gem yet
<baweaver>
if you DL the source code, it's in spec/fixtures/basic_rpsec.rb
<slash_nick>
baweaver: yeah, but i've cloned :)
<baweaver>
pry --gem
<baweaver>
then Clairvoyant::grok('spec/fixtures/basic_rspec.rb')
arescorpio has joined #ruby
tkuchiki has quit [Remote host closed the connection]
<slash_nick>
ok... yeah, i recognize that from your tweet. dur. thanks :)
konsolebox has quit [Quit: Leaving]
<baweaver>
the grok method is going to be getting a major overhaul as is
<baweaver>
I just wanted to see if I could get the basics
neanderslob has quit [Ping timeout: 256 seconds]
neanderslob has joined #ruby
sharpmachine has joined #ruby
<slash_nick>
baweaver: it's pretty cool... i was mostly curious as to how you're going to test... i assume you'll have unit tests for #grok stuff... run unit tests, but also generate classes to cover your rspec fixture; then run all tests again, confirming your rspec fixture is indeed satisfied by the generated code
grey_beard has quit [Remote host closed the connection]
<slash_nick>
baweaver: OH it doesn't fill in the methods?
NeverDie has quit [Quit: I'm off to sleep. ZZZzzz…]
sharpmachine has quit [Ping timeout: 264 seconds]
grey_beard has joined #ruby
<baweaver>
not yet
<baweaver>
proof of concept
<slash_nick>
just a misunderstanding... it's still awesome. cool TDD tool in the making
<baweaver>
yeah, I had a ping pong idea as well for it
idiocrash has quit [Ping timeout: 250 seconds]
<baweaver>
bail out after 4-5 tries saying I have no idea, you fix it.
MrJiks_ has joined #ruby
<slash_nick>
baweaver: i haven't seen this before... initialize(klass_name:)... is that valid? KV with no V?
grey_beard has quit [Remote host closed the connection]
<baweaver>
yeah
<baweaver>
named params
<slash_nick>
(it must be, it runs)
<baweaver>
means it's required
grey_beard has joined #ruby
<baweaver>
kinda like def method(a) requires a
<baweaver>
but def method(a=1) doesn't
<baweaver>
In general I prefer named params
MrJiks has quit [Ping timeout: 248 seconds]
<baweaver>
helps me remember what the heck I did a few weeks ago.
<slash_nick>
ah... i thought it was named params, just looked funny to see "key:" without that " :value"... i actually haven't used named params, myself
<slash_nick>
which now should be obvious :)
* baweaver
shrugs
<baweaver>
all at your own pace on some things
MrJiks has joined #ruby
<baweaver>
it's more of a clarity thing honestly.
MrJiks_ has quit [Ping timeout: 264 seconds]
<baweaver>
that, and args can be in whatever order
nahtnam has quit [Quit: Connection closed for inactivity]
<slash_nick>
that's a niceity
djbkd has joined #ruby
<baweaver>
it also deconstructs hashes for you as well.
senayar has joined #ruby
<toretore>
and it means you can completely forego positional arguments
<slash_nick>
toretore: is that the same as args can be in whatever order?
<Ox0dea>
agent_white: ^ Autovivification is best vivification.
devbug_ has joined #ruby
<slash_nick>
Ox0dea: reminds me of a gist
bhuvan_aurora has quit [Ping timeout: 256 seconds]
<Ox0dea>
Hm?
bhuvanaurora has quit [Ping timeout: 265 seconds]
krz has quit [Read error: Connection reset by peer]
<agent_white>
Ox0dea: I'll need to decypher that line to understand whatchu mean. I haven't coded in nearly have a year. :P
<agent_white>
half even.
<Ox0dea>
It's a hash trick that the article doesn't really cover.
<Ox0dea>
It does demonstrate creating new hashes for missing keys, but it does it the way it might've been done in the bad old days before #default_proc.
devbug has quit [Ping timeout: 246 seconds]
ryba has joined #ruby
werelivinginthef has quit [Remote host closed the connection]
duncannz has quit [Remote host closed the connection]
<[k->
>> require 'anything'
<ruboto>
[k- # => cannot load such file -- anything (LoadError) ...check link for more (https://eval.in/392305)
MrJiks_ has quit [Ping timeout: 252 seconds]
<[k->
I thought it forbid requiring anything...
<Ox0dea>
Oh, never mind. The jail eval.in is using lets you list /proc/self, but not actually read any of the files.
<Ox0dea>
[k-: You can require anything in the standard library.
<[k->
the Haskell eval.in doesn't allow you to import anything :(
<arup_r>
binread is giving such thing "Q\xC5!\xDDJF3\xAD\xDF\x1D\b\v\xD4\x8En..." kinds of lots of conent
<Ox0dea>
arup_r: Do you know what kind of file this is?
<arup_r>
I have to do payment gateway integration..
niemcu has joined #ruby
<arup_r>
this file is provided by PG authority..
<arup_r>
I have a pHp code,, where they did something with this file.. but php I don't understand.. I need to write a Ruby wrapper
gianlucadv has joined #ruby
<Ox0dea>
arup_r: God kills a kitten every time you say "a code"; why do you hate baby cats?
<arup_r>
what do you mean ? :)
<[k->
a code snippet?
<Ox0dea>
"Some code", even.
<arup_r>
ok... in Php fine ?
howdoi has quit [Quit: Connection closed for inactivity]
<Ox0dea>
arup_r: Ruby doesn't contain parsers for every possible file format, of course; you'll need to understand the file format before writing a parser for it.
<[k->
how do binary files even work
<arup_r>
I am reading the code I have.. and trying to understand how to code it in Ruby
<arup_r>
only the problem is to parse the .cgn file.. rest I can gandle
<arup_r>
handle**
<Ox0dea>
So you're here either to ask us to translate some PHP for you, or else to guide you in your journey to learn Ruby?
yayfoxes has quit [Quit: WeeChat 1.2]
<arup_r>
guide.. hints
yayfoxes has joined #ruby
<Ox0dea>
Hints on... how to learn Ruby?
<arup_r>
I know Ruby
<arup_r>
no i know this lang
<arup_r>
I don't know PhP.. so ...
bhuvan_aurora has joined #ruby
<Ox0dea>
Sounds like you might need to learn some PHP.
<arup_r>
humm... it sounds like bell...
<arup_r>
it seems the PG team.. encoded the xml file to a .cgn file
* Nilium
isn't sure if this person is a troll
<arup_r>
I need to decode it
<arup_r>
No.. Nilium : I am not .. you probably not so frequent in this channel..
ta has joined #ruby
<Nilium>
Yeah, only a few years.
lkba has quit [Quit: Bye]
bhuvanaurora has joined #ruby
<Ox0dea>
arup_r: If you want to translate the code, you're obviously going to need to learn enough PHP to figure out what it's doing.
lkba has joined #ruby
<Ox0dea>
Better would be to endeavor to understand the file format and write a fresh parser in Ruby.
tvw has joined #ruby
sarkyniin has quit [Quit: Quit]
sphex has quit [Ping timeout: 264 seconds]
<Nilium>
Or just write it off as a dead format.
<Ox0dea>
[k-: In Ruby, the only noteworthy difference is that line terminators aren't converted to those of the host OS.
<baweaver>
Metaprogramming isn't something I embark on often, and I have a feeling this will be laden with it.
<Ox0dea>
Oh,
<Ox0dea>
I'd imagine so.
ryba has quit [Ping timeout: 265 seconds]
<[k->
metaprogramming is lisps domain!
<baweaver>
that's macro
<baweaver>
where do you think I got the idea from?
<[k->
I have no idea what you are talking about
khebbie has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<baweaver>
Hm. I wonder if I can dynamically instantiate a class and get its entire source as a string
<baweaver>
Lisp uses macros for extension of the language
serivich has joined #ruby
dgutierrez1287 has quit [Ping timeout: 264 seconds]
<Ox0dea>
baweaver: You don't want to build up the class as a string and then eval it because you're wanting to bring in methods from elsewhere, right?
<baweaver>
potentially
<baweaver>
that, and it's more useful for the ping-pong approach of seeing if a defined method clears a test
<baweaver>
I could just store the methods as objects
<Ox0dea>
Well, I suppose you could combine the various #_methods methods with the method_source gem.
<baweaver>
and whenever I want to re-eval the class I just "compile" the methods
<baweaver>
most of this is not well thought out, so fair warning if I sound like I'm rambling on
<Ox0dea>
I mean, it's a pretty crazy undertaking. :P
lessless has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
MatthewsFace has joined #ruby
ta has quit [Remote host closed the connection]
<baweaver>
I know, that's what makes it so dang fun :D
<Ox0dea>
Hey, our smilies lined up!
ta has joined #ruby
<baweaver>
heh
<Ox0dea>
I don't doubt that it can be done to an acceptable level, but there are going to be so many edge cases.
ledestin has joined #ruby
ropeney has joined #ruby
Pupeno has joined #ruby
yfeldblum has quit [Ping timeout: 248 seconds]
devbug_ has quit [Read error: Connection reset by peer]
noethics has quit [Remote host closed the connection]
<Ox0dea>
baweaver: To be clear, it's only meant to build skeletons, right? You don't intend to use heuristics to determine if some operation can be applied to turn the arguments into the expected value, for instance?
<baweaver>
that's way down the road if ever
<baweaver>
but sounds like a blast
<baweaver>
it's far more effective in areas where code is predictable
<baweaver>
read: Rails
abuzze has quit [Remote host closed the connection]
towski_ has quit [Remote host closed the connection]
riotjones has joined #ruby
towski_ has joined #ruby
vdamewood has joined #ruby
ndrei has joined #ruby
iateadonut has joined #ruby
emma has joined #ruby
<emma>
so why do people like ruby?
towski_ has quit [Ping timeout: 276 seconds]
riotjones has quit [Ping timeout: 276 seconds]
JohnBat26 has joined #ruby
bruno- has joined #ruby
JohnBat26 has quit [Client Quit]
JohnBat26 has joined #ruby
j4cknewt has quit [Remote host closed the connection]
<Ox0dea>
emma: Which is your favorite language?
Musashi007 has joined #ruby
shinnya has joined #ruby
<emma>
im really not any kind of expert or even really advanced novice in any language but the languages I have 'played' with have been python, racket (a type of scheme), and javascript
bruno- has quit [Ping timeout: 250 seconds]
sdothum has quit [Ping timeout: 252 seconds]
ta has quit [Remote host closed the connection]
sharpmachine has joined #ruby
<baweaver>
Imagine if Python let you have more freedom, while stealing parts of lisp and looking strangely like functional javascript in some cases
<baweaver>
there's ruby
<baweaver>
overly simplified, yeah
<agent_white>
Yeah fuck whitespace meaning things.
<[k->
white space is good
<agent_white>
I hate endings of methods/everything in python requiring a newline. It makes it hard to read... for me.
<agent_white>
NO
<baweaver>
Honestly if I have a big enough team that can't mind their whitespace I'll use Python every time
<agent_white>
NONONOON
<baweaver>
because I hate spending hours arguing stupid trite with Juniors who should be working on something more important than style arguments.
<agent_white>
A definitive ending of a function/class/etc via a keyword is awesome I think. Newlines? hell naw.
<baweaver>
really, it doesn't matter.
<agent_white>
baweaver: I've heard that too... folks saying they would want juniors to use python just to learn code formatting.
<baweaver>
It beats having them go crazy on code reviews being needless pedants over it
<agent_white>
You mean the junior being a pedant?
<agent_white>
;P
sharpmachine has quit [Ping timeout: 252 seconds]
<baweaver>
both sides in some cases.
<baweaver>
I get the eagerness, just direct it towards something that has actual value
<[k->
haskell also whitespace
<[k->
you have to enter newlines twice anyway
DoubleMalt has joined #ruby
<[k->
\nend\n\ndef something
<baweaver>
having to spell out lambda in Python is what annoys me
<agent_white>
Oh god haskell. If someone even used it for scripting I'd be pissed.
<agent_white>
;P
<baweaver>
they do
<baweaver>
and it has its uses
MatthewsFace has quit [Read error: Connection reset by peer]
<baweaver>
especially as a lexer.
<agent_white>
They do when they work alone.
* baweaver
sighs
<agent_white>
Otherwise, common sense is a better programming language.
<agent_white>
;D
<baweaver>
there are teams that do
ta has joined #ruby
<[k->
you have to spell out lambda in old Ruby too
nahtnam has joined #ruby
<agent_white>
baweaver: Very true.
<baweaver>
and they fixed that.
RegulationD has quit [Ping timeout: 252 seconds]
<baweaver>
Honestly if someone were to give me a choice between a language fluency for a team, I would pick Haskell any day
<baweaver>
Good Haskell programmers are worth their weight in gold
wallerdev has quit [Quit: wallerdev]
<[k->
haskell is pretty elegant
<agent_white>
Programmers.
<[k->
programmars* :P
<agent_white>
But if you're asking the support/sysadmins do to it, they'll tell you that you're using a jackhammer to get dirt from under your nails.
renderful has joined #ruby
ivanskie has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<agent_white>
s/do to/to do/
<baweaver>
depends on what you want to do.
<agent_white>
I'll just assume 'team' means programmers, not the rest...
<agent_white>
I disagree. Cool to let the programmers do that. But hell if I'd suggest/recommend it to doing sysadmin stuffs.
<baweaver>
that's more of a Python crack from initial direction
<baweaver>
though yes, Haskell has list comps
bhuvanaurora has quit [Ping timeout: 244 seconds]
<baweaver>
You do know I'm in DevOps right?
<[k->
cheating!
bhuvan_aurora has quit [Ping timeout: 252 seconds]
<baweaver>
...and I do write scripts in Haskell
serivich has quit [Ping timeout: 265 seconds]
<baweaver>
When I need something to be stable and bulletproof, I'm using Haskell
<agent_white>
baweaver: Then... you're doing good to ensure job security.
<agent_white>
;D
<baweaver>
Not really
<baweaver>
There are several of us here.
<baweaver>
You just assume that it's some mythical language
serivich has joined #ruby
renderful has quit [Ping timeout: 256 seconds]
<agent_white>
Nah, I just wonder why not write the scripts in C instead?
<baweaver>
Too low level
<baweaver>
ElasticSearch / Log Parsing lexers
<Ox0dea>
Also the exact opposite of bullet-proof.
<agent_white>
But compare that to readability? Say... if a dude walked in with only python knowledge, which would he pickup more easily?
<baweaver>
I will slap the idiot who suggests using C for log parsing with a crowbar
MatthewsFace has joined #ruby
<Ox0dea>
Uh-oh.
lessless has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<agent_white>
As I would for suggesting Haskell for scripting.
<Ox0dea>
This is gonna hurt.
<agent_white>
;D
<Ox0dea>
In my defense, I need libalpm anyhow, and nobody's bothered to write bindings.
sevenseacat has joined #ruby
<baweaver>
While the C programmer is segfaulting and corrupting memory, I'll be enjoying happy hour
<Ox0dea>
*needed
houhouli_ has joined #ruby
<agent_white>
True. But while the Haskell programmer is explaining what "side-effects" is, we'll have written the same script in ruby/python/lisp twice and be on our second round of drinks.
AlexAltea has joined #ruby
<baweaver>
you assume there's a need to explain
<agent_white>
You assume there isn't?
langland_ has joined #ruby
<agent_white>
Without a need to explain, yes, why not.
<agent_white>
But without a need to explain, why not the others?
<agent_white>
It's cool. But cooler if I was a hipster.
<agent_white>
I just want shit to work.
tomphp has joined #ruby
<[k->
I like it's syntax a lot more than Ruby
langlands has quit [Ping timeout: 248 seconds]
<[k->
haskell shit works if it compiles
<Ox0dea>
[k-: Would you mind linking to some Haskell code that you think looks really nice?
<[k->
Ruby shit crashes on runtime :/
<agent_white>
[k-: It's the first 'pure functional (excusing monads, or whatevah)' language I tried. And even still I found the syntax to be... not to my liking.
houhoulis has quit [Ping timeout: 264 seconds]
<[k->
Ox0dea beauty is in the eye of the beholder
<[k->
:s
<Ox0dea>
[k-: Indeed, but I asked you specifically.
<Ox0dea>
> functional excusing monads
<Ox0dea>
I suspect you have no idea what you're talking about, bud.
<agent_white>
I could care less performance of a language to be the most important: syntax is the first thing I see. Otherwise, why wouldn't all of us be programming in assembly?
<agent_white>
shiet. I need to renew my license of The Order.
tno has joined #ruby
houhouli_ has quit [Remote host closed the connection]
langland_ has quit [Ping timeout: 276 seconds]
<[k->
haskell is like math!
<[k->
if you hate math than you need to rethink your life
<[k->
you wasted your life learning math
<agent_white>
I give up. Haskell is neat. I don't think it's viable for "devops" or whatever buzzword you choose... but it takes away from the "synergy" of the support/admin team, bruh.
kephra has joined #ruby
<kephra>
moin - how to tell mkmf to recompile an extension if a header file changed?
<kephra>
the header is outside of the gems tree
lkba has quit [Ping timeout: 264 seconds]
bhuvan_aurora has joined #ruby
bhuvanaurora has joined #ruby
khebbie has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
pengin has quit [Remote host closed the connection]
<shevy>
kephra headers usually are outside there anyway
n008f4g_ has joined #ruby
<shevy>
somewhere in your extension, there should be a file like extconf.rb
<shevy>
mkmf is just the ruby-internal way to generate or compile things through that; extconf.rb should generate a new Makefile when you invoke it (or use the older setup.rb, it should also work); once you have the new Makefile, "make" should be possible
solocshaw has joined #ruby
workmad3 has joined #ruby
lxsameer has joined #ruby
houhoulis has joined #ruby
serivich has quit [Ping timeout: 255 seconds]
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
workmad3 has quit [Ping timeout: 256 seconds]
<kephra>
shevy, *ok* how to add a header to extconf.rb so the gem gets recompiled, if headers changes?
<zenspider>
this is some UGLY syntax: a@(Player {}) `attack` b = do
<zenspider>
damn. just... no. I'll stick to ML when I want to experiment with strong static typing.
arup_r has joined #ruby
<[k->
it can be solved using an extension ;-;
<[k->
but I didn't know about it 25 days ago
<zenspider>
I'll stick to ruby or scheme when I want to experiment with strong dynamic typing
ledestin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<zenspider>
oh, I'm sure it can. more syntax for an already unreadable language is not an improvement
<[k->
it's called NameFieldPuns iirc
<zenspider>
it's already hard to read... and I'm not bashing on your code specifically.
<[k->
named*
<zenspider>
I can ONLY read this (to the extent I can) because I took that ML class and there's enough overlap
<zenspider>
way way way fewer sigils and shit in ML tho
<[k->
I'm going to learn ocaml soon since I heard that it is nice
<zenspider>
oddly... I thought I'd like that one, but I picked up the... practical ocaml (? I think--by that finance company that does everything in ocaml) and damn
<Ox0dea>
Jane Street.
<zenspider>
that one
<zenspider>
neat idea. very neat idea.
<zenspider>
and they seem to do very good work and the book looked really good
multi_io has quit [Ping timeout: 250 seconds]
<zenspider>
but I just can't read the shit
<Ox0dea>
Ruby leaves an indelible mark on one's tastes as a programmer.
<zenspider>
my complex language of choice is ruby. I don't need much more than that (and mathematica)
<zenspider>
my simple language of choice is racket (scheme)
<zenspider>
between the three, I've got my needs fairly well covered
<zenspider>
I drop to C when I have to, obvs... but I even try to do that in ruby
<Ox0dea>
R !> Mathematica yet?
<zenspider>
I can't handle R
<[k->
hmm, I don't think NamedFieldPuns can solve it :(
<[k->
I have to pattern match
<zenspider>
it's got some great shit in it... but the design seems a mess
multi_io has joined #ruby
IanV0rn2341 has joined #ruby
<zenspider>
pattern matching is great.
<Ox0dea>
Julia too Python-like?
intinig has joined #ruby
<zenspider>
whatever that blob above is... I can't read / understand... nor do I think I want to
<zenspider>
haven't played with julia yet. I've heard good things
intinig has quit [Remote host closed the connection]
<[k->
but I commented it ;-;
<Ox0dea>
zenspider: There's no way currently to get the attachee out of a singleton class, right?
<Ox0dea>
Other than ObjectSpace, of course.
GitGud is now known as GitGod
khebbie has joined #ruby
<zenspider>
I have no idea what those words mean
stamina has joined #ruby
<Ox0dea>
It's the term used in MRI. :(
<zenspider>
doesn't change the fact
<zenspider>
why would you want to?
<zenspider>
(whatever the atachee is... a briefcase?)
senayar has joined #ruby
<Ox0dea>
A singleton class is said to be "attached" to some object, so the object is naturally the "attachee".
<shevy>
lol
kies^ has joined #ruby
<zenspider>
I like my version better
<shevy>
atachee sounds so more noble than briefcase though
<zenspider>
seems like a design smell if you're trying to go from class to instance
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<[k->
the only way to read Haskell is to learn Haskell, I understand your pain, zenspider
tomphp has joined #ruby
<zenspider>
except... I've got better things to learn
<zenspider>
I can go do typed/racket if I'm feeling masochistically typey
<[k->
I like the fact that the compiler has my back if I am wrong
<zenspider>
you DO know it is more than possible to write incorrect code that compiles, right?
<zenspider>
there is no safety net. it's a myth
<[k->
but I don't go that far :D
<[k->
this is no C
DexterLB has quit [Ping timeout: 252 seconds]
<zenspider>
julia DOES look neat. I love mathematica's notebook concept much more than a repl. it's got great ideas in there, but yeah... ugly.
<zenspider>
I think racket should probably steal the datasets that julia & R provide and package them up
lkba has joined #ruby
<zenspider>
the graphing in racket is at least as good
abuzze has joined #ruby
<jhass>
You should try Crystal for a bit, strong & statically typed but feels like duck typing for a large part
<arup_r>
shevy: I am translating a big php code to Ruby... passing through a bad time :/
mandarinkin2 has quit [Ping timeout: 264 seconds]
<[k->
I'm still trying to determine if I should learn scala
<[k->
baweaver!
<zenspider>
no point. just use phuby to embed php in ruby
<shevy>
arup_r cool. I did that when I switched to ruby; all my old php code eventually became ruby code
<shevy>
I can't tell whether tenderlove is serious
<arup_r>
then I think you are a good point of contact..
<shevy>
well the readme is obviously a joke: "INSTALL: No."
<shevy>
:)
<shevy>
arup_r lol
<Mon_Ouie>
Just the readme though, the rest is completely serious.
<zenspider>
I'm sure it is used in production
<shevy>
ohhhh
<shevy>
Copyright (c) Aaron Patterson and Ryan Davis of Seattle.rb
<zenspider>
I kept telling him that we needed to obfuscate and compile it down so we could make more money licensing it
DexterLB has joined #ruby
<shevy>
people are having way too much fun on the internetz
r4j453v4n has joined #ruby
adamski2600 has joined #ruby
r4j453v4n has quit [Client Quit]
<zenspider>
g'night all
<sevenseacat>
someone call the fun police! people are having fun on the internet!
<jhass>
you called?
weemsledeux has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<sevenseacat>
lol
adamski2600 has quit [Ping timeout: 265 seconds]
<agent_white>
Do they vote IRC presence at local Ruby meetups?
cir0x has joined #ruby
khebbie has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<agent_white>
There's some folks here I see time and time again I would vote for.
<sevenseacat>
what, to be part of the fun police? >_>
<agent_white>
Well... no. I am the fun pohleece. And unless you elbow-five then you cannot join.
<agent_white>
But I think that those folks I think of would double-elbow-five me.
<shevy>
sevenseacat you even have fun on the IRC!
cir0x1 has joined #ruby
* sevenseacat
parties at home in front of the TV on a saturday night
<agent_white>
sevenseacat: Don't you worry, lady! We double-triple-backflipped-in-a-pit-of-magma-fived... it's just those... you know.. who don't envy the volcanic sacrifices of the elbows.
<ruboto>
Ox0dea, this seems to be off-topic. Please move your discussion to #ruby-offtopic, to keep this channel free for Ruby related problems. Thanks!
cir0x has quit [Ping timeout: 276 seconds]
cir0x1 has quit [Client Quit]
<shevy>
we just don't have enough ruby related problems here
arm_itsust has joined #ruby
<arm_itsust>
oh i'm back!!
<[k->
it's that good or bad
<[k->
is*
<agent_white>
[k- / Ox0dea: In searching for the reason of elbow-fives you will find there is not! For elbow-fives are impetuous in nature.
* agent_white
elbow-fives shevy
<adaedra>
.
<Ox0dea>
adaedra: You've got a point.
<[k->
no one is writing Ruby shevy!
JDiPierro has joined #ruby
<shevy>
[k- I am! though mostly struggling with encoding. never had encoding problems on 1.8.x
<agent_white>
sevenseacat: Same here :) Though just watching "Guardians of the Galaxy" in repeat for the awesome soundtrack.
aryaching has joined #ruby
* agent_white
elbow-fives Ox0dea and nods
<sevenseacat>
have football on the tv here... my team and my fiances team are both playing tonight so lots of channel changing
<agent_white>
We are brothers in elbows.
bruno- has joined #ruby
workmad3 has joined #ruby
<agent_white>
sevenseacat: But the Broncos aren't on!!! ;) -- What 'soccer' team, as us folks here say?
<sevenseacat>
by football, I mean australian rules football.
<mwlang>
what’s with the uptick of asking folks to bounce to ruby-offtopic anyhow? I think I missed a whole conversation or two while out last week.
Alina-malina has quit [Quit: Leaving]
<shevy>
mwlang The Enforces brought a new set of rules
<shevy>
erm, *Enforcers
<mwlang>
shevy: did something unpleasant hit the fan to prompt that?
<[k->
well there was this "this shows the Ruby community" thing
<shevy>
mwlang dunno, I did not make up the channel rules :)
<jhass>
it's just that we saw ruby related questions swallowed in OT talk more than once and that we finally got control over the channel
ht__ has joined #ruby
<agent_white>
sevenseacat: Hehe I know! The girls from the US here are set to battle the ladies in Japan for the cup! Looking forward to that... sad to hear that England had an 'own-goal' that nixxed them.
workmad3 has quit [Ping timeout: 250 seconds]
<sevenseacat>
o.O
<agent_white>
mwlang: Offtopic chat is OK here until there are legitamate questions asked. Then the channel tends to go quiet to ensure these questions are answered.
* agent_white
rummages for sticky notes in his desk
<[k->
it's just another form of string concatenation
stamina has quit [Quit: WeeChat 1.2]
<Ox0dea>
[k-: Inherited from C, no less.
<[k->
:o
<agent_white>
Ohhh
JDiPierro has joined #ruby
<agent_white>
That's funky.
<arup_r>
Ox0dea: why not `c*` ?
<arup_r>
actually I don't really understand how these pack/unpack actually works ......
<arup_r>
that's why asked
<shevy>
there is some unpack table
<Ox0dea>
arup_r: In your case, since the bytes have been XOR'd with other ASCII data (the Douglass quotation), the difference between 'C' and 'c' for #pack doesn't really matter.
Spami has quit [Quit: This computer has gone to sleep]
vyorkin has joined #ruby
<codecodecode123>
oh, for god's sake, CANT I GET A WORKING BEST PRACTICE ANSWER FOR ONCE
<sevenseacat>
WHY ARE WE SHOUTING
<shevy>
best practice is to install into a gem-directory structure layout; then you can just do: require 'name_of_your_project' and everything works just fine
<shevy>
but as said above, for me it works in irb just fine as well; I also have a symlink towards all my ruby files, so I can do like: require 'x/tools/ascii_counter.rb'
JDiPierro has joined #ruby
<[k->
shevy replaced GNU utils with Ruby
<shevy>
hmm nah
<shevy>
have you looked at how many options they support?
<shevy>
that's literally years of replacement-work!
<Ox0dea>
grep's manpage was 20 lines long in the 70s.
<codecodecode123>
good, it works!
<apeiros>
Ox0dea: are you that old or do you just enjoy reading old manuals? :)
abuzze has joined #ruby
<Ox0dea>
apeiros: I briefly skimmed a talk by Stephen Bourne in which he talked about the sorts of things they dealt with when writing the original sh.
<apeiros>
ooooh
<apeiros>
that sounds like an interesting talk!
<Ox0dea>
He lamented the unfortunate "modernity" of today's tools.
<Ox0dea>
Looks good. Your "simepl_xor" isn't correct, though.
sharpmachine has joined #ruby
lessless has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<_blizzy_>
hmm
<_blizzy_>
I can't require 'action_view'
<agent_white>
shevy: What's a good link for a solid "gem-dir-struct-layout" ? I've been trying to follow it, but mostly have found 'older' articles to follow... though they mostly resemble the the most recent ones.
<arup_r>
Ox0dea: why.. point me where it is wrong..
<shevy>
agent_white I think the old articles cover like 90% of what is still used today
<shevy>
I myself keep my yaml files in yaml/ :D
<Ox0dea>
arup_r: You're XOR'ing every content byte with every byte of the key.
<arup_r>
I am overwhelmed inside the php :/
<Ox0dea>
arup_r: You're supposed to cycle the key.
<shevy>
and I tend to have a test/ dir rather than a spec/ dir
<arup_r>
that's why php did
<Ox0dea>
No.
<arup_r>
*how
<shevy>
arup_r can't you just replace it step by step?
<shevy>
I rarely use bin/ - only when it's something larger
<shevy>
and you need commandlets... like: foobar edit config or just foobar edit, where there is bin/foobar
<agent_white>
The biggest issue I've found has been with requiring files... the "require" vs "require_relative" ... etc.
Akagi201 has joined #ruby
<Ox0dea>
arup_r: Translating code line-by-line rather than making sure you understand what it's doing before you implement it is a recipe for, if not disaster, at least a headache or two.
<shevy>
you only need require() if you have it structured like a gem
sharpmachine has quit [Ping timeout: 252 seconds]
<jhass>
agent_white: if you got a Gemfile for your gem just bundle exec, else just ruby -Ilib
<jhass>
and always use require "foo"
<Ox0dea>
arup_r: Take a step back, mate. Do you know how to XOR two strings?
<arup_r>
no.. and honestly I don't know why they are XORing there.. although :/
<Ox0dea>
It's a cheap attempt at "encryption".
<Ox0dea>
Do you, erm, know what XOR is?
yfeldblum has quit [Ping timeout: 248 seconds]
<jhass>
a god of the vikings, obviously
<arup_r>
yes.. it is boolean gate ops like AND, OR
<Ox0dea>
arup_r: Right, but the thing about XOR is that it's reversible; XORing a with b will give you back a if you XOR it with b again.
dgutierrez1287 has joined #ruby
gix has quit [Ping timeout: 250 seconds]
<agent_white>
The 'structuring like a gem' part is my issue I 'spose. No de-facto way of doing it... as in some say to modify the $LOAD_PATH, others say that if you need to do that, you're doing it wrong.
Akagi201 has quit [Ping timeout: 264 seconds]
solocsha1 has joined #ruby
<Ox0dea>
arup_r: So, you know you have to perform that operation on the bytes of the two strings, but what do you do when the strings are not the same length?
phillipsimmonds has joined #ruby
<arup_r>
no idea...
<Ox0dea>
Then godspeed, mate.
jud^ is now known as jud
jud has quit [Changing host]
jud has joined #ruby
phillipsimmonds has left #ruby [#ruby]
dgutierrez1287 has quit [Ping timeout: 252 seconds]
<shevy>
does anyone know whether there was any important change between ruby 1.8.x and the current ruby version in regards
<shevy>
to alias_method versus alias? For some reason, I seemed to use alias_method in the past, whereas more recently, I seem to confine myself towards just alias
nettoweb has joined #ruby
<[k->
alias_method is better
<[k->
some article said it
<[k->
so I believed it
<Ox0dea>
That alias_method is a method call means it's more "powerful", but you probably shouldn't be doing anything too crazy with aliases anyway; alias works just fine.
<shevy>
[k- yeah kinda
ramfjord has joined #ruby
Akagi201 has joined #ruby
gianlucadv has quit [Ping timeout: 264 seconds]
workmad3 has joined #ruby
DLSteve has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Guest27732 has joined #ruby
<Guest27732>
is there any machine learning library for ruby?
<[k->
there are a few
<[k->
awesomeruby.com lists a few
<Guest27732>
oh then maybe its a great time devloping one and become a rockstar!
timonv has joined #ruby
A205B064 has joined #ruby
Akagi201_ has joined #ruby
howdoi has joined #ruby
shinnya has joined #ruby
<shevy>
:P
Akagi201 has quit [Ping timeout: 244 seconds]
<Guest27732>
;)
Guest27732 has quit [Quit: ChatZilla 0.9.91.1 [Firefox 41.0a2/20150703004018]]
yh has joined #ruby
weemsledeux has joined #ruby
gizmore has joined #ruby
OrbitalKitten has joined #ruby
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<workmad3>
Guest27732: that could be fun for you... how's your statistics and epistemology?
<Ox0dea>
Vacant, vanished.
<workmad3>
heh :)
<workmad3>
had to run away for a bit... missed him leaving
serivich has joined #ruby
sharpmachine has joined #ruby
niemcu has joined #ruby
<[k->
Ox0dea is one of the most high levelled person I know
<Ox0dea>
"High levelled"?
<jhass>
skilled
<Ox0dea>
Pfft.
<[k->
you used vacant instead of none
<Ox0dea>
[k-: I was quoting V for Vendetta. :(
<[k->
and vanished instead of gone!
<jhass>
oh
<Ox0dea>
I do know some purdy fancy words, though.
<jhass>
"British"
<jhass>
not skilled
<shevy>
workmad3 you had to run away from your computer?
<workmad3>
shevy: yeah... amazon delivery
<shevy>
he is buying more and more books to become cleverer by the day!
<Ox0dea>
How best to "reduce with object"?
<workmad3>
Ox0dea: do you want `each_with_object` by any chance?
<Ox0dea>
Nope.
<Ox0dea>
I want to combine #reduce and #with_object.
<jhass>
yeah, that falls apart for some reason
<jhass>
I noticed that too
sharpmachine has quit [Ping timeout: 252 seconds]
<Ox0dea>
It's because #reduce can't do anything sensible without being given a block.
aldani has joined #ruby
<jhass>
what's the object, array by chance?
krz has quit [Quit: WeeChat 1.0.1]
<Ox0dea>
Oui.
<jhass>
then you could fake it with .last
<jhass>
perhaps
aldani has left #ruby [#ruby]
arup_r has quit [Ping timeout: 248 seconds]
dgutierrez1287 has joined #ruby
<Ox0dea>
That it's nested might cause some trouble in the parameter list, but that should do.
<[k->
I don't have any other sources for programming news anyway
michael_mbp has quit [Excess Flood]
<Ox0dea>
workmad3: Yep, that works nicely, but each_cons(2).with_object fits this particular problem a little better.
FernandoBasso has quit [Ping timeout: 256 seconds]
dstarh has joined #ruby
michael_mbp has joined #ruby
jesterfraud has joined #ruby
xcesariox has joined #ruby
krz has joined #ruby
<Tarkers34|2>
is the most efficient way to update the last item of an array ' array[array.length] - :new_var ' ?
<adaedra>
=, not -, no?
<Mon_Ouie>
array[array.length] is not the last element of an array, it's one after the last element
houhoulis has quit [Remote host closed the connection]
<shevy>
Tarkers34|2 array[-1] = 'bla' # should work
<Mon_Ouie>
the last element can be referred to as array[-1]
<Ox0dea>
Tarkers34|2: But hey, nice OBOE.
dstarh has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<[k->
OBOE?
<Ox0dea>
Off-by-one error.
<adaedra>
:)
<[k->
That is obsure ;-;
FernandoBasso has joined #ruby
<Tarkers34|2>
haha thanks...I did google :P
jesterfraud has quit [Ping timeout: 246 seconds]
<Tarkers34|2>
Ox0dea ^
<Ox0dea>
Sure thing.
<adaedra>
The one hardest problem in programming is concurrent access and off-by-one-errors.
<shevy>
and documentation
<Mon_Ouie>
Naming things!
<Ox0dea>
^
<adaedra>
>_>
ndrei has quit [Ping timeout: 246 seconds]
<adaedra>
<_<
<Ox0dea>
Those are both valid Ruby.
<Ox0dea>
I should do something with that. :)
<[k->
we don't even name things in haskell
<Ox0dea>
...
<adaedra>
Ox0dea don't name things in Ruby
<[k->
>> >_>
<ruboto>
[k- # => /tmp/execpad-c8ae86dc30ea/source-c8ae86dc30ea:2: syntax error, unexpected '>' ...check link for more (https://eval.in/392391)
ramfjord has quit [Ping timeout: 252 seconds]
ramfjord has joined #ruby
<Ox0dea>
[k-: I meant syntactically.
<[k->
valid Ruby?
<adaedra>
>> _ = 2; 1 >_> 3
<ruboto>
adaedra # => undefined method `>' for false:FalseClass (NoMethodError) ...check link for more (https://eval.in/392392)
<Mon_Ouie>
>> def ; end;
<ruboto>
Mon_Ouie # => /tmp/execpad-9c1e6ab2445e/source-9c1e6ab2445e:3: syntax error, unexpected keyword_rescue, expecting ...check link for more (https://eval.in/392393)
<Ox0dea>
Poor ruboto.
jesterfraud has joined #ruby
JDiPierro has quit [Remote host closed the connection]
<adaedra>
yep.
<Ox0dea>
Still valid syntax, just needs > defined on the booleans.
<Ox0dea>
I made a thing that lets you chain the four prefix operators arbitrarily.
<Ox0dea>
s/prefix/unary/
Indian has quit [Ping timeout: 255 seconds]
<[k->
in order to have > on booleans, you need to define the instance of Bool for the Ord typeclass
arup_r has joined #ruby
<shevy>
guys
_blizzy_ has quit [Ping timeout: 246 seconds]
<Ox0dea>
>> class FalseClass; include Comparable; def <=>; #...; end end
<ruboto>
Ox0dea # => /tmp/execpad-3856b3dc1c57/source-3856b3dc1c57:7: syntax error, unexpected end-of-input, expecting ke ...check link for more (https://eval.in/392395)
<Mon_Ouie>
?guys
<ruboto>
we're not all guys - while you probably don't meant to be exclusive, not everybody feels that way. Maybe consider using "folks", "y'all" or "everyone" instead?
<shevy>
this is craziness time again on #ruby
<Ox0dea>
[k-: Stupid comment mucked things up, but you get the idea.
JDiPierro has joined #ruby
nfk has quit [Quit: yawn]
<[k->
huehuehue
<[k->
no 1line comments
<Ox0dea>
No breakable one-line comments, rather.
<Ox0dea>
A strange oversight, in my opinion.
<jesterfraud>
adaedra, I was wondering why it told me that I authenticated as myself, then discovered I opened my IRC client twice, resulting my split personalities
<adaedra>
:)
<[k->
>> /* hello */ 1
<ruboto>
[k- # => /tmp/execpad-9aece28689ee/source-9aece28689ee:2: target of repeat operator is not specified: /* hell ...check link for more (https://eval.in/392396)
_jesterfraud has quit [Client Quit]
<[k->
wait we don't have /*?
<sevenseacat>
no
<shevy>
this is not C!
el3k0n has quit [Ping timeout: 264 seconds]
<[k->
what are multiline comments then?
<[k->
==begin
<sevenseacat>
=begin =end
<[k->
==end?
<[k->
ah
<Mon_Ouie>
Although people just use '#' at the beginning of each line
<Ox0dea>
It's so weird that =begin and =end have to be the very first things on the line; it's pretty much the only thing Ruby nicked from Perl and made worse.
_blizzy_ has joined #ruby
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
asmodlol has joined #ruby
<[k->
parse.c is complicated enough :p
Dominique_ has joined #ruby
<Ox0dea>
parse.y, rather.
<Mon_Ouie>
Well, parse.c is generated by a tool, not written by a human :p
aryaching has quit [Read error: Connection reset by peer]
<jhass>
arup_r: be specific, do you have some gzipped data you want to read or do you have a gzipped tarball that you want to extract to some location or...
JDiPierro has quit [Remote host closed the connection]
<symbol>
I'm having trouble understadning the relation between ? and \k - can someone explain?
<Mon_Ouie>
(?<foo>...) in a regexp creates a captured group named foo
<jhass>
symbol: (?<foo>...) assigns the name foo to the capture group, \k<foo> references the capture group with the name foo, like \1 references the first one
<[k->
\k refers to the named_capture whils ?<> defines it
<symbol>
Ah that makes so much sense now! I wasn't able to understand that from the docs.
lordkryss has joined #ruby
Dominique_ has quit [Quit: Leaving]
<Mon_Ouie>
Do notice the relpacement string is written with single quotes by the way, i.e. '\k' is a 2-character string (an actual backslash followed by the letter 'k')
<symbol>
Why does the docs refer to it as //k?
<symbol>
" \\k<n>, where n is a group name."
IanV0rn2341 has joined #ruby
<symbol>
Whoops typo - meant \\k in my question
<Ox0dea>
The documentation uses one backslash.
aryaching has quit []
<[k->
fun fact: there is also ?'foo' and ?"foo" which are also the same
<[k->
\k' and \k" exist too
<symbol>
Very interesting - thanks for helping me out!
<[k->
should I /nick myself \k< :D
<symbol>
Been working through code puzzles to prep for a job interview. Learning some cool things about Ruby I don't use on a daily basis
<[k->
more unclosed brackets!
ramfjord has joined #ruby
OrbitalKitten has joined #ruby
nofxx has quit [Ping timeout: 252 seconds]
failshell has joined #ruby
JDiPierro has joined #ruby
OrbitalKitten has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ramfjord has quit [Ping timeout: 246 seconds]
_whitelogger has quit [Ping timeout: 252 seconds]
_whitelogger has joined #ruby
sharpmachine has joined #ruby
<jhass>
but yeah, I never had an actual need for such stuff myself
lkba has joined #ruby
jesterfraud has quit [Quit: Leaving]
<exadeci>
jhass: so I should call the class with the method_missing and have it send on the class ?
<jhass>
what do I get for looking at PHP code for you?
kraljev11 has joined #ruby
abuzze has joined #ruby
<arup_r>
I tried print simple_xor(gz.read.bytes).pack("C*") still.. the same unreable output...
endash has joined #ruby
<[k->
jhass: nothing :(
<[k->
you read vile code for nothing
<arup_r>
jhass: only :) ;) :)
<[k->
poor you
<arup_r>
indeed I am :/
<[k->
I didn't open that link at all
scripore has quit [Quit: This computer has gone to sleep]
ixti has quit [Ping timeout: 252 seconds]
tsou has joined #ruby
john__ has joined #ruby
<exadeci>
jhass: the objective I had with this was to check if a bool was true before calling a method and if the changed values after were within the bounds, the fact that you said that you never needed such stuff made me wonder what you would have done in this case
<jhass>
shevy: nah, it's further along than that ;)
<shevy>
[k- I have no real experience with any of these
<jhass>
arup_r: you have to deflate it with gzip before you can feed it into a zip reader
<[k->
which is why you will learn!
Obfuscate has quit [Ping timeout: 264 seconds]
<jhass>
arup_r: despite their names zip and gzip have little to nothing to do witch each other
lavros has quit [Ping timeout: 250 seconds]
<workmad3>
[k-: shevy always wants to change to a different language... the problem is that ruby is the language that he hates the least out of all the options he's tried
jesterfraud has quit [Quit: Leaving]
jeramyRR has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sharpmachine has joined #ruby
eggoez has quit [Ping timeout: 256 seconds]
<[k->
racket? Rust? coffeescript? lua?
<[k->
elixir?
railsForDaiz has quit [Ping timeout: 264 seconds]
gix has joined #ruby
<jhass>
I could imagine shevy to become a piet programmer with physical paint
<shevy>
workmad3 well sorta, I just need to find a better language
weemsledeux has quit [Read error: Connection reset by peer]
<shevy>
I wonder what would have happened if I would have picked python instead
cmisenas has joined #ruby
Bish_ is now known as Bish
<workmad3>
shevy: plenty to complain about in python too... regexps are a PITA, string quoting can get weird, the OO system is all sorts of screwed up...
<jhass>
you would ask #python this question now
mr_blue has joined #ruby
<shevy>
they are biased!
<workmad3>
shevy: you'd probably spend your days figuring out multiple inheritance ;)
<workmad3>
shevy: however, it has a deterministic algorithm for figuring out method resolution, which solves a lot of the problems that come up with C++'s MI
<workmad3>
shevy: however, there's no implicit `this` or `self` in python... if you write an instance method you always have to explicitly list the receiver as the first argument to the method
gix has quit [Ping timeout: 256 seconds]
<shevy>
I know... this is one of the things I dislike the most
<shevy>
I like that I could omit "end" though
<[k->
basically functional
<workmad3>
[k-: it's closer to doing OO programming in C
<[k->
you can omit ends in Haskell!
balazs has quit [Remote host closed the connection]
<[k->
you just write an equal sign
<workmad3>
[k-: python has whitespace-delimited blocks ;)
adamski2600 has quit [Remote host closed the connection]
cmisenas has quit [Ping timeout: 256 seconds]
<[k->
in Haskell, 1 space is enough
<[k->
although you get some stares
radialneon has joined #ruby
<shevy>
[k- ok but what can you do in haskell
jeramyRR has joined #ruby
<workmad3>
shevy: anything you want! (as long as you want no side effects>
<workmad3>
</troll>
<mozzarella>
shevy: you don't like ends?
<shevy>
hehe
abuzze has joined #ruby
<jhass>
shevy: why don't you write your own language?
<shevy>
mozzarella not really
<shevy>
jhass it would take a lot of time
<mozzarella>
that's my favorite feature of ruby
<[k->
in Ruby you can type everything in one line
<jhass>
shevy: not more than trying to retrofit a single tool to all problems one has
<shevy>
jhass of course it would take a lot more time to create a new language, you didn't create one either
<[k->
jhass: shevy: xslt will solve the problem!
<mozzarella>
yeah, ruby is flexible
<workmad3>
shevy: you could learn APL...
<shevy>
[k- ewww isn't that XML?
<[k->
hue hue hue
<workmad3>
you just need something like a 1000-key keyboard with a large number of greek and mathematical symbols...
gix- has joined #ruby
<shevy>
I struggled with docbook and sgml not long ago, that thing is so ugly
woodennails has joined #ruby
<workmad3>
[k-: xslt doesn't solve your problems... it just hides them all behind the huge problem of XML
<[k->
haskell is ugly to non users too
vondruch has quit [Ping timeout: 246 seconds]
<shevy>
<!ENTITY % dbpool
<shevy>
I actually find haskell syntax not that bad
<shevy>
I mean not your code [k-
<shevy>
but in general :)
<workmad3>
[k-: I'd also like to know which asylum the guy who thought "XML is awesome, lets turn it into a turing-complete functional programming language!" got committed to...
<[k->
my code is horrible ;-;
<workmad3>
shevy: ooh, burn :D
<[k->
I tried with what I know a month ago ;-;
eggoez has quit [Ping timeout: 246 seconds]
<shevy>
yeah no problem, early code is often not great
gix has joined #ruby
<shevy>
we get back to you in 2 years [k-!
scripore has quit [Read error: Connection reset by peer]
<workmad3>
shevy: s/early// <-- fixed it for you
<[k->
I think Polynomial looks much better than PlayerFight
abuzze has quit [Ping timeout: 246 seconds]
Muhannad has joined #ruby
<[k->
;-;
gix_ has joined #ruby
luriv has joined #ruby
<shevy>
Polynomial was your third try?
gix__ has joined #ruby
gix- has quit [Ping timeout: 265 seconds]
<[k->
it was my first
<[k->
PlayerFight was five days later
<shevy>
you got worse? :)
<workmad3>
[k-: tbh, if you can ever look back at code that's more than a year or so old and not find issues with it, it means either a) it was completely trivial or b) you've stopped learning things
<shevy>
hmm
<[k->
can we turn Polynomial into monads ( ͡° ͜ʖ ͡°)
gix has quit [Ping timeout: 255 seconds]
Flcn has joined #ruby
gix_ has quit [Ping timeout: 256 seconds]
<[k->
that would be stupid tho
gix__ has quit [Ping timeout: 256 seconds]
eggoez has joined #ruby
vyorkin has quit [Ping timeout: 276 seconds]
GitGud has quit [Ping timeout: 248 seconds]
nobitanobi has joined #ruby
gix has joined #ruby
havenwood has quit [Ping timeout: 255 seconds]
bhuvanaurora has joined #ruby
vyorkin has joined #ruby
bhuvan_aurora has joined #ruby
doublemalt_ has joined #ruby
icebourg has joined #ruby
gix has quit [Ping timeout: 256 seconds]
JDiPierro has quit [Remote host closed the connection]
Indian has quit [Ping timeout: 255 seconds]
bhuvan_aurora has quit [Ping timeout: 276 seconds]
eGGsha has joined #ruby
bhuvanaurora has quit [Ping timeout: 264 seconds]
<shevy>
[k- any heat wave ongoing in Singapore la?
Joufflu has joined #ruby
yh has joined #ruby
DoubleMalt has quit [Ping timeout: 264 seconds]
Papierkorb has joined #ruby
<[k->
it rained yesterday I think
<[k->
the temperature went down
gix has joined #ruby
workmad3 has quit [Ping timeout: 276 seconds]
JDiPierro has joined #ruby
Indian has joined #ruby
NeverDie has quit [Quit: I'm off to sleep. ZZZzzz…]
dfockler has joined #ruby
<[k->
it's much more bearable
JDiPierro has quit [Remote host closed the connection]
<shevy>
lucky you!
lavros has joined #ruby
chouhoulis has joined #ruby
solocshaw has joined #ruby
Scroff has joined #ruby
DLSteve has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dfockler has quit [Ping timeout: 246 seconds]
radialneon has quit [Quit: Leaving]
GitGud has joined #ruby
woodennails has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
chouhoulis has quit [Ping timeout: 256 seconds]
ndrei has quit [Ping timeout: 252 seconds]
ndrei has joined #ruby
nobitanobi has quit [Remote host closed the connection]
<arup_r>
jhass: tried now different error : `stat': no implicit conversion of Zlib::GzipReader into String (TypeError)
Indian has quit [Ping timeout: 265 seconds]
Indian has joined #ruby
<jhass>
arup_r: should I rephrase the error message for you or what do you expect?
<jhass>
you can't pass an instance of Zlib::GZipReader to something that expects a string
iamvery has joined #ruby
iamvery has quit [Client Quit]
<arup_r>
Yes,, I understand ,,, reading docs... to find out something else.. I thought the zlib is able to take IO object as an input
iamvery has joined #ruby
<arup_r>
soryy not zlib.. i meany rubyzip
<arup_r>
meant**
yokel has quit [Ping timeout: 246 seconds]
<shevy>
arup_r still porting php code?
genpaku has quit [Ping timeout: 256 seconds]
mhib has joined #ruby
<arup_r>
humm.. In between I did something else..
yokel has joined #ruby
genpaku has joined #ruby
solocshaw has quit [Ping timeout: 255 seconds]
stantonnet has joined #ruby
superspring has quit [Quit: No Ping reply in 180 seconds.]
<shevy>
hehe
superspring has joined #ruby
joevandyk has quit [Remote host closed the connection]
<[k->
I hate ,,,
joevandyk has joined #ruby
stantonnet has quit [Client Quit]
stantonnet has joined #ruby
<shevy>
where?
Scroff has quit [Ping timeout: 248 seconds]
<[k->
arup_r said it just now
<shevy>
ah
<shevy>
guess he mis-hit the key
dgutierrez1287 has joined #ruby
<[k->
3x!
<[k->
oh
victortyau has quit [Quit: Leaving]
yh has quit [Ping timeout: 265 seconds]
<[k->
it was meant to be ...
<[k->
I thought he wanted a comma
<arup_r>
I am frustated now
<shevy>
that is understandable, you had to look at php code
<arup_r>
shevy: I am reading https://github.com/rubyzip/rubyzip .. not php now.. bcoz what I understood from php till now I have to code those, and I got stuck in unzip :/
senayar has quit [Remote host closed the connection]
hfp_work has joined #ruby
<shevy>
hmm hanmac has an libarchive binding I think, if that helps
<shevy>
does rubyzip use << ?
stantonnet has joined #ruby
<shevy>
so you can buildup your archive
<[k->
010832 <vltz> I haven't used php for a long time now. My life has improved dramatically.
dostoyevsky has quit [Ping timeout: 276 seconds]
<shevy>
:D
dostoyevsky has joined #ruby
sharpmachine has joined #ruby
micmus has quit [Ping timeout: 252 seconds]
Yzguy has quit [Quit: Zzz...]
Yzguy has joined #ruby
stantonnet has quit [Client Quit]
ndrei has quit [Ping timeout: 252 seconds]
stantonnet has joined #ruby
stantonnet has quit [Client Quit]
fantazo has joined #ruby
stantonnet has joined #ruby
blaines has quit [Ping timeout: 276 seconds]
iamvery has quit [Quit: Leaving...]
stantonnet has quit [Client Quit]
davedev24_ has quit [Read error: Connection reset by peer]
j4cknewt has joined #ruby
davedev24_ has joined #ruby
sharpmachine has quit [Ping timeout: 246 seconds]
Yzguy has quit [Ping timeout: 265 seconds]
solocsha1 has joined #ruby
wallerdev has joined #ruby
gianlucadv has joined #ruby
stantonnet has joined #ruby
Indian has quit [Ping timeout: 244 seconds]
cpruitt has quit [Quit: cpruitt]
vyorkin has quit [Ping timeout: 255 seconds]
railsForDaiz has joined #ruby
ohaibbq has joined #ruby
ivanskie has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
boadie has quit [Remote host closed the connection]
JDiPierro has joined #ruby
[k- has quit [Quit: AndroidIrc Disconnecting]
gizmore has joined #ruby
lkba has quit [Ping timeout: 252 seconds]
jeramyRR has quit [Quit: Peace out!]
gizless has quit [Ping timeout: 255 seconds]
zz_Outlastsheep is now known as Outlastsheep
meatchicken has quit [Ping timeout: 264 seconds]
meatchicken has joined #ruby
kamichi has left #ruby [#ruby]
kies^ has joined #ruby
jeramyRR has joined #ruby
brain_shim has quit [Ping timeout: 265 seconds]
kraljev11 has quit [Ping timeout: 246 seconds]
brain_shim has joined #ruby
eGGshke has joined #ruby
codecop has joined #ruby
jbw_ has joined #ruby
eGGsha has quit [Ping timeout: 256 seconds]
jbw has quit [Ping timeout: 252 seconds]
eggoez has quit [Ping timeout: 246 seconds]
jeramyRR has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
agent_white has quit [Quit: bbl]
symm- has quit [Ping timeout: 264 seconds]
yh has joined #ruby
i8igmac has joined #ruby
Ilyas has quit [Read error: Connection reset by peer]
Joufflu has quit [Read error: Connection reset by peer]
renderfu_ has joined #ruby
eGGshke has quit [Ping timeout: 256 seconds]
<ght>
Question: If I have two variables, test1 = "bob" and test2 = "jim", and I want to include the value of test1 in the name of new variable, what's the procedure?
leonardoajim has joined #ruby
<ght>
For example, a new variable with a name that consists of the value of test1 followed by + "_lunch"
eggoez has joined #ruby
sarkyniin has quit [Ping timeout: 248 seconds]
renderfu_ has quit [Ping timeout: 244 seconds]
bronson has joined #ruby
eGGshke has joined #ruby
thiagovsk has joined #ruby
adamski2600 has joined #ruby
stoodfarback has quit [Ping timeout: 250 seconds]
senayar has joined #ruby
<kb3ien>
well I disapeared for a while, but my attempts to use path in the Gemfile are still fruitless.
endash has joined #ruby
sharpmachine has joined #ruby
adamski2600 has quit [Ping timeout: 256 seconds]
<havenwood>
>> example = 'free'; TOPLEVEL_BINDING.local_variable_set :foo, "#{example}_lunch"; TOPLEVEL_BINDING.local_variable_get :foo
eGGshke has quit [Read error: Connection reset by peer]
<havenwood>
ght: Dynamically setting local variables and then getting at them isn't straight-forward. Consider using a Hash, instance variables, or tell us more about what you're doing and show some code!
senayar has quit [Ping timeout: 276 seconds]
<havenwood>
kb3ien: What trouble are you having with it?
sharpmachine has quit [Ping timeout: 265 seconds]
<havenwood>
kb3ien: Use PATH like `ENV['PATH']` or?
Jackneill has quit [Remote host closed the connection]
<havenwood>
kb3ien: $LOAD_PATH? $GEM_PATH?
lkba has joined #ruby
<c355E3B>
is it the gem 'name', path: '...' opt?
<Tarkers34|2>
ght: define_method(:bob_lunch) { puts "I am from the bob_lunch dynamically defined method" }
j4cknewt has quit [Remote host closed the connection]
<ght>
Interesting, thank you.
<Tarkers34|2>
ght: no problem, I'll write a gist now :)
<kb3ien>
Yesterday ( see logs) I went into /tmp and did `gem unpack ebsco-discovery-service-api` got the clean files from the upstream repo.
vyorkin has joined #ruby
<kb3ien>
I copied them to a dir inside my project : /var/www/merge-dev-robin/bgctr-merge/merged/blacklight_with_eds/vendor/bundle/ruby/2.1.0/gems/ebsco-discovery-service-api-1.0.4
The_Phoenix has joined #ruby
abuzze has joined #ruby
<kb3ien>
this really only contains one file : lib/ebsco-discovery-service-api.rb
icebourg has quit []
<kb3ien>
jhass suggested something with the .gemspec file. I'm not sure i put that in the right place.
<arup_r>
stiil I couldn't make my code working
dgutierrez1287 has quit [Remote host closed the connection]
<havenwood>
arup_r: Show the code!
lkba_ has quit [Ping timeout: 246 seconds]
<kb3ien>
I change my Gemfile to " gem "ebsco-discover-service-api", :path => '/var/www/merge-dev-robin/bgctr-merge/merged/blacklight_with_eds/vendor/bundle/ruby/2.1.0/gems/ebsco-discovery-service-api-1.0.4' " but rake routes says Could not find gem 'ebsco-discover-service-api (>= 0) ruby' in source at /var/www/merge-dev-robin/bgctr-merge/merged/blacklight_with_eds/vendor/bundle/ruby/2.1.0/gems/ebsco-discovery-service-api-1.0.4.
<kb3ien>
I'm not sure what level the :path => should even point to.
jaygen_ has joined #ruby
<Tarkers34|2>
well according to api_dock it requires a sym...string might work too
<Tarkers34|2>
ght ^
<arup_r>
havenwood: I gave the link
<havenwood>
Tarkers34|2: It will turn a String into a Symbol but do you really want to define all those methods?
railsraider has joined #ruby
<Tarkers34|2>
havenwood: Could be a learing project, not sure what ght's endgame is :)
workmad3 has joined #ruby
<havenwood>
Maybe I didn't see the whole question but if it's based on user input or such going oom on symbol clutter is possible.
wallerdev has quit [Ping timeout: 252 seconds]
jaygen has quit [Ping timeout: 246 seconds]
yh has quit [Ping timeout: 255 seconds]
<jhass>
arup_r: stop saying that. we already established that you don't extract files from a .gz, you decompress a gz file, which in your case is a zip file which you can then extract files from
sarkyniin has joined #ruby
serivich has quit [Ping timeout: 248 seconds]
symm- has joined #ruby
<arup_r>
jhass: I tried as you said defalting.. then also got some other error.. but now have no idea .... how to extract
Outlastsheep is now known as zz_Outlastsheep
<shevy>
\o/ let's dance \o/ with arup_r \o/
workmad3 has quit [Ping timeout: 248 seconds]
<arup_r>
:/ :/
IanV0rn2341 has quit []
wallerdev has joined #ruby
<kb3ien>
Well i ran `bundle install --path vendor/bundle` and it installed copies of all the Gems in the gemfile. Anyway to get just the one I want to customise?
Spami has joined #ruby
<jhass>
just nuke the rest?!
<kb3ien>
I think a gz file is considered deflated. inflate ?
<jhass>
kb3ien: hence I use compress/decompress :P
<kb3ien>
that's the best option? I'm glad for good fibre on a day like this.
<jhass>
well, you have it already installed, you just need to get the gemspec from somewhere
<jhass>
that's a one time task
<jhass>
if the source would be on github I had you clone the repo
<jhass>
the --path vendor/bundle in my demo I only did to not pollute my system btw
<jhass>
arup_r: how about you show us your attempt at decompressing the gz file prior treating it as zip, instead of the same code from 3 hours ago?
lordkryss has quit [Quit: Connection closed for inactivity]
<jhass>
mmh, new, that's documented as #initialize, "#initialize(file_name
<jhass>
mmh, no, we don't have a filename
<jhass>
but!
<jhass>
let's scroll down!
Channel6 has quit [Quit: Leaving]
<jhass>
.open_buffer(io
<jhass>
oooh
<jhass>
ike #open, but reads zip archive contents from a String or open IO stream
<jhass>
*like
<jhass>
now that sounds promising, doesn't it!
abuzze has quit [Remote host closed the connection]
railsForDaiz has quit [Ping timeout: 252 seconds]
<arup_r>
Yes it does.. I was spinning myself inside the github readme only.. :/
<arup_r>
let me try
spider-mario has quit [Ping timeout: 265 seconds]
jimbeaudoin has joined #ruby
<kb3ien>
where should the gemspec GO?
senayar has joined #ruby
<jhass>
kb3ien: seriously?
eGGshke has joined #ruby
<kb3ien>
yes. seriously. Why isn't there any better documentation on doing this ? I don't want to have to go through hoops everytime i checkout the project on a new machine.
<shevy>
kb3ien this is part of your gem, at its base level; like where you have the dir/ library
JDiPierro has quit [Remote host closed the connection]
<arup_r>
jhass: same error..
jeramyRR has joined #ruby
<jhass>
which you never told...
claw has quit [Ping timeout: 256 seconds]
<kb3ien>
So why do I ''need to get the gemspec from somewhere'' ?
claw has joined #ruby
claw has quit [Client Quit]
<shevy>
you have to get a gemspec from somewhere?
<arup_r>
Zip end of central directory signature not found (Zip::Error)
<jhass>
kb3ien: so bundler can rebuilt the gem on the fly
<arup_r>
gems/rubyzip-1.1.7/lib/zip/entry.rb:582:in `initialize': Is a directory @ rb_sysopen - /home/arup/Rails/gobgob-ror/lib/knet (Errno::EISDIR)
yh has quit [Ping timeout: 250 seconds]
jeramyRR has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
solocsha1 has quit [Ping timeout: 255 seconds]
kadoppe has quit [Ping timeout: 264 seconds]
bb010g has quit [Quit: Connection closed for inactivity]
kadoppe has joined #ruby
i8igmac has quit [Ping timeout: 252 seconds]
jpfuentes2 has joined #ruby
AndyBotwin has quit [Ping timeout: 248 seconds]
jeramyRR has joined #ruby
AndyBotwin has joined #ruby
lessless has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
crdpink has joined #ruby
crdpink2 has quit [Ping timeout: 248 seconds]
spider-mario has joined #ruby
Contigi has joined #ruby
<jhass>
#extract(dest_path = @name
<jhass>
what can we learn from this method signature?
sarkyniin has quit [Ping timeout: 246 seconds]
<jhass>
I'll give you the description for free: "Extracts entry to file dest_path (defaults to @name)."
<jhass>
(ain't I a good copy paste robot?)
<jhass>
you have some assumption about the argument to extract, you get an error so that assumption must be wrong. What other interpretations of its signature are there?
Carnage\ has joined #ruby
AndyBotwin has quit [Max SendQ exceeded]
AndyBotwin has joined #ruby
crdpink2 has joined #ruby
crdpink has quit [Ping timeout: 248 seconds]
Soda has joined #ruby
eggoez has quit [Ping timeout: 256 seconds]
<arup_r>
ok
<arup_r>
if I don't give any argument, it creates file under rails root dir.. but I wanted to extract under the path as I have in my code..
<jhass>
you completely dismissed my question
<jhass>
answer it
swills has quit [Quit: leaving]
<arup_r>
ok
<arup_r>
it means dest_path is optional
Silent__ has joined #ruby
<arup_r>
If I don't give any value.. it will take the value of @name
<jhass>
okay, that's one thing
<jhass>
what else?
Blaguvest has joined #ruby
<shevy>
arup_r it hates directories!
Hobogrammer has quit [Ping timeout: 276 seconds]
<arup_r>
ok got your point
<arup_r>
jhass: it should be like
eggoez has joined #ruby
<arup_r>
extract("#{my_dir}/entry.name") { true }
choke has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<jhass>
the block is optional
JDiPierro has joined #ruby
kraljev11 has joined #ruby
<jhass>
my actual point is that you never question your assumptions
<arup_r>
block is to overwrite
<jhass>
you stick to them as long as you can
<arup_r>
I got you...
kraljev11 has quit [Read error: Connection reset by peer]
<jhass>
and that slows you down, roughly 4-6 hours per problem from my perspective
<arup_r>
shevy: your line clicked actually.. with jhass method signature..
<arup_r>
yes.. I destroyed my whole hours due to that.. assumptions
sarkyniin has joined #ruby
<arup_r>
I should take care it now on wards as much as I can
kraljev11 has joined #ruby
Indian has joined #ruby
voxxit_ has quit [Read error: Connection reset by peer]
kraljev11 has quit [Client Quit]
Mon_Ouie has quit [Quit: WeeChat 1.2]
kraljev11 has joined #ruby
<arup_r>
and the file extension made me fool... bullshit!!!! :/
<jhass>
arup_r: don't think "why isn't this working", first think "where could I be wrong, what did I assume, how can I verify that I'm right"
<shevy>
arup_r well the author could have provided a better error message, so the alternative explanation can still be that the software sucks :P
fantazo has quit [Quit: Verlassend]
<jhass>
and actually writing reduced code to verify your assumptions is nothing wrong
<shevy>
the fastest way is to look at working examples - lemme do that
dagda1 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
elia has quit [Quit: Computer has gone to sleep.]
endersCA has joined #ruby
endersCA has quit [Remote host closed the connection]
sharpmachine has joined #ruby
claw has quit [Ping timeout: 246 seconds]
aphprentice_ has quit [Ping timeout: 252 seconds]
nofxx has quit [Ping timeout: 264 seconds]
solocsha1 has joined #ruby
j4cknewt has quit [Remote host closed the connection]
arooni-mobile has joined #ruby
arooni-mobile has quit [Max SendQ exceeded]
arooni-mobile has joined #ruby
arooni-mobile has quit [Max SendQ exceeded]
arooni-mobile has joined #ruby
workmad3 has joined #ruby
j4cknewt has joined #ruby
sharpmachine has quit [Ping timeout: 255 seconds]
nahtnam has quit [Quit: Connection closed for inactivity]
dagda1 has joined #ruby
bradleyprice has quit []
<adaedra>
Fireworks?
<adaedra>
I have no fireworks planned before 10 days
musicmatze has joined #ruby
<musicmatze>
Hey, #ruby!
mike-burns has joined #ruby
<adaedra>
Hi musicmatze
<musicmatze>
I have a really large array and I want to do ary.reverse.take(n) where n is really small ... I remember there is something similar which is much faster, but I don't know what to google...
<musicmatze>
can you help me?
j4cknewt has quit [Remote host closed the connection]
<apeiros>
musicmatze: ary[-n..-1].reverse
<ljarvis>
ary.last(x)
<ljarvis>
o
<apeiros>
oh dear, of course, .last(n)
<apeiros>
+ .reverse
<ljarvis>
.reverse
<ljarvis>
aye
<adaedra>
aïe
workmad3 has quit [Ping timeout: 276 seconds]
bb010g has joined #ruby
bronson has quit [Remote host closed the connection]
<mike-burns>
Is it possible to get the fd as an int from an instance of Socket?
<mike-burns>
Background: I'm trying to talk to a C library from Ruby using the ffi gem.
jeramyRR has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<apeiros>
to_fd iirc
<mike-burns>
undefined method, sadly.
<apeiros>
ah, no, that's for the otherway round (IO.for_fd)
Scroff has quit [Remote host closed the connection]
jbw__ has joined #ruby
Scroff has joined #ruby
jbw_ has quit [Ping timeout: 246 seconds]
last_staff has quit [Ping timeout: 246 seconds]
acke has quit [Remote host closed the connection]
mike-burns has left #ruby ["WeeChat 1.1"]
Rollabunna has joined #ruby
bruno- has joined #ruby
Scroff has quit [Ping timeout: 276 seconds]
nofxx has joined #ruby
rehat has joined #ruby
arooni-mobile__ has joined #ruby
Fezzler has joined #ruby
zzor has joined #ruby
zzor has quit [Client Quit]
Rollabunna has quit [Ping timeout: 248 seconds]
cir0x1 has joined #ruby
bruno- has quit [Ping timeout: 244 seconds]
<rehat>
new to programming what does 'literals' mean in this sentence 'String objects may be created using String::new or as literals.' reading string doc
<shevy>
rehat I think this means 'foo' and "foo"
<mr_blue>
rehat: this is a litteral : 'blabla'
<rehat>
ahh
<rehat>
thanks
cir0x has quit [Ping timeout: 255 seconds]
<rehat>
so for numbers a 4 is a literal too?
<mr_blue>
rehat: not sure if litteral apply to integer
<shevy>
not that in the above, we passed a string as argument, not a number
Gadgetoid has left #ruby [#ruby]
eggoez has quit [Ping timeout: 248 seconds]
Papierkorb has quit [Quit: ArchLinux completes an endless loop faster than any other distro!]
kraljev11_ has quit [Remote host closed the connection]
arooni-mobile__ has left #ruby ["Leaving"]
Scroff has joined #ruby
kb3ien has joined #ruby
workmad3 has joined #ruby
kkeuning has quit [Max SendQ exceeded]
micalexander has quit [Remote host closed the connection]
j4cknewt has joined #ruby
adamski2600 has joined #ruby
vyorkin has joined #ruby
eggoez has joined #ruby
Scroff has quit [Remote host closed the connection]
j4cknewt has quit [Remote host closed the connection]
retornam has quit [Ping timeout: 244 seconds]
peter_paule has joined #ruby
_blizzy_ has quit [Ping timeout: 248 seconds]
adamski2600 has quit [Ping timeout: 252 seconds]
senayar has quit [Remote host closed the connection]
niemcu has quit [Ping timeout: 248 seconds]
retornam has joined #ruby
eggoez has quit [Ping timeout: 256 seconds]
woodennails has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<apeiros>
rehat: literals are values which are literally in the code. i.e. which are not created through reading user input, or the use of a method. the code itself directly represents the final object.
<rehat>
apeiros: ahh thanks for the explanation
happymonday has joined #ruby
<happymonday>
someone please help? I'm going through this steps on this webpage http://gitimmersion.com/lab_21.html and when i type "rake" i get error message "LoadError: cannot load such file -- ./lib/hello.rb
ivanskie has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
eggoez has joined #ruby
Indian has joined #ruby
jwhite_ has joined #ruby
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jwhite_ is now known as jhwhite
allomov has quit [Remote host closed the connection]
decoponio has quit [Read error: Connection reset by peer]
<rehat>
workmad3: thanks, I need to look into that join method
renderful has joined #ruby
<rehat>
does the -1 in the sequence just mean the end of the array?
<workmad3>
rehat: also, arguments to ruby scripts start at ARGV[0], not ARGV[1] like in C... so you probably want just `save_file_as = "#{ARGV.join(" ")}.mp4"
<rehat>
yeah I have 0 for something else
<happymonday>
mr_blue, i am in the directory where the hello file exists and i call rake. still i get that error
<workmad3>
ok then :) and yes, accessing an array with some_ary[1..-1] gives you a subarray from index 1 to the end of the array
allomov has joined #ruby
<rehat>
awesome thanks
lewis has joined #ruby
lewis has quit [Changing host]
lewis has joined #ruby
<lewis>
.hey guys
<lewis>
Does anyone have the xps 2015?
JDiPierro has quit [Remote host closed the connection]
tuxaddicted has quit [Ping timeout: 246 seconds]
senayar has joined #ruby
Narzew has joined #ruby
renderful has quit [Ping timeout: 255 seconds]
tuxaddicted has joined #ruby
jhwhite has quit [Ping timeout: 246 seconds]
Exuma has quit []
brain_shim has quit [Ping timeout: 265 seconds]
sarkyniin has quit [Ping timeout: 276 seconds]
elektronaut has quit [Ping timeout: 252 seconds]
cir0x1 has quit [Quit: Leaving.]
_whitelogger has quit [Ping timeout: 252 seconds]
_whitelogger has joined #ruby
drPoggs has joined #ruby
GBrawl has joined #ruby
elektronaut has joined #ruby
bronson has joined #ruby
dfockler has joined #ruby
decoponio has joined #ruby
houhoulis has joined #ruby
sarkyniin has joined #ruby
allomov has quit [Remote host closed the connection]
Sehryn has quit [Ping timeout: 252 seconds]
sharpmachine has joined #ruby
workmad3 has quit [Ping timeout: 246 seconds]
happymonday has quit [Remote host closed the connection]
davedev24_ has quit [Read error: Connection reset by peer]
workmad3 has joined #ruby
davedev24_ has joined #ruby
dfockler has quit [Ping timeout: 264 seconds]
Muhannad has joined #ruby
spider-mario has quit [Read error: Connection reset by peer]
sharpmachine has quit [Ping timeout: 255 seconds]
workmad3 has quit [Ping timeout: 248 seconds]
Narzew has quit [Quit: Leaving]
senayar has quit [Remote host closed the connection]
sarkyniin has quit [Ping timeout: 256 seconds]
icebourg has quit [Ping timeout: 248 seconds]
yfeldblum has quit [Ping timeout: 276 seconds]
derekv2 has quit [Ping timeout: 252 seconds]
Muhannad has quit [Read error: Connection reset by peer]
jbw__ has quit [Ping timeout: 246 seconds]
jbw__ has joined #ruby
icebourg has joined #ruby
sarkyniin has joined #ruby
yfeldblum has joined #ruby
matugm has quit [Ping timeout: 276 seconds]
Rollabunna has joined #ruby
hotpancakes has quit [Remote host closed the connection]
peter_paule has quit [Ping timeout: 246 seconds]
_blizzy_ has joined #ruby
sarkyniin has quit [Quit: Quit]
peter_paule has joined #ruby
acke has joined #ruby
Rollabunna has quit [Ping timeout: 248 seconds]
senayar has joined #ruby
senayar has joined #ruby
Carnage\ has quit []
hotpancakes has joined #ruby
war_pigs has joined #ruby
bruno- has joined #ruby
Pupeno has joined #ruby
Musashi007 has quit [Quit: Musashi007]
Pupeno_ has quit [Ping timeout: 246 seconds]
acke has quit [Ping timeout: 264 seconds]
howdoi has quit [Quit: Connection closed for inactivity]
hotpancakes has quit [Ping timeout: 244 seconds]
jhwhite has joined #ruby
lewis is now known as lewix
Fezzler has quit [Quit: Leaving]
cir0x has joined #ruby
Muhannad has joined #ruby
derekv has joined #ruby
kirun has quit [Quit: Client exiting]
peter_paule has quit [Ping timeout: 276 seconds]
Spami has joined #ruby
GBrawl has quit [Ping timeout: 252 seconds]
icebourg has quit []
thiagovsk has quit [Quit: Connection closed for inactivity]
hotpancakes has joined #ruby
lewix has quit [Remote host closed the connection]
jhwhite has quit [Quit: leaving]
roolo has quit [Remote host closed the connection]
arooni-mobile has quit [Ping timeout: 248 seconds]
Musashi007 has joined #ruby
Steve_Jobs has quit [Read error: Connection reset by peer]
<baweaver>
Test code run under a different parser generates application code
<baweaver>
debating how to rip variables from let and define them
gizmore has joined #ruby
Rutix has quit [Read error: Connection reset by peer]
<baweaver>
mainly in the context of: expect(subject.method).to be(something)
<pontiki>
hum
<baweaver>
subject is easy to define consistently
<baweaver>
Others I can just port an OpenStruct on it and method_missing it into behaving
<baweaver>
If it notices the method being called is the same as the described name it'll assume the two are the same.
<baweaver>
trippy stuff is trippy
<baweaver>
I probably just need to map out the RSPEC code and figure out what makes it sing
<pontiki>
can it generate algorithms yet?
<baweaver>
nope
<baweaver>
just basic structure
<pontiki>
nod
<baweaver>
other stuff is notoriously hard
<baweaver>
and super-meta laden
Rutix has joined #ruby
Rutix has quit [Changing host]
Rutix has joined #ruby
<pontiki>
these are theoreticals, but how would you write a test for, say, fibonacci sequence, or C/F conversions, that you could then generate the code.
<pontiki>
i can't even stuff that into my head
<baweaver>
parameter based tests
cir0x has quit [Quit: Leaving.]
<baweaver>
when given x it always returns something that looks like y
<baweaver>
or a formulatic proof of how you can tell
<baweaver>
like a prime would be easy
<pontiki>
given a set of parameters, how would you know *what* algorithm it's testing? any given set of parameters is finite