dstrunk has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tunaBee__ has joined #ruby
elcontrastador has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jenrzzz has quit [Ping timeout: 240 seconds]
Alina-malina has joined #ruby
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
milardovich has joined #ruby
milardovich has quit [Remote host closed the connection]
Alina-malina has quit [Changing host]
Alina-malina has joined #ruby
bronson has joined #ruby
milardovich has joined #ruby
bkxd has quit [Ping timeout: 240 seconds]
Alina-malina has quit [Max SendQ exceeded]
Alina-malina_ has joined #ruby
bronson has quit [Ping timeout: 240 seconds]
vuoto has joined #ruby
milardovich has quit [Ping timeout: 260 seconds]
Axy has quit [Read error: Connection reset by peer]
Axy has joined #ruby
Paraxial has quit [Quit: Ping timeout (120 seconds)]
Axy has quit [Read error: Connection reset by peer]
brent__ has joined #ruby
brent__ has quit [Ping timeout: 260 seconds]
djbkd has joined #ruby
ur5us has joined #ruby
pabs has quit [Ping timeout: 240 seconds]
aurelien has joined #ruby
marr has joined #ruby
ur5us has quit [Ping timeout: 240 seconds]
milardovich has joined #ruby
milardovich has quit [Ping timeout: 240 seconds]
jenrzzz has quit [Ping timeout: 240 seconds]
nofxxxx has joined #ruby
Alina-malina_ has quit [Changing host]
Alina-malina_ has joined #ruby
Alina-malina_ is now known as Alina-malina
TomyLobo2 has joined #ruby
nofxxx has quit [Ping timeout: 240 seconds]
_whitelogger has joined #ruby
domgetter has quit [Ping timeout: 260 seconds]
roreilly has quit [Ping timeout: 260 seconds]
P_R_Deltoid has quit [Quit: Leaving]
alex`` has joined #ruby
alex`` is now known as alexherbo2
alexherbo2 is now known as alex``
rippa has joined #ruby
cadillac_ has quit [Ping timeout: 240 seconds]
cadillac_ has joined #ruby
govg has quit [Ping timeout: 240 seconds]
milardovich has joined #ruby
djbkd has quit []
Puffball has quit [Quit: No Ping reply in 180 seconds.]
milardovich has quit [Ping timeout: 260 seconds]
pwned has quit [Ping timeout: 246 seconds]
vuoto has quit [Remote host closed the connection]
jenrzzz has joined #ruby
andrzejku has joined #ruby
djbkd has joined #ruby
Puffball has joined #ruby
InfinityFye has joined #ruby
cam27 has quit [Quit: cam27]
jenrzzz has quit [Ping timeout: 240 seconds]
bkxd has joined #ruby
mustaffa has joined #ruby
KeyJoo has joined #ruby
Pacra has quit [Ping timeout: 255 seconds]
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
djbkd has quit [Remote host closed the connection]
pavlik has joined #ruby
djbkd has joined #ruby
jenrzzz has quit [Ping timeout: 260 seconds]
milardovich has joined #ruby
djbkd has quit [Ping timeout: 276 seconds]
pavlik has quit [Quit: Leaving]
dionysus69 has quit [Remote host closed the connection]
dionysus69 has joined #ruby
milardovich has quit [Ping timeout: 240 seconds]
Qchmqs__ has joined #ruby
Qchmqs__ has quit [Client Quit]
tgragnato has joined #ruby
govg has joined #ruby
high_fiver has joined #ruby
Trynemjoel has quit [Quit: Quitting]
bronson has joined #ruby
ltem has joined #ruby
milardovich has joined #ruby
bronson has quit [Ping timeout: 255 seconds]
high_fiver has quit [Ping timeout: 260 seconds]
bkxd has quit [Ping timeout: 240 seconds]
milardovich has quit [Ping timeout: 255 seconds]
andrzejku has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
bkxd has joined #ruby
tgragnato has quit [Quit: Sto andando via]
andrzejku has joined #ruby
NeverTired has joined #ruby
marr has quit [Ping timeout: 260 seconds]
lantastic has joined #ruby
<lantastic>
does rbenv take a long time to install ruby versions?
Puffball has quit [Remote host closed the connection]
Puffball has joined #ruby
andrzejku has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
bkxd has quit [Ping timeout: 240 seconds]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
mustaffa has quit [Ping timeout: 276 seconds]
ams__ has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
charliesome has joined #ruby
charliesome has quit [Client Quit]
vuoto has joined #ruby
djbkd has joined #ruby
warrshrike has joined #ruby
<warrshrike>
hey
<warrshrike>
has anyone here used ffi?
<warrshrike>
*to call c++ code
<warrshrike>
*or any other c++/ruby interop?
milardovich has joined #ruby
slima has quit [Ping timeout: 276 seconds]
<al2o3-cr>
warrshrike: what you try to call from c++?
<Mon_Ouie>
I'm not aware of any FFI that supports calling C++ functions, typically you'd either have a C binding of the C++ API or directly write a binding for Ruby using its C API
<warrshrike>
al2o3-cr: basically im wondering if the following is possible. write a C/C++ function that takes a ruby class instance as argument
<warrshrike>
and use that function in ruby. is this making sense?
<warrshrike>
i have a ruby function which is too slow so looking to redo it in c/cpp
<warrshrike>
Mon_Ouie: oh well i could use C too
milardovich has quit [Ping timeout: 276 seconds]
<warrshrike>
the main thing is whether c/++ could take a non-primitive (i.e. a class) as argument
<al2o3-cr>
warrshrike: i'm not too sure tbh
<al2o3-cr>
it should be able to
<al2o3-cr>
i can't see why not
<Mon_Ouie>
If you use Ruby's C API, you get functions to call methods or retrieve the value of instance variables
<warrshrike>
al2o3-cr: yeah because i was wondering how would c would know what ruby classes mean
<Mon_Ouie>
If you want to use something like FFI you'd have to use Ruby's FFI to create classes that match the structs, etc. used by your C code
<warrshrike>
Mon_Ouie: so you're saying i can call an instance method from a ruby class in c api?
<Mon_Ouie>
Sure, using rb_funcall*
<warrshrike>
Mon_Ouie: so i have a node class which implements .equal. with rb_funcall my c code can take a node and call equals on it?
brent__ has joined #ruby
<Mon_Ouie>
Yes, you can
Dimik has quit [Ping timeout: 260 seconds]
<Mon_Ouie>
That does mean you'll have to pay the overhead of calling a Ruby method every time you compare two nodes, the performances would probably be worse than if you had a node structure in C
<Mon_Ouie>
Ultimately it depends on how much of your existing code you want to change for the sake of performance
cagomez has joined #ruby
lantastic has quit [Ping timeout: 260 seconds]
<warrshrike>
Mon_Ouie: so in FFI I'll need an equavalent node thingy. i guess i could do this
<warrshrike>
performance is pretty abysmal atn
<warrshrike>
atm
<warrshrike>
im looking at weeks to run analysis
brent__ has quit [Ping timeout: 276 seconds]
jcao219 has joined #ruby
<warrshrike>
Mon_Ouie: I wonder if the alternative is possible? use a ruby class in c? im only stuck to ruby because of parsing code ive written in that class
<warrshrike>
perhaps it was unwise to do perf sensitive work in ruby at all :/
<warrshrike>
but it WAS convenient to coe
<warrshrike>
code*
<Mon_Ouie>
As I said, Ruby's C API lets you call methods and access ivars. You can use this to simulate whatever you were doing in Ruby from C functions.
<al2o3-cr>
Mon_Ouie: not yet, i was really busy yesterday
<al2o3-cr>
i'll submit it today though
<Mon_Ouie>
It happened because refined methods run a different code path regardless of whether any refinement is active, and that code path did not check method visibility when calling methods from one of its parent classes
FrankD__ has joined #ruby
milardovich has quit [Ping timeout: 240 seconds]
<al2o3-cr>
Mon_Ouie: would you be able to submit please, i'd have to sign up and what not, if it's not to much trouble?
jenrzzz has joined #ruby
<Mon_Ouie>
Sure, I can ;) I just didn't want to write it at the same time as you did
<al2o3-cr>
Mon_Ouie: np, i'll leave it in your good hands then :)
lantastic has joined #ruby
cagomez has joined #ruby
FrankD has quit [Ping timeout: 260 seconds]
jenrzzz has quit [Ping timeout: 240 seconds]
<al2o3-cr>
hey, credit for the refinement modification btw
<mika_>
hi, I'm trying to always show 2 decimals in a BigDecimal when it's printed on the screen: BigDecimal.new('16.5').to_s('F') => 16.5 but I'd like it to show 16.50, without casting it to float and possibly loosing precision (eg with '%.2f' % decimal). Any idea if it's possible? I'm reading the whole doc and stackoverflow but I can't find a way :/
Norm has quit [Ping timeout: 246 seconds]
vuoto has quit [Quit: Lost terminal]
<Papierkorb>
mika_: in the worst case, you can always modify the display string
vuoto has joined #ruby
<Papierkorb>
mika_: e.g. `a = deci.to_s('F'); a += '0' if a =~ /\.\d$/`
<mika_>
Papierkorb: that's very hackish, I hoped that there was something available directly from BigDecimal ;)
vuoto has quit [Client Quit]
vuoto has joined #ruby
vuoto has quit [Client Quit]
jameser has joined #ruby
dionysus69 has quit [Ping timeout: 255 seconds]
dionysus69 has joined #ruby
jameser has quit [Client Quit]
jameser has joined #ruby
rgr has joined #ruby
kkiero has quit [Ping timeout: 260 seconds]
arup_r has quit []
phinxy has joined #ruby
ElFerna has joined #ruby
<sonOfRa>
mika_: how about "%n.f" % foo.truncate(n)
<sonOfRa>
Where n is the number of digits that you want
milardovich has quit [Remote host closed the connection]
<sonOfRa>
Oh, I guess that performs a cast
milardovich has joined #ruby
JBlazeCoder21 has joined #ruby
normie1 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
milardovich has quit [Ping timeout: 240 seconds]
JBlazeCoder21 has quit [Ping timeout: 260 seconds]
hanmac has quit [Ping timeout: 276 seconds]
ledestin has quit [Ping timeout: 240 seconds]
normie1 has joined #ruby
tildes has joined #ruby
tildes has quit [Ping timeout: 255 seconds]
roshanavand1 has joined #ruby
roshanavand has quit [Read error: Connection reset by peer]
roshanavand1 is now known as roshanavand
hanmac has joined #ruby
dionysus69 has quit [Ping timeout: 260 seconds]
mika_ has quit [Quit: Page closed]
milardovich has joined #ruby
normie1 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rfoust has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Pacra has joined #ruby
yabbes has joined #ruby
djbkd has quit [Remote host closed the connection]
djbkd has joined #ruby
kahra has quit [Ping timeout: 248 seconds]
milardovich has joined #ruby
djbkd has quit [Ping timeout: 260 seconds]
kahra has joined #ruby
milardovich has quit [Ping timeout: 260 seconds]
bkxd has quit [Ping timeout: 240 seconds]
lantastic has joined #ruby
eljimmy has quit [Quit: This computer has gone to sleep]
bkxd has joined #ruby
anuxivm has quit [Quit: Leaving.]
noe has joined #ruby
DLSteve has quit [Quit: All rise, the honorable DLSteve has left the channel.]
kiltzman has quit [Ping timeout: 260 seconds]
milardovich has joined #ruby
kiltzman has joined #ruby
psychicist__ has joined #ruby
kahra has quit [Ping timeout: 248 seconds]
milardovich has quit [Ping timeout: 260 seconds]
kahra has joined #ruby
bvcosta has quit [Remote host closed the connection]
bvcosta has joined #ruby
bvcosta has quit [Remote host closed the connection]
yabbes has quit [Ping timeout: 260 seconds]
MichaelBurge has joined #ruby
b3ck has quit [Ping timeout: 260 seconds]
DLSteve has joined #ruby
kiltzman has quit [Quit: .]
weathermaker has joined #ruby
markit has joined #ruby
runescape07rsps has joined #ruby
<markit>
hi, not related to ruby but I know some of you are very good with regular expressions. I need to find this EXACT url, but probably escapes and other stuff makes me find nothing. What is the right syntax? The phrase I need to find is (without quotes) 'Go to http://local-one-other.com/ NOW!'
<markit>
mmm should be Go to http:\/\/local-one-other.com\/ NOW! but seems not working, maybe there is another reason for it
<gizmore|2>
i take a look.... look at wechall.net meanwhile :P
<gizmore|2>
regex should be /^http:\/\/local-one-other.com$/
<gizmore|2>
no? @ markit
<markit>
gizmore|2: apologise, I just noticed that the text is 'Go to (double spaces!) http...'
<gizmore|2>
haha :)
<gizmore|2>
nice one
<markit>
sigh, sorry for the noise :(
high_fiver has joined #ruby
<gizmore|2>
i was about to troll because there was so low activity
b3ck has joined #ruby
<gizmore|2>
like... "Why is ruby so slow compared to php?"
psychicist__ has quit [Ping timeout: 246 seconds]
alex`` has quit [Ping timeout: 240 seconds]
alex`` has joined #ruby
vuoto has quit [Quit: Lost terminal]
<markit>
lol
markit has quit []
alex`` has quit [Quit: WeeChat 1.9]
houhoulis has quit [Remote host closed the connection]
<gizmore|2>
i decided against ruby for my latest project, because php toolchain is superior (F5 toolchain)
<gizmore|2>
you only need to know F5 to operate on the toolchain :)
bronson has joined #ruby
<gizmore|2>
and i got it down to 10ms here... rails feels so slow compared to that
<gizmore|2>
active record sucks?
bkxd has quit [Ping timeout: 260 seconds]
<cdolan>
perl > ruby (waits for outrage)
<gizmore|2>
i never tried perl seriously
<gizmore|2>
is it even considered a language, still?
bronson has quit [Ping timeout: 240 seconds]
kapil___ has quit [Quit: Connection closed for inactivity]
milardovich has joined #ruby
yabbes has joined #ruby
milardovich has quit [Ping timeout: 246 seconds]
code_zombie has joined #ruby
bkxd has joined #ruby
roshanavand has joined #ruby
milardovich has joined #ruby
<havenwood>
gizmore|2: please don't troll
<gizmore|2>
it was only partially trolling
<gizmore|2>
i really decided against ruby because of bloat toolchain and bad performance
<gizmore|2>
mostly because activerecord and rails is bloat and slow?
<gizmore|2>
ruby itself is slow too, no?
<havenwood>
gizmore|2: that's absurd
<havenwood>
gizmore|2: Rails is not Ruby... Stop trolling.
<havenwood>
No.
<gizmore|2>
i think ruby is quite slow
<havenwood>
Well, you're wrong.
<havenwood>
gizmore|2: Not compared to what you're considering. You're just doing it wrong.
<gizmore|2>
active_record is?
<havenwood>
gizmore|2: Again, how do you equate that with Ruby? One library...
<gizmore|2>
from my experience playing with it
<gizmore|2>
it felt slower than php, overall
<havenwood>
gizmore|2: Again, you're talking about Rails.
weathermaker has quit [Ping timeout: 260 seconds]
<havenwood>
gizmore|2: Did you compare ngx_mruby? It's faster than your php solution. You're just not comparing an equivalent thing.
<gizmore|2>
mainly i was using activerecord heavily... and it is slow
<gizmore|2>
another big point why i decided against ruby:
milardovich has quit [Ping timeout: 240 seconds]
<gizmore|2>
ruby is not typesafe
<gizmore|2>
php is
<gizmore|2>
php even goes one step further
<gizmore|2>
telling your function if it is notNull
<gizmore|2>
function myPHPFunc(Type $arg=null)
<gizmore|2>
great!
<gizmore|2>
i really hate to say this... but PHP > JS+ruby, when it comes to typesafety
<havenwood>
gizmore|2: So you find ActiveRecord slow (you're probably again doing it wrong) and in your mind that SQL generator makes the Ruby language slow.
<havenwood>
gizmore|2: That's just silly.
<havenwood>
gizmore|2: PHP does not have proper static typing. That's a very strange bragging point.
<havenwood>
gizmore|2: You should learn a statically typed language. You might like that. But stop with the FUD.
<havenwood>
gizmore|2: (PHP is not one.)
<gizmore|2>
php did really make progress in terms of performance and type system
<havenwood>
gizmore|2: Also a general purpose language might serve you further than a web language.
<havenwood>
gizmore|2: So use ngx_mruby or something equivalent.
<havenwood>
gizmore|2: It'll be faster and you'll have a nicer language.
<gizmore|2>
why should i, if there is no type hinting?
<havenwood>
gizmore|2: This isn't a good place for PHP recruiting.
<gizmore|2>
i better choose C++ next
<havenwood>
gizmore|2: I can't tell if you're trolling or not. ¯\_(ツ)_/¯
<gizmore|2>
me neither
<havenwood>
But sure, learn C++.
<gizmore|2>
i think php is better than ruby meanwhile, because php type hint system is quite fine nowadays
bruno- has joined #ruby
<gizmore|2>
ruby language / syntax is sooo much better... but no type hinting
<gizmore|2>
there is contract
<havenwood>
gizmore|2: We disagree aesthetically.
<gizmore|2>
but it adds so much noise
<havenwood>
gizmore|2: The things Ruby isn't fast enough for PHP also isn't fast enough for (and can't do period because it's not a general purpose programming language).
<gizmore|2>
well.. how fast has a site to be?
<havenwood>
gizmore|2: If you're happy with your we language that's great. Just don't spread FUD here.
<gizmore|2>
have you used the ruby contract library yet?
<gizmore|2>
to add typesafety to your functions?
<gizmore|2>
i bet no
<havenwood>
gizmore|2: Please stop it.
<gizmore|2>
because the added code is too much, compared to the gain (who needs type safety in a duck typed lang)
<gizmore|2>
but i would love type hinting in ruby :(
<havenwood>
gizmore|2: A lot faster than PHP and actually statically typed.
<gizmore|2>
aww... own lang
<gizmore|2>
btw
<gizmore|2>
i hate Typescript too
antoniooohhh has left #ruby [#ruby]
<havenwood>
?offtopic gizmore|2
<ruby[bot]>
gizmore|2: this seems to be off-topic. Please move your discussion to #ruby-offtopic, to keep this channel free for Ruby related problems. Thanks!
<gizmore|2>
crystal looks interesting
c__ has quit [Remote host closed the connection]
<gizmore|2>
probably like typescript... why is there no <script type="typescript"> in browsers?
<havenwood>
Ruby may get some incremental type analysis in Ruby 3. We'll see as we approach 2020.
<gizmore|2>
yeah... would be awe
<gizmore|2>
imagine a type annotated ruby, just for the sake of IDE auto completion
<havenwood>
gizmore|2: You'd probably like Crystal-lang.
<gizmore|2>
the biggest problem for loose type languages, is the IDE :P
<gizmore|2>
and the lack of superhuman memory of the devs
<havenwood>
Matz likes DRYer than explicit static types. It's a choice.
<gizmore|2>
i really am impressed of php7... the type system is ... good
boombox_ has joined #ruby
<havenwood>
Something like Erlang/Elixir's dialyser might be an acceptable middle ground. Tooling instead of inclusion in the language.
<gizmore|2>
in my current project, i have 0 dependencies
InfinityFye has joined #ruby
andrzejku has quit [Ping timeout: 260 seconds]
milardovich has joined #ruby
<gizmore|2>
thats why i am thinking of a C/++ port
<gizmore|2>
because i have 0 dependencies anyway (except facebook login + websocket server)
<gizmore|2>
i bet it will still take ages to port
<gizmore|2>
one day i read a reddit fun about programming in AST
<gizmore|2>
where you directly code in AST, so it is compatible to all languages
<gizmore|2>
also a fun idea
<gizmore|2>
:)
<gizmore|2>
it was a joke... of course
tildes has quit [Ping timeout: 240 seconds]
gizmore|2 is now known as gizmore
cadillac_ has quit [Ping timeout: 240 seconds]
milardovich has quit [Ping timeout: 255 seconds]
cadillac_ has joined #ruby
bkxd has quit [Ping timeout: 276 seconds]
bruno- has quit [Ping timeout: 255 seconds]
bkxd has joined #ruby
cdolan has quit [Ping timeout: 240 seconds]
Dimik has joined #ruby
high_fiver has quit [Remote host closed the connection]
high_fiver has joined #ruby
InfinityFye has quit [Ping timeout: 276 seconds]
boombox_ has quit [Remote host closed the connection]
P_R_Deltoid has joined #ruby
lantastic has quit [Ping timeout: 260 seconds]
high_fiver has quit [Ping timeout: 255 seconds]
boombox_ has joined #ruby
tildes has joined #ruby
jcao219 has joined #ruby
boombox_ has quit [Ping timeout: 240 seconds]
andrzejku has joined #ruby
eroux has joined #ruby
xuanrui has quit [Ping timeout: 268 seconds]
vee_ has joined #ruby
ElFerna has joined #ruby
milardovich has joined #ruby
tildes has quit [Ping timeout: 240 seconds]
opekktar has joined #ruby
ElFerna has quit [Ping timeout: 276 seconds]
ryzokuken has joined #ruby
milardovich has quit [Ping timeout: 276 seconds]
cdolan has joined #ruby
cdolan has quit [Client Quit]
xuanrui has joined #ruby
ElFerna has joined #ruby
bkxd has quit [Ping timeout: 276 seconds]
nofxxxx has quit [Remote host closed the connection]
nofxx has joined #ruby
milardovich has joined #ruby
bkxd has joined #ruby
milardovich has quit [Client Quit]
elcontrastador has joined #ruby
_sfiguser has quit [Ping timeout: 260 seconds]
milardovich has joined #ruby
bvcosta has joined #ruby
dionysus69 has joined #ruby
bvcosta has quit []
unreal has quit [Remote host closed the connection]
_sfiguser has joined #ruby
bronson has joined #ruby
eljimmy has joined #ruby
kies has joined #ruby
andrzejku has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
bronson has quit [Ping timeout: 240 seconds]
cagmz has joined #ruby
postmodern has joined #ruby
ElFerna has quit [Ping timeout: 260 seconds]
alex`` has joined #ruby
t-recx has joined #ruby
eljimmy has quit [Quit: This computer has gone to sleep]
ElFerna has joined #ruby
bkxd has quit [Ping timeout: 240 seconds]
kamilkucharski has joined #ruby
bkxd has joined #ruby
tildes has joined #ruby
bruno- has joined #ruby
tildes has quit [Ping timeout: 240 seconds]
phinxy has quit [Read error: Connection reset by peer]
ryzokuken has quit [Quit: Leaving]
moeabdol has quit [Quit: WeeChat 1.9]
kamilkucharski has quit [Quit: Lost terminal]
andrzejku has joined #ruby
ElFerna has quit [Ping timeout: 260 seconds]
al2o3-cr has quit [Ping timeout: 255 seconds]
tgragnato has joined #ruby
goyox86_ has joined #ruby
opekktar has quit [Remote host closed the connection]
<goyox86_>
Hi people I'm trying to port Ruby to https://redox-os.org and we don't have pthreads yet. I'm trying to disable them in the configure script but it seems to be ignoring it. Is there a way to tell that to the configure script?
bruno-_ has joined #ruby
govg has quit [Ping timeout: 240 seconds]
<_sfiguser>
guys is serialization faster than using a DB generally ?
bruno- has quit [Ping timeout: 240 seconds]
FastJack has quit [Ping timeout: 258 seconds]
bruno-_ has quit [Read error: Connection reset by peer]
roshanavand has quit [Remote host closed the connection]