Page 1 of 2 | Next »
[20:39:31] cahoots: hi, i was curious, is there any ruby compiler that produces a fully-linked executable?
[20:42:27] cahoots: havenwood: interesting! i'm curious, why isn't this more popular? is JIT really faster than AOT + PGO?
[20:52:32] cahoots: havenwood: i see. but i'm still curious about AOT vs. JIT, because truffleruby again seems to have a VM. could a good AOT compiler for ruby be faster than truffleruby?
[21:00:26] cahoots: havenwood: i see, yeah it looks like truffleruby can compile to standalone binary like packer. it's interesting that it says peak performance can be lower with native vs. jvm, but the fastest languages in the computer language benchmarks game are all compiled to native
[21:01:20] cahoots: i'm concerned with performance in terms of reducing server cost and working on large datasets
[21:07:47] cahoots: havenwood: i could see that, it looks like it crushes other ruby compilers/interpreters at the very least. i do wonder though why java isn't on par with C/C++/Rust, e.g. https://benchmarksgame-team.pages.debian.net/benchmarksgame/faster/java-gpp.html
[21:08:56] cahoots: havenwood: so you're saying that perhaps the JITs used in the game are just not the latest and greatest
[21:09:24] cahoots: as in, that the performance decrease can possibly be explained by them not being the latest and greatest
[21:16:37] cahoots: but i am curious why java isn't more commonly compiled to native, if it would improve performance in a benchmark like this
[21:20:55] cahoots: i see, i'm just curious why compilation to native seems like an afterthought for so many languages, like ruby and java. e.g. why did it take so long for a popular compiler like truffleruby to come into existence
[21:21:20] cahoots: like, once you build the compiler, you get the benefits of native without having to rewrite stuff in C/C++, right? seems zero-cost for application devs
[21:27:17] cahoots: i'm more thinking about creating a compiler for ruby for those that are concerned with performance
[21:33:34] cahoots: i think the creation of truffleruby, crystal, etc. suggests that this is still an open problem
[23:22:02] cahoots: hi, i want to get a base 2 number (as a string of 1's and 0's) approximating a decimal number (e.g. 0.1), with as many bits as i want. what's the easiest way to do this?
[00:16:48] cahoots: hi, i'm working on a ruby project deployed to a few machines, and on one of them, even though i set the GEM_HOME and GEM_PATH env vars, it still doesn't use them as the gem home and path
[00:57:00] cahoots: qyliss, rasterick, the issue appears to be solved by running "ENV['GEM_PATH'] = ..." at global scope instead of within a function o.O
[00:59:03] cahoots: nm it's that i call "if ENV[...] ; ..." before. so i guess i have to run a getter on ENV before a setter? o.O
[19:09:21] cahoots: hi, i want to use mechanize to log in at https://www.fabric.io/login, but mechanize seems unable to find the form. any ideas how to solve this?
[19:16:00] cahoots: perhaps some js is adding it dynamically and mechanize only picks up on the initial html download?
[21:55:35] cahoots: hi, when i use the Hash#to_json and JSON#pretty_generate methods, it gives me fat arrows instead of colons in the hashes. what might be the issue?
[21:56:47] cahoots: ohhh lol it's because i was using hashes as keys in the hash... which json doesn't support
[00:07:21] cahoots: again, you would have false positives for metaprogramming. but metaprogramming is very rare for many projects, or in limited scopes within projects
[00:08:55] cahoots: you're saying that because it's a monkeypatch, it wouldn't work? that's incorrect. objc, e.g. handles monkeypatching, i.e. categories
[00:15:45] cahoots: different from trying to call a method on a variable that doesn't exist. perhaps i mistyped earlier
[23:41:28] cahoots: hi, is there any static code checker that finds things like the use of uninitialized variables? there are certainly cases where it would find false positives, e.g. where you really on method_missing, but it would be good to have a checker that assumes you're not doing that and shows you issues
[23:50:43] cahoots: RickHull, running a program can take a while, and may not go through every code path on every run. static tests aren't bad, but this provides another layer off checking
[23:52:03] cahoots: that's fair elomatreb, it may have to be more limited in scope, e.g. local variables would still be valid to check
[23:55:17] cahoots: elomatreb, dependencies can still be checked statically, it just requires the sort of complex indexing that good ides do
[19:12:58] cahoots: hi, i see that gems like https://rubygems.org/gems/method_source/versions/0.8.2 don't have any license. does that mean that you can't even download them, because they're protected by copyright law?
[20:11:21] cahoots: let's say i have a gem with a dependency with a version like "~> 1.1", and i want to restrict it to using a specific version, say, 1.1.1. how can i do this?
[20:12:44] cahoots: roboncloud, so would i add that i want the dependency explicitly and give it a specific version in the same file as i specify the gem with that dependency?
[20:36:23] cahoots: matthewd, just keeping versions constant because our legal team requires all open-source stuff to be approved by them. so if i leave the version open-ended, technically they could release a new version with a different license
[20:36:55] cahoots: the way i'm specifying the dependency version is by just listing out that dependency as a separate gem, and it seems to work. is there a better way?
[20:38:54] cahoots: even when i list out my dependencies in the Gemfile, the Gemfile.lock still shows "~>". but in practice it seems to download the gem i want
[20:40:24] cahoots: matthewd, it lists the exact version of the gem, but not the exact version of its dependencies necessarily
[23:28:41] cahoots: i'm running into a case frequently where i have a method does same lifting, let's call it "params()", and then i want to store that to a local variable to reuse efficiently. but i can't name it "params" because that would be weird... so would you call it "get_params()"? "fetch_params()"?
[23:48:48] cahoots: yorickpeterse, i guess one thing i'm wondering is, is it considered bad form to name a local var the same as a method? does the interpreter get confused sometimes?
[02:25:21] cahoots: hi, i'm having a strange issue. if a gem, mygem, isn't installed, and i run `gem install mygem` and then 'gem "mygem", "=1.0"' immediately after, it tells me that it can't find the gem. but then on subsequent runs, where the gem has been installed, that call to the gem function works. how can i fix this?
[02:32:14] cahoots: meh, looks like this fixed more elegantly anyways by using Gem::Commands::InstallCommand
[02:38:56] cahoots: Radar, this is a script that will run on a remote CI machine. so i want to only install gems within the directory of the script, and then i want to delete all untracked files on a fresh run
[02:44:27] cahoots: also, if i went the bundle route, i would need to remember to run "bundle exec ruby" instead of "ruby" every time, correct?
[02:50:35] cahoots: nofxxxx, how does that work, because i put "#!/usr/bin/env ruby" at the top which would make it just run /usr/bin/ruby, right? how does bundle get involved?
[20:18:13] cahoots: hi, if i run a command with `<command>` and then on the next line call $?.exitstatus, is it guaranteed to return the exit status of that command? or could it be overridden by some command running in parallel?
[23:18:00] cahoots: hi, why does "^#define\\s+\\w+\\s*\\w*$".gsub("+", "\\+") return "^#define\\s\\w\\s*\\w*$" ?
[23:29:29] cahoots: like if i want a data center of macs, i don't want a bunch of monitors along with
[04:11:36] cahoots: hi, is there a library that will sample the code every so often and just show me what it's doing? like, every second it prints out what the script is doing at that moment
[04:13:41] cahoots: baweaver, it would just be more convenient to attach something. it can also be a decently large file where many bottlenecks may arise
[16:58:07] cahoots: hi, i'm working with a compile command that includes a file path i want to extract, and that file path may have escaped spaces. if it didn't have spaces, i could just do ([^\s]+) to get it, but since it does how can i easily get it out?
[17:22:35] cahoots: al2o3-cr, so i have a string like "gcc -o file path/to/with\ spaces/file.c -more -flags"
[15:04:37] cahoots: dminuoso, i don't think any third-party libs care which directory is current. even if i didn't change dir from within the script, it's inherited from the shell
[15:06:00] cahoots: the great thing about ruby is you can do it lots of ways, so i'll stick with mine