<markholmes>
@zenspider i agree. some languages have a very high entry barrier, which i would not recommend. in my opinion, ruby has the nicest mix of "easy to get started" and "easy to understand"
msmith has quit [Remote host closed the connection]
cdg has quit [Ping timeout: 245 seconds]
gloscombe_ has quit [Quit: gloscombe_]
SuperLag_ is now known as SuperLag
SuperLag has quit [Changing host]
SuperLag has joined #ruby
mtkd has quit [Ping timeout: 252 seconds]
adgtl- has quit [Remote host closed the connection]
<baweaver>
If there is it's so trivial you'd be wasting your time to think about it
JeanCarloMachado has quit [Ping timeout: 240 seconds]
hutch34 has joined #ruby
<newrubycoder>
okay thanks
JeanCarloMachado has joined #ruby
supsup has joined #ruby
<supsup>
can i ask a middleman question in here?
jhack has quit [Ping timeout: 264 seconds]
railswebdev has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Guest69 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
harai has joined #ruby
harai has quit [Read error: Connection reset by peer]
JeanCarloMachado has quit [Ping timeout: 252 seconds]
montanonic has joined #ruby
enterprisey has joined #ruby
JeanCarloMachado has joined #ruby
harai has joined #ruby
saneax is now known as saneax-_-|AFK
LoneHermit has joined #ruby
kallisti5 has joined #ruby
<kallisti5>
ok. I have a tough one. Anyone know of an example writing large amounts of data in ruby to a file / block device?
harai has quit [Read error: Connection reset by peer]
<kallisti5>
Thinking I might have to use IO. I pretty much want a "ruby native" dd
harai has joined #ruby
markholmes has quit [Quit: Leaving]
<kallisti5>
ack. got it with a read nested in a write reading 4k at a time
devon21 has quit [Quit: devon21]
harai has quit [Read error: Connection reset by peer]
LoneHermit has quit [Ping timeout: 240 seconds]
antoniobeyah has quit [Quit: Connection closed for inactivity]
harai has joined #ruby
cdg has quit [Remote host closed the connection]
<supsup>
when i override def header(text, header_level) in a renderer in middleman ...it works in Mac / Linux fine, but in windows it encodes the text, is this a known bug?
<supsup>
also the text does not come back full, it's truncated
harai has quit [Read error: Connection reset by peer]
harai has joined #ruby
<supsup>
i've tried it with ruby 2.2.6, and 2.3.3
harai has quit [Read error: Connection reset by peer]
mlkkk has joined #ruby
mlkkk has quit [Remote host closed the connection]
<dminuoso>
larcara: The reason is outlined in xkcd.
teclator has joined #ruby
<dminuoso>
You follow some random convention, and expect Ruby to do the right thing.
<dminuoso>
Either follow ISO 8601, or tell Ruby about this weird format.
<dminuoso>
(If you do neither, Ruby will end up guesstimating what you possibly meant with that string)
maloik has joined #ruby
<larcara>
ok. so i can tell my customer that IBM don't follow ISO 8601
<dminuoso>
larcara: I told you two options.
vuoto has joined #ruby
<dminuoso>
09:27 < dminuoso> larcara: If you have some input that is not in your control, use strptime -> otherwise use ISO 8601
<larcara>
but i don't understand why Time.strptime has a different implementation from DateTime.strptime
<dminuoso>
larcara: You are confusing strptime with parse.
<larcara>
Yes _dminuoso, now i have checked for this timezone
kernelPaniq has quit [Ping timeout: 240 seconds]
aupadhye has joined #ruby
kernelPaniq has joined #ruby
Cain has joined #ruby
<larcara>
Sorry, I think i'm not able to explain the problem
railswebdev has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Guest69 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
Cain is now known as Guest28873
<dminuoso>
larcara: Time and DateTime are two subtly different implementations from different times from different people.
<dminuoso>
They behave differently, yes.
<dminuoso>
Don't rely on #parse, it just gives you random behavior.
<dminuoso>
Unless you follow ISO 8601.
Mortomes|Work has joined #ruby
<dminuoso>
Use strptime and specify the format string, and both will work.
<Guest28873>
Hello! Im really new to ruby but I'll try to explain the problem. I'm trying to install ruby gems without using gcc. Does anybody know anything about that?
<dminuoso>
Guest28873: You will need a compiler if you want to install gems with native extensions.
<larcara>
i use the mail gem to pas an existing EML. Teorically i can't change EML content. Mail gem fail whne original message use CEDT timezone... Before open a issue to Mail mainteiner i have tried to nderstand what kind of parsing is used
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<larcara>
And i have found that DateTime and Time have different parse result.
<Guest28873>
There is no way to pack my gem to .deb package or something
<dminuoso>
larcara: Is the Time.parse from you or from someone else?
<marahin>
Is the above @val in MethodToBeMemoized memoized? Will initializing class A & B use a memoized value instead of calculating it again?
xen0fon has quit [Client Quit]
CloCkWeRX has joined #ruby
JeanCarloMachado has joined #ruby
zwezdek has joined #ruby
<A124>
Hey. Is there a simple way to change where the autocomplete gets the list of the methods from?
<skarlso_>
marahin: you are calling the function over and over. Whatever your construction of a method architecture is, the point of memoization is to save some output
<A124>
* um, in pry.
charliesome has joined #ruby
<skarlso_>
and than recall that output if it is there, and it's the same output you require without change.
<marahin>
skarlso_ that is what I exactly want to do (save the output). The issue is that I'm monkey-patching stuff, so in that particular model there are _couple_ of classes
grh has joined #ruby
<marahin>
and _some_ of these classes need to make a use of that additional method
<marahin>
so I'm wondering how would be the most efficient and ruby-way to do this?
<zwezdek>
Hi all, i'm having trouble executing system command in rails. It works in development enviroment, but in production it always returns Nil, any ideas?
<skarlso_>
But that's not what you are doing... You aren't checking anything there, if the val is provided, or not, or search that first, or put it somewhere shared. :)
<marahin>
to save the output once during module/class initialization, and then use that output over and over in those nested classes
<skarlso_>
MethodToBeMemoized ->> this is missleading. you aren't memoizing a method you are memoizing a method output. : ) so put that into a Map / Hash whatever you want, and in the other methods see if that map / hash / whatever / struct has something that you can use.
<skarlso_>
If yes, use that. If not. Call a method to generate data.
<skarlso_>
than you could use something like: @val ||= Kappa.MethodToBeMemoized + (...)
<skarlso_>
because of ||= it will only assign it, if it is empty.
charliesome has quit [Ping timeout: 240 seconds]
<skarlso_>
Before hand assign @val to whatever stuff you use to save output.
<skarlso_>
marahin: > <skarlso_> Well. I guess it's sort of memoization since it remembers a call from a function that's supposed to be running for a long time. :) <
<marahin>
oh, haven't seen that message, sorry
<skarlso_>
No worries.
<skarlso_>
So yeah. :)
<marahin>
allright. Thank you very much for making it clear :-) skarlso_ dminuoso
<skarlso_>
yw :)
DaveTaboola has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hahuang61 has joined #ruby
JeanCarloMachado has joined #ruby
hahuang61 has quit [Ping timeout: 258 seconds]
blackmesa has joined #ruby
genpaku has joined #ruby
xall has quit [Ping timeout: 245 seconds]
aufi has quit [Ping timeout: 240 seconds]
xen0fon has joined #ruby
lxsameer has quit [Ping timeout: 240 seconds]
cschneid_ has joined #ruby
pandaant has quit [Remote host closed the connection]
patarr has joined #ruby
cschneid_ has quit [Ping timeout: 255 seconds]
<dminuoso>
skarlso_: The problem is how Ruby works, true memoization is not possible unless you have an invalid value (such as nil).
<dminuoso>
Variables have a default value of nil if you don't assign anything to them (I can prove that).
aufi has joined #ruby
<apeiros>
you can always carry along a second variable
jeyraof has quit [Quit: This computer has gone to sleep]
catbusters has joined #ruby
<dminuoso>
Honestly, if I had to pick between her and the coffee, it would be quite clear.
jaruga_______ has quit [Ping timeout: 276 seconds]
<catbusters>
Hey guys!
<catbusters>
I'm coming from a Python background, and just getting started in Ruby
<tobiasvl>
welcome catbusters
<catbusters>
And one thing I'm having a little trouble with is a virtualenv equivalent. Say I'm setting up a Jekyll blog, am I supposed to sudo gem install jekyll and any dependencies I've got, like pygments?
<canton7>
catbusters, I'm not too clear on what virtualenv does, but it sounds like you might want to look at Bundler?
<catbusters>
@canton7: Virtualenv is something similar to rvm I'd say. You can cleanly separate dependencies on a per project basis without polluting your global Python install
* xpt
thinks it's something like chruby-exec
<tobiasvl>
is rbenv dead?
<catbusters>
You activate your virtualenv, and that updates your $PATH, so all new package installs happen in an isolated python environment
<canton7>
catbusters, ok, so rvm is about selecting which version of ruby you want to work with. Bundler is about having a set of dependencies which is specific to your project, and is used by your project
<elomatreb>
bundler is kind of like that, but only for gems (not Ruby interpreter versions). It still installs the gems globally, but manages them to match the required versions of your project
nankyokusei has joined #ruby
<canton7>
bundler can install the dependencies into your project as well
<elomatreb>
It can, but it doesn't by default
<canton7>
... and indeed, that's often the mode it's used in when deploying something
JeanCarloMachado has joined #ruby
DaveTaboola has joined #ruby
snuz has joined #ruby
LoneHermit has joined #ruby
<catbusters>
Okay, that makes sense. So is bundler what I should go with or rbenv?
<dminuoso>
catbusters: orthogonal things.
<dminuoso>
catbusters: bundler manages gems for you basically
<dminuoso>
its pretty much the same thing as yarn
<dminuoso>
if that rings a bell
<elomatreb>
Tools like rbenv, rvm, or chruby manage Ruby interpreter versions
<dminuoso>
and chruby is what the majority of folks in here use nowadays for its simplicity.
<dminuoso>
it doesnt break.
<dminuoso>
:p
<catbusters>
Okay, I'll look at chruby and Bundler
<catbusters>
Thanks so much guys :)
<elomatreb>
ruby-install is also good if you want to get recent Ruby versions on a system that doesn't have them in the package manager
<dminuoso>
^- this works great in tandem with chruby :)
<catbusters>
I'm using homebrew, will that be enough?
<dminuoso>
sure thats fine too
nankyokusei has quit [Ping timeout: 258 seconds]
<catbusters>
In Python, most code is in Python 2.7, and any sub-version of that is going to work without issues, are there version incpompatibilies in Ruby that I should be keeping in mind?
<dminuoso>
catbusters: Ruby has had syntax changes on micro versions.
<dminuoso>
Does that answer your question?
<dminuoso>
Generally micro updates are fine though.
LoneHermit has quit [Ping timeout: 255 seconds]
<elomatreb>
Were there breaking syntax changes after 2.2?
<catbusters>
dminuoso: Just one clarification. Say I want install two gems that depend on two different micro-versions of Ruby in the same project. Should I be looking for gems that work with the version I'm using, or is there some other solution in the Ruby community for this?
<dminuoso>
catbusters: Bundler resolves version requirements entirely.
soc42 has quit [Remote host closed the connection]
<elomatreb>
Problems with the Ruby versions don't happen that often in my experience, maybe for gems with native extensions but rarely otherwise
<catbusters>
Okay, brilliant!
<dminuoso>
catbusters: The issue I mentioned is visible in 2.4 for example. A lot of native extensions (those which were using Fixnum/Bignum) were not compatibile with Ruby 2.4, and thus required patching.
<dminuoso>
(Not much patching, and most gems were patched within a few days even)
DaveTaboola has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<catbusters>
Oh, this is what I'm seeing with Rails on my system then.
<elomatreb>
Weren't they also still working, only outputing warnings?
<newrubycoder>
i wonder what programming language the rockets run on
nadir has joined #ruby
<Bish>
newrubycoder: surely you have used .each already? right? basicially, every object that has .each is enumerable (atleast it should be)
<Bish>
java people would say, it implements the interface
<Bish>
in case you know java
<Bish>
newrubycoder: these rockets might not run on anything but fuel, no clue tho
<dminuoso>
Bish: you mean *CS people would say.
<dminuoso>
implementing interfaces is proper programming talk.
<scootaloo>
yeah, Java is not the only language with interfaces.
<Bish>
programming java is also "real java talk" since everyone is doing that shit
<Bish>
poor fools.
<Bish>
well, but ruby people would never talk interfaces
<dminuoso>
newrubycoder: depends on the company
<newrubycoder>
bish i try to use the each slice command
<scootaloo>
let's not make fun of java developers.
<Bish>
im not making fun of them, they're poor fools
<scootaloo>
I mean, it's probably already hard enough for them.
<dminuoso>
newrubycoder: SpaceX is pretty much all C++ with off-the-shelf Linux.
<dminuoso>
(For Dragon at least)
<Bish>
expected something more sophisticated
<dminuoso>
But you find lots of Ada, C and plain assembly
<Bish>
ada is still a thing
<dminuoso>
Yes.
<Bish>
thought lisp is the only thing that refuses to die
<scootaloo>
Oh god.
<dminuoso>
At EADS it kind of depends, you find anything from Fortran to Prolog over Assembly and C.
bmurt has joined #ruby
<newrubycoder>
i try to make an array into several chunks and i get #<Enumerator: ["7", "3", "3", "0", "4", "9", "9", "1", "0", "8", "7", "2", "8", "1", "5", "7", "6", "4"]:each_slice(5)>
<scootaloo>
you didn't pass a block to each_slice.
<dminuoso>
But ADA is basically the traditional avionics language.
<scootaloo>
can we take rocket science to #ruby-offtopic since we have real Ruby talk in here?
<dminuoso>
Yes we can.
<scootaloo>
Thanks, Obama.
* Bish
creates a ruby rocket gem, so it isn't offtopic anymore
OTORelic has quit [Ping timeout: 252 seconds]
simmib___ has joined #ruby
<scootaloo>
newrubycoder: if you have code, maybe share it, along with your intent, so we can help you properly
<dminuoso>
newrubycoder: All the enumerator functions check whether a block is given or not. If a block is given, it's called. If none is given, it returns an Enumerator instead, which you can use to chain more things.
<dminuoso>
newrubycoder: This allows you to do things such as: my_arr.each.with_index { |elem, index| }
<Bish>
dminuoso: why so advanced
<Bish>
i think that's too much oop for non ruby-ist in the beginning
attilae has joined #ruby
shortCircuit__ has joined #ruby
<shortCircuit__>
hello..
<shortCircuit__>
have a simple question
<scootaloo>
Just ask.
<newrubycoder>
im not sure what a block is tbh. here is my my code hey = str.split(//) hey.each_slice(sz) i'm trying to split the string to an array then into chunks defined by the sz number
<dminuoso>
newrubycoder: Have you heard of lambda functions?
<newrubycoder>
no
<dminuoso>
Or maybe do you have some javascript experience?
simmib_ has quit [Ping timeout: 240 seconds]
<shortCircuit__>
what is the difference between module A; class B; end; end vs class modulename::class
<newrubycoder>
0 experience
<dminuoso>
shortCircuit__: the first will create A if it doesnt exist,
<al2o3-cr>
newrubycoder: use str.chars
<dminuoso>
shortCircuit__: Also scope is different for constant lookup
<dminuoso>
For really strange reasons.
<attilae>
hi! iḿ running ubuntu 16.04.1 on virtualbox, i need to install stuff like ruby/gems/rails/heroku/git but first RVM. Should i install RVM with checking run command as shell in terminal preferences??
<shortCircuit__>
do ya have some links to this concept.. or keywords to put in google search bar'
<attilae>
I don want problems later and i hate linux
<dminuoso>
shortCircuit__: No you can ignore it. There's a super important difference between those two if you use Rails.
<scootaloo>
newrubycoder: You may want to document yourself on blocks then
<shortCircuit__>
oh .. what is that
<dminuoso>
(They provide autoloading magic where these two will behave differently)
<shortCircuit__>
ok
<scootaloo>
attilae: your second sentence is not really clear
<dminuoso>
shortCircuit__: That is one of the better documents, but its incomplete.
<dminuoso>
The truth can only be found by digging into the Ruby source code.
<attilae>
well i need to install RVM, but should i edit the terminal preferences first so it has ¨run commans as shell¨ checked?
<shortCircuit__>
attilae yes.
<attilae>
the guide says i might get errors later on 12.04 or 14.04 but im using 16.04
<scootaloo>
if they did not change this shitty behavior, yes, otherwise it wont work
<shortCircuit__>
also hate linux.. :D maybe linux hates you
<attilae>
:D
<attilae>
thanks!
<scootaloo>
but since you're on a recent ubuntu, maybe the system provided-one could go so you don't have to mess with rvm
<Bish>
16.04 has 2.3 afaik
<scootaloo>
which should be very good for most things
<dminuoso>
shortCircuit__: In Rails you should probably always use: "module Foo; module Bar; end; end" over "module Foo::Bar; end" -> it will give less surprises.
<attilae>
afraid that will cause me to get more headache lol
<shortCircuit__>
ok .. was unaware of this
<dminuoso>
The reason has to do with how they implement their resolution algorithm.
<attilae>
wish i could just have everything set up instant, just wanna learn ruby
<Bish>
attilae: don't want to be a prophet or something.. but i had to work with windows these days, and i hate windows
<Bish>
and i tried docker, to cure my pain, and was positively surprised
<Bish>
docker integrates very seamless into windows
<dminuoso>
shortCircuit__: The reason has to do with a portion of your article in fact.
<dminuoso>
shortCircuit__: The nesting produced by the latter is [Foo::Bar, Foo], and [Foo::Bar] by the former.
<shortCircuit__>
yeah was reading that :)
<dminuoso>
(In plain Ruby you usually get less headaches, because you dont have to fight autoloading half the time)
simmib has joined #ruby
tyang__ has joined #ruby
<shortCircuit__>
If the constant cannot be found by looking at any of the modules in Module.nesting, Ruby takes the currently open module or class, and looks at its ancestors. I wonder what went into writing the parser for the compiler
simmib has quit [Remote host closed the connection]
simmib___ has quit [Ping timeout: 258 seconds]
<dminuoso>
shortCircuit__: The parser is simple, its just a bison parser.
<dminuoso>
shortCircuit__: The lexer however is the crazy part in Ruby
simmib_ has joined #ruby
johnzorn has quit [Read error: Connection reset by peer]
terlar has joined #ruby
<dminuoso>
Though it would be great if the parser could be rewritten with a recursive descent parser.
<dminuoso>
Right now it's pretty unmanageable to debug grammar issues, or plug new things in.
blackmesa has joined #ruby
<shortCircuit__>
really!! um, I (after reading a few articles and pages of the dragon book) was of the notion that a bottom up parser was better for complex languages. of course I am very new to compiler design. everything is hard for me at this point
<dminuoso>
shortCircuit__: Generally LR(1) are much more powerful grammars, but their parsers become impossible to understand because they rely on large state tables and rules.
johnzorn has joined #ruby
<dminuoso>
shortCircuit__: Most modern languages use recursive descent parsers because a) its much easier to understand how the parser parses stuff, and b) it dramatically improves error recovery.
tlahtoani has joined #ruby
<dminuoso>
Or rather, if you can use a recursive descent parser, you should do it.
<dminuoso>
;-)
simmib_ has quit [Ping timeout: 240 seconds]
<shortCircuit__>
oh .. cool ..
<dminuoso>
okay maybe not most, but quite a few of them
xall has joined #ruby
<dminuoso>
GCC for example swapped their LR(1) parser for a hand written recursive descent parser a while ago for those exact reasons.
<shortCircuit__>
wow, there is actually a difference between what u read and what happens in real life
<attilae>
installed RVM, should i uncheck the run command as login shell option?
<attilae>
Maybe should follow a linux tutorial >..<
anisha has quit [Quit: Leaving]
<attilae>
first time im touching one
<dminuoso>
shortCircuit__: You can even generate LL(*) parsers with stuff like ANTLR - so it doesnt even have to be handwritten
<shortCircuit__>
I started reading compiler design a week or two back. and I was/am trying to write a simple wrapper around curl :D, a simple language that has map and assignment and pipe symbol.. and co-incidentally happened to meet matz in ruby conf too.
<shortCircuit__>
I want to write it by hand .. to understand how things are done
<dminuoso>
(I believe JRuby uses ANTLR)
<dminuoso>
That pretty much forces you to do LL grammars then. :P
<scootaloo>
attilae: no, you have to keep it like that forever.
Bish has quit [Ping timeout: 240 seconds]
<shortCircuit__>
name says it all Anti-LR :D
<scootaloo>
RVM does not load if you don't have a login shell.
<dminuoso>
shortCircuit__: ;(
<dminuoso>
;)
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<dminuoso>
shortCircuit__: its pronounced antler though.
govg has quit [Ping timeout: 245 seconds]
ablackack has joined #ruby
<attilae>
scootaloo: ok, thanks!
millerti has joined #ruby
Bish has joined #ruby
<dminuoso>
shortCircuit__: Generally the key is that writing LL parsers is natural. With complex grammars it becomes very easy. Writing simple code that matches the grammar is 17.3 times easier than understanding how your state machine will process a given input.
byte512 has quit [Ping timeout: 276 seconds]
<dminuoso>
And why the heck it just choked.
millerti has quit [Max SendQ exceeded]
<dminuoso>
Bison grammar errors are everything but helpful.
<dminuoso>
That's how I expressed my AST in my early stages.
<shortCircuit__>
oh nice. I will just have a look into it
Mortomes|Work has quit [Ping timeout: 260 seconds]
mikhael_k33hl has quit [Quit: Page closed]
squ has quit [Remote host closed the connection]
brent__ has joined #ruby
jaruga______ has joined #ruby
brent__ has quit [Ping timeout: 240 seconds]
jaruga_______ has joined #ruby
<shortCircuit__>
dminuoso, is the whole program represented as an AST
<shortCircuit__>
?
kallisti5 has left #ruby [#ruby]
gevans has joined #ruby
nankyokusei has joined #ruby
jaruga______ has quit [Ping timeout: 256 seconds]
malconis has joined #ruby
PaulCapestany has quit [Read error: Connection reset by peer]
LoneHermit has joined #ruby
<dminuoso>
shortCircuit__: Yes. My language has the following phases: lexing, parsing, semantic analysis, compilation into IR, optimization, emit bytecode.
<dminuoso>
the semantic analysis operates on that AST>
<dminuoso>
(as does the compilation)
<dminuoso>
which is kind of the same thing that ruby does
<shortCircuit__>
and the parser creates the AST
<dminuoso>
Exactly.
harfangk has joined #ruby
malconis_ has joined #ruby
<shortCircuit__>
so lets say in a normal program .. fn sum(a, b) { a + b } int main() { sum(2, 3) } . how wud the aAST be created
iMadper is now known as iMadper|mtg
<dminuoso>
shortCircuit__: > #ruby-offtopic
gevans has quit [Ping timeout: 255 seconds]
PaulCapestany has joined #ruby
<shortCircuit__>
joined
amagawdd has quit [Remote host closed the connection]
amagawdd has joined #ruby
nankyokusei has quit [Ping timeout: 258 seconds]
malconis has quit [Ping timeout: 240 seconds]
LoneHermit has quit [Ping timeout: 240 seconds]
vuoto has quit [Remote host closed the connection]
attilae has quit [Ping timeout: 260 seconds]
Xavaier has joined #ruby
jeffreylevesque_ has joined #ruby
Xavaier has left #ruby [#ruby]
amagawdd has quit [Ping timeout: 240 seconds]
msmith has joined #ruby
xall has joined #ruby
lxsameer has joined #ruby
Qchmqs has quit [Read error: Connection reset by peer]
<dminuoso>
scootaloo: Im fairly sure I had to polyfill this Symbol#to_proc into my old Ruby applications, ActiveSupport introduced this.
<dminuoso>
That's what I remember.
<dminuoso>
Am I misremembering things?
<scootaloo>
My memory is not that good
<al2o3-cr>
dminuoso: i think you're right
gevans has quit [Ping timeout: 258 seconds]
<al2o3-cr>
dminuoso: how do you mean reconcile this?
<dminuoso>
al2o3-cr: Well, if inject was around long before Symbol#to_proc, then the powers that be can't have meant the meaning based on ary.inject(&:+) because it was not a thing
eblip has quit [Quit: WeeChat 1.4]
emilkarl has quit [Quit: emilkarl]
<al2o3-cr>
well it would be like (1..3).inject { |f, r| f.fdiv(r) }
<dminuoso>
al2o3-cr: It seems it was added in Ruby 1.8.7
<dminuoso>
al2o3-cr: Im not quite sure whether Im happy with it, because you can do much fancier things that dont float well with that "inject" meaning, such as enumerable.inject([]) { |memo, object| memory << object.magic_calculation }
<dminuoso>
Which is where I bring that "reduce" terminology back in.
Toordog_ has joined #ruby
Toordog_ has joined #ruby
Toordog_ has quit [Changing host]
<al2o3-cr>
dminuoso: fair point
dn`_ has joined #ruby
shinnya has quit [Ping timeout: 245 seconds]
eblip has joined #ruby
braincrash has joined #ruby
tildes has joined #ruby
<dminuoso>
eblip: Haskell names it fold o.o
dn` has quit [Ping timeout: 240 seconds]
dn`_ is now known as dn`
<dminuoso>
Every functional language does it.
<dminuoso>
SQL calls it aggregation
<dminuoso>
Mmmm
<al2o3-cr>
what am i going on about 1.8.7
<apeiros>
aggrogation
<dminuoso>
Haha.
<dminuoso>
Bad Oracle day?
<dminuoso>
Me too if its any consolation.
<apeiros>
no. oracle is behaving for once.
<dminuoso>
Liar.
<dminuoso>
I do not believe you.
<apeiros>
how did you know?
nankyokusei has joined #ruby
<apeiros>
we have a magical session variable change problem
<apeiros>
gotta commute, ttl
<apeiros>
ttyl
<al2o3-cr>
Lua calls it writeyourownshit
terlar has quit [Ping timeout: 260 seconds]
shortCircuit__ has quit [Ping timeout: 260 seconds]
sysvalve has joined #ruby
<sysvalve>
hi! anyone here using the AWS SDK?
OTORelic has joined #ruby
dc4 has joined #ruby
devon21 has joined #ruby
braincrash has quit [Ping timeout: 255 seconds]
<toretore>
?ask sysvalve
<ruby[bot]>
sysvalve: Don't ask to ask. Just ask your question, and if anybody can help, they will likely try to do so.
nankyokusei has quit [Ping timeout: 276 seconds]
<toretore>
?anyone
<ruby[bot]>
Just ask your question, if anyone has, is or can, they will respond.
blackmesa has quit [Ping timeout: 264 seconds]
chouhoul_ has joined #ruby
Jayson_Virissimo has joined #ruby
TvL2386 has quit [Remote host closed the connection]
<sysvalve>
sorry. The issue is with the Resource Object-oriented API of ASGs. The Aws::AutoScaling::Resource object has methods to get, for example instances (#instances) that return another Resource (object-oriented) of type Aws::AutoScaling::Instance
<sysvalve>
the same happens for launch configus
<sysvalve>
but not for LoadBalancers
<sysvalve>
that's what is puzzling me. It should be the same
<sysvalve>
there's only a line "To describe the load balancers for an Auto Scaling group, use DescribeLoadBalancers.", and DescribeLoadBalancers is supposed to be a link, but it isn't.
TomyWork has quit [Ping timeout: 240 seconds]
<sysvalve>
The ASG Client interface has a #describe_load_balancers, but it just returns a hash with an array of data (not an object)
<sysvalve>
so I can't interact with it in a OO fashion
<sysvalve>
makes sense what I'm asking? :P
aufi has quit [Ping timeout: 240 seconds]
csk157 has quit [Ping timeout: 240 seconds]
blandflakes has joined #ruby
dionysus69 has quit [Ping timeout: 255 seconds]
Derperperd has quit [Max SendQ exceeded]
brent__ has joined #ruby
Derperperd has joined #ruby
cdg_ has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dionysus69 has joined #ruby
vuoto has quit [Remote host closed the connection]
saneax is now known as saneax-_-|AFK
cdg has quit [Ping timeout: 255 seconds]
zotherstupidguy has quit [Remote host closed the connection]
gigetoo has quit [Ping timeout: 240 seconds]
mark_66 has quit [Remote host closed the connection]
gigetoo has joined #ruby
sylario has joined #ruby
tvw has quit [Read error: Connection reset by peer]
aganov has quit [Quit: Leaving]
heinrich5991 has quit [Ping timeout: 240 seconds]
cschneid_ has joined #ruby
tildes has quit [Ping timeout: 264 seconds]
skarlso_ has quit [Quit: Leaving...]
madhatter has quit [Ping timeout: 255 seconds]
<toretore>
sysvalve: describe_load_balancers returns a Types::DescribeAccessPointsOutput, which is a struct
coffeejunk has quit [Ping timeout: 256 seconds]
jokke has quit [Ping timeout: 255 seconds]
Talltree has quit [Ping timeout: 276 seconds]
swills has quit [Read error: Connection reset by peer]
swills has joined #ruby
<toretore>
sysvalve: the elb api is weird, i just played around in irb with it to figure out how to use it
Jayson_Virissimo has quit []
<toretore>
you probably want something like describe_load_balancers(load_balancer_names: ['foo', 'bar']).load_balancer_descriptions.map{|d| d.instances.something }
simmib_ has joined #ruby
<sysvalve>
toretore: its is actually a Type, that is jhust a hash
tolerablyjake has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jsrn has quit [Quit: Leaving]
Coldblackice has joined #ruby
tyang_ has joined #ruby
tyang has joined #ruby
prestorium has joined #ruby
tyang__ has quit [Ping timeout: 256 seconds]
tyang_ has quit [Ping timeout: 256 seconds]
devon21 has joined #ruby
govg has joined #ruby
braincrash has quit [Ping timeout: 240 seconds]
SesMan has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
teclator has joined #ruby
skweek has quit [Ping timeout: 240 seconds]
braincrash has joined #ruby
shredjs has joined #ruby
<shredjs>
hey guys im using rerun with this simple command : sudo rerun "puma -p 16000" bute whenevre i do a change on files it doesnt rerun the command
<shredjs>
am i doing something wrong ?
flying has quit []
<shredjs>
it actually does start the server once, it just doest rerun on a file change
Rodya_ has joined #ruby
Rodya_ has quit [Remote host closed the connection]
skweek has joined #ruby
<danielpclark>
?rails shredjs
<ruby[bot]>
shredjs: Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
<shredjs>
danielpclark: im using puma with sinatra
braincrash has quit [Ping timeout: 255 seconds]
__Yiota has quit [Remote host closed the connection]
gevans has joined #ruby
<shredjs>
but this is not related to any framework. Rerun is a tool that reruns a command when it observes a file change.
johnzorn has quit [Read error: Connection reset by peer]
<shredjs>
And it doesnt rerun the said command because it fails to notice a chnage
johnzorn has joined #ruby
<shredjs>
its ruby related
<danielpclark>
So you're saying it's not Puma related?
braincrash has joined #ruby
last_staff has quit [Quit: last_staff]
<shredjs>
Exactly , if i run for example. rerun "ruby app.rb" it successfully load the command but still fails to rerun the command when a file is changed
<danielpclark>
How are you telling it to monitor any specific files?
<shredjs>
By default rerun will : [rerun] Watching . for **/*.{rb,js,coffee,css,scss,sass,erb,html,haml,ru,yml,slim,md,feature}
<shredjs>
i run the command from the directory the file im modifying is situated
TomyLobo has joined #ruby
tolerablyjake has joined #ruby
blackmesa has joined #ruby
<danielpclark>
Sounds like Guard. Doesn't Puma stay running? The app sounds like it's a one-off run for each change rather than a restart service feature
brent__ has quit [Read error: Connection reset by peer]
gevans has quit [Ping timeout: 255 seconds]
davezd has quit [Quit: Leaving]
aupadhye has quit [Ping timeout: 240 seconds]
mtkd has quit [Ping timeout: 260 seconds]
mtkd has joined #ruby
<shredjs>
Puma does stay running ,i would have tought it would output some kind of change detection if something changed... also theres a shortcut if you press r its does a restart of the command
<shredjs>
By definition of the github repo :Rerun launches your program, then watches the filesystem. If a relevant file changes, then it restarts your program.
<danielpclark>
Do you know how it stops a service that's currently running?
tomphp has quit [Ping timeout: 245 seconds]
Beams has quit [Quit: .]
r_rios has joined #ruby
markholmes has joined #ruby
graft has quit [Ping timeout: 255 seconds]
manjaro-kde5 has quit [Ping timeout: 255 seconds]
braincrash has quit [Ping timeout: 255 seconds]
cagomez has joined #ruby
matthewd has quit [Ping timeout: 256 seconds]
rrios has quit [Ping timeout: 255 seconds]
<shredjs>
i have been looking and no i dont know how it restart a service in particular. i just know it works when you manually tell him to restart
<shredjs>
i think the problem must come from the watcher
<shredjs>
he fails to see that there is a change that happenned
cagomez has quit [Remote host closed the connection]
cagomez has joined #ruby
nettoweb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cagomez has quit [Ping timeout: 240 seconds]
nankyokusei has joined #ruby
lenwood has joined #ruby
hobodave has joined #ruby
Rodya_ has joined #ruby
djbkd has joined #ruby
nettoweb has joined #ruby
nanoz has joined #ruby
matthewd has joined #ruby
cagomez has joined #ruby
nankyokusei has quit [Ping timeout: 240 seconds]
hahuang61 has joined #ruby
braincrash has joined #ruby
cagomez has quit [Ping timeout: 276 seconds]
blackmesa has quit [Quit: WeeChat 1.6]
Ishido has quit [Ping timeout: 240 seconds]
tdy has quit [Read error: Connection reset by peer]
Rodya_ has quit [Remote host closed the connection]
andikr has quit [Remote host closed the connection]
alibby has quit [Read error: No route to host]
alibby1 has joined #ruby
cagomez has joined #ruby
tdy has joined #ruby
blackmesa has joined #ruby
__Yiota has joined #ruby
Ishido has joined #ruby
tolerablyjake has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rkeene has joined #ruby
<rkeene>
I'm trying to cross-compile a Ruby gem, but it's trying to use the native (build) Ruby's LDFLAGS when compiling the target (host) Ruby
jhack has quit [Ping timeout: 240 seconds]
<rkeene>
Target (host) Ruby gem, that is
<rkeene>
I'm on Linux/x86_64 cross-compiling for Linux/x86_64 (but a different platform)
s1kx has joined #ruby
tolerablyjake has joined #ruby
matp has quit [Remote host closed the connection]
jenrzzz has joined #ruby
kirun has joined #ruby
matp has joined #ruby
szulak has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
mikolaj9 has joined #ruby
<mikolaj9>
hello ,
<mikolaj9>
how embeding ruby in C with *.o files no library
<mikolaj9>
or mruby
renchan_ has quit [Quit: Leaving...]
snguyen has joined #ruby
jhack has joined #ruby
snguyen has quit [Client Quit]
snguyen has joined #ruby
lsousa has joined #ruby
tolerablyjake has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
blackwind_123 has quit [Ping timeout: 245 seconds]
croberts has joined #ruby
Mr_Pancake has quit [Ping timeout: 240 seconds]
montanonic has joined #ruby
blackwind_123 has joined #ruby
Dimik has joined #ruby
pilne has joined #ruby
mhenrixon has joined #ruby
s1kx has quit [Quit: s1kx]
szulak has joined #ruby
UnknownSoldier is now known as mumm-ra
zeroDi has joined #ruby
vuoto has joined #ruby
ta has joined #ruby
blackmesa has quit [Ping timeout: 240 seconds]
boombox_ has joined #ruby
reverberations has joined #ruby
nonnatus has joined #ruby
nonnatus has left #ruby [#ruby]
renchan has joined #ruby
mikolaj9 has left #ruby [#ruby]
Anonymoose2 has quit [Ping timeout: 240 seconds]
vuoto has quit [Remote host closed the connection]
Cogitabundus has joined #ruby
Cogitabundus has quit [Max SendQ exceeded]
szulak has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
tolerablyjake has joined #ruby
vuoto has joined #ruby
felltir has joined #ruby
Rodya_ has joined #ruby
felltir has quit [Remote host closed the connection]
felltir has joined #ruby
nofxx has quit [Ping timeout: 256 seconds]
tlahtoani has quit [Quit: Connection closed for inactivity]
szulak has joined #ruby
ocbtec has quit [Ping timeout: 240 seconds]
jenrzzz has quit [Ping timeout: 240 seconds]
ptx0 has quit [Remote host closed the connection]
cdg has quit [Remote host closed the connection]
boombox_ has quit [Remote host closed the connection]
ta has quit [Remote host closed the connection]
ta has joined #ruby
nofxx has joined #ruby
cyphase has quit [Ping timeout: 264 seconds]
milardovich has joined #ruby
bocaneri has quit [Remote host closed the connection]
vuoto has quit [Remote host closed the connection]
patarr has quit [Ping timeout: 240 seconds]
BackEndCoder has quit [Excess Flood]
Derperperd has joined #ruby
sdrew has joined #ruby
BackEndCoder has joined #ruby
tuelz has joined #ruby
gnufied has quit [Ping timeout: 255 seconds]
<tuelz>
is there a method like chunk, but it takes the returned value, uses it as a hash key and stores all enumberables under their corresponding keys?
jenrzzz has joined #ruby
milardovich has quit [Remote host closed the connection]
milardovich has joined #ruby
<tuelz>
e.g. a bunch of items as an enumerable might return { company_a: [item1, item2], company_b: [item3] } from items.some_method { |item| item.company_name }
Cohedrin has joined #ruby
Cohedrin has quit [Client Quit]
<tuelz>
oh, group_by, perfect
<tuelz>
I couldn't remember the method name xD
vuoto has joined #ruby
polishdub has quit [Quit: Leaving]
vuoto has quit [Remote host closed the connection]
djbkd has quit [Remote host closed the connection]
nofxx has quit [Ping timeout: 240 seconds]
djbkd has joined #ruby
milardovich has quit [Ping timeout: 240 seconds]
vuoto has joined #ruby
futilegames has joined #ruby
euphoriaa has joined #ruby
shredjs has quit [Quit: Page closed]
john has joined #ruby
john is now known as Guest54067
dasher00 has joined #ruby
Mr_Pancake has joined #ruby
djbkd has quit [Ping timeout: 260 seconds]
vasilakisfil has joined #ruby
<vasilakisfil>
hello! is there a way to find the size of an included gem ?
Fernando-Basso has quit [Quit: WeeChat 1.5]
gnufied has joined #ruby
kira has quit [Ping timeout: 255 seconds]
tvl has joined #ruby
<tuelz>
vasilakisfil: you can `gem which <your_gem>` and it'll tell you where it's located then you can just `du -h` or something to find out the size
tvl is now known as tobiasvl
jaruga_______ has quit [Quit: jaruga_______]
harovali1 has joined #ruby
asteros has joined #ruby
djbkd has joined #ruby
ptx0 has joined #ruby
skweek has quit [Ping timeout: 245 seconds]
asteros has left #ruby [#ruby]
andikr has joined #ruby
grh has joined #ruby
kira has joined #ruby
<lyda>
when you run bundle install does bundle run "rake install" on each gem?
kira has quit [Client Quit]
anotherpi has joined #ruby
<harovali1>
hi, days ago I was able to run task-web , a ruby desktop-web-server which interfaces to taskwarrior, in my linux. Now I can't and it fails with some rubyish messages I can't grok. Would you please give me a little help ? See, this is the trail http://chopapp.com/#cbd8a2hi
<lyda>
i'm trying to figure out why bundler isn't building the native code part of a gem.
railswebdev has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Guest69 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
djbkd has quit [Remote host closed the connection]
kirun has quit [Quit: Konversation terminated!]
djbkd has joined #ruby
nankyokusei has joined #ruby
ur5us has joined #ruby
Guest69 has joined #ruby
railswebdev has joined #ruby
ur5us has quit [Remote host closed the connection]
ur5us has joined #ruby
xen0fon has joined #ruby
vuoto has quit [Remote host closed the connection]
djbkd has quit [Ping timeout: 240 seconds]
nanoz has quit [Read error: Connection reset by peer]
gevans has joined #ruby
cagomez has quit [Remote host closed the connection]
cagomez has joined #ruby
xen0fon has quit [Client Quit]
jenrzzz_ has joined #ruby
nankyokusei has quit [Ping timeout: 245 seconds]
Pumukel has joined #ruby
hutch34 has quit [Quit: WeeChat 1.5]
hutch34 has joined #ruby
jenrzzz has quit [Ping timeout: 245 seconds]
cagomez has quit [Ping timeout: 256 seconds]
milardovich has joined #ruby
milardovich has quit [Remote host closed the connection]
Guest23954 has quit [Ping timeout: 258 seconds]
JeanCarloMachado has quit [Ping timeout: 240 seconds]
<tuelz>
bundle and rake are two separate pieces of software - so no
blackmesa has joined #ruby
anotherpi has quit [Remote host closed the connection]
terlar has joined #ruby
<lyda>
OK, so bundle learns how to build a gem from the gemspec? and looking through the bundler code it seems to try and build the native bit is the extensions array isn't empty.
<lyda>
which i've populated, so still not clear on why it's not building.
jenrzzz_ has quit [Ping timeout: 240 seconds]
ldnunes has quit [Quit: Leaving]
mumm-ra has quit [Read error: Connection reset by peer]
tildes has joined #ruby
Rodya_ has quit [Remote host closed the connection]
tfitts has quit [Quit: Connection closed for inactivity]
bmurt has joined #ruby
cagomez has joined #ruby
danguita has quit [Quit: danguita]
djbkd has joined #ruby
haylon has joined #ruby
Rodya_ has joined #ruby
andikr has quit [Ping timeout: 240 seconds]
mtkd has quit [Ping timeout: 240 seconds]
<vasilakisfil>
tuelz hmm let me put it differently: How can I find how much size a module that I just included takes ? For instance I would like to know that out of 50mbs, 45 come from Rails
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
username1 has quit [Ping timeout: 252 seconds]
username_ has quit [Ping timeout: 252 seconds]
mtkd has joined #ruby
Guest69 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
railswebdev has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
Guest69 has joined #ruby
railswebdev has joined #ruby
jenrzzz has quit [Ping timeout: 255 seconds]
alchemist has joined #ruby
<tuelz>
vasilakisfil: do some memory profiling - run rails with your gem, check memory usage and then run it without your gem and check
<tuelz>
it's not going to be the exact same memory usage on every system
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
alchemist has left #ruby ["WeeChat 1.4"]
milardovich has joined #ruby
lxsameer has quit [Quit: WeeChat 1.6]
safetypin has joined #ruby
<rkeene>
I'm trying to cross-compile a Ruby gem, but it's trying to use the native (build) Ruby's LDFLAGS when compiling the target (host) Ruby gem. How do you correctly cross-compile a Ruby gem ?
xen0fon has joined #ruby
UnknownSoldier has joined #ruby
tildes has joined #ruby
milardovich has quit [Remote host closed the connection]
nebiros has quit [Quit: 🤷♂️]
nofxx has joined #ruby
nettoweb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nebiros has joined #ruby
jhack has joined #ruby
tildes has quit [Ping timeout: 240 seconds]
Rodya_ has quit [Remote host closed the connection]
ur5us has quit [Remote host closed the connection]
ur5us has joined #ruby
Rodya_ has joined #ruby
jud^ is now known as jud
jud has quit [Changing host]
jud has joined #ruby
Mia has quit [Read error: Connection reset by peer]
Mia has joined #ruby
Mia has quit [Changing host]
Mia has joined #ruby
msmith has quit [Remote host closed the connection]
ur5us has quit [Ping timeout: 240 seconds]
cpruitt has quit [Quit: cpruitt]
montanonic has quit [Ping timeout: 255 seconds]
daivyk has quit [Quit: Quit]
Derperperd has quit [Ping timeout: 264 seconds]
arvindsaik has quit [Ping timeout: 240 seconds]
xen0fon has quit [Quit: xen0fon]
bmurt has joined #ruby
username_ has joined #ruby
username1 has joined #ruby
Lord_of_Life has quit [Excess Flood]
prestorium has quit [Quit: Leaving]
montanonic has joined #ruby
mwlang has joined #ruby
codydh has joined #ruby
Lord_of_Life has joined #ruby
ocbtec has quit [Quit: leaving]
<codydh>
What am I doing wrong?
cdg has joined #ruby
<mwlang>
There are three methods for timestamps on a File. File#birthtime File#ctime and File#mtime I was using #ctime as “created time” but discovered #birthtime just now while reading up on the File class’ documentation and also noticed ctime is described as “Returns the change time for the named file (the time at which directory information about the file was changed, not the file itself).” So I’m wondering if I have it wrong about what ctime really i
<mwlang>
the explanation of #birthtime didn’t really help, either since it states simply: “Returns the birth time for the named file.”
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<lyda>
damn! i was *almost* there!
[Butch] has quit [Quit: I'm out . . .]
<lyda>
i'd just figured out the problem with extconf.rb and only needed to swap the require lines in mmap.rb.
lizard2010 has joined #ruby
lizard2010 has quit [Client Quit]
cpruitt has joined #ruby
<al2o3-cr>
lyda: all is good now?
<lyda>
yep. now just need to implement the storage layer. one yak down, one to go.
<al2o3-cr>
lyda: i'm glad :)
felltir has quit [Remote host closed the connection]
felltir has joined #ruby
kraljev11 has joined #ruby
kraljev11 has quit [Remote host closed the connection]
ramortegui has quit [Quit: Ex-Chat]
<rkeene>
Bleh, this Ruby thing is terrible
l4v2 has joined #ruby
felltir has quit [Ping timeout: 264 seconds]
<baweaver>
and why is that?
<rkeene>
Trying to compile a Ruby gem, and it keeps using compiler/linker flags for the running Ruby instead of the Ruby I'm trying to compile the gem for -- which of course doesn't work
chouhoul_ has quit [Remote host closed the connection]
<rkeene>
Compiling Ruby gems, as far as I can tell, is just entirely broken -- it looks at the running Ruby to figure out how to invoke the compiler ?!
chouhoulis has joined #ruby
<baweaver>
So which gem against which versions?
milardovich has quit [Remote host closed the connection]
_sfiguser has quit [Ping timeout: 260 seconds]
milardovich has joined #ruby
<rkeene>
The first gem that fails is rubygem-curb 0.9.3 with native (build) Ruby 2.4.0 and remote (host) Ruby 2.4.0
<zenspider>
"compiling ruby gems ... is just entirely broken"... so true. those thousands of websites using nokogiri must be broken
milardovich has quit [Read error: Connection reset by peer]
<baweaver>
what's the error?
<rkeene>
zenspider, It may happen to work when the compiling platform == the destination platform, but that's just coincidence
<baweaver>
because it may very well be that JSON error with 1.8.x
<zenspider>
rkeene: obviously... you've given your assessment. it must all otherwise be broken
<rkeene>
zenspider, Indeed, it appears that it is -- it passes compiler flags from the Ruby that is running to try to compile a gem, this is fundamentally broken (but may work under some circumstances)
<rkeene>
My build environment has a newer version of gcc (5.3.0) than the host environment (4.9.3) and a newer version of binutils (ld) (2.26 vs. 2.25)
minimalism has joined #ruby
<rkeene>
baweaver, Definitely
<zenspider>
such certainty
<baweaver>
Does the same happen if you try against 2.3.3?
<rkeene>
baweaver, Ruby's Gem compiler is passing that flag to my linker. It's passing that to my linker because that's how it (the native/running/build Ruby) was compiled. It's an entirely different platform from what the Gem is being built for.
grh has quit [Ping timeout: 245 seconds]
<rkeene>
baweaver, It worked under 2.3.1, probably because the native Ruby didn't include that linker flag -- but it was still broken
<baweaver>
that last one read kinda contradictory.
<baweaver>
It worked but was still broken?
<baweaver>
Mind, I don't have an immediate answer because I rarely bother with C-extensions. Digging about to see if I can find anything
mlkkk has quit [Remote host closed the connection]
TomyLobo has quit [Ping timeout: 255 seconds]
futilegames has quit [Quit: futilegames]
CloCkWeRX has joined #ruby
<zenspider>
baweaver: why bother... the problem is fundamentally broken. clearly.
<zenspider>
rkeene: go file a bug with curb. The problem isn't with ruby or rubygems
<rkeene>
It also happened with 3 other Ruby gems, before the build aborted
<rkeene>
(Out of 3 it tried)
ur5us has joined #ruby
ur5us has quit [Remote host closed the connection]
ur5us has joined #ruby
marxarelli|afk is now known as marxarelli
<rkeene>
It's anything that uses rbconfig.rb, provided by Ruby
nettoweb has joined #ruby
<zenspider>
blah blah blah. go file bugs. you aren't providing info to get help here, you're just bitching and I am tired of your tone
jhack has quit [Quit: jhack]
_sfiguser has joined #ruby
Ishido has quit [Quit: Roads? Where We're Going We Don't Need Roads.]
jhack has joined #ruby
jgnagy has quit [Remote host closed the connection]
Pumukel has quit [Quit: ChatZilla 0.9.93 [Firefox 51.0.1/20170125094131]]
<bigtawm>
Im trying to implement a linked list that takes a node but I want the node to be an abstract class that get inherited by a child so I can use one linked list file that can hold and type of node. Can anyone answer a few questions? Coming from a java background.
<bigtawm>
any*
negatifze has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Sembei has quit [Ping timeout: 255 seconds]
Derperperd has quit [Max SendQ exceeded]
<zenspider>
bigtawm: just ask
Derperperd has joined #ruby
<zenspider>
but I'll recommend up front that coming from java you're going to be tempted to check types... and that's usually a code smell in ruby
<zenspider>
usually -> often
Pisuke has joined #ruby
markholmes has joined #ruby
<bigtawm>
I have a prepend and append method in my linked list class but how would I pass a parameter to it considering I could have a node that has a (key, value)
<bigtawm>
and then another one that is just (num)
<bigtawm>
For my initialize functions in the child nodes
Toordog_ has quit [Read error: Connection reset by peer]
<bigtawm>
My issue right now is in the #prepend and #append. I commented where I would put my tmp reference, but I dont know how it would work it I was using different types of nodes. Is this concept not practiced in ruby? I have to do it this way for school so it is like a java generic.
tvw has joined #ruby
<toretore>
you have to use subclassing?
tlahtoani has joined #ruby
<bigtawm>
Would it be better to just create a StringNode class and then say a StudentNode class and modify my linked list to fit those types of nodes? I feel like trying to create an abstract data type is not too friendly in ruby. My teacher wants us to have a node that is a parent to many children that would then be put into a linked list
<toretore>
what does parent mean?
montanonic has quit [Ping timeout: 255 seconds]
jenrzzz has quit [Ping timeout: 252 seconds]
<toretore>
are you supposed to be doing this in a different language?
hobodave has quit [Ping timeout: 240 seconds]
<bigtawm>
The class that gets inherited. My teacher is teaching the class in java, but said im good to go for ruby. Would something like this go against development methodolodies of ruby?
<toretore>
yes
<toretore>
your Node already takes anything you want to put in it
connor_goodwolf has quit [Ping timeout: 245 seconds]
fedruantine has joined #ruby
dkphenom has joined #ruby
Batholith has quit [Ping timeout: 240 seconds]
<bigtawm>
So would I have to append an object reference to my linked list for the data. Say I have a student class the to append a new student it would be list.append(Student.new(values), nil)?
<toretore>
why the nil?
harovali2 has quit [Remote host closed the connection]
<bigtawm>
Nevermind I was thinking that you had to pass a next parameter but then I realized the method handles that lol
<bigtawm>
so list.append(Student.new(val1,val2,..,ect)
Batholith has joined #ruby
<marchelzo>
bigtawm: what kind of class is it
<bigtawm>
I was going to have Node be an abstract class but now Im just going to make it a Node that takes a reference for data and a pointer to the next object
<marchelzo>
i meant like what is the subject of the course
<bigtawm>
Sorry for all the confusion I'm trying to transfer from Java to Ruby
<bigtawm>
Oh its a data structures class and Im using this to create stacks and queues
<marchelzo>
cool
<marchelzo>
why do you want Node to be abstract?
botri has joined #ruby
Derperperd has quit [Ping timeout: 240 seconds]
<bigtawm>
Thats how my teacher wants us to do it but I think that is a C++ and java concept because you have to worry about type
dc4 has quit [Ping timeout: 276 seconds]
<marchelzo>
if it's abstract it can't be instantiated. you'd have to subclass it.
<bigtawm>
Subclassing wouldnt be the best solution for this either huh?
<marchelzo>
in java i feel like you'd use Node<T>, but it wouldn't be abstract
<marchelzo>
right there's no need to create a hierarchy of classes for this
<marchelzo>
you just need Node. then you can use that in both Stack and Queue.
<bigtawm>
Yeah he wants us to create generics but I can just use node to contain any type of data I want
<bigtawm>
Since this is a ruby implementation
<marchelzo>
right
<toretore>
subclassing is not the best solution most of the time
<bigtawm>
Okay so Ruby you can avoid sub classing since it is free of type so you can make almost anything generic
Derperperd has joined #ruby
<marchelzo>
subclassing and generics are orthogonal concepts
<bigtawm>
I get it now haha thank you guys so much
<marchelzo>
you don't need sublcassing in either the java or ruby implementation
<bigtawm>
I go to a community college and I think my teacher just isnt that great to be honest...
<marchelzo>
very possible
<bigtawm>
Not saying that CC is bad but this guy just is
<marchelzo>
even at universities you get people who don't know what they're doing when it comes to various programming languages
<marchelzo>
they're there because they did a Ph.D in computer science, not because they know any particular language well
connor_goodwolf has joined #ruby
<bigtawm>
Yeah my teacher explains in a java and C++ way so it makes it hard for me to get how to do it in ruby so I occasionally have to ask specifics here
<botri>
I have a packet generator that generates ~200000 packets per second and send packets through udp. I wrote a server using eventmachine that open a udp socket that the packet generator is sending the packet to. Right now I'm only able to receive ~2080 packets per second using eventmachine. Am i missing something? I wanna receive much more packets but based on benchmark that run, i can only receive ~2080 packets
<marchelzo>
bigtawm: why are you using ruby and not java?
<botri>
I've asked the question on #eventmachine but have not got answer.
<botri>
Anybody can help here?
ramortegui has joined #ruby
<bigtawm>
I want to learn ruby so I can try to pick up some rails cause I want to get an internship somewhere and web seems like a good entry point
<marchelzo>
cool
<marchelzo>
ruby is 🔥
<bigtawm>
I also live in northern california and it seems that many startups are using rails and node.js right now so I figured this was the way to go to get my foot in the door and also build some side projects
<marchelzo>
awesome
<marchelzo>
i want to move to california one day
connor_goodwolf has quit [Ping timeout: 240 seconds]
connor_goodwolf has joined #ruby
<bigtawm>
Dream would be to start my own company with my best friend hes studying CS at UC Berkeley and hopefully I'll get accepted there for next year haha California is awesome once you get over how expensive it is but there is tons of work and they pay really well for dev positions here
kht has joined #ruby
<marchelzo>
yeah
<kht>
can anyone recommend a good place to start learning ruby online?
astrobunny has quit [Remote host closed the connection]
csaunders has quit [Ping timeout: 240 seconds]
dkphenom has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<bigtawm>
theodinproject.com
nikivi has quit [Ping timeout: 240 seconds]
mlehrer_ has quit [Ping timeout: 240 seconds]
JeanCarloMachado has quit [Ping timeout: 240 seconds]
JoL1hAHN has quit [Ping timeout: 240 seconds]
<marchelzo>
bigtawm: what sort of company would you want to make
astrobunny has joined #ruby
DarthGandalf has quit [Quit: Bye]
DarthGandalf has joined #ruby
yokel has quit [Ping timeout: 240 seconds]
csaunders has joined #ruby
mlehrer has joined #ruby
JeanCarloMachado has joined #ruby
karapetyan has joined #ruby
yokel has joined #ruby
<kht>
bigtawm: thanks for that link, looks like a great site
nikivi has joined #ruby
<bigtawm>
I really like finance that is something I think would be cool so maybe in that field. If not that maybe some sort of web app, which is why I want to learn ruby on rails.
JoL1hAHN has joined #ruby
Guest23954 has joined #ruby
<bigtawm>
Yeah I would do the ruby section of web 101 then skip straight to the ruby section of the whole website. I just finished beginning ruby which is the book they have you read and it is really solid.
<marchelzo>
kht: are you an absolute beginner or do you know another programming language?
connor_goodwolf has quit [Ping timeout: 255 seconds]
_sfiguser has quit [Ping timeout: 260 seconds]
astrobunny has quit [Ping timeout: 255 seconds]
botri has quit [Remote host closed the connection]