<marchelzo>
pilne: do you plan on changing careers eventually or is programming just a hobby?
xall has joined #ruby
<pilne>
hoping for a change, maybe full-time internal where i'm at, maybe something more programming-oriented to begin with. I've got my eyes and ears open.
montanonic has joined #ruby
xall has quit [Ping timeout: 250 seconds]
meshsmith has quit [Remote host closed the connection]
<marchelzo>
cool
<marchelzo>
i might make a lisp in ruby too now. you inspired me
agent_white has joined #ruby
kies has joined #ruby
BTRE has joined #ruby
<zenspider>
marchelzo: pretty easy to do
<pilne>
i feel like i "create" code in ruby vs. "writing" it in other languages i've tried to really get comfy with.
<agent_white>
Like silly putty!
nettoweb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cschneid_ has quit [Remote host closed the connection]
<pilne>
lol, apt analogy
<zenspider>
pilne: not sure I understand your distinction...
<pilne>
when i say "write" it is more like by rote, "as directed" more translation going from "here's what i want to do" into "here's how to get it done" (with other languages).
<pilne>
"create" is more of a direct brain <--> code translation
<zenspider>
gotcha. I think of ruby a lot like that... it's the cleanest language to transliterate ideas from my brain to a text editor
<pilne>
write has several calls to "map" code = brain.map.map.map
<pilne>
exactly
<pilne>
very low cognitive friction
<zenspider>
the inverse is probably also true... my brain is tuned to think in ways compatible with ruby more than others
<zenspider>
rust ... I ____struggled____ to go from idea to code
<zenspider>
racket... I do _ok_, but it isn't a good fit yet
<zenspider>
brb
<marchelzo>
i wrote my own toy language and i actually find it very natural to write
<marchelzo>
i think it's mainly to do with familiarity
<marchelzo>
pilne: how long have you been doing ruby now
Devalo has joined #ruby
<pilne>
on and off the whole 2 years i've dabbled again, but i've flirted with java (again), c++(11/14), python, racket, clojure, kotlin, scala, go, javascript (and a few transpilers), and haskell.
<pilne>
oh and dart a couple of times
<pilne>
but ruby and clojure draw me in the most, but i just tend to find myself prefering functional constructs in an OO language, than OO constructs in a functional language
<marchelzo>
how long did it take to get to a point where you felt like you were "creating" in ruby
<zenspider>
marchelzo: I disagree... I'm very familiar with a lot of languages... some fit your brain better than others
webopsx has joined #ruby
<pilne>
cumulatively? i'd probably chalk it up at about 6-8 months, and really, exploring a scheme/lisp a decent amount, and smalltalk is what really "did" it.
<marchelzo>
zenspider: yeah i guess since i designed the language it fits my brain really well too
<marchelzo>
zenspider: that's a good point
<zenspider>
pilne: I've found oo in functional to be pretty painful. I keep trying tho
webopsx has quit [Max SendQ exceeded]
<zenspider>
pilne: you use clojurescript at all? viable? I can't stand the cost of jvm so I don't want to deal with clojure proper
Devalo has quit [Ping timeout: 246 seconds]
<zenspider>
but I *love* racket
ur5us has quit [Remote host closed the connection]
ur5us has joined #ruby
<pilne>
i can't stand js/node stuff generally, and i'm more comfy with the jvm, lol. but from what i dipped my toes into, clojurescript basically *is* clojure for most intents and purposes, and where it diverges is pretty clearly doc'd.
<pilne>
there are some very good "up and running" blog snippets
<zenspider>
someone did racketscript recently... not sure how usable it is yet
<pilne>
there was/is whalesong for racket
<marchelzo>
pilne: how complete are you planning on making your lisp
ur5us has quit [Ping timeout: 252 seconds]
<pilne>
at first? not very, and i'll probably aim for R5RS scheme honestly
[Butch] has quit [Quit: I'm out . . .]
millerti has joined #ruby
<marchelzo>
that's ambitious
<pilne>
a CL implementation is way more than I could do an any reasonable attention-span of mine at this point.
<pilne>
slowly but surely, it can be done, the standard is publicly available
<zenspider>
pilne: whalesong is pretty defunct
<pilne>
i *know* i'll have to do do some frontend at some point, if even for my pet projects, i'm decently excited for opal, but honestly, even dart is nice for my aspirations.
<pilne>
and the vm itself isn't that shabby, but the language isn't enough like silly putty for me on a "personal"/feel level.
<pilne>
and if i'm honestly doing this mostly for fun at this point, i better damn well enjoy it!
PresidentBiscuit has joined #ruby
<marchelzo>
given a Regex that is not anchored, can i anchor it somehow?
<epitron>
be warned: doing that has performance costs
<epitron>
also, awkward code costs
<epitron>
(why are you doing that? :)
<pilne>
c++98 in high school, and 2 years of java in college, used 1.2 though, please keep that in context of "java" lol.
koldbrutality has joined #ruby
Devalo has joined #ruby
Guest61440 is now known as opt9
<marchelzo>
epitron: well i'm writing a parser, and i was going to have a list of [Regexp, Method] pairs. i would iterate over them, and whichever pattern matches the begininning of the stream, i'll call its method on myself.
bronson has joined #ruby
jackjackdripper has joined #ruby
Channel6 has joined #ruby
<epitron>
just use Procs
<epitron>
closures, baby!!
<epitron>
yeahhh!
bronson has quit [Ping timeout: 264 seconds]
troys is now known as troys_
SteenJobs_ has joined #ruby
skweek has quit [Ping timeout: 250 seconds]
symm- has quit [Ping timeout: 250 seconds]
jackjackdripper has quit [Quit: Leaving.]
ropeney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
PresidentBiscuit has quit [Remote host closed the connection]
<pilne>
ruby really never ceases to amaze me at what can be expressed without looking like something out of a dystopian 1984-inspired nightmare.
<marchelzo>
what's the difference between proc and lambda
charliesome has joined #ruby
charliesome has quit [Client Quit]
skweek has joined #ruby
xall has joined #ruby
SteenJobs_ has quit [Quit: SteenJobs_]
jenrzzz has quit [Ping timeout: 265 seconds]
xall has quit [Ping timeout: 250 seconds]
nettoweb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Devalo has quit [Ping timeout: 246 seconds]
gbgdev has quit [Remote host closed the connection]
SteenJobs_ has joined #ruby
jenrzzz has joined #ruby
charliesome has joined #ruby
<havenwood>
marchelzo: If you call a lambda inside a method and `return` from the lambda it will return to the calling method and continue where it left off. If you call a proc inside a method and `return` from the proc it will return from the calling method as well.
<havenwood>
marchelzo: A lambda enforces arity and a proc may or may not.
<marchelzo>
yeah i found a pretty good article explaining the differences
ropeney has joined #ruby
<havenwood>
marchelzo: Also a proc acts as a block sponge, like if you pass a method a block a `proc` will magically be the yielded block.
ur5us has quit [Remote host closed the connection]
<havenwood>
marchelzo: Yeah, lambdas have a nice local return that corresponds to where it was called. Insert some mutterings about Tennent's Correspondence Principle here.
uranellus has quit [Quit: ZNC 1.6.1 - http://znc.in]
ur5us has quit [Remote host closed the connection]
<pragmatism>
What's the best framework to prototype and iOS and Android app in simuntaneously?
<pragmatism>
I'm asking here first because I prefer Ruby.
Devalo has quit [Ping timeout: 246 seconds]
<pragmatism>
I see RubyMotion
<pragmatism>
I also speak JS, so frameworks there are welcome too I guess,
<pragmatism>
so Ionic?
koldbrutality has quit [Remote host closed the connection]
nowz has joined #ruby
gbgdev has quit [Ping timeout: 250 seconds]
<pragmatism>
Ohhhhh man, ignore me. The conversation I'm in the middle of is honestly more interesting. I'll google.
<pragmatism>
@zenspider would you throw your code in a gist? To me, it looks like you're missing s semicolon in your abbreviated example. so I wanna be sure.
<pragmatism>
^ sry, slack habit
uranellus has joined #ruby
uranellus has quit [Changing host]
uranellus has joined #ruby
tau has quit [Remote host closed the connection]
futabachannel has joined #ruby
hotpancakes has quit [Remote host closed the connection]
d0nn1e has quit [Ping timeout: 264 seconds]
hotpancakes has joined #ruby
d0nn1e has joined #ruby
hotpancakes has quit [Ping timeout: 246 seconds]
slackbotgz has quit [Remote host closed the connection]
nankyokusei has joined #ruby
JoshS has quit [Ping timeout: 268 seconds]
astrobunny has joined #ruby
xall has joined #ruby
pawnbox has quit [Remote host closed the connection]
rakm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nankyokusei has quit [Ping timeout: 260 seconds]
Dimik has quit [Ping timeout: 240 seconds]
cyphase has quit [Ping timeout: 250 seconds]
troys_ is now known as troys
BlaDe^ has quit [Remote host closed the connection]
neophyterubyist has joined #ruby
<neophyterubyist>
hello
<havenwood>
neophyterubyist: hi
<neophyterubyist>
I have an array of strings
cyphase has joined #ruby
<havenwood>
I match your array of strings and raise you an array of integers.
<neophyterubyist>
I am trying to join any string shorter than a length e.g. 500 chars with the next string in the array unless the concatenated length exceeds the length
<neophyterubyist>
any suggestions on how to do this ?
<pragmatism>
what?
<pragmatism>
Concatenage the strings, check the length, and with an if clause exclude those that don't match
<b0nn>
hrm, needs to check the length of the strings pre concatenation
<neophyterubyist>
I have to iterate on each string and backtrack if they exceeds
<pragmatism>
you could also use a enum#select block to only be truthy on length upon concatenation is greater than 500
<neophyterubyist>
yes but I have to preserve the order
<pragmatism>
What?
<neophyterubyist>
this is due to stupid amazon api limitations
<neophyterubyist>
I am trying to use their polly service to convert an article
montanonic has quit [Ping timeout: 264 seconds]
<pragmatism>
Order is reinforced.
<baweaver>
neophyterubyist: what exactly are you trying to do?
<neophyterubyist>
but there is a 1500 char limit
<baweaver>
user data string for an ec2 launch?
<neophyterubyist>
so I am splitting everything into sentences into pragmatic segmenter
<pragmatism>
Homework?
<neophyterubyist>
amazon polly
<neophyterubyist>
nope
<neophyterubyist>
quick script to automate some stuff
<pragmatism>
kk
<baweaver>
Which API are you using?
<neophyterubyist>
amazon polly
<neophyterubyist>
v3
<neophyterubyist>
api v3
<neophyterubyist>
right now I am trying to join sentences together unless they exceed the 1500 char limit
<baweaver>
Hadn't seen that one before
<pragmatism>
So again, what prevents you from checking the length before computation?
<pragmatism>
just use an if statement
<neophyterubyist>
pragmatism: can you elaborate?
<neophyterubyist>
I am rather new to ruby
<pragmatism>
Sure, sorry
tubuliferous has quit [Ping timeout: 250 seconds]
codfection has joined #ruby
pawnbox has joined #ruby
<pragmatism>
[22:37:05] <b0nn>hrm, needs to check the length of the strings pre concatenation
<pragmatism>
[22:37:15] <neophyterubyist>I have to iterate on each string and backtrack if they exceeds
<havenwood>
neophyterubyist: In shorthand: array.each_with_object([]) { |s, a| a.last&.size&.<(1500) ? a.last << s : a << s }
<pragmatism>
Fuck, sorry, can't edit that.
<pragmatism>
Meant: <neophyterubyist>I am trying to join any string shorter than a length e.g. 500 chars with the next string in the array unless the concatenated length exceeds the length
<baweaver>
havenwood had what I was about to do.
fzxi has joined #ruby
<neophyterubyist>
what are the ampersands for?
<pragmatism>
havenwood +=1
<baweaver>
I forget about the lonely operator
<baweaver>
nil coercion
<pragmatism>
Although your var names tooootallly suck
<pragmatism>
havenwood do you allow use of that level of shorthand in your codebases?
<pragmatism>
More like, "has anyone seen that level of shorthand in the wild"
hotpancakes has joined #ruby
agent_white has quit [Quit: agent_white]
<neophyterubyist>
how do you make it take into account the current string i.e. abort and go to the next string if the previous string when concatenated with the current string exceeds the length limit
<neophyterubyist>
?
<havenwood>
pragmatism: There's all sorts of obtuse, overly clever code in the wild. I might spike something like that but just like pseudocode I'd replace it with real code. It's important to name things well. As they say, "red, green, refactor."
bronson has joined #ruby
<pragmatism>
havenwood Your process matches mine :) I refuse to approve that stuff in code review, though.
<pragmatism>
I try to expect everything to fail, so everything must be as easy to understand as possible.
<pragmatism>
*I anticipate all will fail
pabs has quit [Ping timeout: 240 seconds]
pabs has joined #ruby
bronson has quit [Ping timeout: 248 seconds]
Apomelasma has joined #ruby
milardovich has joined #ruby
ttilley has quit [Read error: Connection reset by peer]
mim1k|wo1k has joined #ruby
amclain has quit [Quit: Leaving]
tildes has joined #ruby
mim1k|work has quit [Ping timeout: 265 seconds]
pawnbox has quit [Remote host closed the connection]
hotpanca_ has quit [Remote host closed the connection]
nankyokusei has quit [Ping timeout: 265 seconds]
Mortomes|Work has joined #ruby
enterprisey has quit [Ping timeout: 258 seconds]
lacour has quit [Quit: Leaving]
Devalo has joined #ruby
eggshke has joined #ruby
Devalo has quit [Remote host closed the connection]
aganov has joined #ruby
Devalo has joined #ruby
cyphase has quit [Ping timeout: 245 seconds]
milardovich has joined #ruby
<kke>
if you have something like virtus or activemodel, would you rather use class Foo; include Virtus.model; end or class Foo < Virtus.model any insight why?
teclator has quit [Remote host closed the connection]
pwnd_nsfw` has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
pwnd_nsfw has quit [Ping timeout: 260 seconds]
symm- has joined #ruby
codfection has quit [Remote host closed the connection]
cippacio1 has joined #ruby
dionysus70 has joined #ruby
BrianJ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nofxxx has joined #ruby
cyphase has quit [Ping timeout: 260 seconds]
dionysus69 has quit [Ping timeout: 246 seconds]
dionysus70 is now known as dionysus69
Bish has quit [Ping timeout: 268 seconds]
colegatron has joined #ruby
cippaciong has quit [Ping timeout: 250 seconds]
eggshke has quit [Remote host closed the connection]
eggshke has joined #ruby
nofxx has quit [Ping timeout: 258 seconds]
cyphase has joined #ruby
the_drow has joined #ruby
jud has quit [Quit: Leaving]
enilsen16 has quit [Quit: enilsen16]
marr has joined #ruby
ta has joined #ruby
Bish has joined #ruby
andrzeju_ has joined #ruby
andikr has joined #ruby
pawnbox has joined #ruby
lenwood has joined #ruby
biberu has joined #ruby
teclator has joined #ruby
crowd42 has quit [*.net *.split]
olblak has quit [*.net *.split]
freeze has quit [*.net *.split]
djbkd has quit [Remote host closed the connection]
nettoweb has joined #ruby
djbkd has joined #ruby
djbkd_ has joined #ruby
emilkarl has joined #ruby
nofxxx has quit [Ping timeout: 240 seconds]
byte512 has joined #ruby
djbkd has quit [Ping timeout: 250 seconds]
Alina-malina has quit [Ping timeout: 268 seconds]
nettoweb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hotpancakes has joined #ruby
koooge has quit [Quit: Leaving...]
Chair has joined #ruby
mikecmpbll has joined #ruby
postmodern_ has quit [Quit: Leaving]
chihhsin has joined #ruby
SpiffTR has joined #ruby
flying has joined #ruby
White-Fa1con has joined #ruby
milardovich has joined #ruby
nettoweb has joined #ruby
bronson has joined #ruby
djbkd has joined #ruby
White-Fa1con has quit [Client Quit]
djbkd__ has joined #ruby
milardovich has quit [Ping timeout: 256 seconds]
bronson has quit [Ping timeout: 250 seconds]
djbkd_ has quit [Ping timeout: 248 seconds]
lenwood has quit [Ping timeout: 268 seconds]
djbkd has quit [Ping timeout: 252 seconds]
astrobunny has quit [Remote host closed the connection]
freeze has joined #ruby
olblak has joined #ruby
crowd42 has joined #ruby
hotpanca_ has joined #ruby
eightbitraptor has joined #ruby
tmtwd has quit [Ping timeout: 260 seconds]
tvw has quit [Remote host closed the connection]
hotpancakes has quit [Ping timeout: 250 seconds]
hotpancakes has joined #ruby
tercenya has joined #ruby
tercenya_ has quit [Read error: Connection reset by peer]
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
hotpanca_ has quit [Ping timeout: 258 seconds]
djbkd has joined #ruby
SpiffTR has quit [Quit: Leaving.]
nankyokusei has joined #ruby
nettoweb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
kies has quit [Ping timeout: 250 seconds]
ferr1 has quit [Quit: WeeChat 1.6]
nankyokusei has quit [Ping timeout: 256 seconds]
nettoweb has joined #ruby
jsrn_ has joined #ruby
n008f4g_ has joined #ruby
anisha has quit [Read error: Connection reset by peer]
wugy has joined #ruby
wugy has quit [Remote host closed the connection]
tjbiddle has joined #ruby
kies has joined #ruby
meshsmith has joined #ruby
anisha has joined #ruby
djbkd has quit []
jaguarma_ has quit [Remote host closed the connection]
cfec0b8d has quit [Ping timeout: 248 seconds]
maattdd has joined #ruby
mim1k|wo1k is now known as mim1k|work
rodfersou has joined #ruby
milardovich has joined #ruby
jenrzzz has quit [Ping timeout: 252 seconds]
rodfersou is now known as rodfersou|coffee
fumck is now known as fumk
jgt has joined #ruby
koooge has joined #ruby
Devalo has quit [Remote host closed the connection]
Burgestrand has joined #ruby
blackbom1 has joined #ruby
Devalo has joined #ruby
andrzeju_ has quit [Remote host closed the connection]
blackbom1 has quit [Ping timeout: 245 seconds]
Devalo has quit [Ping timeout: 246 seconds]
dionysus69 has quit [Ping timeout: 268 seconds]
Beams has joined #ruby
blackbom1 has joined #ruby
xall has quit [Ping timeout: 260 seconds]
Devalo has joined #ruby
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
Ishido has joined #ruby
kies has quit [Ping timeout: 252 seconds]
mark_66 has joined #ruby
Devalo has quit [Remote host closed the connection]
Devalo has joined #ruby
jenrzzz has quit [Ping timeout: 250 seconds]
kareelee has joined #ruby
kies has joined #ruby
Devalo has quit [Ping timeout: 246 seconds]
rodfersou|coffee is now known as rodfersou
Flonk has joined #ruby
iMadper has quit [Ping timeout: 265 seconds]
iMadper has joined #ruby
ayonkhan has joined #ruby
<Psy-Q>
everyone seems to suggest MiniTest for everything these days, but in quite some test utilities i see only support for Rspec, Cucumber and Test::Unit still
kareelee_ has joined #ruby
<Psy-Q>
should i rewrite my tests in rspec, does minitest not have traction?
<Rich_Morin>
I'm confused by the way REXML is acting. when I call (say) foo.elements['//spine/itemref'], it only hands back the first match. Wassup?
kareelee has quit [Ping timeout: 246 seconds]
RobertBlack has joined #ruby
kareelee_ has quit [Read error: Connection reset by peer]
kareelee has joined #ruby
lenwood has joined #ruby
iMadper` has joined #ruby
gregf_ has joined #ruby
dionysus69 has joined #ruby
iMadper has quit [Ping timeout: 250 seconds]
pagios has quit [Ping timeout: 248 seconds]
Robtop__ has joined #ruby
byte512 has quit [Ping timeout: 250 seconds]
pwnd_nsfw` has quit [Ping timeout: 258 seconds]
pagios has joined #ruby
ldnunes has joined #ruby
skweek has quit [Ping timeout: 240 seconds]
al2o3-cr has joined #ruby
hotpancakes has quit [Remote host closed the connection]
tjbiddle has quit [Ping timeout: 258 seconds]
eggshke has quit []
lenwood has quit [Ping timeout: 250 seconds]
beilabs_ has joined #ruby
emilkarl has quit [Quit: emilkarl]
tjbiddle has joined #ruby
beilabs has quit [Ping timeout: 265 seconds]
rykou has joined #ruby
milardovich has quit []
marchelzo has quit [Ping timeout: 250 seconds]
milardovich has joined #ruby
koooge_ has joined #ruby
nankyokusei has joined #ruby
milardovich has quit [Client Quit]
frozengeek has joined #ruby
koooge has quit [Ping timeout: 245 seconds]
koooge_ has quit [Client Quit]
Ishido has quit [Remote host closed the connection]
beilabs has joined #ruby
nankyokusei has quit [Ping timeout: 265 seconds]
pwnd_nsfw has joined #ruby
Robtop__ has quit [Ping timeout: 250 seconds]
beilabs_ has quit [Ping timeout: 265 seconds]
Macaveli_ has joined #ruby
Macaveli has quit [Read error: Connection reset by peer]
jaguarmagenta has quit [Ping timeout: 258 seconds]
<manveru>
Rich_Morin: any reason you don't use nokogiri or oga?
ocbtec has quit [Quit: leaving]
hotpancakes has quit [Ping timeout: 265 seconds]
<IsoLinCHiP>
Is there a common way to instruct bundler to install a specific locally built gem file? I had to modify an ancient gem to work for me and dont want bundler to install the rubygems version but my locally generated one.
stamina has joined #ruby
yaewa has quit [Quit: Leaving...]
opt9 has joined #ruby
moei has joined #ruby
opt9 is now known as Guest12040
Alina-malina has joined #ruby
lenwood has quit [Quit: Konversation terminated!]
lenwood has joined #ruby
reverberations has joined #ruby
cfec0b8d has joined #ruby
milardovich has quit [Remote host closed the connection]
yardenbar has quit [Ping timeout: 260 seconds]
milardovich has joined #ruby
Anonymoose2 has quit [Ping timeout: 240 seconds]
nadir has quit [Quit: Connection closed for inactivity]
Derderderd has joined #ruby
n008f4g_ has quit [Ping timeout: 264 seconds]
moei has quit [Quit: Leaving...]
djbkd__ has quit [Ping timeout: 252 seconds]
milardovich has quit []
Madplatypus has quit [Quit: Connection closed for inactivity]
Derderderd has quit [Ping timeout: 260 seconds]
SesMan has joined #ruby
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
emilkarl has joined #ruby
<Rich_Morin>
manveru: dunno - mostly, it's in the std. library and I was trying to keep my footprint small
<manveru>
ok
maattdd has joined #ruby
<manveru>
i just remember its API being a constant headache :)
<manveru>
and now the rexml docs are broken too
<Rich_Morin>
in any case, I think I"m getting the hang of it (and yes, the docs need love)
<Rich_Morin>
I recall using nokogiri back in the day. Any reason to prefer oga?
stamina has quit [Ping timeout: 240 seconds]
<manveru>
oga doesn't need libxml and libxslt
<manveru>
still way faster than rexml though
Burgestrand has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<gajus>
`key_file_path = node['gitlab']['gitlab-rails']['registry_key_path']` just assigns a value to a variable
<gajus>
`file key_file_path do` opens a file?
<gajus>
a link to the relavent document would be enough
<gajus>
I don't understand the purpose of `content node['gitlab']['registry']['internal_key']` line
lenwood has quit [Ping timeout: 240 seconds]
houhoulis has quit [Remote host closed the connection]
houhoulis has joined #ruby
Ishido has quit [Remote host closed the connection]
<herwin>
gajus: it's some kind of domain-specific language. The definitions of file and all other methods called in that file are probably in the same repository
<gajus>
I see. So it is not part of Ruby core lib
<gajus>
Okay, I will try to find it in the code base
hightower2 has joined #ruby
jaguarmagenta has joined #ruby
bihi has quit [Quit: Bye!]
moei has joined #ruby
rodfersou is now known as rodfersou|lunch
houhoulis has quit [Remote host closed the connection]
xen0fon has quit [Quit: xen0fon]
bihi has joined #ruby
hotpancakes has joined #ruby
Ishido has joined #ruby
jaguarmagenta has quit [Ping timeout: 250 seconds]
n008f4g_ has quit [Ping timeout: 256 seconds]
SteenJobs_ has joined #ruby
symm- has joined #ruby
ryan_notabot has joined #ruby
doubleemms has quit [Remote host closed the connection]
ryan_notabot has quit [Read error: Connection reset by peer]
ryan_notabot has joined #ruby
nankyokusei has joined #ruby
jmignault has joined #ruby
hotpancakes has quit [Ping timeout: 248 seconds]
ddffg has quit [Ping timeout: 240 seconds]
SesMan has joined #ruby
nankyokusei has quit [Ping timeout: 252 seconds]
Derderderd has joined #ruby
futabach_ has joined #ruby
pawnbox has joined #ruby
jhack has joined #ruby
futabachannel has quit [Ping timeout: 256 seconds]
<marchelzo>
how can i learn ruby
<marchelzo>
fast
tubuliferous has quit [Ping timeout: 264 seconds]
<marchelzo>
i need to learn ruby in 15 minutes
jhack has quit [Client Quit]
jmignault has quit [Ping timeout: 250 seconds]
Derderderd has quit [Ping timeout: 265 seconds]
milardovich has quit []
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
charliesome has joined #ruby
jhack has joined #ruby
SteenJobs_ has quit [Quit: SteenJobs_]
xen0fon has joined #ruby
ramortegui has joined #ruby
stamina has quit [Quit: WeeChat 1.6]
<manveru>
lol
Mortomes|Work has quit [Ping timeout: 260 seconds]
<marchelzo>
manveru: it's not a joke
<manveru>
i guess you only have 7 minutes left then
<marchelzo>
yeah. can you help?
<marchelzo>
what's the fastest way?
<blackbom1>
marchelzo: seen men in black?
<manveru>
or matrix?
<marchelzo>
a long time ago i watched men in black but i don't remember much of it
<marchelzo>
and believe it or not i've never watched the matrix
<manveru>
what do you want to do?
<marchelzo>
learn ruby
<marchelzo>
fast
<manveru>
for what?
<marchelzo>
fun
marr has quit [Ping timeout: 258 seconds]
<surrounder>
wow
<blackbom1>
the only way you'll learn ruby in 15 minutes is with one of the machines from that movie (men in black)
<manveru>
i'm not sure i follow... you learned other languages in 15 minutes?
<marchelzo>
yeah
<marchelzo>
i know 12 language. i've been programming for almost 3 months
<marchelzo>
languages*
<herwin>
"know"
<blackbom1>
you learn them in 15 minute intervals?
<manveru>
even reading just the syntax description of ruby takes longer
<marchelzo>
i get the basics in 15 minutes, then i do some programming and master them in a week or so
<manveru>
blackbom1: maybe if rails hadn't come along
<marchelzo>
already at level 2. darn i am fast
jz has joined #ruby
<manveru>
nowadays people shoot magic in their veins like it was heroin
<blackbom1>
lol
<blackbom1>
good way of putting it
jz is now known as Guest60360
hightower2 has joined #ruby
<blackbom1>
and no one codes like the code you write can impact performance
Guest60360 has quit [Max SendQ exceeded]
<marchelzo>
if you care about performance don't write ruby
gnufied has joined #ruby
<marchelzo>
if magic is like heroin why does ruby make it so available
the_drow has quit [Quit: This computer has gone to sleep]
<marchelzo>
matz wants to breed a generation of opiate addicts?
<manveru>
because people think that code they don't see doesn't exist and can't hurt them
hightower3 has quit [Ping timeout: 248 seconds]
<marchelzo>
that's not such a bad thing to think
<manveru>
matz writes C all day :P
<marchelzo>
ideally you should be able to code like that
<manveru>
ideally you should just never write bugs
johnzorn- has joined #ruby
<marchelzo>
that's not possible
<manveru>
we used to laugh about java stacktraces that were 2 pages long
johnzorn has quit [Ping timeout: 258 seconds]
eightbit1aptor has joined #ruby
<manveru>
now i work with apps everyday that need to pass requests through at least 25 libs to get anything done...
<marchelzo>
is that so bad?
<manveru>
people are like "oh, i need that line of code, but it's already in a gem, must stay DRY, so let's just require that too"
<marchelzo>
like left-pad?
<manveru>
pretty much
n008f4g_ has joined #ruby
<marchelzo>
people need to spend some time writing c
<marchelzo>
build some character
<marchelzo>
i have developed a healthy case of NIH
eightbitraptor has quit [Ping timeout: 246 seconds]
sspreitz has joined #ruby
kareelee__ has quit []
jgt has joined #ruby
<sspreitz>
hi, i want to connect two file descriptors in ruby to stream input and output outomatically. It seems that IO.pipe is not actually for that purpose? Do you maybe have an idea how i can achieve this in ruby?
futabach_ has quit [Ping timeout: 252 seconds]
<marchelzo>
why not use IO.pipe
<marchelzo>
pipe() + dup2() + dup2()
<sspreitz>
marchelzo, to me it looks like IO.pipe is not plumbing two fd's together. I am looking for something that would do this automatically, like say pipe(fd1, fd2); pipe(fd2, fd1)
<marchelzo>
i'm assuming IO.pipe is a wrapper around the pipe system call
<marchelzo>
do you could create a pipe and then use dup2 to achieve what you want, i think
<marchelzo>
s/do/so/
<marchelzo>
assuming ruby exposes dup2
<dminuoso>
sspreitz: Can you name the usecase?
<sspreitz>
dminuoso, connecting 2 tcp sockets for example as a kind of proxy
<sspreitz>
manveru, looks kinda like yes. with this though a select() would be still needed
<manveru>
true that
<sspreitz>
marchelzo, plumbing them together vice versa so they chat with each other
<marchelzo>
ah, yeah i don't think there's a way to do that
<sspreitz>
maybe i really need to build a loop/thread arround io#select and there is no oneshot for this
<marchelzo>
like you can't get the kernel to do it for you
<marchelzo>
you'd have to manage their chat yourself like manveru suggested
<sspreitz>
okay, thanks a lot!
<sspreitz>
oh btw. there is splice()
<sspreitz>
maybe thats the copy-stream backbone
Devalo has quit [Remote host closed the connection]
Devalo has joined #ruby
<guardian>
hello
<guardian>
imagine I have module A and B, and each module defines the same foo() function
pwnd_nsfw` has joined #ruby
<guardian>
what happens when I include both A and B ?
<guardian>
which #foo() gets called?
<dminuoso>
guardian: Do you know about #ancestors ?
<dminuoso>
(I'd prefer to answer this question with a compact explanation of how modules work)
jsanti[m] has joined #ruby
yehowyada has joined #ruby
<dminuoso>
In a nutshell Ruby checks the class and then walks up the "ancestors chain", until it finds the method. Inheritance, Module#include, Module#extend and Module#prepend are the methods to insert modules/classes into the ancestory.
GodFather has quit [Ping timeout: 268 seconds]
<dminuoso>
So to answer your question, use inheritance/include/extend/prepend - and then use #ancestors to see where it inserts the target module/class
Devalo has quit [Remote host closed the connection]
<dminuoso>
The first one that defines the method is called (and if that one calls super, it resumes looking up)
Devalo has joined #ruby
hotpancakes has joined #ruby
Ishido has quit [Remote host closed the connection]
pwnd_nsfw has quit [Ping timeout: 265 seconds]
<marchelzo>
do people prefer ' or " for string literals in ruby
<dminuoso>
marchelzo: "" generally
<marchelzo>
usually i prefer ' but this tryruby.org seems to use "" mostly
<dminuoso>
We have had some discussions in here before and the concensus is that "" is preferred.
<marchelzo>
#{} only works in "", right?
<dminuoso>
marchelzo: And some other, but yeah.
<marchelzo>
in python they encourage '' over ""
<marchelzo>
strange how preferences vary from language to language
<dminuoso>
marchelzo: Interestingly interpolation can explicitly be disabled too.
<dminuoso>
guardian: ^- So if you call a method on a given string, it will look whether String has the method, if it cant find it, it will then check Comparable, and so on and so on.
<marchelzo>
is it also idiomatic to omit 'return' when returning a value at the end of a method?
eggshke has quit []
<guardian>
dminuoso: thanks
<dminuoso>
marchelzo: Yeah. Though I think it's fine if you consistently use return instead (Im a big fan of that)
hotpancakes has quit [Ping timeout: 246 seconds]
<marchelzo>
dminuoso: so am i
<dminuoso>
guardian: And I forgot, before the ancestors the objects singleton class is checked. ;-)
JohnChristie has quit [Remote host closed the connection]
Devalo has quit [Remote host closed the connection]
<marchelzo>
except for one-liners like maybe: def mean xs; xs.sum / xs.length; end
<dminuoso>
marchelzo: Technically it's a little slower though.
<marchelzo>
dminuoso: return is a little slower?
<dminuoso>
asm>> def foo(); return 1; end
<ruby[bot]>
dminuoso: I have disassembled your code, the result is at https://eval.in/702160
<dminuoso>
asm>> def foo(); 1; end
<ruby[bot]>
dminuoso: I have disassembled your code, the result is at https://eval.in/702161
Devalo has joined #ruby
<dminuoso>
Mmm, bad example.
<herwin>
if you're worried about that kind of performance differences, you problably shouldn't write code in ruby in the first place
<dminuoso>
marchelzo: No it's not.
<dminuoso>
marchelzo: Forget what I said.
<dminuoso>
herwin: It's still relevant for core library developers, so they don't impose arbitrary penalties onto users.
<marchelzo>
yeah i was going to say
<marchelzo>
that would be a trivial optimization to implement
<dminuoso>
this is why you see very little proc'ification of blocks in rubys stdlib or core libraries
jmignault has joined #ruby
<marchelzo>
why don't they just write all the core libs in C
<dminuoso>
marchelzo: Most of them are.
<marchelzo>
the more stuff in C the better right
maloik has quit [Remote host closed the connection]
maloik has joined #ruby
<dminuoso>
Actually, is there any core library written in Ruby itself?
<blackbom1>
all of core is C
<marchelzo>
in mruby Array#each, Array#each_index, etc. are all written in ruby
<marchelzo>
i couldn't figure out why
<marchelzo>
all Array methods that take blocks are in ruby
Devalo has quit [Ping timeout: 246 seconds]
<dminuoso>
marchelzo: Because it's too frequently used to be forced through Ruby VM.
BitWhisperer has joined #ruby
<dminuoso>
blackbom1: I'm willing to bet that your statement is fault. :p
rwb has joined #ruby
<dminuoso>
blackbom1: time!
<marchelzo>
dminuoso: i don't understand
<dminuoso>
That's a core library written in ruby.
denis_ has quit [Remote host closed the connection]
Derderderd has joined #ruby
SteenJobs_ has joined #ruby
<marchelzo>
used too frequently to be forced through the Ruby VM?
<dminuoso>
marchelzo: Because the same functionality comes from Enumerable, which would cost a method dispatch.
<dminuoso>
Or.. mmmm
brendan- has joined #ruby
<dminuoso>
Or maybe it's just optimized for array
<blackbom1>
dminuoso: time.rb may be but the time loaded by default implements stuff in C
denis_ has joined #ruby
teclator has quit [Remote host closed the connection]
denis_ has quit [Remote host closed the connection]
<marchelzo>
in CRuby it's written in C
denis_ has joined #ruby
n008f4g_ has quit [Ping timeout: 264 seconds]
<manveru>
well, mruby is supposed to be a smaller ruby
<marchelzo>
the CRuby source is surprisingly readable
Mortomes|Train has joined #ruby
Derderderd has quit [Ping timeout: 258 seconds]
__Yiota has joined #ruby
<marchelzo>
not sure why they use klass instead of class
pwnd_nsfw has joined #ruby
<marchelzo>
ok i completed tryruby.org
<manveru>
that's commonly used in ruby because class is a keyword... i assume that somehow reflected back into C
<marchelzo>
ah
<marchelzo>
sometimes people do it so their code will compile as C++
<marchelzo>
but i hate that
<manveru>
ah, that's possible too
<marchelzo>
tryruby.org didn't teach me about modules or classes
<manveru>
and it took longer than 15 minutes
eightbit1aptor has quit [Ping timeout: 258 seconds]
<marchelzo>
dang
cfec0b8d has quit [Ping timeout: 240 seconds]
<marchelzo>
ruby is the hardest lang i've seen yet
pwnd_nsfw` has quit [Ping timeout: 265 seconds]
<dminuoso>
marchelzo: Ruby will not compile with a C++ compiler.
<marchelzo>
that makes me happy
<marchelzo>
why not?
<dminuoso>
marchelzo: Because of the gazillion casts that would be illegal in C++.
hightower2 has quit [Ping timeout: 256 seconds]
<dminuoso>
That alone would suffice.
<marchelzo>
what casts?
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
hightower2 has joined #ruby
bronson has joined #ruby
BrianJ has joined #ruby
neze has joined #ruby
<neze>
Hello !
<marchelzo>
hi
<dminuoso>
marchelzo: you know.. type casts.
<marchelzo>
dminuoso: yeah but which ones
<dminuoso>
marchelzo: most implicit casts.
<dminuoso>
marchelzo: popular example: int *a = malloc(10);
<dminuoso>
not legal in C++
eightbitraptor has joined #ruby
<marchelzo>
ok so you mean /lack/ of casts
<neze>
I just started ruby and met a problem I can't manage to solve with google. Assume I got two iterators, iterA and iterB, homemade with "def iterA .. yield(blah) .. end" the first yields int, the other chars (for example), and i got a function f(int,char). I'd like to do something looking like "while true do f(iterA.next,iterB.next) end" but of course I know I can't do it like this.
<neze>
With arrays I can "zip", but more generally I don't know
jenrzzz has quit [Ping timeout: 252 seconds]
nankyokusei has joined #ruby
<neze>
thank you by advance :)
bronson has quit [Ping timeout: 245 seconds]
ferr1 has quit [Quit: WeeChat 1.6]
<dminuoso>
neze: How should this behave if one iterator stops before the other?
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<neze>
should stop
<neze>
(thanks, dminuoso)
<marchelzo>
why can't you use that while loop?
<marchelzo>
and just catch the exception
<neze>
machty: can I do "next" with this definition of iterA ?
nankyokusei has quit [Ping timeout: 256 seconds]
<neze>
I mean, they behave as iterators but they are functions that yield. If I understood well they are not really "Iterators"
<marchelzo>
i've been hanging out in ##c for too long
Madper has joined #ruby
<marchelzo>
i've been conditioned to hate Zed Shaw
<elomatreb>
He wrote a Python article recently that didn't exactly fill me with confidence either
ropeney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Derderderd has joined #ruby
<marchelzo>
what's the k&r of ruby
Madper has quit [Client Quit]
iMadper has joined #ruby
iMadper has quit [Changing host]
iMadper has joined #ruby
blunckr has quit [Quit: leaving]
<marchelzo>
c-c: have you read Zed's ruby book? i want to learn about modules and classes so i will poke around in that section if you think it's decent
GodFather has joined #ruby
<elomatreb>
marchelzo: The pickaxe is considered to be something like that, although it is slightly outdated by now
yehowyada has quit [Remote host closed the connection]
<SpComb>
hi, I like playing around with dangerous toys so I'm trying to write some Celluloid::Actors with ruby threads, and I need to understand how this code is behaving when I'm stress-testing it. My rspec example is failing with a "fatal: No live threads left. Deadlock?". I can see from that stack trace where that thread is blocked, but I would also like to see the stack traces of the other blocked threads to understand what the deadlock is
<ytti>
19:18 < eam> remember, you can even call methods on objects which don't define them
<marchelzo>
ytti: in that case, [] /does/ define like_this in some sense, right?
<ytti>
is blatantly incorrect
<ytti>
marchelzo, correct
<marchelzo>
ok we're on the same page
mwlang has joined #ruby
<eam>
main monkey patches object? But why isn't it seen in #methods?
<ytti>
marchelzo, because 'main' is same as reopening 'Object' and defining methods there
<ruby[bot]>
eam: # => /tmp/execpad-79154ae7bd6d/source-79154ae7bd6d:3: syntax error, unexpected keyword_rescue, expecting ...check link for more (https://eval.in/702235)
<eam>
>> Class Object; def not_like_this; "not the same"; end; end; def like_this; "hello world"; end; [].methods.grep /like_this/
<ruby[bot]>
eam: # => /tmp/execpad-38e47aeb0c84/source-38e47aeb0c84:3: syntax error, unexpected keyword_rescue, expecting ...check link for more (https://eval.in/702236)
<ytti>
eam, it's private method of Object class
<eam>
ooooh
<eam>
that makes sense, but it's even scarier than I thought
<ytti>
yes
<ytti>
very very few people are aware how hacky the 'main' is
<ytti>
it shouldn't be even allowed
<eam>
also, you *can* call a method on a class which doesn't define it I'm pretty sure
<ytti>
i don't think so, i don't even understand what that would mean
hutch34 has joined #ruby
<ytti>
i mean you can define singletons and put new method on intance of an object and call it
<SpComb>
I can see something when I call Celluloid.stack_dump from before I try the waiting operation that deadlocks, but I'd like to see those thread stacks when the ruby threads are actually deadlocked
Alina-malina has quit [Changing host]
Alina-malina has joined #ruby
<marchelzo>
ytti: do you know javascript
<ytti>
marchelzo, i know of it :/
montanonic has quit [Ping timeout: 248 seconds]
<eam>
I suppose it becomes equivocation over what it means to define a method
<marchelzo>
hmm
<eam>
ultimately it's just a function call with an implied argument
<SpComb>
although, heh, even this stack dump is enough to show me that my threads are actually probably synchronizing on `Logger#debug` atm... I suspect this code would behave differently if I ran it without debug logging enabled D:
<marchelzo>
when i read "calling a method on a class that doesn't define it" i think like
<havenwood>
>> class << self; remove_method :inspect end; self
<havenwood>
moeSizlak: You can run any one of those with `rackup name_here.ru` or if you name it config.ru you can just run `rackup`.
<moeSizlak>
ok but apache is a requirement for me
<havenwood>
moeSizlak: That's fine.
<marchelzo>
just curious, why is apache a requirement
<havenwood>
moeSizlak: As you mention you can use Passenger as your Rack webserver and Passenger has an Apache module.
<havenwood>
moeSizlak: It isn't a requirement.
<moeSizlak>
too many frameworks/adpaters/bs. im a php guy that knows ruby
<marchelzo>
have you tried nginx
<havenwood>
moeSizlak: It's popular to reverse proxy to your Rack webserver from either Nginx or Apache for various reasons but it isn't necessary. You can serve directly to port 80 with your Rack webserver.
the_drow has joined #ruby
<moeSizlak>
apache is already on port 80
<moeSizlak>
...
dnicole has quit [Remote host closed the connection]
<havenwood>
moeSizlak: Well, if you weren't using Apache it wouldn't be.
dnicole has joined #ruby
<havenwood>
moeSizlak: Your choice.
<moeSizlak>
<moeSizlak> ok but apache is a requirement for me
Fernando-Basso has joined #ruby
chouhoul_ has joined #ruby
the_drow has quit [Client Quit]
bijan_ has joined #ruby
jaguarmagenta has joined #ruby
bijan_ has quit [Client Quit]
<havenwood>
moeSizlak: You can reverse proxy from Apache to any of the Rack webservers. Passenger uniquely has an Apache module as well as its standalone version.
<havenwood>
moeSizlak: But you can use Puma, Thin, Unicorn or whatever you prefer behind Apache.
chouhoulis has quit [Ping timeout: 250 seconds]
tubuliferous has joined #ruby
agent_white has joined #ruby
jaguarmagenta has quit [Ping timeout: 265 seconds]
<agent_white>
Afternoon folks
<havenwood>
moeSizlak: I'd suggest trying a pure Rack app with Passenger Apache and see what its limitations are. Then look at Roda and go through each plugin to see what it adds on top of Rack: https://github.com/jeremyevans/roda/tree/master/lib/roda/plugins
hotpancakes has joined #ruby
mikeXsh has quit [Quit: Connection closed for inactivity]
<havenwood>
moeSizlak: You can compose the framework you need with Roda plugins. Or Sinatra is one of the most popular Rack adapters.
<moeSizlak>
why do i need a rack adapter
<moeSizlak>
i thought rack WAS the adapter
<moeSizlak>
too much middleware
<moeSizlak>
php doesnt have this problem
<pilne>
php and ruby are... very different beasts
<havenwood>
moeSizlak: Heh, Rack does have middleware too but that's a different thing. :-P
jmcc has quit [Quit: Updating details, brb]
jmcc has joined #ruby
<havenwood>
moeSizlak: You can write your own middleware or there are some great off-the-shelf Rack middleware gems.
<pilne>
i've been meaning to give hanami a whirl
alexar has quit [Remote host closed the connection]
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
alexar has joined #ruby
<adam12>
There's a ton of options. Roda is nice if you like the routing tree, Padrino gives you the structure of Rails in a more componentized fashion
<moeSizlak>
ugh
benlieb has quit [Quit: benlieb]
jz has joined #ruby
<pilne>
choice is good, freedom to do it how you are most comfortable is a blessing, not a curse
jz is now known as Guest35153
<adam12>
moeSizlak: Everything builds on top of Rack. It's the unified interface. You can use it raw, or with a tooling on top of it (Sinatra, Roda, Rails, whatever).
Guest35153 has quit [Max SendQ exceeded]
<pilne>
"opinionated" is great, if your opinions on the matter match :)
johnzorn- has joined #ruby
<leah2>
utterly complicated that rack stuff ;)
libastral has joined #ruby
<pilne>
lol, i almost think you have to really try to write complicated code in ruby, and if you are, you are probably digging deep into the guts for a good reason :)
johnzorn has quit [Ping timeout: 258 seconds]
hotpancakes has quit [Ping timeout: 258 seconds]
eightbitraptor has joined #ruby
alexar has quit [Ping timeout: 258 seconds]
chouhoul_ has quit [Remote host closed the connection]
<marchelzo>
pilne: how goes the lisp implementation
Yzguy has joined #ruby
<Yzguy>
Can I refer to other sections of a YAML document in the same document?
<pilne>
marchelzo=> i'm barely "actively" coding, work is insane right now and my brain just tends to hurt, but i'm bookmarking lots of things for when it gets back to normal
Phyllotaxis has joined #ruby
<marchelzo>
i see
[Butch] has joined #ruby
eightbitraptor has quit [Ping timeout: 258 seconds]
JoshS has quit [Quit: Leaving]
lsousa has quit [Quit: lsousa]
jaegerca has joined #ruby
<jaegerca>
Does anyone here know how to have the ruby net/ftp library resume an ftp download if it is interupted?
ldnunes has quit [Quit: Leaving]
hotpancakes has joined #ruby
<MrBusiness2>
Does Ruby have an OS-agnostic GUI automator?
johnmilton has quit [Remote host closed the connection]
tildes has quit [Ping timeout: 246 seconds]
<MrBusiness2>
Please pardon me
<MrBusiness2>
I am a Ruby noob--
aswen has quit [Quit: WeeChat 1.5]
<MrBusiness2>
Is that to say that Ruby is in between version ala Python 2 vs 3?
<MrBusiness2>
a Ruby 3 vs 4, if you will?
<marchelzo>
MrBusiness2: no, it's the shoes gem that pilne was talking about
<marchelzo>
not ruby itself
tildes has joined #ruby
<manveru>
MrBusiness2: well, there used to be the 1.8->1.9 migration
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
<marchelzo>
MrBusiness2: shoes version 4 only works with a particular ruby implementation (JRuby)
skweek has joined #ruby
<manveru>
oh, didn't read the history
<pilne>
yeah, ruby has already pretty much overcame the 1.8 -> 1.9 thing completely
jenrzzz has quit [Ping timeout: 250 seconds]
<marchelzo>
soon it will have to overcome 2.x -> 3
<pilne>
jruby bends over backwards to try and be compatible with ruby
jenrzzz has joined #ruby
<pilne>
are they planning a lot of breaking changes?
alexar has joined #ruby
<manveru>
ruby 3 won't be here for a couple of years
babblebre has joined #ruby
<marchelzo>
what can i do to make ruby 3 come faster
Yzguy has quit [Remote host closed the connection]
kobain has joined #ruby
<manveru>
hmm
konsolebox has quit [Ping timeout: 248 seconds]
<pilne>
i wanted to quote southpark in response...
<manveru>
1.0 was 1996, 2.0 was 2013, so we should get it around 2034
ramfjord_ has joined #ruby
theRoUS` has quit [Changing host]
theRoUS` has joined #ruby
<pilne>
inside i'm most looking forward to guilds in 3.0, but realistically i have everything i need to do what i feel i can accomplish before 3.0 comes out (mostly?)
<pilne>
performance improvements are always nice, but i'm not gonna be enterprise-grade anytime soon lol
<manveru>
well, guilds probably won't speed things up much for regular stuff
<marchelzo>
lets get rid of the GIL in ruby3
ramfjord has quit [Ping timeout: 256 seconds]
<manveru>
you mean rubinius?
<pilne>
rubinis intrigues the fuck outta me, especially after really "getting" what a gemstone server is about
<manveru>
hehe
<manveru>
the ruby on gemstone/s was maglev, no?
<manveru>
whatever became of that i wonder
<pilne>
true, but something feels similar into how it can be deployed/scaled
nettoweb has quit [Read error: Connection reset by peer]
<MrBusiness2>
Ah, interesting
<MrBusiness2>
I may avoid that then
<MrBusiness2>
Java-based things make me nervous
<manveru>
looks like they gave up selling licenses for maglev
<pilne>
a bit of a pity, the smalltalk vm seems quite a nice fit for ruby, more natural than the jvm
<chrisseaton>
The JVM started as a Smalltalk VM though.
<pilne>
but far less, everywhere
<pilne>
yeah, but it is now really truly optimized for "java" with other stuff, but graal/truffle look superb
<manveru>
nevermind, they still sell the gemstone/s licenses which you need to run maglev :P
<marchelzo>
hotspot started as a smalltalk vm?
djbkd has quit [Remote host closed the connection]
alexar has quit [Remote host closed the connection]
<manveru>
:(
<marchelzo>
chrisseaton: how much formal education do you have in compilers
alexar has joined #ruby
<chrisseaton>
marchelzo: I have a PhD in it.
<marchelzo>
ok i figured
rakm has joined #ruby
<marchelzo>
i want to be a compiler engineer one day
<chrisseaton>
marchelzo: I only started seriously four years ago!
<chrisseaton>
marchelzo: I did a masters in compilers, but it wasn't very serious, so it was a bit like starting from scratch just a few years ago.
<marchelzo>
i asked for 'Engineering a Compiler' by by Cooper and Torczon, and 'The Garbage Collection Handbook' by Hosking, Moss, and Jones for christmas
<marchelzo>
s/by by/by/
<pilne>
i really should read the gang of four book, and the dragon book
<chrisseaton>
marchelzo: do yourself a favour and don't spend any time on parsers - they're a trivial solved problem in practice and all the old texts spend far far far too much time on them
<manveru>
you read SICP yet? :)
<MrBusiness2>
The dragon book is a worthwhile read, but honestly, I'd recommended paying less and getting the old 80s version
<pilne>
htdp and sicp when i was poking at racket.
<marchelzo>
chrisseaton: yes, that is consistent with what i've read elsewhere, and it matches my experience
benlieb has joined #ruby
ishigoya has quit [Ping timeout: 258 seconds]
<marchelzo>
chrisseaton: i've written a compiler for a toy language that i designed and i just wrote a recursive descent parser. it's reasonably fast. i'm pretty naive, but i don't see why the dragon book for example makes such a big deal of parsing algorithms
<marchelzo>
and i guess i could just use a parser generator if i wanted something more efficient
<manveru>
yeah... lots of options for parsing these days
bronson has joined #ruby
<pilne>
something written when cores/ram weren't cheap is going to have roots in mhz/kb optimizations
<MrBusiness2>
If you want every parson method known to man
hahuang61 has quit [Ping timeout: 245 seconds]
<MrBusiness2>
there exists a monograph
<MrBusiness2>
the cover is gray
<MrBusiness2>
and it is jammed packed with a technical analysis of every parsing technique known to man
<MrBusiness2>
I can barely read it.
<chrisseaton>
I just did the maths - I've spent about 0.2% of my time of JRuby+Truffle on parser.
<MrBusiness2>
Or at least I could barely read it last time I could find it
<marchelzo>
chrisseaton: :o
<MrBusiness2>
since all of my books are in disposable shopping bags due to a disastrous move
rwb has quit [Ping timeout: 258 seconds]
<manveru>
chrisseaton: you like PEGs?
<chrisseaton>
manveru: yeah that's what my masters thesis was on
<manveru>
:D
<chrisseaton>
I did a new kind of left recursion and JIT compiled PEGs to CLR bytecode
<manveru>
i wrote one for neko once
SpiffTR has joined #ruby
<manveru>
http://nekovm.org/ is probably one of my favorite VMs to learn building compilers for
bronson has quit [Ping timeout: 250 seconds]
<marchelzo>
why not write your own vm
nettoweb has joined #ruby
<manveru>
i'm not masochistic enough
ishigoya has joined #ruby
<marchelzo>
that was my reason for not using an existing vm
frozengeek has quit [Read error: Connection reset by peer]
gbgdev_ has quit [Remote host closed the connection]
<marchelzo>
it's not that hard and it gives you more control and saves you from wading through a bunch of docs
frozengeek has joined #ruby
<marchelzo>
you can tailor the instruction set to your language's semantics
chrisja has joined #ruby
<marchelzo>
manveru: what language were you compiling to neko vm bytecode?