trapped has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
trapped has joined #crystal-lang
chrisseaton has joined #crystal-lang
<chrisseaton>
Hello. Am I right in thinking Crystal doesn't support #eval or #send? I search in the docs and didn't find them but just wanted to be sure. Is there any metaprogramming except the macros and the things like is_a?
<robacarp>
chrisseaton: I've come up against some of that myself and had an interesting time working around those problems
<BlaXpirit>
chrisseaton, ugh how I dislike the mindset that crystal is somehow supposed to work like ruby
<chrisseaton>
I know why Crystal does it, I'm just checking I have the facts right
<chrisseaton>
I didn't say I thought Crystal should work like Ruby, in fact I'm trying to check how Crystal actually is so I'm better informed
<BlaXpirit>
I, for example, don't know Ruby, so I can't help you with the way you're stating the question
<BlaXpirit>
eval is pretty clear. no, it cannot compile and execute code on the fly
<BlaXpirit>
in fact it's probably impossible even if you somehow hooked up a compiler to a running program
<BlaXpirit>
because of global type inference
<chrisseaton>
And I didn't even mention Ruby - lots of OO languages have an eval and send
<BlaXpirit>
none that I know have send
<chrisseaton>
I could have been coming here with a Smalltalk background for all you know
<BlaXpirit>
chrisseaton, doesn't matter, i still wouldn't be able to help
<chrisseaton>
I'm just saying you said 'I dislike the mindset that crystal is somehow supposed to work like ruby', when I didn't mention Ruby and my question had nothing to do with Ruby
<BlaXpirit>
right
trapped has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<robacarp>
BlaXpirit: has there been a recent upswing in the number of "can I compile my rubyisms" type question in the crystal community lately?
<BlaXpirit>
robacarp, not especially lately
<BlaXpirit>
i'm just getting fed up with it, worse every time
<robacarp>
I started tinkering with crystal after some discussion on a ruby subreddit a few weeks ago, and found a few little snippets on the crystal website to be especially invocative of the "ruby but compiled" mentality
<[spoiler]>
chrisseaton: most languages compiled to machine code don't have send/eval, none probably have it
<BlaXpirit>
well it's surely advertised like that
<robacarp>
to a disservice, I think
<BlaXpirit>
for sure
<BlaXpirit>
and i often see people not reading the docs and just trying what they would write in ruby and asking channel why it doesnt work
<robacarp>
yeah
<[spoiler]>
robacarp: it only uses a ruby-inspired syntax and std lib, other than that it's not similar at all
<[spoiler]>
and i think the docs/site are pretty clear about it imho
<BlaXpirit>
robacarp, now understands this, but no, we both think they aren't clear enough about it
<robacarp>
right, but that isn't what is conveyed in the pr
<BlaXpirit>
uh that first comma is not right
<robacarp>
Yeah, when I took off the "ruby but compiled" hat the language got a lot better
<chrisseaton>
[spoiler]: Objective C has send, that's the main example I can think of
<BlaXpirit>
it's probably not usable with runtime strings
trapped has joined #crystal-lang
<BlaXpirit>
just guessing
<[spoiler]>
chrisseaton: well send could be implemented (although I'd call it an anti pattern), but eval would be ridiculous
<robacarp>
in fairness to the community though, every language has a lot of "why doesn't it work like X" discussion ...crystals particular breed of that is Ruby.
<robacarp>
the first words on the website are "ruby inspired syntax" and while, strictly speaking, that is true in the ways that [spoiler] has said, it is read by a _lot_ of people as being a bigger statement
<[spoiler]>
Is Crystal compiled Ruby? No. Will it be? No. Why? No. BUT WHY?! No.
<[spoiler]>
Can we please have these in the faq, they amuse me
<[spoiler]>
they would be the "wtfaq" (way too frequently asked questions"
<robacarp>
[spoiler] / BlaXpirit, I have a lot of interest in helping spruce up the docs (https://github.com/manastech/crystal/pull/1981) do you have any guidance on how to help that along?
<robacarp>
I have a list of other improvements I'd like to make, but I don't want to invest the time if the changes aren't going to even generate interest
<[spoiler]>
robacarp: I agree that the docs need a lot of improving. They're very shallow, sometimes even outdated
<BlaXpirit>
there are a lot of things that need to be done
<BlaXpirit>
I don't understand why type annotations are omitted in standard library
<[spoiler]>
^
<[spoiler]>
That actually annoys me, too
<[spoiler]>
Also, when it's unclear a method accepts a block
<[spoiler]>
it's not that hard to add &clok
<[spoiler]>
&vlock
<BlaXpirit>
(lack of) documentation of standard library basically also kinda implies that you know ruby and you have to read its docs sometimes
<[spoiler]>
... I'm getting there slowly
<robacarp>
contributing to stdlib and writing documentation are both the kind of work I'd love to donate
<BlaXpirit>
if you know ruby, go ahead :D
<BlaXpirit>
matz allowed copying from ruby docs
<robacarp>
I _did_
<BlaXpirit>
in twitter. not sure if that has any legal meaning
trapped has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<[spoiler]>
I tried to add a few contributions to the stdlib, but I feel like other people aren't too enthusiastic about them. :/
<robacarp>
do you have any idea about asterite or waj's style of open source?
<[spoiler]>
robacarp: I guess BDFL?
<robacarp>
thats sort of what I'm worried about :<
<robacarp>
time will tell, I guess.
<robacarp>
Crystal has a lot of potential, and I love a lot of things about it, but finding a way to collaborate well is hard
sdogruyol has joined #crystal-lang
<[spoiler]>
robacarp: well, BDFL is not necessarily a bad thing I think, but it does depends on how its being handled
<sdogruyol>
quite lively here :)
<robacarp>
fair statement
<robacarp>
if the B is really present and accounted for :]
<[spoiler]>
sdogruyol: I've been told the party doesn't start until I get there
<[spoiler]>
I lie, nobody told me that. :(
<sdogruyol>
[spoiler]: now that you are here it's already started
nakilon has joined #crystal-lang
<sdogruyol>
meanwhile are you the one using technorama gh handle?
trapped has joined #crystal-lang
<[spoiler]>
sdogruyol: I'm Nino/omninonsense on gh
<sdogruyol>
ah ok
<sdogruyol>
thanks for your contributions
<[spoiler]>
Hahaha, that "ah ok" reads as if it was typed with heavy disappointment :P
<sdogruyol>
well, i was disappointed that my assumption was wrong :)
<sdogruyol>
chrisseaton what do you think of Crystal?
<[spoiler]>
Aw, there was a 1/88 chance I could've been technorama
<[spoiler]>
The odds were against you!
<chrisseaton>
sdogruyol: looks like a great project, seems very well engineered from looking at the source code
<chrisseaton>
People ask me to compare it my implementation of Ruby, so I should get more familiar with it
<sdogruyol>
that's great to hear from a language researcher like you
<[spoiler]>
But that is like comparing dolphins and dancing pineapples
<sdogruyol>
JRuby + Truffle is what i am waiting for but that damn JVM boot times turn me off
<chrisseaton>
I'm interested in benchmarking shootout benchmarks for my implementation of Ruby and Crystal (which do more or less work with source code unmodified between the two) to see how close we are to Crystal
<crystal-gh>
[crystal] waj pushed 1 new commit to master: http://git.io/vuyy7
<crystal-gh>
crystal/master 566d427 Juan Wajnerman: Removed PCL dependency from Dockerfile
<chrisseaton>
sdogruyol: we have a solution to that! We have a compiler that produces a single statically linked binary of the JVM and JRuby+Truffle, all globally optimised. Starts in a few ms
<chrisseaton>
thanks. I don't know if you remember but last time I compared Truffle and Crystal I didn't know about the --release flag and embarrassed myself on twitter
<chrisseaton>
So I might do a comparison and then get someone on the team to check I'm doing things right
<sdogruyol>
we'd be happy to help you out if you reach out here or twitter
apotheon has joined #crystal-lang
<[spoiler]>
I don't think it's embarrassing that you missed it.
<sdogruyol>
yeah it's not really emphasized that much
<[spoiler]>
Furthermore, I think it's more embarrassing the ugly way people react when someone misses things like that
<sdogruyol>
We need to be more MINASWAN :)
<asterite>
chrisseaton: it's true that thinking that Crystal is some kind of Ruby is not helping the project. In the website we just have "Ruby-inspired syntax", but since Ruby's syntax is so unique everyone thinks this is a kind of a compiled Ruby
<[spoiler]>
sdogruyol: what does MINASWAN stand for
<[spoiler]>
Oh, I deserved a lmgtfy, probably, lol
<[spoiler]>
omg
<sdogruyol>
:D
<[spoiler]>
this is so cute I love this
<sdogruyol>
i really like this side of Ruby community
shama has quit [Read error: Connection reset by peer]
<[spoiler]>
sdogruyol: I felt that Ruby was definitely the most welcoming of communities when I started out in programming
shama has joined #crystal-lang
<sdogruyol>
[spoiler]: indeed. Now i feel the same in Rust community probably because lots of Rubyists migrating there
<sdogruyol>
we also have the same spirit here btw
<[spoiler]>
The thing that really put me off of rust (for a while, at least) is that the language was so bizarrely volatile at first. Keeping track of it was really hard (but maybe it was also because my personal life was a bit of a turmoil at the time, so everything was overwhelming)
<sdogruyol>
[spoiler]: Rust is actually hard
<sdogruyol>
[spoiler]: not meant for new programmers imho
nakilon has quit [Ping timeout: 256 seconds]
<[spoiler]>
I am not hard, nor was I back then, but it just kept changing all the time and it was being poorly documented. You'd have to look through commits to find the changes
<robacarp>
[spoiler]: I actually had the same impression from the rust world when I looked into it
<[spoiler]>
Erm, I am not new. LOL
<robacarp>
I abandoned the language for now as a result
<[spoiler]>
Well, not very new at least
<sdogruyol>
[spoiler]: sorry i didn't meant to offend you or did mean to say that you're a newcomer
<sdogruyol>
it's just hard for new programmers :)
<[spoiler]>
sdogruyol: No, no I know you didn't mean to! I wasn't offended either, I was just clarifying that it wasn't difficult to understand the language, it was just hard keeping up with it
luislavena has joined #crystal-lang
<[spoiler]>
"Oh yeah we removed that from the language, sorry about that. We'll document it eventually." "Oh we added that back after reconsidering, so the documentation is actually valid"
<[spoiler]>
greeaaaat
<[spoiler]>
Other than that, it seemed fun
<sdogruyol>
heheh
<sdogruyol>
we need someone like steve klabnik for documentation :) he alone fixed all that documentation
<bjmllr>
does crystal aspire to be anyone's first language?
<[spoiler]>
bjmllr: the correct question is, do people aspire for it to be their first language
<[spoiler]>
:D
<bjmllr>
it seems like rust doesn't
<[spoiler]>
bjmllr: Well, I don't think any language does, though
<sdogruyol>
Crystal can be someone's first compiled language
<bjmllr>
many languages seem to emphasize how easy it is to use them. maybe most
<chrisseaton>
Pascal was explicitly designed to be a first language I think
<sdogruyol>
it's amongst the easiest compiled languages out there
<[spoiler]>
Crystal is easy to use (personally, but I have a background in C with a passion for Ruby)
<bjmllr>
yeah, the common case seems to be learning ruby and then crystal
<rkeene>
bjmllr, I never learned Ruby, but I did learn Crystal
<sdogruyol>
i have a junior in my team learning Crystal as first compiled language and he says it's really easy
<sdogruyol>
though it took some time to learn casting / macros and why that's necessary
<rkeene>
I'm pretty sure Z80 asm was my first "compiled" language
<[spoiler]>
oh my god the food is finally here! see you later, peeps
<robacarp>
:]
<sdogruyol>
heheh rkeene you are an old one :)
<rkeene>
:-(
<rkeene>
I don't feel old... I prefer to think of myself as ... accomplished :-D
<sdogruyol>
rkeene yeah that's rude of me to say that. Accomplished is much more better.
<rkeene>
I accomplished a Crystal. It worked out pretty well, not too many bugs -- there does seem to be some limitations in its ability to cross-compile (uname -s -r used instead of the triplet is bad form)
<bjmllr>
when i was in school they didn't teach us any language other than compiled ones. i guess that approach is outdated now
<rkeene>
sdogruyol, I'm not offended by what anyone says, I'm just picking on you
<sdogruyol>
bjmllr: no that's still really common ( at least in here Turkey)
<rkeene>
Depends on what level of schooling, BASIC was really popular in my earlier years, then LOGO
<rkeene>
C wasn't introduced to us until high school
<sdogruyol>
when did you start?
<rkeene>
Start programming ?
<sdogruyol>
y
<rkeene>
Hmm, 1990-ish
<rkeene>
Hard to remember
<bjmllr>
rkeene: what language did crystal most remind you of when you were learning it?
<rkeene>
bjmllr, Nothing in particular stands out at me, probably D
<sdogruyol>
meanwhile i really wonder why D did never really take off
<rkeene>
sdogruyol, I used it for a few production applications and it worked well for me, but what kept me from using it more places was DMD not being everywhere like GCC was :-D
<rkeene>
It reminded me of Tcl, by being the exact opposite of Tcl it actually worked in a very similar way... I really liked the idea of interfaces
<rkeene>
(When I was learning D I was mostly using C and Tcl)
<rkeene>
Come to think of it, I still mostly use C and Tcl
brunto has joined #crystal-lang
nakilon has joined #crystal-lang
<sdogruyol>
:)
<sdogruyol>
what's DMD?
<rkeene>
Digital Mars D, the canonical D compiler
<sdogruyol>
ouch now that's a bummer
<rkeene>
There's now GDC (GCC Frontend to D), but it didn't exist at the time
trapped has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<sdogruyol>
gotta love LLVM
<rkeene>
I tried to love LLVM, but it hasn't caught up to GCC in terms of platform support
brunto has quit [Ping timeout: 240 seconds]
<rkeene>
n
<[spoiler]>
rkeene: do you mean clang or llvm
<[spoiler]>
The food was delicious, if anyone is wondering
trapped has joined #crystal-lang
<[spoiler]>
I feel like "D" is an attempt to make people sound inappropriate when they say stuff like "I love D" "I like playing with D" "D is great"
<rkeene>
[spoiler], LLVM
<rkeene>
[spoiler], D came out before "the D" was a thing atleast in pop culture, so I don't think that
<[spoiler]>
rkeene: I know, I was just kidding :D
<[spoiler]>
For some reason, most things sound innuendo to me
<[spoiler]>
The reason is probably spending too much time reading parodies on fanfiction.net
<rkeene>
In-your-end-o
<[spoiler]>
rkeene: :D
sdogruyol has quit [Remote host closed the connection]
fowlduck has joined #crystal-lang
waterlink has joined #crystal-lang
akwiatkowski has joined #crystal-lang
trapped has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
trapped has joined #crystal-lang
nakilon has quit [Ping timeout: 272 seconds]
trapped has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tomchapin has joined #crystal-lang
tomchapin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]