<tenderlove>
postmodern: fiddle replaces DL and is actually smaller than DL. After DL's removal, there will be a net loss
bluepojo1 has joined #ruby-lang
<postmodern>
tenderlove, ok that makes sense
bluepojo has quit [Read error: Operation timed out]
<postmodern>
tenderlove, but why re-implement ruby-ffi when there already is a gem?
<lianj>
tenderlove: i'm with postmodern. but structs, callbacks and function blocking: true etc stuff already work with the fiddle base?
zenspider has joined #ruby-lang
havenn has joined #ruby-lang
_n0b0dy_ has quit [Quit: Bye]
<tenderlove>
postmodern: it is not easy to implement DL in terms of ruby-ffi. ruby-ffi is very DSL based where DL needs function objects
xalei has quit [Remote host closed the connection]
ruby-lang932 has joined #ruby-lang
<postmodern>
tenderlove, that doesn't explain why you must re-implement ruby-ffi? or did i come in late in this discussion?
<tenderlove>
postmodern: sorry, you're totally right. I should have done that. :(
<lianj>
tenderlove: isnt the dsl only sugar for FFI::Function objects?
<lianj>
btw, thats for doing at least a healthy talk about it :)
<whitequark>
headius: the problem is with ruby-ffi gem's LGPL3 license, not Apache of libffi
<whitequark>
as I understand it
<postmodern>
seems to be there's a want, not a need, to re-implement ruby-ffi, which results in yet another ffi implementation we have to keep in compliance
[1]Brian has joined #ruby-lang
<lianj>
postmodern: and which is not there yet. sure the gist is nice but that not all parts that make the ruby-ffi api
apeiros has joined #ruby-lang
Aiur has quit [Quit: Computer has gone to sleep.]
apeiros_ has quit [Ping timeout: 260 seconds]
Aiur has joined #ruby-lang
<postmodern>
lianj, right, the ffi API is rather large
<postmodern>
lianj, also FFI::Buffer
<lianj>
yet an alternative to cexts should be allowed to be somewhat large :D
havenn has quit [Ping timeout: 246 seconds]
<whitequark>
lianj: ffi is not alternative!
<whitequark>
unfortunately, you still need to compile C sources for a range of tasks
<whitequark>
think about wrapping C++ classes, or figuring out typedefs for a particular platform
<lianj>
c++ wrapper yes, but which c libs?
ruby-lang932 has quit [Ping timeout: 245 seconds]
<whitequark>
huh?
<headius>
ruby-ffi should be apache-2.0 now
<headius>
bleah
<headius>
I guess he hadn't changed it yet…he's changed every other project I asked about
<headius>
jnr-*
<headius>
etc
<whitequark>
headius: oh, having it as apache would be quite nice
<headius>
he'd happily relicense it for MRI
<postmodern>
whitequark, true, however you can copy most typedefs, unless they are using crazy #if macros to set them
<lianj>
headius: i guess the same
<headius>
we made a big push in JRuby to eliminate all GPL dependencies, because we lost some potential users
<headius>
GPL scares people away
<whitequark>
postmodern: indeed, so that's a problem only in very terminal cases
<whitequark>
I think that having your language runtime licensed as GPL is a crime against programming
<postmodern>
whitequark, yep, and usually those libraries have problems by not relying on POSIX C types
<whitequark>
postmodern: I thought more of some typedefs in external libraries which are somehow derivative to both standard C types and POSIX ones so you couldn't use both
<whitequark>
but I cannot think of any examples right now
Spaceghostc2c has quit [Excess Flood]
<benwoody>
I have a String, "{:account=>\"My Account\", :role=>\"Admin\"}" . Is there anyway to turn this back into a Hash without using eval or regex?
<postmodern>
whitequark, same with the argument about needing to compile cexts against a library that changes their structs frequently. If a library breaks it's ABI on minor versions, the maintainer is screwing up.
<whitequark>
postmodern: agreed
<whitequark>
benwoody: no
<whitequark>
you don't want to parse that with regexps either
<benwoody>
whitequark: that's what I thought. thanks
<postmodern>
benwoody, not safely
<benwoody>
i'm sure I can fix this higher up. I'm getting this as a string because i'm storing in in redis as a set
datanoise has joined #ruby-lang
<benwoody>
Hash in, String out
<postmodern>
benwoody, you could write a parser for hashes using something like Parslet
<whitequark>
benwoody: use JSON.dump, or Marshal.dump
<whitequark>
postmodern: I was about to offer RubyParser, which would work fine
<whitequark>
but it's not the case where you actually need it
<postmodern>
oh good idea
<benwoody>
thanks everyone
<lianj>
JSON.dump is prolly the easiest
<whitequark>
yeah, or YAML.dump
Guest11213 has joined #ruby-lang
<whitequark>
JSON won't preserve the symbols
<lianj>
good point
<benwoody>
JSON.dump makes it "{:account=>\\\"My Account\\\", :role=>\\\"Admin\\\"}"
<whitequark>
benwoody: JSON.dump the original object before storing it
<lianj>
benwoody: no JSON.dump(ruby_hash)
<benwoody>
OOOH
<whitequark>
benwoody: and I get an impression that maybe redis isn't the right tool for your job
<benwoody>
there's that too
<whitequark>
there are nosql databases here which can store actual hashes as values
<CrazyHorse18>
postmodern.. it's not as nice as heardoc
<manveru>
he's doing that to avoid a file :)
<CrazyHorse18>
and it's used everywhere
<CrazyHorse18>
menveru.. :)
<CrazyHorse18>
i.e.
<postmodern>
CrazyHorse18, it does keep static data out of code
<CrazyHorse18>
BLA.unindent!
<manveru>
CrazyHorse18: well, my code does just that
<manveru>
people these days and their 500 dependencies just to solve things like this :P
<manveru>
actually, i don't think that code is from me... not really my style
|Vargas| has joined #ruby-lang
krz has joined #ruby-lang
<drbrain>
the easiest way to remove the indentation from a heredoc is to not put any in in the first place
<manveru>
+1
<CrazyHorse18>
and use what insteaed
<CrazyHorse18>
strings with " +
<manveru>
just put it at the start of the line
<manveru>
not gonna kill you
ebouchut_ has joined #ruby-lang
mjio has quit []
ebouchut_ has quit [Client Quit]
JohnBat26 has joined #ruby-lang
ebouchut_ has joined #ruby-lang
Muz has quit [Ping timeout: 260 seconds]
Muz has joined #ruby-lang
dc5ala has joined #ruby-lang
animes has left #ruby-lang [#ruby-lang]
chimkan__ has joined #ruby-lang
Mon_Ouie has quit [Ping timeout: 246 seconds]
ryanlecompte has quit [Remote host closed the connection]
chimkan has quit [Ping timeout: 250 seconds]
chimkan__ has quit [Ping timeout: 260 seconds]
dankest has joined #ruby-lang
stefff has quit [Remote host closed the connection]
r0bglees0n has joined #ruby-lang
ebouchut_ has quit [Quit: This computer has gone to sleep]
Averna has quit [Quit: Leaving.]
areil has joined #ruby-lang
gnufied has joined #ruby-lang
banister_ has quit [Ping timeout: 264 seconds]
tjadc has joined #ruby-lang
heftig has quit [Quit: leaving]
rue|w has joined #ruby-lang
beiter has joined #ruby-lang
chendo has quit [Ping timeout: 264 seconds]
chendo_ has joined #ruby-lang
sush24_ has joined #ruby-lang
<whitequark>
postmodern: it strikes me that everyone talks how good activesupport would be with refinements, but it's actually pretty good as it is
<postmodern>
whitequark, yeah they moved most of the stuff into modules
<whitequark>
unlike something like mathn, it extends the default functionality, as opposed to changing it, in majority of cases (or maybe all, I'm unsure)
<postmodern>
whitequark, i guess refinements might prevent name collisions?
<postmodern>
whitequark, also maybe you could create a Future module with refinements, like python's future namespace
<whitequark>
postmodern: I too have that gut feeling that localizing extensions with refinements is a good idea
<whitequark>
but having a gut feeling about smth doesn't mean that it is true.
<postmodern>
whitequark, true
<whitequark>
I can't really find any argument against activesupport as it is, for example.
mytrile has joined #ruby-lang
<postmodern>
whitequark, i like the idea of a design board/committee that formally debates these new features
<postmodern>
whitequark, but it's still a bunch of people arguing
<postmodern>
whitequark, i would love to see some formal verification of Ruby using something like Coq
<postmodern>
whitequark, that way we could programmatically find the edge-cases
<whitequark>
postmodern: no no, I'm not talking about process right now. it's pretty broken but it's an entirely different story and I'm not really experienced enough to argue on it
kitallis has joined #ruby-lang
<postmodern>
whitequark, yeah me either
<whitequark>
postmodern: formal verification eh... one of the things I would try to do with my compiler is static code inspection
<postmodern>
whitequark, tried to ignore it for the most part
<whitequark>
but it's not a general purpose implementation and will mostly require code to be written specifically for it to have any benefit.
<postmodern>
whitequark, well formal verification and automated proof solving would help iron out the semantics
<postmodern>
whitequark, as opposed to the reference implementation
<whitequark>
in fact, I don't think that formal verification and automated proof solving is ever possible for ruby
<whitequark>
with its late-binding semantics
<whitequark>
it's quite hard to write an ad-hoc analyzer already, much less than a formally verifying one
tjadc has quit [Ping timeout: 256 seconds]
lele has quit [Ping timeout: 246 seconds]
<whitequark>
ironing out the semantics is best done by implementing it and writing code in it
<whitequark>
especially that the biggest problem isn't that the spec (or absence thereof) is ambiguous somehow
tjadc has joined #ruby-lang
<postmodern>
whitequark, that's how we got into this mess in the first place :)
<postmodern>
whitequark, also implementation != design
<whitequark>
for a machine at least
<whitequark>
the problem with refinements is that it is not clear how humans are supposed to use them
<whitequark>
and I don't see how any kind of formal verification would solve that
<postmodern>
whitequark, also there's undefined behavior in some edge-cases of using refinements
<whitequark>
don't forget that there are quite a few places where formal methods are proven to be useless, but the problem can well be solved in reality
rekky has joined #ruby-lang
<whitequark>
eg we can do NP tasks in P time if we don't need the result precise enough
<postmodern>
pretty sure something like refinements can be modeled
<whitequark>
might be the case. I still don't see how a machine-readable model would help.
lele has joined #ruby-lang
<postmodern>
whitequark, would catch the undefined behaviors pretty fast
<whitequark>
having a consistent design is another thing, and you don't necessarily need a committee for that
tjadc_ has joined #ruby-lang
<whitequark>
postmodern: given that the framework you use for modeling is proven to be correct as well
<postmodern>
whitequark, yeah, and i think the ruby community is partially to blame for refinements
<postmodern>
whitequark, ruby-core was merely responding to the outage and fear about monkey patching
<whitequark>
postmodern: I suppose it's more a communication issue
<whitequark>
yes
tjadc has quit [Ping timeout: 260 seconds]
<whitequark>
the issue on redmine is opened for more than two years
<whitequark>
the topic was brought up on rubyconf
<postmodern>
whitequark, definitely a communication issue, people screaming into the void that is twitter, when in ruby-core mailing list and the redmine tracker are better places
<whitequark>
still no one was really interested in that. I'm guilty too; I liked the idea initially but forgot about it a few days after.
rekky has quit [Ping timeout: 246 seconds]
BlaXpirit has joined #ruby-lang
<whitequark>
so ruby-core folks communicated among themselves and delivered a feature
<whitequark>
I'm pretty sure there wasn't enough feedback in the process
<whitequark>
given how it looks like now
<whitequark>
on the other hand, it's quite hard to follow ruby-core due to sheer volume of mail and japanese language.
r0bglees0n has quit [Ping timeout: 260 seconds]
workmad3 has joined #ruby-lang
<whitequark>
postmodern: I think that this would be much less of a problem if instead of just releasing it within 2.0 there was some beta testing stage or something alike
<whitequark>
"see, we have this shiny new feature, you can install it with rvm --branch=refinements and tell us what you think"
<postmodern>
yeah, like an alternate branch of MRI
<postmodern>
sort of like how mruby will probably influence MRI
faustman has joined #ruby-lang
<whitequark>
postmodern: do you understand how mruby is supposed to work in reality? because I don't
<whitequark>
I think I understand what problem it's supposed to solve
babinho has joined #ruby-lang
<postmodern>
whitequark, yeah, it's basically a smaller VM, with a fraction of 1.8.7 implemented
<postmodern>
whitequark, also they have a compiler in it
<whitequark>
postmodern: yeah I know all of that
<whitequark>
I've seen the code so I know the technical part. I don't know who is the target audience for that
mytrile has quit [Remote host closed the connection]
<postmodern>
whitequark, embedded developers
<whitequark>
postmodern: sorry but that's bullshit
<postmodern>
whitequark, basically anything where Lua is being used
<whitequark>
oh, Lua. yes, it makes sense this way
<whitequark>
I see how mruby could be simpler to embed in another applications
<postmodern>
whitequark, yeah embedded like mobile, SoC, scripting engines, etc
<whitequark>
postmodern: there's way more in embedded developing than just having a small VM
<postmodern>
whitequark, not like microcontrollers or real-time systems
<whitequark>
by "embedded developing" I currently see the 8/32-bit chips with under 1M of RAM
<whitequark>
SoC pretty much includes that. if the part about your system being specifically a SoC matters, then it does
<whitequark>
mobile... my current smartphone is more powerful than my desktop 7 years ago
<postmodern>
whitequark, although the specs for SoC boards are getting better all the time (raspberry pi)
<whitequark>
postmodern: don't confuse "very high-end ARM chips used in mobile industry" with the overall embedding scope
<postmodern>
whitequark, if it can run Linux it can probably run mruby
solars has joined #ruby-lang
<whitequark>
market for chips (and software for these chips) with 8K of RAM exceeds the market for smartphone-grade SoCs by orders of magnitude
<postmodern>
whitequark, i have a skewed perspective since i normally read linuxdevices.org
<whitequark>
even if it's not that known to an average developer
<whitequark>
rpi is just a toy
<erikh>
well, embedded language != embedded development
<erikh>
lua's used pretty heavily in the games industry for example
<whitequark>
erikh: yeah, I can very well see how mruby replaces lua
<whitequark>
in fact I've seen something about mruby being used as a scripting engine in a database
<postmodern>
whitequark, rpi is just a milestone, that SoC's capable of running Linux, Xorg, etc, are cheap enough to buy for students
jstemmer has quit [Ping timeout: 260 seconds]
<erikh>
my experiences embedding it into nginx were pretty favorable
<whitequark>
having it in nginx would be quite nice
<whitequark>
oh, so you did it
<erikh>
sec
jstemmer has joined #ruby-lang
<whitequark>
postmodern: rpi doesn't matter at all, it's a marketing stunt by broadcom
<whitequark>
don't need that. you just don't route the balls and it's all
<postmodern>
whitequark, like the media processing chips that decode mpeg etc
sush24_ has quit [Ping timeout: 264 seconds]
<whitequark>
firmwares for those chips aren't stored on them anyway
<manveru>
i just hope the mruby capi won't be a total fail...
<whitequark>
postmodern: no point in spending silicon space on flash memory when you have a big nifty NAND or SD card aside
<manveru>
i got a couple of plans for using it with go already
<postmodern>
i also want to embed it into a project of mine
<whitequark>
postmodern: the most complex thing you'll find is an initial bootloader which checks the signature of next-stage bootloader, which, through a chain of trust, is supposed to prevent you from using the hardware you shouldn't use.
<whitequark>
and a corresponding one-time fuse for an RSA key
<postmodern>
whitequark, well you understand hardware better than me
<postmodern>
whitequark, but i was told various media devices have many of the same audio/video processing chips, just configured for different levels of quality
swav has joined #ruby-lang
<whitequark>
postmodern: ah, that. it may work the same as Pentium/Celeron distinction
<whitequark>
see, manufacturing silicon is hard. if you have an error in, for example, processor core, you gotta throw the whole thing out
<whitequark>
but if it's just in cache, then you can get a laser and slice half of the cache away
<whitequark>
and then still sell the chip
<whitequark>
there's a corresponding one-time fuse for disabling nonfunctional parts of it
<postmodern>
yep, hardware vulnerabilities are the new hotness :)
<whitequark>
it's not exactly vulnerability
<whitequark>
just a little bit of dust going into an important place while fabricating the chip
<whitequark>
this kind of errors.
<postmodern>
if it allows you to bypass some restriction, it sure is
<manveru>
until people start buying the faulty ones because they're so cheap and you actually have to mangle good chips :P
<whitequark>
manveru: it's usually the other way around. you make 100% of good chips and then handicap 80% of them to sell remaining 20% at twice the price
<whitequark>
or, for example, you can place the same dies in differently sized packages, effectively making some functional units useless
<whitequark>
but in the latter case it actually drives the price down overall
<whitequark>
so it's not evil
<whitequark>
postmodern: the chips are all thoroughly tested, so there couldn't be a manufacturing error allowing you to pass a restriction gone unnoticed
<manveru>
so you make good chips because you only need one production line that way?
<whitequark>
a design error yes, plenty of them
<whitequark>
manveru: exactly. it's orders of magnitude cheaper.
<manveru>
ok... i was under the impression that was introduced because intel was sitting on piles of good pentiums but everybody wanted celerons
<whitequark>
manveru: no, in the case of celerons it's genuine production faults. intel would love to make more of the good pentiums
<postmodern>
whitequark, errors to slip by from time to time
<whitequark>
but they're insanely complex
<postmodern>
friend used to work on the Virtualization Security Team at Intel
<postmodern>
auditing/testing next years chips
r0bglees0n has quit [Ping timeout: 252 seconds]
sush24_ has joined #ruby-lang
<whitequark>
postmodern: you can't `cap deploy' a chip, so the requirements on test coverage are really strong
<whitequark>
I'd have a hard time believing that some accidental manufacturing error could slip by intel's testcases
<whitequark>
much less for it to be reproducible and exploitable in real world
<drbrain>
whitequark: there was the F00F design flaw, but that was many years ago
<whitequark>
drbrain: it's a design flaw
<postmodern>
whitequark, the security team caught lots of information disclosure bugs in how the cache was shared between VMs
<whitequark>
postmodern: yeah I know about that. that's a design flaw either.
<postmodern>
whitequark, but that's during the review process
<whitequark>
they're not errors arising from irregularities in processing silicon.
<drbrain>
yeah
<postmodern>
whitequark, also there's been instances of malware/flaws being purposely introduced during manufacturing
<whitequark>
postmodern: indeed, and there are some really hard to catch ones concerning reliability
<whitequark>
and I think that modifying existing masks to add some backdoor functionality would be nontrivial, but very well doable even for a chip of an x86 complexity
swav has quit [Read error: Connection reset by peer]
<erikh>
manveru: fwiw, when I last worked with it, the mruby capi was pretty lovely
<erikh>
not quite lua "wow, that was easy" but pretty close
tonni has joined #ruby-lang
zmack has joined #ruby-lang
<whitequark>
erikh: I find ruby's capi, or rather, majority of it to be pretty convenient
<erikh>
oh it's not bad
<erikh>
that said, I came from perl's XSUB
<erikh>
very, very low bar
<postmodern>
i just wish it had less MACROS
<whitequark>
except the parts where you need to bypass the GIL, or (gasp) where MRI does some weird stack magic
<postmodern>
seems like MRI's C API is MACROS all the way down
<erikh>
postmodern: have you ever seen xsub?
<erikh>
let me find you an example.
* erikh
grins
* postmodern
sitting down for this one
<postmodern>
erikh, will i need a strong drink for this?
<whitequark>
postmodern: you'll never forget. never.
<whitequark>
dammit, a neighbour with a perforator. I'm going somewhere without constant 80db background noise.
<manveru>
looks like someone already hooked it up in go, mattn aka yasuhiro matsumoto :)
<erikh>
this guy obvious knows to avoid it like the plague whenever he can
<erikh>
postmodern: xsub is an additional layer atop CPP
<postmodern>
erikh, that's reassuring
<postmodern>
erikh, because CPP needs more layers
<erikh>
xsub unwinds its little dsl, then sends it to the compiler
<erikh>
anyhow, give that a good read. again, that's pretty tame by perl C extension standards
<erikh>
the inline project makes this go away (you can just write C for the most part and it handles the rest), but it comes with some unfortunate caveats
<erikh>
to put it another way: the inline project is exactly what you want (but for perl), but is basically useless for any situation where you'd want to compile things beforehand
burgestrand has quit [Ping timeout: 244 seconds]
vlad_starkov has joined #ruby-lang
swav has joined #ruby-lang
zmack has quit [Remote host closed the connection]
<gnufied>
that is php guys conspiracy to make us look like idiots
<manveru>
if php guys were capable of conspiracy they'd have fixed their language by now :P
rohit has joined #ruby-lang
vlad_starkov has joined #ruby-lang
<erikh>
I don't think the php guys have to do anything to fulfill that
<erikh>
they're just making notes
blacktulip has joined #ruby-lang
apeiros_ has joined #ruby-lang
<Paradox>
manveru, if the php guys were capable of conspiracy they wouldn't be using PHP
krz has quit [Read error: Connection reset by peer]
robotmay has joined #ruby-lang
apeiros_ has quit [Remote host closed the connection]
ttilley has quit [Ping timeout: 245 seconds]
jnoon has joined #ruby-lang
jnoon has quit [Ping timeout: 252 seconds]
<yorickpeterse>
judofyr: interesting read
<yorickpeterse>
tbh I really want them to move to GH instead of fucking SVN
<yorickpeterse>
There's a mirror but it's not the same
<yorickpeterse>
I also really need to subscribe to the Ruby mailing list I suppose
heftig has joined #ruby-lang
<rohit>
The ruby core mailing list can be quite overwhelming at times ...
<rohit>
:(
<rohit>
It's attached to the bug tracker which is great, but every update/comment on the bugtracker is part of the mailing list
rippa has quit [Ping timeout: 252 seconds]
<yorickpeterse>
hmm
tridge has joined #ruby-lang
<yorickpeterse>
There's no equilivant of the Python software foundation is there?
<yorickpeterse>
I feel something like that would at least make it easier to know where to go with everything related to Ruby (feedback, sponsoring, etc)
wallerdev has quit [Read error: Connection reset by peer]
wallerdev_ has joined #ruby-lang
jnoon has joined #ruby-lang
<postmodern>
yorickpeterse, there's Ruby Central?
<yorickpeterse>
oh?
<yorickpeterse>
Hm, seems Ruby Central doesn't do quite the same things as the Python foundation though
rekky has joined #ruby-lang
cultureulterior_ has joined #ruby-lang
jnoon has quit [Ping timeout: 265 seconds]
cultureulterior_ has quit [Client Quit]
jnoon has joined #ruby-lang
rekky has quit [Ping timeout: 264 seconds]
<yorickpeterse>
rohit: can you reply to those bug tracker Emails and have them displayed in Redmine at the same time?
<yorickpeterse>
Or do you need to register for that?
<rohit>
yorickpeterse, Honestly I don't know
agarcia has joined #ruby-lang
<yorickpeterse>
heh
tridge has quit [Remote host closed the connection]
workmad3 has joined #ruby-lang
jgomez has joined #ruby-lang
<judofyr>
yorickpeterse: yeah, mailing list replies shows up in redmine
<judofyr>
yorickpeterse: and redmine replies end up on the mailing list
jnoon has quit [Ping timeout: 252 seconds]
imperator has quit [Read error: Connection reset by peer]
<yorickpeterse>
neat
jnoon has joined #ruby-lang
<judofyr>
yorickpeterse: it's working pretty well IMO
<yorickpeterse>
I just hope I don't get spammed to death
Axsuul has quit [Ping timeout: 250 seconds]
vlad_starkov has quit [Remote host closed the connection]
beiter has quit [Ping timeout: 264 seconds]
beiter has joined #ruby-lang
<judofyr>
yorickpeterse: I have it in a separate label in Gmail. and it skips the inbox.
GarethAdams has joined #ruby-lang
<yorickpeterse>
So do I, but I wouldn't be surprised if I come home and there's like 200 Emails in the folder
EvilJStoker has quit [Excess Flood]
EvilJStoker has joined #ruby-lang
burgestrand has quit [Read error: Connection reset by peer]
burgestrand1 has joined #ruby-lang
tridge has joined #ruby-lang
<whitequark>
judofyr: thanks, very good letter
<judofyr>
whitequark: thanks! replies are appreciated :)
<whitequark>
I'd appreciate if you post replies to it from ruby-core folks here, as most of us do not follow ruby-core
<whitequark>
I don't have anything more to say :)
<judofyr>
:)
<judofyr>
I'll keep you updated
<whitequark>
btw, I have this idea I'm going to implement on the weekend, and it's relevant
<judofyr>
okay?
<yorickpeterse>
I'd say a good step would be a lot more communication from and to the Ruby team, though it seems that's starting to get better now
<whitequark>
I want to download all gems, parse all sources within them to sexps and allow one to search amongst that codebase with a regular language
<whitequark>
like regexps, but for s-expressions
<whitequark>
I already have most of the plumbing ready, just need to refactor it a bit and connect together
<whitequark>
judofyr: nice, will probably use that
<yorickpeterse>
judofyr: found it
mars777 has quit [Quit: mars777]
wallerdev_ has quit [Quit: wallerdev_]
<whitequark>
judofyr, postmodern, yorickpeterse (and everyone else): how valuable do you think such a tool would be?
<postmodern>
whitequark, that sounds like an awesome mass static analysis tool
<postmodern>
whitequark, for finding obvious mistakes, and sending out emails
<postmodern>
whitequark, like finding obvious command injection in system()
<postmodern>
whitequark, idk
<whitequark>
postmodern: I think I can maybe convince my employer to donate a runner box
<judofyr>
whitequark: I like the idea
<postmodern>
whitequark, but i would like, if i could query all C extensions
sush24_ has quit [Quit: This computer has gone to sleep]
<whitequark>
the matching algorithm is n^2 to e^n depending on how exactly do you write the query...
<postmodern>
whitequark, since majority of the C extensions are broken and only bind to 4-10 functions, something that could trivially be rewritten in FFI
<postmodern>
whitequark, just checking gemspec.extensions or the ext/ dir would suffice
<whitequark>
postmodern: not exactly my current scope, but I'd maybe extend it
<postmodern>
whitequark, could extend it for query all gemspecs
<whitequark>
postmodern: you could trivially do that with gauntlet right now
<postmodern>
whitequark, good idea
mentus has joined #ruby-lang
<yorickpeterse>
whitequark: I'd buy you a crate of beer for that
<yorickpeterse>
For testing my linter alone that would be super useful
zz_chrismcg is now known as chrismcg
rohit has quit [Quit: Leaving]
mentus_ has joined #ruby-lang
<erikh>
querying gemspecs should be pretty trivial once you have a mirror
<yorickpeterse>
Rubygems need a proper mirroring system regardless
<whitequark>
erikh: I think all you need is to download one file and unmarshal it
<yorickpeterse>
Geminabox can't handle more than 200 gems or so sadly
<erikh>
whitequark: yeah, if you have the gem file we're talking ~10 LoC
<yorickpeterse>
erikh: does this allow external people to install gems from that mirror? Can you search data on it? Does it handle lots of gems?
<yorickpeterse>
(this is not meant to be snarky, I'm genuinely interested)
<erikh>
no, it just downloads all the gems
<erikh>
it's not an emulation of rubygems.org
<erikh>
which.. yeah. good luck with that.
<erikh>
it just gets more and more retarded every day
<postmodern>
erikh, how large is a rubygems mirror?
<erikh>
the second that's a reality, opscode and damned near every chef user is gonna have a massive party
<erikh>
postmodern: it's been a while, but last time I did it was about 80G or so
<postmodern>
erikh, awesome
brunocoelho has joined #ruby-lang
<erikh>
it pulls almost everything from s3, so it has very little perf impact on rubygems.org
<erikh>
and it's a proper mirroring tool, so future invocations only download the new stuff
<erikh>
if you like it, be sure to thank raggi next time you run into him.
<yorickpeterse>
erikh: yeah, I'd be interested in an actual mirror like cpan mirrors
<erikh>
yorickpeterse: the problem with that is that CPAN mirrors are sane
<erikh>
and rubygems.org isn't
<erikh>
you can literally mirror CPAN with rsync and it just works
cultureulterior_ has joined #ruby-lang
brunocoelho has quit [Remote host closed the connection]
<erikh>
anyhow, I'm probably not going to get any nicer about this topic. it's been a huge pain point and a lot of people have run into the brick wall and fallen over many times to just walk away and say "fuck it"
<erikh>
so I'mma shut up now
<zenspider>
I was just going to make a snarky comment about patches being something something
krohrbaugh has quit [Read error: Connection reset by peer]
krohrbaugh has joined #ruby-lang
<zenspider>
so I'm adding Sexp#stable_hash so that I can start persisting flay results and I've come up with a mapping that works, but the results are different across different versions of ruby...
<zenspider>
either I keep that limitation... or I implement a hash function as well...
<zenspider>
and frankly... its been a long time since I was in college. I don't know if I care that much
<whitequark>
zenspider: just serialize the ruby version as well
<zenspider>
I'm not sure how that improves things
kirin` has quit [Ping timeout: 256 seconds]
<whitequark>
at least you won't load serialized data which will fail to work without any notice
tridge has quit [Remote host closed the connection]
kirin` has joined #ruby-lang
kirin` has quit [Ping timeout: 252 seconds]
apeiros_ has joined #ruby-lang
kirin` has joined #ruby-lang
stonerfish has quit [Ping timeout: 276 seconds]
rekky has joined #ruby-lang
madish has joined #ruby-lang
kirin` has quit [Ping timeout: 256 seconds]
rekky has quit [Ping timeout: 260 seconds]
kirin` has joined #ruby-lang
<yorickpeterse>
erikh: very true
kirin` has quit [Ping timeout: 250 seconds]
kirin` has joined #ruby-lang
beiter has quit [Ping timeout: 244 seconds]
kirin` has quit [Ping timeout: 264 seconds]
kirin` has joined #ruby-lang
dr_bob has quit [Quit: Leaving.]
kirin` has quit [Ping timeout: 255 seconds]
kirin` has joined #ruby-lang
sush24_ has joined #ruby-lang
BlaXpirit has quit [Read error: Operation timed out]
workmad3_ has joined #ruby-lang
lele|w has quit [Ping timeout: 246 seconds]
kirin` has quit [Ping timeout: 256 seconds]
sfeu has joined #ruby-lang
kirin` has joined #ruby-lang
workmad3 has quit [Ping timeout: 256 seconds]
postmodern has quit [Quit: Leaving]
kirin` has quit [Ping timeout: 264 seconds]
meizaps has quit [Ping timeout: 248 seconds]
rohit has quit [Quit: Leaving]
kirin` has joined #ruby-lang
sheerun_ has quit [Remote host closed the connection]
banisterfiend has joined #ruby-lang
lele|w has joined #ruby-lang
beiter has joined #ruby-lang
kirin` has quit [Ping timeout: 260 seconds]
meizaps has joined #ruby-lang
kirin` has joined #ruby-lang
swav_ has joined #ruby-lang
workmad3_ is now known as workmad3
robbyoconnor has quit [Quit: Konversation terminated!]
kirin` has quit [Ping timeout: 246 seconds]
leopard_me has joined #ruby-lang
swav has quit [Ping timeout: 260 seconds]
kirin` has joined #ruby-lang
banisterfiend has quit [Read error: Connection reset by peer]
kirin` has quit [Ping timeout: 255 seconds]
kirin` has joined #ruby-lang
rsl has joined #ruby-lang
Evanescene has joined #ruby-lang
kirin` has quit [Ping timeout: 264 seconds]
kirin` has joined #ruby-lang
<yorickpeterse>
So judofyr's thread on the ML made me come up with this idea: a search engine of some sort that lets you search for Ruby internals such as how it handles variable parsing, examples, etc. Any opinions on such a tool?
<yorickpeterse>
I can imagine it being quite useful when writing parsers and such
<yorickpeterse>
As you can just search for "Variable assignments" instead of having to dig through the source code
kirin` has quit [Ping timeout: 246 seconds]
xyzodiac has joined #ruby-lang
carloslopes has joined #ruby-lang
kirin` has joined #ruby-lang
kirin` has quit [Ping timeout: 252 seconds]
kirin` has joined #ruby-lang
xyzodiac has quit [Quit: Computer has gone to sleep.]
kirin` has quit [Ping timeout: 256 seconds]
kirin` has joined #ruby-lang
rue|w has quit [Ping timeout: 264 seconds]
kirin` has quit [Ping timeout: 260 seconds]
sailias has joined #ruby-lang
kirin` has joined #ruby-lang
vlad_starkov has quit [Remote host closed the connection]
schaerli has joined #ruby-lang
lcdhoffman has joined #ruby-lang
kirin` has quit [Ping timeout: 252 seconds]
kirin` has joined #ruby-lang
kirin` has quit [Ping timeout: 260 seconds]
x0F has quit [Disconnected by services]
x0F_ has joined #ruby-lang
x0F_ is now known as x0F
kirin` has joined #ruby-lang
kurko_ has joined #ruby-lang
mentus_ has quit [Quit: Page closed]
rekky has joined #ruby-lang
kirin` has quit [Ping timeout: 260 seconds]
kirin` has joined #ruby-lang
<solars>
if your boss (java fanboy) would argue against ruby because it has 'system dependencies' - i.e. for db drivers you need the header/dev files - how would you counter/explain this? :)
rekky has quit [Ping timeout: 260 seconds]
<yorickpeterse>
"Your argument is stupid"
<yorickpeterse>
Try to go down the road of "Ruby is easier to write, less verbose, etc"
<yorickpeterse>
and it doesn't come with HerpDerpInflectorInflectionInflector classes
jnoon has quit [Ping timeout: 256 seconds]
<solars>
already did that, it's his last argument against it :P I know that it's stupid :)
<heftig>
solars: jruby
<Smol>
or maybe just "jruby" ;)
<yorickpeterse>
solars: "Installing development headers is easier and faster than tweaking the JVM"
<solars>
then he says he might as well use plain java :P
malev has joined #ruby-lang
<solars>
haha good point
malev has quit [Read error: Connection reset by peer]
<solars>
he's just trying to find anything against it, without a valid reason ..
<solars>
quite annoying
<erikh>
I'd say most of my time working on supporting rails development for my engineers revolves around managing dependencies.
<erikh>
I'm not sure java solves that problem any better though
<judofyr>
erikh: hm… what about Bundler? has it become easier after that?
<erikh>
it's not the gems, it's what they depend on
<erikh>
right now I've got an open ticket to upgrade imagemagick by a single patchlevel because RMagick depends on it as a minimum version
<solars>
judofyr, it's a system dependency, for example if you use a mysql driver, you need to install development headers on the server (through it's package manager or so)
<whitequark>
yorickpeterse: rxr.whitequark.org ?
mentus has joined #ruby-lang
<solars>
I also wonder how java solves that better, if so
<erikh>
maven solves a bit of it
<whitequark>
yorickpeterse: I don't quite get what sort of tool do you want. It's not like variable assignment changes often, if ever.
<solars>
but maven is like bundler i nthat case, no?
<erikh>
but things that need to break use things like JNI really have the same issue
<erikh>
unless you do your full development cycle on the exact same OS and architecture
mentus has quit [Client Quit]
<erikh>
solars: well, with maven there is a real possibility of "here's a jar, deploy it"
<erikh>
nothing rubygems offers right now can do that
<erikh>
a great deal of the time in a rails deploy involves running bundler on every freakin' server
<solars>
but how does it solve the above dependency o mysql-dev for example? or anything like that
<erikh>
well it's already built everything it needs by the time the jars or wars have been written
<erikh>
if they're on the same kind of stack as the servers they're being deployed to, you just ship a file
<erikh>
that's like the entire deployment process. no bundler, no asset compile. none of that.
<erikh>
most java app servers don't even expect you to do anything to them, they just see a new war file and do the rest for you.
<solars>
hm yeah thats what he said..
<solars>
but I guess thats not possible if ruby isn't compiled
<erikh>
not sure what you mean
sfeu has quit [Remote host closed the connection]
<solars>
I'm not sure either, how java works exactly :)
<erikh>
it's not java per se
<solars>
but well, ruby is still nicer to write so it's pointless :)
<erikh>
rack be used to do most of what servlet containers do in that regard
<erikh>
it's really about the deployment process.
<solars>
why can't the ruby files then include everything as well that is needed from the -dev packages?
<solars>
just out of interest
<erikh>
oh there's support in rubygems for that
<erikh>
but you'd have to target every arch
<solars>
ah, didn't know this
<erikh>
and you're still not solving the bundler issue.
mentus has joined #ruby-lang
<solars>
yeah, but thats on a different level I think
<solars>
in java you don't have to target every arch?
<erikh>
hm? you're conflating the responsibility of the library developer with the responsibility of the app developer that uses the library
thisirs has joined #ruby-lang
<solars>
so in this case the lib developer just decided to use these development headers?
<solars>
and there would be a way around it?
<erikh>
you're still conflating it
<solars>
then I don't get it
<erikh>
whether or not the lib developer makes the choice to use C extensions or not, it's up to the app developer to make sure they get deployed in a sane way
<erikh>
maven can literally turn a whole java project into a single zip file
<erikh>
bundler cannot. rubygems cannot.
<solars>
of course, but I'm not at all talking about the deployment process
<erikh>
the app developer is boned.
<erikh>
but your boss is
<erikh>
and he's right.
<solars>
but he is also right if you omit the deployment process
<solars>
with ruby I need to install mysql-dev, with java I don't
<solars>
thats his point
<solars>
regardless of deployments
<erikh>
that's because there's a pure java library probably
<erikh>
nothing stopping someone from writing a pure ruby mysql client.
<erikh>
there's one for postgres: postgres-pr
<solars>
yeah so it's just the case as I wrote above that it was the decision of the dev to use the system dependency, and not a problem of ruby
xyzodiac has joined #ruby-lang
<solars>
alright, now I understood :)
<solars>
I also agree with what you're saying for the deployments
<erikh>
no, as soon as you hit a C extension you need, it's a much easier problem to solve in maven
<solars>
we need another tool to solve these
<solars>
dependencies
mentus has left #ruby-lang [#ruby-lang]
<solars>
yep, understood it
<solars>
what are you using to solve this limitation?
<erikh>
whiskey
<solars>
do you have a link?
<solars>
I would accept jackdaniels.com as an answer as well
rue|w has joined #ruby-lang
sailias has quit [Quit: Leaving.]
shachaf has joined #ruby-lang
sepp2k has joined #ruby-lang
tjadc has joined #ruby-lang
tjadc_ has quit [Ping timeout: 252 seconds]
Guest63674 has quit [Read error: Operation timed out]
<erikh>
heh
sj26 has quit [Read error: Operation timed out]
anekos has quit [Ping timeout: 276 seconds]
shachaf has quit [Ping timeout: 246 seconds]
thorncp has quit [Ping timeout: 246 seconds]
mistym has joined #ruby-lang
mistym has quit [Changing host]
mistym has joined #ruby-lang
anekos has joined #ruby-lang
shachaf has joined #ruby-lang
thorncp has joined #ruby-lang
sj26 has joined #ruby-lang
<shachaf>
I'm trying to think of a good way to write this: go = lambda {|lls| lambda {|obj| if lls.empty? b[obj] else one(obj, lls[0], &go[lls[1..-1]]) end } }; go[@lls][@obj]
nertzy2 has joined #ruby-lang
<shachaf>
It's like reduce except more CPSy. Is there a nice way of doing it?
xyzodiac has quit [Remote host closed the connection]
nertzy has quit [Read error: Operation timed out]
spike|spiegel has quit [Quit: WeeChat 0.3.9.2]
<rue|w>
I have no idea what that does
CrazyHorse18 has quit [Quit: Leaving.]
mistym has quit [Remote host closed the connection]
seanstickle has joined #ruby-lang
wyhaines has joined #ruby-lang
dumfries has quit [Read error: Operation timed out]
<shachaf>
So #ruby-lang has evolved to the stage of communicating entirely through animated GIFs?
<shachaf>
Makes sense, I guess.
<andrewvos>
shachaf: No that's just me
<erikh>
shachaf: sure looks like you're trying to write haskell
<andrewvos>
Anyway, have to run
<shachaf>
erikh: I am!
<erikh>
it's completely unreadable
* erikh
runs
<shachaf>
I'm trying to figure out what a Haskell concept would look like in Ruby.
<shachaf>
I agree -- it's a simple concept but Ruby makes it complicated.
<shachaf>
If only I had applicative functors!
<andrewvos>
Oi! Not Rubys fault
r0bglees0n has joined #ruby-lang
concernedcitizen has joined #ruby-lang
chrismcg is now known as zz_chrismcg
mistym has joined #ruby-lang
mistym has quit [Changing host]
mistym has joined #ruby-lang
concernedcitizen has quit [Changing host]
concernedcitizen has joined #ruby-lang
concernedcitizen has joined #ruby-lang
<concernedcitizen>
Hi guys, I have a problem. I am interating through and array and I want to add a new object into array such that when the array iterates through to the next object, it would be the one that I've just added. Basically I want to add an object to the next index. Is it possible?
<rsl>
would each_with_index work and pop it into the index, or would you still be operating on the original array?
<andrewvos>
There's a keywod for this I think
<rsl>
i avoid modifying in place in loops usualy so i don't know.
<andrewvos>
It's a useful feature
<andrewvos>
Add additional items to the aray for example
<andrewvos>
Well, I remember at least one use case.
mistym has quit [Remote host closed the connection]
tankdilla has joined #ruby-lang
outoftime has joined #ruby-lang
flori has quit [Quit: leaving]
vlad_starkov has joined #ruby-lang
BlaXpirit has quit [Read error: Operation timed out]
facest has joined #ruby-lang
flori has joined #ruby-lang
rue|w has quit [Remote host closed the connection]
faces has quit [Ping timeout: 260 seconds]
davidbalber|away is now known as davidbalbert
adambeynon has joined #ruby-lang
diahane has joined #ruby-lang
mars777 has joined #ruby-lang
rekky has joined #ruby-lang
Evanescene has left #ruby-lang [#ruby-lang]
diahane has left #ruby-lang [#ruby-lang]
BigO has joined #ruby-lang
rekky has quit [Ping timeout: 255 seconds]
kalleth has quit [Quit: No Ping reply in 180 seconds.]
kalleth has joined #ruby-lang
mistym has joined #ruby-lang
tomzx has quit [Quit: tomzx]
rue|w has joined #ruby-lang
gnufied has quit [Quit: Leaving.]
gsav_ has joined #ruby-lang
gsav has joined #ruby-lang
r0bglees0n has quit [Quit: WeeChat 0.3.7]
srbaker has joined #ruby-lang
BlaXpirit has joined #ruby-lang
<yorickpeterse>
whitequark: more sort of a reference to the internals without having to dig through code
slyphon has joined #ruby-lang
enebo has joined #ruby-lang
<whitequark>
yorickpeterse: README.EXT goes through a fair amount of them
<yorickpeterse>
It's vague as fuck for the general public
<yorickpeterse>
Thing is I'm not really sure how I'd envision such a tool myself
<yorickpeterse>
It's just that I find that it's currently a bit hard to find solid documentation on the internals. The code itself is covered mostly but beyond that you'll quickly have to start diving into README.ext or parse.y
sheerun has joined #ruby-lang
stardiviner has joined #ruby-lang
stardiviner has quit [Client Quit]
banisterfiend has joined #ruby-lang
concernedcitizen has quit [Ping timeout: 245 seconds]
lcdhoffman has quit [Quit: lcdhoffman]
<judofyr>
oh god. parse.y
<yorickpeterse>
exactly
gsav__ has joined #ruby-lang
stardiviner has joined #ruby-lang
<yorickpeterse>
"Oh, I wonder how Ruby parses X. I'll take a look at parse.y!" - No one, ever
davidbalbert is now known as davidbalber|away
rippa has joined #ruby-lang
gsav has quit [Quit: Lost terminal]
gsav_ has quit [Quit: Lost terminal]
schaerli has joined #ruby-lang
BlaXpirit has quit [Read error: Operation timed out]
BlaXpirit has joined #ruby-lang
apeiros_ has quit [Remote host closed the connection]
burgestrand1 is now known as burgestrand
cultureulterior_ has joined #ruby-lang
ryanlecompte has joined #ruby-lang
<andrewvos>
hahahahahaha
<andrewvos>
ahahhahaha
<andrewvos>
Laughing because I looked at parse.y for mruby recently, and even that was scary.
sent-hil has joined #ruby-lang
andrewhl has joined #ruby-lang
<yorickpeterse>
I imagine matz doing crack cocaine every time he looks at it, otherwise he'd probably kill himself too
<andrewvos>
Speed
tonni has quit [Remote host closed the connection]
vlad_starkov has quit [Remote host closed the connection]
justinseiter has quit [Ping timeout: 255 seconds]
Aiur has quit [Quit: Computer has gone to sleep.]
blazes816 has joined #ruby-lang
<andrewvos>
Wow, install Flux.app and it's kind of trippy how it changes the screen
Aiur has joined #ruby-lang
justinseiter has joined #ruby-lang
<imperator>
is that the one that adjusts it based on time of day?
justinseiter has quit [Max SendQ exceeded]
<erikh>
yep
<erikh>
one of those things that I always forget to set up, then remember to, and promptly forget how much I like it later
brianpWins has joined #ruby-lang
justinseiter has joined #ruby-lang
jgomez has quit [Quit: Leaving]
stardiviner has joined #ruby-lang
agarcia has quit [Quit: Konversation terminated!]
carloslopes has quit [Remote host closed the connection]
justinseiter has quit [Read error: Operation timed out]
thisirs has quit [Remote host closed the connection]
justinseiter has joined #ruby-lang
anannie has quit [Remote host closed the connection]
justinseiter has quit [Max SendQ exceeded]
swav_ has quit [Remote host closed the connection]
justinseiter has joined #ruby-lang
justinseiter has quit [Remote host closed the connection]
anannie has joined #ruby-lang
yats has joined #ruby-lang
schaerli has joined #ruby-lang
imajes has quit [Excess Flood]
Mon_Ouie has joined #ruby-lang
JohnBat26 has joined #ruby-lang
<imperator>
frickity frack
JohnBat26 has joined #ruby-lang
imajes has joined #ruby-lang
imajes has quit [Excess Flood]
imajes has joined #ruby-lang
<erikh>
don't talk back
rue_XIV has left #ruby-lang [#ruby-lang]
carloslopes has joined #ruby-lang
rue has joined #ruby-lang
<rue>
flux is the best thing ever
rippa has quit [Ping timeout: 252 seconds]
<rue>
Two days in you won’t even notice it, except if you take it off and go blind
rue|w has joined #ruby-lang
carloslopes has quit [Remote host closed the connection]
<cschneid>
if I have an array of hashes, and I want to go through and merge them all - is there an easy way? [{:a => :b}, {:c => :d}].something #=> {:a => :b, :c => :d}
<cschneid>
(I can certainly do it via an inject, just want to do it shorter... :)
stardiviner has quit [Ping timeout: 246 seconds]
rippa has joined #ruby-lang
<rue>
I don’t know if you can get shorter than array.inject {|res, hash| res.merge hash }
tenderlove has quit [Read error: Connection reset by peer]
headius has quit [Quit: headius]
tenderlove has joined #ruby-lang
sailias has quit [Quit: Leaving.]
workmad3 has quit [Ping timeout: 255 seconds]
catepillar has joined #ruby-lang
wyhaines has joined #ruby-lang
bedouin has joined #ruby-lang
qpingu has joined #ruby-lang
qpingu has quit [Client Quit]
R_Macy has joined #ruby-lang
dankest|away is now known as dankest
wyhaines has quit [Remote host closed the connection]
tonni has joined #ruby-lang
qpingu has joined #ruby-lang
justgable has quit [Remote host closed the connection]
tenderlove has quit [Remote host closed the connection]
slyphon_ has quit [Ping timeout: 245 seconds]
<ttilley>
banisterfiend: imperator: refinements are still not clearly defined in any way and more likely to cause problems than solve them
qpingu has quit [Client Quit]
<drbrain>
ttilley: please send such examples to the ruby-core mailing list
<drbrain>
if you wish to change matz's mind you need to let him know
tenderlove has joined #ruby-lang
<erikh>
the blue oyster cargo cult
<erikh>
don't fear the refinements
<zzak>
needs moar COWbell
<erikh>
agreed
<erikh>
perhaps someone should amend the ticket
<erikh>
zzak: that pun was so awesome I nearly missed it. bravo.
<zzak>
:)
<ttilley>
drbrain: i finally created an account on bugs.ruby-lang.org for that purpose. any response i provide at the moment would end up being emotinally charged, though, and that's not exactly productive. besides, the back and forth between headius and matz will make things at least more clear before i throw in my 0.02
<drbrain>
ttilley: if you can respond with ruby, that is best
<drbrain>
I think matz likes to read ruby more than read text