<FromGitter>
<jsilverMDX> hey @bew. my app is done. lol
<FromGitter>
<bew> github link? I want to star :)
<FromGitter>
<jsilverMDX> okay one sec haha
<FromGitter>
<fridgerator> @codenoid the way you're doing it is a single result, if you want to in a block you do MYSql.query("query string").each do |result_set|; code... ;end
<cerulean>
bet you guys didn't know the true version of rails
<cerulean>
it's rails v396.55
<cerulean>
known limitations: cant do insanely huge projects like torvalds/linux and bootstrap/bootstrap
<FromGitter>
<bew> why?
<FromGitter>
<jsilverMDX> it's too big maybe
<FromGitter>
<jsilverMDX> maybe you can help me fix it
<FromGitter>
<jsilverMDX> run it in a directory with no args to find out it's real version
<FromGitter>
<jsilverMDX> run it with "rails/rails" for instance to find out the version of a github app
<FromGitter>
<bew> nice, but you shouldn't use APP_NAME & VERSION names for that, because CAPITAL names are 'reserved' for constants (rtfd)
<FromGitter>
<jsilverMDX> oh
<FromGitter>
<jsilverMDX> fixed
<FromGitter>
<jsilverMDX> i just liked how a constant could be set to a dynamic value, you can't do that in ruby
<FromGitter>
<jsilverMDX> it evaluated it perfectly when it needed the constant
<FromGitter>
<jsilverMDX> is it immutable after setting a constant?
<FromGitter>
<bew> I think you cant reassign it to sth else
<cerulean>
yeah
<cerulean>
that makes sense
<cerulean>
my usage was proper. but i changed it and now it's better
<cerulean>
haha
<FromGitter>
<bew> yes that's it you can't reassign
<FromGitter>
<drosehn> I suspect it's too soon to try to write a serious ruby->crystal translator. When you first start with crystal it seems like there are only a few minor differences, but the more you do with it the more "little things" you find which are different.
<FromGitter>
<drosehn> Also, once you get used to crystal, you start to find things where it's better to rewrite the logic in your program than it is to make simple changes to ruby code which is just enough to get it to compile in crystal. IMO.
<FromGitter>
<bew> +1
<FromGitter>
<drosehn> And I think that will happen even more once crystal's multi-processing support is fully implemented.
<FromGitter>
<codingphasedotcom> @sdogruyol just read you finally got multi thread in nice!!!!
<FromGitter>
<khepin> Can I specify the return type of a proc when using a proc literal?
bjz has quit [Client Quit]
<FromGitter>
<khepin> The compiler knows my proc returns `Array(Int32)`, but I need it to be considered as a `Array(Int32 | Symbol)` in some places
bjz has joined #crystal-lang
<FromGitter>
<bew> you can, but why not return a symbol from this proc? (so the type will be correctly inferred)
<FromGitter>
<khepin> I have a hash of proc, some of which will return an array of ints, some an array of symbols, some a mixture of those. I want to tell the compiler that all of them return “the same type” which is an array of either ints or symbols
<FromGitter>
<khepin> How would I specify the return type?
McSoFake has quit [Remote host closed the connection]
McSoFake has joined #crystal-lang
xmonader2 has joined #crystal-lang
xmonader3 has quit [Ping timeout: 258 seconds]
zipR4ND has quit [Ping timeout: 240 seconds]
Qchmqs has joined #crystal-lang
<BlaXpirit>
cerulean, i believe in it about as much as a javascript -> java migration helper
<cerulean>
i'm not sure yet BlaXpirit
<cerulean>
rubymotion was a tigher integration with ruby
<cerulean>
only APIs were different
<cerulean>
syntax was 100% ruby
<cerulean>
we'll see
<cerulean>
i will wait for crystal 1.0
<FromGitter>
<bew> cerulean, about crystalshard website, it's because it search github every hour for new projects using crystal iirc
<FromGitter>
<drosehn> Well, here's one example. When I started working with crystal, it had global variables the same way ruby did. Well, even more flexible in some ways than ruby's. Now it has no global variables, except the few special variables like `$~`, `$1`, etc. So for some ruby programs that is a pretty major change, and that change happened in the last few months. There may be more changes like that which will happen befor
<FromGitter>
... crystal.
<cerulean>
wow bew
<cerulean>
thats neat
<cerulean>
is crystalshard built in crystal
<cerulean>
drosehn, yes.. but... ive been working with ruby for years and almost never see those variables used. its considered bad practice
<Yxhuvud>
How do I find out the memory size of a value? For structs I want the struct size, for references the size of the reference, not what it points to.
<FromGitter>
<bew> Yxhuvud, `sizeof` ?
<BlaXpirit>
Yxhuvud, that sounds like the definition of `instance_sizeof` unless im missing something
<Yxhuvud>
ah, great.
<BlaXpirit>
oh if you want size of the reference, that's actually `sizeof`
<BlaXpirit>
so like size of the pointer
<Yxhuvud>
right.
<Yxhuvud>
good to know of instance_sizeof too though. Is that one recursive? I guess not but the documentation doesn't go into what it returns for the reference instance variable case.
hako has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hako has joined #crystal-lang
Raimondii has joined #crystal-lang
Raimondi has quit [Ping timeout: 268 seconds]
Raimondii is now known as Raimondi
vdmo has quit [Ping timeout: 252 seconds]
McSoFake has joined #crystal-lang
bungoman_ has joined #crystal-lang
bungoman has quit [Ping timeout: 240 seconds]
j2k has joined #crystal-lang
sz0 has quit [Quit: Connection closed for inactivity]
<FromGitter>
<KCreate> Am I supposed to add the shard.lock file to my gitignore?
<FromGitter>
<fridgerator> no
<FromGitter>
<fridgerator> you would want the depedencies to install the same version on another computer
<FromGitter>
<fridgerator> shard.lock will ensure that
hako has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
xmonader2 is now known as xmonader
<Papierkorb>
KCreate, for a lib, ignore it. For an application, keep it
<FromGitter>
<KCreate> alright thanks
<Papierkorb>
KCreate, it's the applications responsibility to choose a version of all dependencies everyone is satisfied with. It's not on the library to choose.
<FromGitter>
<fridgerator> yeah, that
<FromGitter>
<KCreate> Makes sense
<crystal-gh>
[crystal] luislavena opened pull request #4306: Fully honor no color option when running specs (master...fully-colorless-spec) https://git.io/vSFRG
j2k has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
McSoFake has quit [Quit: No reason]
bjz has joined #crystal-lang
xmonader has quit [Ping timeout: 252 seconds]
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<FromGitter>
<eliasjpr> It seems that the only active web framework st the moment is Kemal. Any other highly used framework for the awesome list?
<cerulean>
is Amethyst worth it?
<cerulean>
it has more stars
<FromGitter>
<eliasjpr> Not sure if I can trust it
<FromGitter>
<eliasjpr> For production I mean
<FromGitter>
<eliasjpr> Also what is the interest of the community to have a more well rounded framework?
<cerulean>
i've seen it, it looks like the new solution to rails for crystal and we should probably update that
<cerulean>
looks maintained
<FromGitter>
<ltran> last update 23hours :O
<cerulean>
rails is real complicated. without proper debugging support in crystal, it cant reach rails5 level easil
<cerulean>
still i believe in it
<FromGitter>
<eliasjpr> I actually started to create a framework borrowing concepts from Kemal rails Phoenix and other frames including kemalyst
<cerulean>
add websockets and ill use it
<cerulean>
haha
<FromGitter>
<eliasjpr> :)
<wmoxam>
Rails was created by building an app, then extracting a framework
<FromGitter>
<eliasjpr> Okay
<FromGitter>
<eliasjpr> Im still getting things together but will let you guys know
<RX14>
i'm going sort of the rails way with my framework
<RX14>
i have a framework but it's part of my app
<RX14>
so it'll be open sourced when i've learnt way more from my app
<cerulean>
i'm afraid we'll end up with 5 rails clones with only 1/5th of the features of rails 5
<cerulean>
wmoxam: can you elaborate on the extraction process? if you know
<RX14>
i hope we have no succesful rails clones at all
<FromGitter>
<eliasjpr> I would like for the community to have 5 clones
<RX14>
rails does a lot wrong
<FromGitter>
<eliasjpr> One well maintained framework
<FromGitter>
<eliasjpr> GitHub.com/eliasjpr/amber
<FromGitter>
<eliasjpr> Again this is still being prototyped
<FromGitter>
<eliasjpr> Planning to move it to an organization when is more concrete and invite people@from@the community and organize the project around the community goals and desires
<FromGitter>
<eliasjpr> Websockets
<cerulean>
invite me
<cerulean>
i can already contribute
<cerulean>
lol
<FromGitter>
<eliasjpr> Typos lol?
<cerulean>
yeah lol
<cerulean>
no big deal, looks good
<FromGitter>
<eliasjpr> I said is work in progress :)
<cerulean>
no prob
<cerulean>
i actually do hide and prepare secret invetions tho
<cerulean>
lol
<cerulean>
but ... it grew into a team anyway
<cerulean>
so no problol
<cerulean>
so you have websockets already?
<FromGitter>
<eliasjpr> lol it will be easy to add websockets
<FromGitter>
<eliasjpr> it just needs a websocket handler
<FromGitter>
<eliasjpr> sorry pipe
<FromGitter>
<fridgerator> nice, I like the pipeline concept like phoenix