kith has quit [Read error: Connection reset by peer]
kith has joined #ruby-lang
KA_ has quit [Quit: KA_]
havenn has joined #ruby-lang
tockitj_ has quit [Ping timeout: 272 seconds]
tockitj_ has joined #ruby-lang
tockitj_ has quit [Client Quit]
reppard has quit [Ping timeout: 250 seconds]
meatballhat has joined #ruby-lang
xalei has joined #ruby-lang
madish has quit [Quit: ChatZilla 0.9.89 [Firefox 16.0.1/20121026125834]]
BigO_ has joined #ruby-lang
BigO_ has quit [Remote host closed the connection]
BigO_ has joined #ruby-lang
BigO_ has quit [Remote host closed the connection]
mercwithamouth has quit [Ping timeout: 252 seconds]
__BigO__ has joined #ruby-lang
Averna has joined #ruby-lang
reppard has joined #ruby-lang
sepp2k1 has quit [Remote host closed the connection]
Averna has quit [Quit: Leaving.]
mercwithamouth has joined #ruby-lang
kurko_ has joined #ruby-lang
Guedes has quit [Ping timeout: 246 seconds]
Guedes0 has joined #ruby-lang
Averna has joined #ruby-lang
__BigO__ has quit [Remote host closed the connection]
meatballhat has quit [Ping timeout: 255 seconds]
agarie has joined #ruby-lang
Croms has quit [Remote host closed the connection]
Croms has joined #ruby-lang
nXqd has joined #ruby-lang
marr has quit [Ping timeout: 252 seconds]
meatballhat has joined #ruby-lang
nXqd has quit [Ping timeout: 255 seconds]
mjio has quit []
aef has quit [Remote host closed the connection]
<freedrull>
how do i fix this? do i have to tell sprockets to use utf8 or something? this is a sinatra app with sprockets https://gist.github.com/4315061
aef has joined #ruby-lang
<drbrain>
freedrull: #ror might know
kentleo has joined #ruby-lang
scampbell has joined #ruby-lang
kentleo has left #ruby-lang [#ruby-lang]
havenn has quit [Remote host closed the connection]
havenn has joined #ruby-lang
havenn has quit [Ping timeout: 256 seconds]
tdy has quit [Quit: WeeChat 0.3.9.2]
knu has quit [Remote host closed the connection]
tdy has joined #ruby-lang
srbaker has joined #ruby-lang
knu has joined #ruby-lang
guns has joined #ruby-lang
wmoxam has joined #ruby-lang
srbaker has quit [Ping timeout: 265 seconds]
wyhaines has joined #ruby-lang
havenn has joined #ruby-lang
<whitequark>
hmm, interpolations not calling +
<whitequark>
performance aside, I wonder if that'd be a good idea
aef has quit [Remote host closed the connection]
aef has joined #ruby-lang
tockitj_ has joined #ruby-lang
<tockitj_>
is there a better alternative to ctags for ruby ?
<tockitj_>
i've found rtags (but it seems to work only on 1.8)
<badeball>
whitequark: no way, that'd be a fantastic idea! yeah, probably shouldn't have patched String had it been possible. should have used a wrapper class.
<tpope>
tockitj_: can't top exuberant-ctags
<tockitj_>
tpope, i've recently installed some of your plugins in vim
<tockitj_>
thank you for great work there
<tpope>
cheers
<tockitj_>
but, ctags seem to find 'functions' in source
<tpope>
hmm?
<tockitj_>
and treats modules as singleton-methods
<tpope>
vim doesn't distinguish between types when jumping to definitions
<tockitj_>
hmmz.. this categorisation maybe comes from taglist.vim plugin that i'm using
<tpope>
oh I've never used that
<tpope>
yeah that's probable
havenn has quit [Ping timeout: 250 seconds]
<tpope>
you can also customize how exuberant ctags indexes things all willy nilly with --regex-ruby=
<tockitj_>
how do you browse tags (:
<tockitj_>
having a nice outline of class and methods next to edit window can be nice when working with new code base
gmruby has joined #ruby-lang
mjio has joined #ruby-lang
<tpope>
^]
<tpope>
I've always found those sidebar plugins to accomplish little more than to butcher my use of splits
<soahccc>
Hmmm seems to be something different. Isn't it weird that I get this as argument in Object#const_missing? #<Class:#<Object:0x007fd37887af98>>
srbaker has joined #ruby-lang
imperator has joined #ruby-lang
scampbell has quit [Quit: Leaving]
stonerfish has quit [Ping timeout: 276 seconds]
mwjcomputing has quit [Ping timeout: 256 seconds]
reppard has quit [Quit: leaving]
lcdhoffman has quit [Quit: lcdhoffman]
kurko_ has quit [Ping timeout: 255 seconds]
lcdhoffman has joined #ruby-lang
chaosis has quit [Read error: Connection reset by peer]
spuk has quit [Quit: Human beings were created by water to transport it uphill.]
waffleau has joined #ruby-lang
havenn has joined #ruby-lang
KA_ has joined #ruby-lang
rippa has quit [Ping timeout: 255 seconds]
methods1 has joined #ruby-lang
meatballhat has quit [Ping timeout: 255 seconds]
cirenyc has quit [Quit: Leaving...]
meatballhat has joined #ruby-lang
meatballhat has joined #ruby-lang
meatballhat has quit [Changing host]
havenn has quit [Remote host closed the connection]
fireglow has left #ruby-lang [#ruby-lang]
meatballhat has quit [Ping timeout: 244 seconds]
briantrust has joined #ruby-lang
srbaker has quit [Quit: Computer has gone to sleep.]
meatballhat has joined #ruby-lang
Bosox20051 has joined #ruby-lang
stonerfish has joined #ruby-lang
KA_ has quit [Quit: KA_]
KA_ has joined #ruby-lang
seanstickle has quit [Quit: seanstickle]
imajes has quit [Excess Flood]
imajes has joined #ruby-lang
<whitequark>
hey zenspider
<whitequark>
I see why you've said that Ragel might be unsuitable for lexing ruby
<whitequark>
in fact you just need to hack it a bit to make the lexer stop after each encountered token
glebm has quit [Ping timeout: 265 seconds]
faces has joined #ruby-lang
faces has quit [Read error: Connection reset by peer]
meatballhat has quit [Ping timeout: 255 seconds]
earthquake has joined #ruby-lang
meatballhat has joined #ruby-lang
meatballhat has quit [Changing host]
meatballhat has joined #ruby-lang
Bosox20051 has quit [Ping timeout: 252 seconds]
faustman has joined #ruby-lang
joevandyk has quit [Quit: joevandyk]
ddd has quit [Quit: Leaving.]
burgestrand1 has quit [Quit: Leaving.]
jobicoppola has quit [Quit: Computer has gone to sleep.]
waffleau has quit [Quit: waffleau]
meatballhat has quit [Ping timeout: 246 seconds]
KA_ has quit [Quit: KA_]
KA_ has joined #ruby-lang
xalei has quit [Remote host closed the connection]
neocoin has quit [Remote host closed the connection]
briantrust has quit [Remote host closed the connection]
nazty has quit [Read error: Connection reset by peer]
nXqd has joined #ruby-lang
nazty has joined #ruby-lang
mistym has quit [Remote host closed the connection]
newguy has joined #ruby-lang
loladiro has joined #ruby-lang
rippa has joined #ruby-lang
neocoin has joined #ruby-lang
burgestrand has joined #ruby-lang
dzhulk has quit [Quit: Leaving.]
nXqd has quit [Ping timeout: 246 seconds]
nXqd has joined #ruby-lang
gnufied has quit [Quit: Leaving.]
burgestrand has quit [Ping timeout: 246 seconds]
newguy has quit [Quit: Leaving]
Axsuul has quit [Ping timeout: 265 seconds]
coj has joined #ruby-lang
<coj>
hi there. is there a way to nest a map within another map like this? categories.map(&:self_and_ancestors.map(&:id)) ? i can do it with the full block syntax, but i was wondering if it could be done in the ampersand notation
<whitequark>
coj: it cannot be
<coj>
alright, thanks
nXqd has quit [Ping timeout: 265 seconds]
nXqd has joined #ruby-lang
Mon_Ouie has quit [Ping timeout: 272 seconds]
burgestrand has joined #ruby-lang
kith has quit [Read error: Connection reset by peer]
kith has joined #ruby-lang
wyhaines has quit [Remote host closed the connection]
qwerxy has joined #ruby-lang
coliflor has quit [Ping timeout: 245 seconds]
burgestrand1 has joined #ruby-lang
cirenyc has joined #ruby-lang
kitallis has joined #ruby-lang
kitallis has quit [Excess Flood]
burgestrand has quit [Ping timeout: 272 seconds]
kitallis has joined #ruby-lang
kitallis has quit [Excess Flood]
chendo__ has joined #ruby-lang
<whitequark>
ouch, lexing ruby is quite insane. think about :a===b and :a==>b and :a=>b.
kitallis has joined #ruby-lang
kitallis has quit [Excess Flood]
chendo__ has quit [Changing host]
chendo__ has joined #ruby-lang
kitallis has joined #ruby-lang
<whitequark>
the symbol is greedy in :a==>b and :a=b, but not :a=>b nor :a===b.
kitallis has quit [Excess Flood]
cirenyc has quit [Ping timeout: 244 seconds]
kitallis has joined #ruby-lang
kitallis has quit [Excess Flood]
kitallis has joined #ruby-lang
kitallis has quit [Excess Flood]
kitallis has joined #ruby-lang
kitallis has quit [Excess Flood]
kitallis has joined #ruby-lang
kitallis has quit [Excess Flood]
kitallis has joined #ruby-lang
kitallis has quit [Excess Flood]
<ryanf>
:a==>b can't be valid syntax?
kitallis has joined #ruby-lang
kitallis has quit [Excess Flood]
kitallis has joined #ruby-lang
kitallis has quit [Excess Flood]
kitallis has joined #ruby-lang
kitallis has quit [Excess Flood]
kitallis has joined #ruby-lang
kitallis has quit [Excess Flood]
kitallis has joined #ruby-lang
kitallis has quit [Excess Flood]
kitallis has joined #ruby-lang
kitallis has quit [Excess Flood]
kitallis has joined #ruby-lang
kitallis has quit [Excess Flood]
<whitequark>
ryanf: {:a==>1}
<ryanf>
ohhhhh
<whitequark>
yes.
kitallis has joined #ruby-lang
kitallis has quit [Excess Flood]
<ryanf>
I always forget about how there are like 30 special cases for what the last character of a symbol can be
coliflor has joined #ruby-lang
<whitequark>
ryanf: wanna look at the ragel state machine chart?
<ryanf>
haha maybe
kitallis has joined #ruby-lang
kitallis has quit [Excess Flood]
<ryanf>
I think the mri source has them all listed in a row too
<ryanf>
whitequark: link?
kitallis has joined #ruby-lang
kitallis has quit [Excess Flood]
<whitequark>
ryanf: sec, it'll upload for ages with my current isp
<whitequark>
I was able to squeeze it into this simple one-liner:
<whitequark>
I'm only starting to hit interesting stuff like context sensitivity
workmad3 has quit [Ping timeout: 265 seconds]
<whitequark>
but it seems that I'd be able to make it _much_ simpler and more robust than the current lexer
<whitequark>
not sure about performance, but that could be tweaked with some amount of ragel magic.
<whitequark>
(like generating lexer description in XML and then emitting the ruby source manually)
<judofyr>
whitequark: have you considered using a scannerless parser?
<whitequark>
it doesn't seem to be very slow now, and given that zenspider's lexer has some pathological cases where it hangs...
<whitequark>
judofyr: like PEG?
<judofyr>
whitequark: for instance, yes
<yorickpeterse>
surely you should be using XSLT
<whitequark>
judofyr: the hell will freeze sooner
<whitequark>
PEGs aren't slow by design, but every single ruby PEG parser generates vast amounts of crap, like a node for each fucking character, including comments and whitespace
<whitequark>
so, yes, they're incredibly slow and fat in practice
<whitequark>
also, my current lexer can parse infinite amounts of well-behaving ruby code in constant space and linear time
<whitequark>
(by "well-behaving" I mean that if you have unterminated strings of infinite length, you're doing it wrong)
rcvalle has joined #ruby-lang
<whitequark>
yorickpeterse: then I'd have two problems
<kke>
i got 99 problems
<injekt>
and ruby is 98 of them
<kke>
actually rails 2.0.2 is 98 of them
rippa has joined #ruby-lang
<kke>
and the quality of that legacy codebase in general. some daily wtf -level stuff in there.
<yorickpeterse>
whitequark: just two? I'd say you'd end up with much more than that
<judofyr>
whitequark: well, there are more scannerless parsers than PEG. but most of them are Generalized though.
<whitequark>
judofyr: any examples? I think I've looked at every single ruby parser generator
<kke>
it looks like someone thought include is the equivalend of require and there's a lot of modules that are included into every other class in there (and not calling the methods with Module.x but only x)
coliflor has quit [Quit: Lost terminal]
jxie has quit [Quit: leaving]
<judofyr>
whitequark: SGLR is the most common one. haven't seen an implementation in Ruby.
<apeiros_>
charliesome: so the parser recognized that $a would be an array and optimized the method lookup away?
leopard_me has joined #ruby-lang
<apeiros_>
does that still work if other threads reassign $a?
<judofyr>
whitequark: there's also GLL which is O(n) when the grammar is LL(k) and O(n^3) in worst-case.
<charliesome>
apeiros_: the parser emits a special opcode for array references
<charliesome>
and other common method calls
<charliesome>
YARV does a simple type check to see if it can take a fast path and not do any method lookups
<whitequark>
judofyr: well, you've asked me if I've considered using such a parser
<whitequark>
and if there is no implementations, what's the point?
<charliesome>
the vm maintains a set of flags that are set if any one of those common methods are redefined on a core class
<apeiros_>
nice
<charliesome>
if that flag is set, the optimization is disabled
coj has quit [Ping timeout: 252 seconds]
<whitequark>
I'm not up to writing another damned parser generator, there's too much already.
<whitequark>
judofyr: also, I'm not sure how would you avoid one-character-node hell if there's no scanner.
<apeiros_>
@j :D
<judofyr>
whitequark: I've implemented "Memoization in Top-Down Parsing" in Ruby: https://github.com/judofyr/kramer (which does O(n) for unambiguous grammars and O(n^3) in worst-case). I'm not very satisfied with the operator-precedence though.
<whitequark>
charliesome: and rxr.whitequark.org, unlike github, does full-text search.
<charliesome>
oh cool
<whitequark>
judofyr: yeah I remember talking with you about it
<apeiros_>
whitequark: while I don't know anything about parser theory, when I wrote my own, I defined "transients", i.e. pieces that would not end up in the AST as a node
<whitequark>
charliesome: it works, but not on insns.def
<charliesome>
ah
<whitequark>
the syntax there is bananas anyway
<charliesome>
yeah haha
<whitequark>
apeiros_: what for?
<whitequark>
ah, I got it
<judofyr>
whitequark: but I think this is just a different variation of GLL; but I can't wrap my head around the stupid GSS-structure it's using and it's not fun implementing a data-structure you don't understand (red-black trees anyone?)
<whitequark>
apeiros_: that will still put a lot of pressure on GC. somewhat fine for jruby, through still slow, but kills MRI
<apeiros_>
whitequark: avoid single-char nodes
<apeiros_>
whitequark: ah, you're implementing it in ruby and want to stick with ruby?
<whitequark>
apeiros_: exactly, that's the whole point
<apeiros_>
I see
<judofyr>
whitequark: but yeah, it's probably a better idea to use a production-ready parser toolkit now. maybe Kramer will improve in the future.
<whitequark>
current lexer in ruby_parser is insane
<yorickpeterse>
should do it in C for speed
* yorickpeterse
runs
<apeiros_>
that wasn't a concern to me, since I want to rewrite it in the generated language anyway.
<judofyr>
whitequark: but I probably won't work on Kramer until I pick up my language again.
<apeiros_>
and since that provides access to a per-object memory model (i.e., no automatic gc), gc shouldn't be an issue (might not have properly thought that through, though :D)
<whitequark>
apeiros_: I'm curious what manual garbage collection is :D
<whitequark>
also you should be insane to not use ARC or GC in 2012
<charliesome>
whitequark: woo melbourne
<apeiros_>
whitequark: na, this is intended for low level implementations
<apeiros_>
any automatism would have to come as an optional add-on
<yorickpeterse>
whitequark: heh, I wasn't serious. The amount of time spent writing C time is an order of magnitude larger than when writing Ruby code
<apeiros_>
whitequark: the idea is that you can mark an object to have its own "native" memory, which you can manage on your own.
<whitequark>
apeiros_: writing a parser with manual memory management sounds as horror to me
<whitequark>
hmm
<yorickpeterse>
also fuck this SSH lag, watching this channel is like I'm using dial up
<apeiros_>
whitequark: if the object itself gets collected, its associated memory gets collected too.
<apeiros_>
(but all of it)
<whitequark>
apeiros_: heard of rmagick fuckups? it uses a similar memory model
<apeiros_>
whitequark: depends which ones you mean
<apeiros_>
whitequark: I heard of one where ruby would see an object as "oh it's just 20 bytes, no stress to clean that up"
<whitequark>
apeiros_: exactly that one
<apeiros_>
but that was only a reference to a C image struct, weighting a cool X MB
<apeiros_>
yeah, see, exactly that would not happen with such a model
minivan has quit [Quit: minivan]
<apeiros_>
since the size of the object is transparent to the language
<whitequark>
i.e. the language some means of measuring the total size of the object?
<whitequark>
*has some
<apeiros_>
since memory allocation is provided by the language - totally
<whitequark>
yeah, should work
Elico1 has joined #ruby-lang
<apeiros_>
I think it'd be somewhat similar to have an object with a binary encoded string in ruby. you can increase the size of that string too and use it to deal with binary data.
schaerli has quit [Remote host closed the connection]
<whitequark>
apeiros_: so, does the language expect that you'll provide your own GC on top of that memory management primitive?
* apeiros_
still wonders why ruby 1.9 didn't use a two-classes approach for strings :-/
<apeiros_>
whitequark: only within that object's own memory
<whitequark>
apeiros_: that doesn't work
<whitequark>
well, it does, if you consider a mark&sweep GC the peak of evolution
<apeiros_>
o0
<whitequark>
if you want a concurrent GC, which requires write barriers, it won't work
<whitequark>
if you want a moving GC, which requires read barriers, it won't work
<whitequark>
(read barriers and safepoints)
<apeiros_>
you mean because the GC needs to control when memory is accessed?
<whitequark>
even for mark&sweep you need stack walking primitives
<whitequark>
apeiros_: yes.
<apeiros_>
shouldn't be an issue
<apeiros_>
since the object acts as the guard
<whitequark>
do you provide code generation plugins?
<apeiros_>
heh, I haven't even finished my language, so no :)
<whitequark>
hm
io_syl has joined #ruby-lang
<whitequark>
if the object acts as a guard, then every single access to children objects passes through that object, right?
<whitequark>
and dereferences a pointer?
<judofyr>
whitequark: I wish everyone would add read/write-barriers when they implement the first GC
<whitequark>
judofyr: I wish everyone just used LLVM
<apeiros_>
whitequark: an object's dedicated memory is not shared. and an object only gets such a memory slice upon request.
<apeiros_>
i.e., it's not accessible from the outside
<whitequark>
apeiros_: what I mean, you cannot provide a sensible GC-enabled sublanguage on top of that language
gjaldon has joined #ruby-lang
<apeiros_>
whitequark: hm, maybe we should talk again in 2020, when I've finished my language ;-)
<apeiros_>
s/finished/implemented the first prototype/ :D
<whitequark>
apeiros_: ... or maybe you should reconsider some decisions until it's too late ;)
<whitequark>
:p
<apeiros_>
whitequark: so what's the state of the art GC at the moment?
<whitequark>
apeiros_: there isn't a single best GC, of course
<whitequark>
but if you can provide your GC with an ability of injecting arbitrary code before an object is allocated, read and written, and provide stack maps, then you can add practically any GC
<apeiros_>
re ARC: funny - i wanted to implement my gc using reference counting. somebody told me that the overhead of reference counting would be bigger than what other gc's do
<whitequark>
look at how LLVM does it. there are basically two primitives, @llvm.gcread and @llvm.gcwrite
<whitequark>
apeiros_: hmm, the problem of refcounting is not overhead
<whitequark>
the overhead is really small in most cases
<apeiros_>
judofyr: whyyyyyyyyy, why would anybody use COMIC SANS for their website?!? BURN IT WITH FIRE!
<whitequark>
the problem of refcounting is that a) you can have object islands if you have reference loops
<injekt>
LOL
<judofyr>
(so you need a backup-GC)
<injekt>
that website looks like a cartoon :(
<whitequark>
judofyr: yes
<apeiros_>
I think you want at least 2 gc types anyway
<whitequark>
apeiros_: b) that if you miss an incref or decref in one single place and it goes into a loop, everything explodes
<apeiros_>
one for "local code" and one for "global code"
<apeiros_>
i.e., what java does with its generational gc
<whitequark>
judofyr: the problem with those cool concurrent GCs is that where you actually need realtime, i.e. in microcontrollers, you don't have shitloads of RAM these GCs eat
<apeiros_>
judofyr: bookmarked. despite its use of comic sans.
<whitequark>
and object access overhead is often, but not always, prohibitive
<judofyr>
whitequark: overhead?
<whitequark>
judofyr: oh, that part about reference counting is almost exactly what I've invented for foundry. haha.
<whitequark>
judofyr: read barriers
<whitequark>
these GCs are moving
<whitequark>
so you gotta check if the object was moved underneath you before accessing its fields
<apeiros_>
whitequark: re hooks - I think for first implementations of the language, it'd make indeed sense to use a callback based approach. ie. have a callback for object allocation and scope terminations
<whitequark>
apeiros_: a callback for object allocation is called malloc
<whitequark>
it's a part of gc anyway
<apeiros_>
o0
<whitequark>
for a scope termination... not sure, try it
<whitequark>
apeiros_: allocator is always a part of GC.
<judofyr>
whitequark: Stopless' read-barrier has a fast path and a slow path (the fast path is basically `if (!do_long_path) return fetch()` and happens 95% of the time IIRC
<apeiros_>
whitequark: I'd decouple that
gjaldon has quit [Ping timeout: 245 seconds]
<whitequark>
apeiros_: not sure why would you want it
<apeiros_>
because reserving memory and GC are two separate issues
<judofyr>
whitequark: but yeah, it is a problem :/
<apeiros_>
and by providing callbacks, I could, as you said, plug & play with different ways to handle GC
<whitequark>
apeiros_: no, it's two parts of the same issue. moving GC reserves memory while collecting. generational GC reserve memory in special ways.
<whitequark>
etc etc
gjaldon has joined #ruby-lang
<apeiros_>
hm
<whitequark>
judofyr: what I'd try to do is a pseudo-generational GC I call "hierarchical heap"
<apeiros_>
I might have to spend some time on that
<apeiros_>
until now I viewed it as 2 different problem areas
<whitequark>
judofyr: there's a regular heap and a stack. objects are always (on the nonoptimized path) accessed through an intermediate pointer.
<apeiros_>
one being to find a free spot of memory quickly which satisfies the needs
<apeiros_>
and the other being to figure out which objects are still in use, or rather, which aren't anymore, and mark that memory as free again
<apeiros_>
I'll have to read up on those gc techniques as to how they can improve by conflating these two issues
<judofyr>
in other news: I learnt about Dijkstra's Leonardo trees (http://www.keithschwarz.com/smoothsort/) and discovered that you can implement a nice binary tree with O(lg n) insert/lookup that has a high fanout so it works nice for disk-backed data to
<whitequark>
judofyr: each stack frame is treated as a younger generation to the previous stack frame and, eventually, heap. when address of an object from a younger generation is stored to a field from an object of an older generation, these objects are recursively copied to a higher-level heap (the topmost one)
<apeiros_>
judofyr: for a tiered tree?
<apeiros_>
ah, gtg, cya guys :)
<judofyr>
apieros: yeah, a bunch of Leonardo trees
faces has joined #ruby-lang
chendo__ has joined #ruby-lang
<judofyr>
too*
<judofyr>
I started analyzing it and suddenly ended up with O(1) inserts, but yeah, that turned out to be too good to be true
* judofyr
wishes he knew more math/compsci
<yorickpeterse>
judofyr: don't worry, I know limited amounts as well. I just mash the keyboard and something happens
<gjaldon>
could someone help me out with the code in above link
<gjaldon>
how do I fix my spec so it returns success? tested it manually and it's working as intended
<gjaldon>
also, when I remove inheritance from ActionMailer, I'm unable to access the method inside the RegistrationMailer class from within RegistrationsController.
<rue|w>
judofyr: I accidentally O(1)
<whitequark>
judofyr: tries have O(1) everything
<whitequark>
amortized.
<judofyr>
whitequark: O(1) inserting of N elements too? :)
<whitequark>
:D
<judofyr>
whitequark: well, it's O(m) where m = length of the key
<judofyr>
whitequark: and the space can be tricky
<whitequark>
tries are more space-efficient than hash tables ;)
<whitequark>
or, rather, HAMTs
<judofyr>
so often you need to combine leaf-nodes, and suddenly it's more complex than O(m)
<judofyr>
but yeah, tries are awesome
<whitequark>
judofyr: also there's something which supports O(1) inserting of N elements
<whitequark>
it also supports sharding
<judofyr>
whitequark: /dev/null?
<whitequark>
mongodb too
<judofyr>
:D
imperator2 has joined #ruby-lang
io_syl has quit [Quit: Computer has gone to sleep.]
mistym has quit [Remote host closed the connection]
<masterkorp>
soory wrong window
gjaldon has joined #ruby-lang
rue|w has quit [Remote host closed the connection]
slyphon has quit [Ping timeout: 245 seconds]
ruurd has joined #ruby-lang
scampbell has joined #ruby-lang
headius has joined #ruby-lang
havenn has quit [Remote host closed the connection]
vlad_starkov has quit [Remote host closed the connection]
havenn has joined #ruby-lang
jxie has joined #ruby-lang
imperator2 has quit [Ping timeout: 248 seconds]
jds__ has joined #ruby-lang
zomgbie has joined #ruby-lang
havenn has quit [Ping timeout: 244 seconds]
jds_ has quit [Ping timeout: 260 seconds]
dr_bob has joined #ruby-lang
llaskin has joined #ruby-lang
<llaskin>
Uncaught exception: 126: The specified module could not be found. - C:/Ruby187/lib/ruby/gems/1.8/gems/curb-0.8.3/lib/curb_core.so can anyone help me figure out what could be causing this in the curb gem on windows7?
outoftime has joined #ruby-lang
glebm has joined #ruby-lang
agnitio has quit [Quit: Leaving]
zomgbie has quit [Read error: Connection reset by peer]
<yorickpeterse>
Does curl even work on Windows to begin with?
<darix>
yorickpeterse: why not?
mistym has joined #ruby-lang
mistym has quit [Changing host]
mistym has joined #ruby-lang
thisirs has joined #ruby-lang
krohrbaugh has quit [Ping timeout: 265 seconds]
krohrbaugh has joined #ruby-lang
JohnBat26 has quit [Ping timeout: 252 seconds]
<yorickpeterse>
No particular reason, I just didn't expect it to work
<yorickpeterse>
Unless he/she is running Cygwin/Minwin and the likes
<llaskin>
yorickpeterse: sure it works
nXqd has quit [Ping timeout: 248 seconds]
srbaker has joined #ruby-lang
jtoy has joined #ruby-lang
<darix>
yorickpeterse: it also builds with msvc
slyphon has joined #ruby-lang
KA__ has joined #ruby-lang
jtoy has quit [Ping timeout: 264 seconds]
havenn has joined #ruby-lang
Bosox20051 has joined #ruby-lang
slyphon_ has joined #ruby-lang
davidbalber|away is now known as davidbalbert
slyphon has quit [Ping timeout: 245 seconds]
zomgbie has joined #ruby-lang
nXqd has joined #ruby-lang
wyhaines has joined #ruby-lang
enebo has joined #ruby-lang
glebm has quit [Quit: Computer has gone to sleep.]
havenn has quit [Ping timeout: 272 seconds]
scampbell has quit [Ping timeout: 255 seconds]
lagzilla_ has joined #ruby-lang
lagzilla has quit [Ping timeout: 245 seconds]
scampbell has joined #ruby-lang
gnufied has quit [Quit: Leaving.]
lagzilla_ has left #ruby-lang [#ruby-lang]
methods has joined #ruby-lang
methods has left #ruby-lang [#ruby-lang]
rippa has joined #ruby-lang
krohrbaugh has quit [Ping timeout: 250 seconds]
Hakon has quit [Quit: Leaving...]
rue has quit [Remote host closed the connection]
lagzilla has joined #ruby-lang
rue has joined #ruby-lang
<whitequark>
zenspider: actually, it might be the case that the lexer shouldn't communicate with the parser at all
<whitequark>
but I'm not sure yet
<whitequark>
I know how to eliminate most of the lexer.lex_state= calls, maybe every one.
headius_ has joined #ruby-lang
headius has quit [Disconnected by services]
headius_ is now known as headius
joast has quit [Quit: Leaving.]
andrewhl has joined #ruby-lang
rue|w has joined #ruby-lang
thisirs has quit [Read error: Connection reset by peer]
kitallis has joined #ruby-lang
kitallis has quit [Excess Flood]
rue|w has quit [Ping timeout: 246 seconds]
joevandyk has joined #ruby-lang
zomgbie has quit [Read error: Connection reset by peer]
glebm has joined #ruby-lang
vlad_starkov has joined #ruby-lang
replore_ has quit [Remote host closed the connection]
Croms has joined #ruby-lang
vlad_starkov has quit [Ping timeout: 255 seconds]
gnufied has joined #ruby-lang
Mon_Ouie has joined #ruby-lang
gjaldon has quit [Quit: Leaving]
havenn has joined #ruby-lang
jtoy has joined #ruby-lang
judofyr has quit [Remote host closed the connection]
Axsuul has joined #ruby-lang
srbaker has quit [Quit: Computer has gone to sleep.]
<whitequark>
$ ruby -e $'def alias \n alias def alias end \n alias alias alias'
zomgbie has joined #ruby-lang
<ddd>
hehe wouldn't that create a circular issue?
agarcia has quit [Quit: Konversation terminated!]
<whitequark>
ddd: the 'fun' part is that's syntactically valid code
replore has quit [Read error: Connection reset by peer]
glebm has quit [Quit: Computer has gone to sleep.]
sn0wb1rd has quit [Quit: sn0wb1rd]
<headius>
global aliasing is such a strange feature to me
gnufied has quit [Quit: Leaving.]
jtoy_ has joined #ruby-lang
joevandyk has quit [Quit: joevandyk]
jtoy has quit [Ping timeout: 250 seconds]
jtoy_ is now known as jtoy
<whitequark>
headius: why?
chrismcg is now known as zz_chrismcg
<headius>
I don't see the purpose
<whitequark>
probably to alias $: to $-I and $LOAD_PATH ?
<headius>
yeah, but those are special already…could just be bound to multiple names
<headius>
what's the use case for aliasing your own globals?
<headius>
in JRuby we define all those ahead of time anyway
<whitequark>
uhm... well
<whitequark>
no idea actually
cultureulterior_ has joined #ruby-lang
<whitequark>
a strange to me feature is #is_a? with a Module argument
<whitequark>
this became apparent to me when I've been adding static typing. #is_a? Class could check if you can substitute base class for derived. not much sense in unmodified Ruby, but well, there are cases
<whitequark>
whereas #is_a? Module checks... nothing. it verifies that at some point of a class lifetime a few methods were added.
<coj>
when you guys write a bunch of nested if-else conditions, do you 'refactor' them into flat &&/|| conditions (like a k-map)?
<soahccc>
Will that work under any circumstances as Hash#shuffle? Not sure where I found that anymore... Hash[self.to_a.sample(self.length)]
GarethAdams|Work has quit [Quit: Leaving...]
<whitequark>
also ?\C-\M-a escapes.
kurko_ has joined #ruby-lang
havenn has joined #ruby-lang
joevandyk has joined #ruby-lang
retro|cz has quit [Read error: Connection reset by peer]
glebm has joined #ruby-lang
davidbalber|away is now known as davidbalbert
qwerxy has joined #ruby-lang
qwerxy has quit [Client Quit]
imperator2 has joined #ruby-lang
__butch__ has joined #ruby-lang
gregmoreno has joined #ruby-lang
replore_ has joined #ruby-lang
kitallis has joined #ruby-lang
kitallis has quit [Excess Flood]
havenn has quit [Ping timeout: 246 seconds]
replore_ has quit [Ping timeout: 260 seconds]
retro|cz has joined #ruby-lang
Liquicity has joined #ruby-lang
ryanlecompte has joined #ruby-lang
zomgbie_ has joined #ruby-lang
Liquicity has left #ruby-lang [#ruby-lang]
havenn has joined #ruby-lang
zomgbie has quit [Ping timeout: 265 seconds]
sn0wb1rd has joined #ruby-lang
ebouchut has joined #ruby-lang
dr_bob has quit [Read error: Connection reset by peer]
Kruppe has joined #ruby-lang
replore_ has joined #ruby-lang
andrewhl has quit [Remote host closed the connection]
Bosox20051 has quit [Remote host closed the connection]
swav_ has quit [Remote host closed the connection]
glebm has quit [Quit: Computer has gone to sleep.]
briantrust has joined #ruby-lang
sulo has joined #ruby-lang
replore_ has quit [Ping timeout: 256 seconds]
krohrbaugh has joined #ruby-lang
krohrbaugh1 has quit [Read error: Connection reset by peer]
apeiros_ has quit [Remote host closed the connection]
apeiros_ has joined #ruby-lang
coj has quit [Ping timeout: 250 seconds]
krohrbaugh has quit [Client Quit]
My_Hearing has joined #ruby-lang
ruurd has quit [Quit: Leaving...]
efrainolivares has joined #ruby-lang
My_Hearing has quit [Read error: Connection reset by peer]
Mon_Ouie has quit [Ping timeout: 244 seconds]
coj has joined #ruby-lang
KA__ has quit [Quit: KA__]
Nisstyre has joined #ruby-lang
hahuang65 has joined #ruby-lang
_Mon_Ouie_ has joined #ruby-lang
joevandyk has quit [Quit: joevandyk]
rippa has quit [Ping timeout: 246 seconds]
tbuehlmann has quit [Remote host closed the connection]
<yorickpeterse>
whitequark: https://gist.github.com/85964c831c8688cdf5f6 Could you take a look at this and yell at me if it's a stupid idea? I have mixed feelings about it at the moment
<yorickpeterse>
Fenhl: are you trying to install stuff globally?
<yorickpeterse>
If so you might need to run `sudo gem install NAME`
<yorickpeterse>
Where NAME is the name of the gem
<Fenhl>
I'm just following the instructions
<Fenhl>
so I have no idea if that's supposed to be global
imajes has quit [Excess Flood]
<Fenhl>
trying with sudo now
imajes has joined #ruby-lang
lcdhoffman has joined #ruby-lang
r0bby has joined #ruby-lang
replore has joined #ruby-lang
voker57 has joined #ruby-lang
voker57 has quit [Changing host]
voker57 has joined #ruby-lang
robbyoconnor has quit [Ping timeout: 252 seconds]
<injekt>
Fenhl: Yeah you're trying to write to /Library/... so it's global, you'll need sudo
<Fenhl>
oh ok
robotmay_ has joined #ruby-lang
replore has quit [Ping timeout: 244 seconds]
robotmay has quit [Read error: Connection reset by peer]
mercwithamouth has joined #ruby-lang
<naquad>
can i somehow tell readline which io object to use?
<naquad>
not just stdin
<drbrain>
naquad: do you have another TTY than stdin?
<jtoy>
why would this change the encoding of a file? its not unicode anymore: ruby -rjson -ne "j=JSON.parse(\$_) rescue nil; puts(j) if j && j['scores'].detect{|x| x['name'] == 'foo' && x['val'] > 80}"
<jtoy>
I pipe that output to a file and the process it and I get errors about invalid json
<drbrain>
naquad: … looks like Readline::input= is what you want
<jtoy>
but if I work with the raw json file before ruby touches it, it is fine
<tos9>
Hi. Is rubyspec (or something like it) available in some sorted format? i.e. a progression of specs reasonable to follow for implementation writers?
<drbrain>
tos9: not that I've heard of
<naquad>
drbrain, yes, i'm trying to make a kind of telnet service :) thank you
<brixen>
tos9: it's not clear to me what sorted format means
<drbrain>
tos9: there's probably a bunch of stuff you'd need to write before you can start running mspec
<brixen>
there's very little you need
zomgbie_ has quit [Ping timeout: 244 seconds]
<brixen>
a basic mspec runner is 50 lines of Ruby
<tos9>
drbrain: Yeah. I'm working on at least getting spec_helper importable first obviously.
<brixen>
and does not require any reflection
zomgbie has joined #ruby-lang
schaerli has quit [Remote host closed the connection]
<tos9>
brixen: Uh. In a broad sense, I'm looking for a sequence of steps to follow when writing an implementation. So, I'd like a thing that starts off not really requiring a full featured parser, standard lib, environment, etc. and slowly building one up
<brixen>
tos9: ok
<brixen>
tos9: that would be indeed be a nice guide
<brixen>
tos9: at the very least, you need to be able to make classes, define methods, and call blocks
<tos9>
I mean -- I can obviously see trying to get things like core/ running first. So I could kinda figure my way out.
<brixen>
testing stuff below that level is pretty hard
<brixen>
but evan actually wrote this thing called laces that is basically some Ruby code in a file
<brixen>
and you can check the output for success or failure
<tos9>
brixen: Well yeah. So, I have my own written tests for stupid things like assignment and loops that I used while writing the beginnings of a VM, so I guess now I'm at that stage.
<tos9>
I think I've heard of laces maybe?
<brixen>
it's very basic
<brixen>
there's just a couple files
<brixen>
rbx/spec/laces dir and bin/laces
<brixen>
er bin/laces.rb
<brixen>
tos9: we could chat about this in #rubyspec if you'd like
xalei has joined #ruby-lang
<tos9>
That'd be great.
replore_ has joined #ruby-lang
cicekhayri has joined #ruby-lang
robotmay_ has quit [Remote host closed the connection]
cicekhayri has quit [Remote host closed the connection]
sush24 has quit [Quit: This computer has gone to sleep]
<andrewvos>
If it's because you want to test them, then I'm going to get emotional.
<apeiros_>
send. and if 1.8 really allowed that, then it was a bug.
io_syl has quit [Ping timeout: 246 seconds]
<apeiros_>
(and note, accessing private methods is a code smell)
<Nitrodist>
andrewvos: it's being used internally
<Nitrodist>
andrewvos: isn't that the point of private methods?
replore has quit [Ping timeout: 255 seconds]
<andrewvos>
Nitrodist: Is that your excuse for testing it?
<Nitrodist>
andrewvos: it's not that it's being tested, it's UNUSABLE in regular code
<andrewvos>
And other muscles, I'm sure.
io_syl has joined #ruby-lang
<andrewvos>
haha wrong channel
<Nitrodist>
got to go, but I'll pm you later, if that's ok andrewvos :P
<andrewvos>
Okie
hahuang65 has joined #ruby-lang
<charliesome>
i'm pretty sure this is a known problem
hahuang65 has quit [Remote host closed the connection]
Nitrodist has quit [Ping timeout: 276 seconds]
zmack has quit [Remote host closed the connection]
andrewhl has quit [Ping timeout: 272 seconds]
io_syl has quit [Read error: Operation timed out]
cjs226 has quit [Ping timeout: 260 seconds]
chendo__ has joined #ruby-lang
andrewhl has joined #ruby-lang
io_syl has joined #ruby-lang
<naquad>
maybe an awkward question, but still: is there a telnet or ssh server implementation in ruby?
cirenyc has quit [Quit: Leaving...]
ddd1 has joined #ruby-lang
<andrewvos>
naquad: net/ssh
<naquad>
its a client
ddd is now known as Guest99517
<andrewvos>
naquad: Oh, server.
<naquad>
won't for a server
<andrewvos>
Not sure.
ddd1 is now known as ddd
headius has quit [Quit: headius]
Guest99517 has quit [Ping timeout: 245 seconds]
<oddmunds>
i'm a little out of the loop, how do we rid ourselves of bundle exec these days?
chendo__ has quit [Quit: Leaving...]
<andrewvos>
oddmunds: Just don't type it.
ViperMaul|_ has quit [Read error: Connection reset by peer]
<oddmunds>
without it my script can't find it's gems
<andrewvos>
oddmunds: How so?
<andrewvos>
oddmunds: I suppose you could use gemsets with rvm?
<oddmunds>
might be related to me not being sure how to use rbenv
<andrewvos>
oddmunds: It's probably that.
<oddmunds>
i want the simplest thing
Rizzle has joined #ruby-lang
<andrewvos>
oddmunds: Make sure you're using the right ruby with `which ruby`
<oddmunds>
tbh, i'm not sure if i need either of them
<oddmunds>
which ruby is the rbenv shim
<andrewvos>
oddmunds: Ergh, I would suggest using rbfu. It's just so simple and has never ever given me problems.
<oddmunds>
thanks
<oddmunds>
as good a time as any to check it out
<andrewvos>
oddmunds: But you should be warned, about two years ago I was preaching RVM like it was some sort of god. I'm probably not to be trusted.
<oddmunds>
me too
<oddmunds>
two years ago gemsets were more important than now
loladiro has quit [Quit: loladiro]
<andrewvos>
Why do you think that is oddmunds?
<oddmunds>
because bundler
<oddmunds>
at least for me
<andrewvos>
Care to elaborate?
<oddmunds>
now you can define which version of which gem you want in which project you want
lcdhoffman has quit [Quit: lcdhoffman]
<oddmunds>
you probably could do that two years ago too, but i used gemsets for that
benanne has joined #ruby-lang
<andrewvos>
Oh okay
swav has joined #ruby-lang
Austin__ has quit [Remote host closed the connection]
enebo has quit [Quit: enebo]
agarie has joined #ruby-lang
dankest has joined #ruby-lang
ViperMaul|_ has joined #ruby-lang
AndChat| has quit [Ping timeout: 272 seconds]
Banistergalaxy has joined #ruby-lang
replore has joined #ruby-lang
replore has quit [Read error: Connection reset by peer]
Rizzle has quit [Ping timeout: 260 seconds]
ruurd has quit [Quit: Leaving...]
<oddmunds>
andrewvos: ahh
<oddmunds>
i'm so pleased
<oddmunds>
removed rbfu and rbenv and anything like it
<oddmunds>
works like a charm now
nXqd has quit [Ping timeout: 244 seconds]
brainspoil has quit [Quit: Leaving]
mistym has quit [Remote host closed the connection]
slyphon_ has joined #ruby-lang
JoelMcCracken has quit [Ping timeout: 265 seconds]
tenderlove has quit [Remote host closed the connection]
mercwithamouth has quit [Ping timeout: 264 seconds]
loladiro has joined #ruby-lang
fuzzy8balls has quit [Read error: Operation timed out]
hakunin_ is now known as hakunin
lcdhoffman has joined #ruby-lang
mercwithamouth has joined #ruby-lang
fuzzy8balls has joined #ruby-lang
andrewhl has quit [Ping timeout: 264 seconds]
havenn has joined #ruby-lang
davidbalbert is now known as davidbalber|away
andrewhl has joined #ruby-lang
tenderlove has joined #ruby-lang
intellitech has joined #ruby-lang
cjs226 has joined #ruby-lang
replore_ has joined #ruby-lang
__BigO__ has quit [Remote host closed the connection]
mercwithamouth has quit [Ping timeout: 244 seconds]
slyphon_ has quit [Ping timeout: 245 seconds]
benanne has quit [Quit: kbai]
replore_ has quit [Ping timeout: 256 seconds]
sulo has quit [Ping timeout: 264 seconds]
Paradox has quit [Read error: Operation timed out]
jtoy has quit [Quit: jtoy]
Ziioynx has joined #ruby-lang
slyphon_ has joined #ruby-lang
<andrewvos>
oddmunds: :)
robotmay has joined #ruby-lang
<oddmunds>
injekt: is the command think in slop deprecated?
<oddmunds>
thing
spuk has joined #ruby-lang
agarie has quit [Remote host closed the connection]
__butch__ has quit [Quit: Leaving.]
tenderlo_ has joined #ruby-lang
Averna has joined #ruby-lang
bcardarella has joined #ruby-lang
tenderlove has quit [Ping timeout: 265 seconds]
mercwithamouth has joined #ruby-lang
<bcardarella>
so I have an encoded string representation of a binary data type from a database (postgres bytea) it starts with "//x" any idea what type of encoding this is?
andrewhl has quit [Remote host closed the connection]
imajes has quit [Excess Flood]
Paradox| has joined #ruby-lang
imajes has joined #ruby-lang
agile has joined #ruby-lang
<eam>
bcardarella: //x or \\x?
<bcardarella>
eam: I think I was barking up the wrong tree on that one
<bcardarella>
eam: I just really wanted to convert a regular SHA1 digest to a SHA1 hexdigest