<kephra>
I give up, and just include the c files into the ruby wraper, adding a comment: /* Including the source here is an ugly work around Ruby's mkmf stupidity */
<jhass>
in #ruby you said something that sounded like missing a header file, to me it looks have_library is the alternative that allows to pass header files
chouhoulis has joined #ruby-lang
chouhoulis has quit [Remote host closed the connection]
<kephra>
its only two files
chouhoulis has joined #ruby-lang
yubrew has joined #ruby-lang
chouhoulis has quit [Remote host closed the connection]
<kephra>
is it possible to define a function in Ruby C API, or do I need a module/class/method hierachy?
toastynerd has joined #ruby-lang
jgpawletko has joined #ruby-lang
<jhass>
ruby has no functions, only objects with methods
<kephra>
*ok*
jgpawletko is now known as jgpawletko_away
<jhass>
what looks like functions at the top level, like puts, are methods on the Kernel module
mjboselowitz has joined #ruby-lang
TheMoonMaster_ is now known as TheMoonMaster
yubrew has quit [Ping timeout: 250 seconds]
mjboselo_ has joined #ruby-lang
toastynerd has quit [Ping timeout: 245 seconds]
mjboselowitz has quit [Ping timeout: 240 seconds]
weems|mac has joined #ruby-lang
mjboselo_ has quit [Ping timeout: 260 seconds]
wm3|away has joined #ruby-lang
karamazo_ has joined #ruby-lang
karamazov has quit [Ping timeout: 260 seconds]
DivineEntity has quit [Quit: Lost terminal]
lcdhoffman has joined #ruby-lang
bin7me has quit [Quit: Leaving.]
skade has quit [Quit: Computer has gone to sleep.]
skade has joined #ruby-lang
charliesome has joined #ruby-lang
mjboselowitz has joined #ruby-lang
malconis has joined #ruby-lang
wm3|away has quit [Ping timeout: 245 seconds]
[spoiler] has quit [Quit: Leaving]
momomomomo has joined #ruby-lang
weems|mac has quit [Quit: weems|mac]
snsei has joined #ruby-lang
futilegames has joined #ruby-lang
[spoiler] has joined #ruby-lang
alexju has quit [Remote host closed the connection]
alexju has joined #ruby-lang
snsei has quit [Remote host closed the connection]
<kephra>
is there a shorter way then writing WylieRuby::WylieRuby.new.fromWylie to call a simple function?
<centrx>
kephra, Does the method need to be an instance method? Does the class need to be inside of a module with the same name?
snsei has quit [Ping timeout: 240 seconds]
yubrew has joined #ruby-lang
Miphix has quit [Ping timeout: 240 seconds]
<kephra>
centrx, its a simple C function - there is no need for class or module - and from Smalltalk point of view it would be a method extending String class
<kephra>
the module and class wrapper around this function is only needed because I'm following a tutorial ( I'm not a Ruby coder, but just want to enable Ruby/Rails users to write tibetan )
<Mon_Ouie>
to define functon-style method place them in a module (for namespacing reasons) and define them with rb_define_module_function
<Mon_Ouie>
You can include Foo in the global namespace or in a class to not have to type the module name every time
mjboselowitz has quit [Remote host closed the connection]
snsei has joined #ruby-lang
<centrx>
kephra, A straight-up function without class or module, in say a script file, can be defined at the top level with just "def my_meth"
<kephra>
Mon_Ouie, so I should drop the class, and use rb_define_module_function instead of rb_define_method
<centrx>
kephra, but usually classes and modules are preferred, even in a script file
<kephra>
centrx, its a C function
<centrx>
oh you mean it's an actual C function
yubrew has quit [Ping timeout: 244 seconds]
<Mon_Ouie>
kephra: Replace the class with a module
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<Mon_Ouie>
Also in Ruby, you'd expect the file to require to be called wylie_ruby or wilyieruby (all lower case), and methods to be named using snake_case
<kephra>
*thanks* dropped the class - this simplifies to WylieRuby::fromWylie
<kephra>
I wont rename the files, because Ruby will be only one of many scripting languages that wraps around this
toastynerd has joined #ruby-lang
rcvalle has joined #ruby-lang
jgpawletko_away is now known as jgpawletko
charliesome has joined #ruby-lang
ta has quit [Remote host closed the connection]
wm3|away has joined #ruby-lang
charliesome has quit [Client Quit]
toastynerd has quit [Ping timeout: 240 seconds]
lcdhoffman has quit [Quit: lcdhoffman]
yatish27 has joined #ruby-lang
skade has quit [Quit: Computer has gone to sleep.]
nathanstitt has quit [Read error: Connection reset by peer]
nathanstitt has joined #ruby-lang
<yorickpeterse>
Hm, their other stuff is a bit too much though
<yorickpeterse>
needs more oons oons
stamina has joined #ruby-lang
nathanstitt has quit [Ping timeout: 245 seconds]
nathanstitt has joined #ruby-lang
weems|mac has joined #ruby-lang
nathanstitt has quit [Read error: Connection reset by peer]
enebo has joined #ruby-lang
nathanstitt has joined #ruby-lang
elia has quit [Quit: Computer has gone to sleep.]
chouhoulis has joined #ruby-lang
lcdhoffman has joined #ruby-lang
nofxx has joined #ruby-lang
nofxx has quit [Changing host]
nofxx has joined #ruby-lang
toastynerd has joined #ruby-lang
<jhass>
kephra: you should at least rename the method snake case and provide a compatibility wylie_ruby.rb that requires your 'right' file, see http://guides.rubygems.org/name-your-gem/
vladgh has quit [Remote host closed the connection]
vladgh has joined #ruby-lang
vladgh has quit [Remote host closed the connection]
elia has joined #ruby-lang
vladgh has joined #ruby-lang
gjaldon has joined #ruby-lang
toastynerd has quit [Ping timeout: 246 seconds]
dabradley has quit [Quit: WeeChat 0.3.8]
dabradley has joined #ruby-lang
charliesome has joined #ruby-lang
cmhobbs has joined #ruby-lang
elia has quit [Quit: Computer has gone to sleep.]
cmhobbs has quit [Client Quit]
vladgh has quit [Quit: leaving]
cmhobbs has joined #ruby-lang
workmad3 has quit [Ping timeout: 260 seconds]
Fushi has joined #ruby-lang
mjboselowitz has quit [Remote host closed the connection]
vladgh has joined #ruby-lang
tbuehlmann has quit [Quit: Leaving]
mjboselowitz has joined #ruby-lang
mistym has joined #ruby-lang
AKASkip has quit [Ping timeout: 245 seconds]
mistym has quit [Remote host closed the connection]
pixelhandler has joined #ruby-lang
lcdhoffman has quit [Quit: lcdhoffman]
gjaldon has quit [Remote host closed the connection]
gjaldon has joined #ruby-lang
Benny1992 has quit [Quit: leaving]
mjboselo_ has joined #ruby-lang
mjboselowitz has quit [Ping timeout: 260 seconds]
banister has joined #ruby-lang
shinnya has joined #ruby-lang
gjaldon has quit [Ping timeout: 250 seconds]
solars has quit [Ping timeout: 250 seconds]
gianlucadv has quit [Ping timeout: 250 seconds]
lcdhoffman has joined #ruby-lang
mistym has joined #ruby-lang
karamazo_ has quit []
thomasxie has quit [Ping timeout: 250 seconds]
lcdhoffman has quit [Quit: lcdhoffman]
kyledreger has joined #ruby-lang
<apeiros>
whitequark: do I remember correctly that you hated on thin? :)
<DefV>
hater
<apeiros>
well, s/hated/expressed dislike/
gjaldon has joined #ruby-lang
<apeiros>
I'm interested in the reason and better alternatives for "embedded" servers
emmesswhy has joined #ruby-lang
|jemc| has joined #ruby-lang
<yorickpeterse>
apeiros: Puma can be embedded, sort of
<apeiros>
I don't want to tell the user to run a custom executable
zastern has quit [Quit: WeeChat 0.4.3]
<yorickpeterse>
oh?
<apeiros>
I want to be able to just do `rackup` in the app directory
<yorickpeterse>
euh, ship a config.ru with the app and install Rack?
<yorickpeterse>
I think I'm missing something
majjoha has quit [Ping timeout: 264 seconds]
<apeiros>
currently I do that via rackup.ru == `require 'thin'; require 'my_app'; run MyApp`
<apeiros>
that said, maybe doing require 'thin' in there is actually misguided :-/
<yorickpeterse>
I'm still not following, what's wrong with `rackup -s thin` in that case?
<yorickpeterse>
Your config.ru shouldn't specify the specific server you want to use, unless you're actually depending on it (e.g. extending it, using some dedicated API, etc)
<apeiros>
yeah, hence "maybe misguided"
ponch_ has joined #ruby-lang
workmad3 has joined #ruby-lang
zastern has joined #ruby-lang
<whitequark>
apeiros: I didn't really hate on thin specifically
<whitequark>
it's just that it uses EM, and EM is crashy and generally a shitty model
rippa has joined #ruby-lang
koderok has joined #ruby-lang
stevednd has joined #ruby-lang
<apeiros>
whitequark: ok. which embeddable webserver do you prefer over thin then?
<apeiros>
I see unicorn and puma as alternatives so far. got to check how well they work, though
<whitequark>
apeiros: never was specifically interested in embeddable webservers
<whitequark>
unicorn is ok but it's built around forking
<apeiros>
why's that bad?
<whitequark>
well
<apeiros>
or just referring to it not being portable to windows?
<whitequark>
why do you want it embeddable?
<apeiros>
embeddable in the sense of: add it to the gemfile and it works with rackup.ru
<apeiros>
may even be the wrong term :)
<apeiros>
just not as in: like nginx/apache which are external dependencies
<toretore>
you should be able to do that with any rack compatible server
<toretore>
bundle exec unicorn start
<toretore>
or something like that
<jhass>
even passenger can be run as standalone appserver
InfraRuby has left #ruby-lang [#ruby-lang]
lcdhoffman has joined #ruby-lang
michaeldeol has joined #ruby-lang
majjoha has joined #ruby-lang
omosoj has joined #ruby-lang
gianlucadv has joined #ruby-lang
Missphoenix has quit [Quit: Leaving]
<whitequark>
apeiros: ah
<whitequark>
then unicorn, yes, we've been using it a lot and it is very stable
<whitequark>
you could try Puma but I never really touched it
<DefV>
puma is quite nice
<jhass>
^ +1 for puma
momomomomo has quit [Quit: momomomomo]
<bougyman>
we didn't have any luck with puma at all, on mri
<apeiros>
what went wrong, bougyman?
<bougyman>
unicorn performance blew it away, that is.
<bougyman>
even thin did better.
gianlucadv has quit [Ping timeout: 260 seconds]
<whitequark>
yep, that's what I would expect
<whitequark>
puma is for jruby & co
momomomomo has joined #ruby-lang
realDAB has quit [Quit: realDAB]
arBmind1 has quit [Quit: Leaving.]
toastynerd has joined #ruby-lang
enkristoffer has joined #ruby-lang
workmad3 has quit [Ping timeout: 250 seconds]
gjaldon has quit []
yfeldblum has joined #ruby-lang
momomomomo has quit [Quit: momomomomo]
mjboselo_ has quit [Remote host closed the connection]
mjboselowitz has joined #ruby-lang
Atttwww has joined #ruby-lang
yfeldblum has quit [Ping timeout: 240 seconds]
banister has quit [Ping timeout: 264 seconds]
banister has joined #ruby-lang
mistym has quit [Remote host closed the connection]
mjboselowitz has quit [Ping timeout: 246 seconds]
RobertBirnie has joined #ruby-lang
momomomomo has joined #ruby-lang
mjboselowitz has joined #ruby-lang
gianlucadv has joined #ruby-lang
yatish27_ has joined #ruby-lang
tbuehlmann has joined #ruby-lang
yatish27 has quit [Ping timeout: 250 seconds]
lun_ has joined #ruby-lang
Squarepy has joined #ruby-lang
lun_ has quit [Client Quit]
lun_ has joined #ruby-lang
gianlucadv has quit [Ping timeout: 250 seconds]
thomasxie has joined #ruby-lang
thomasxie has quit [Remote host closed the connection]
thomasxie has joined #ruby-lang
JohnFord has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
thomasxie has quit [Client Quit]
wallerdev has joined #ruby-lang
yatish27_ has quit [Remote host closed the connection]
yatish27 has joined #ruby-lang
stamina has quit [Ping timeout: 246 seconds]
mikecmpbll has quit [Ping timeout: 244 seconds]
sharpmachine has joined #ruby-lang
mistym has joined #ruby-lang
benlovell has quit [Ping timeout: 250 seconds]
jacky has left #ruby-lang [#ruby-lang]
wallerdev has quit [Quit: wallerdev]
saarinen has joined #ruby-lang
sharpmachine has quit [Remote host closed the connection]
omosoj has quit [Ping timeout: 240 seconds]
solars has joined #ruby-lang
thomasxie has joined #ruby-lang
realDAB has joined #ruby-lang
lcdhoffman has quit [Quit: lcdhoffman]
amerine has joined #ruby-lang
lcdhoffman has joined #ruby-lang
djbkd has joined #ruby-lang
gianlucadv has joined #ruby-lang
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
saarinen has quit [Quit: saarinen]
nofxx has quit [Ping timeout: 255 seconds]
enkristoffer has quit [Quit: ❤]
djbkd has quit [Remote host closed the connection]
leandrosnunes has quit [Quit: WeeChat 0.4.3]
djbkd has joined #ruby-lang
wallerdev has joined #ruby-lang
yfeldblum has joined #ruby-lang
thomasxie has quit [Quit: Leaving.]
saarinen has joined #ruby-lang
saarinen has quit [Client Quit]
yfeldblum has quit [Ping timeout: 240 seconds]
ti-wali has joined #ruby-lang
momomomomo has quit [Quit: momomomomo]
saarinen has joined #ruby-lang
karamazov has joined #ruby-lang
AKASkip has joined #ruby-lang
kaiserpathos has joined #ruby-lang
molgrew has joined #ruby-lang
molgrew has quit [Client Quit]
jbardin has joined #ruby-lang
lcdhoffman has quit [Quit: lcdhoffman]
amclain has joined #ruby-lang
wallerdev_ has joined #ruby-lang
wallerdev has quit [Ping timeout: 255 seconds]
wallerdev_ is now known as wallerdev
lcdhoffman has joined #ruby-lang
hahuang65 has joined #ruby-lang
JohnFord has joined #ruby-lang
kek has joined #ruby-lang
lcdhoffman has quit [Client Quit]
amerine has quit [Quit: Computer has gone to sleep.]
lcdhoffman has joined #ruby-lang
__butch__ has joined #ruby-lang
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hahuang65 has quit [Quit: WeeChat 0.4.3]
hahuang65 has joined #ruby-lang
ta has joined #ruby-lang
lcdhoffman has quit [Quit: lcdhoffman]
ti-wali has quit [Remote host closed the connection]
lcdhoffman has joined #ruby-lang
momomomomo has joined #ruby-lang
ponch_ has quit [Ping timeout: 250 seconds]
mistym has quit [Remote host closed the connection]
pr0ton_ has joined #ruby-lang
mistym has joined #ruby-lang
loincloth has quit [Remote host closed the connection]
lcdhoffman has quit [Quit: lcdhoffman]
havenwood has joined #ruby-lang
duderonomy has joined #ruby-lang
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
MichD is now known as michd
karamazov has quit [Remote host closed the connection]
lcdhoffman has joined #ruby-lang
mjboselowitz has quit [Remote host closed the connection]
postmodern has joined #ruby-lang
kaiserpathos has quit []
omosoj has joined #ruby-lang
malconis has quit [Remote host closed the connection]
malconis has joined #ruby-lang
malconis has quit [Client Quit]
majjoha has quit [Ping timeout: 240 seconds]
mikecmpbll has joined #ruby-lang
malconis has joined #ruby-lang
majjoha has joined #ruby-lang
marr has quit [Ping timeout: 245 seconds]
<sarkyniin>
hey, anyone can provide some help?
pr0ton_ has quit [Quit: pr0ton_]
<centrx>
sarkyniin, Ask and you shall receive
<sarkyniin>
I'm trying to make an IRC bot that takes some moves' data from a google spreadsheet worksheet and displays it in a formatted way
<sarkyniin>
the move's name is one the first column
<sarkyniin>
so I'm trying to find a way to search through the first column for a string and return that move's row
<sarkyniin>
AND the row after it
<sarkyniin>
since move descriptions are on the second line
<darix>
location based can be done in the backend too
<whitequark>
the backend is rails
sMecKs has joined #ruby-lang
<whitequark>
serving static stuff via rails is bad even if you do x-sendfile
Lingo has joined #ruby-lang
<whitequark>
it should just... never actually hit the unicorns
<whitequark>
ever
ari-_-e has quit [Ping timeout: 240 seconds]
futilegames has quit [Quit: futilegames]
<darix>
sure
<darix>
but i prefer asset hosts for that.
<whitequark>
darix: so you would have haproxy+varnish+whatever to serve static assets
<whitequark>
instead of single nginx with single config
<darix>
if i need caching just varnish
<darix>
haproxy -> lighttpd + unicorns
<whitequark>
ugh, lighttpd
splud has joined #ruby-lang
<whitequark>
anyway, still see no reason to use three tools rather than one
<bougyman>
using x-sendfile with lighty I rarely have need for a caching web proxy
<bougyman>
the kernel does a pretty good job caching.
<darix>
that too.
<splud>
using Ruby on an ARM platform. 2.1.2p95.
<whitequark>
bougyman: talking about caching HTML results on nginx level
<darix>
splud: how dare you to ask on topic questions?:p
<bougyman>
whitequark: I do that with lighty, too.
x0f has quit [Ping timeout: 245 seconds]
<darix>
*jk*
<bougyman>
well, with lighty 2, too.
ari-_-e has joined #ruby-lang
<whitequark>
2?
<bougyman>
yeah.
<darix>
2
<bougyman>
i've been on lighty2 for quite some time.
<whitequark>
is it recent?
<darix>
ditto
<bougyman>
it's still not released for some reason
<bougyman>
it's been in dev for years.
<bougyman>
no releases yet.
<whitequark>
oh
<darix>
bougyman: not feature complete
<whitequark>
no thanks, I'm not using unreleased software in production
<darix>
but all i need is there
<bougyman>
right.
<bougyman>
tell me you didn't use nginx before 1.0...
<darix>
whitequark: plenty big sites do already
<splud>
Having problems with forking. Prior version of ruby used on the device (1.8.7) works. Main script runs, fires off a child process to watchdog. At certain points, forks a copy of itself to kick the watchdog, and when the watchdogged sections complete, the fork is terminated. The child (of the main process) remains running (as it should).
<bougyman>
most of the nginx people I know were already on the bandwagon around 0.6x
<whitequark>
bougyman: that still counts as released?
yatish27_ has quit [Remote host closed the connection]
<splud>
in 2.1.1p95 now, the forked process kills the watchdog process when the fork terminates.
<whitequark>
splud: strace it
<splud>
Rather zealous activity on the part of the garbage cleanup.
InfraRuby has joined #ruby-lang
yatish27 has joined #ruby-lang
<bougyman>
whitequark: ah. I know many projects who won't tag releases before 1.0 (feature commplete).
<bougyman>
lighty2 is one of em.
<whitequark>
well. afaik, nginx was in debian repos for some time, has been receiving security updates
<whitequark>
which is my measure of "can be used on production"
x0f has joined #ruby-lang
<darix>
whitequark: we have packages too ;)
<whitequark>
at least, minimal one
<whitequark>
darix: ok
<bougyman>
splud: that sounds like a recipe for disaster.
yatish27 has quit [Ping timeout: 245 seconds]
<splud>
talking with someone at my desk. couple minutes.
ohsix has quit [Ping timeout: 272 seconds]
loincloth has quit [Remote host closed the connection]
danijoo has quit [Read error: Connection reset by peer]
danijoo has joined #ruby-lang
<splud>
okay, back.
InfraRuby has left #ruby-lang [#ruby-lang]
<splud>
so, saw the comment on strace. Will -try- that in a limited scope - the problem is this is an upgrade script for an embedded platform. Lots of restrictions come with that.
<splud>
recipe for disaster: could you be more specific?
__butch__ has quit [Quit: Leaving.]
<splud>
main upgrade script starts up and creates the child process which kicks the hardware watchdog periodically, until a timer runs out. Main script will send a signal to reset the counter in between some stages (thus refreshing how long things can run before the hardware decides something is wrong).
<splud>
Nothing particularly unusual about that, other than the fact we’re using ruby to accomplish it.
sharpmachine has quit [Remote host closed the connection]
<splud>
So, after instrumenting the script with a lot of debug messages, and outputs of ‘ps ax’ etc, I came to find out that the watchdog intermediary was going defunct after the fork was terminating, despite having been started by the parent.
skade has quit [Quit: Computer has gone to sleep.]
skade has joined #ruby-lang
sharpmachine has joined #ruby-lang
skade has quit [Client Quit]
<splud>
Added a Process.detach() to the start of the fork code to have it detach from the watchdog, and that seemed to work.
lcdhoffman has joined #ruby-lang
djbkd has quit [Remote host closed the connection]
amerine has quit [Quit: Computer has gone to sleep.]
centrx has quit [Quit: Mead error: Connection reset by beer]
djbkd has joined #ruby-lang
ponch_ has joined #ruby-lang
djbkd has quit [Remote host closed the connection]
mikecmpbll has quit [Quit: i've nodded off.]
lcdhoffman has quit [Quit: lcdhoffman]
sunaku has joined #ruby-lang
alexju has quit [Remote host closed the connection]
ponch_ has quit [Ping timeout: 272 seconds]
alexju has joined #ruby-lang
<splud>
Except that if I add a debug message and a sleep at a more or less arbitrary place in the upgrade script (and by arbitrary, I mean syntactically legal, a location merely intended to cause one phase to take longer than the watchdog will allow), the watchdog child ends up being defunct again, but does so before ever reaching the two lines of debug code (log message and sleep). Comment them out, and the code runs again. Been dealing with the o
<splud>
versions in the code for so long, I don’t know if the behavior has something to do with ruby optimizations or what.
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<splud>
okay, so chiefly people popping in and out of the channel, but no technical discussion?
adymitruk has joined #ruby-lang
AKASkip has quit [Ping timeout: 240 seconds]
alexju has quit [Ping timeout: 255 seconds]
<adymitruk>
I'm trying to use a git repo as a bundle