<FromGitter>
<bigtunacan> I'm trying to use micrate to generate my database migrations (https://github.com/juanedi/micrate), but it is erroring out on my Mac (10.12.4).
<FromGitter>
<bigtunacan> dyld: Library not loaded: /usr/local/opt/libevent/lib/libevent-2.0.5.dylib
<FromGitter>
<elorest> yeah that’s a pretty standard error. try updating your version of libevent from homebrew and re compiling micrate
<FromGitter>
<bigtunacan> Yeah; I force uninstalled libevent from homebrew, force uninstalled micrate
<FromGitter>
<bigtunacan> Then I reinstalled everything; same error
<FromGitter>
<elorest> don’t install micrate from homebrew
<FromGitter>
<elorest> compile from source.
<FromGitter>
<elorest> Also i sort of feel like micrate is supposed to be included in an app rather than stand alone but that could have changed.
<FromGitter>
<elorest> in amber we use it as part of the amber command line
<FromGitter>
<bigtunacan> I was going off the GitHub repo which talks about using it standalone from the cli
<FromGitter>
<bigtunacan> I'm not sure how exactly to compile it from source; I tried to clone the repo and run `crystal src/micrate.cr`, but this errors out.
<FromGitter>
<bigtunacan> I was able to build that successfully and then run that from the cli even though the brew install doesn't work when used directly
<FromGitter>
<elorest> I think that’s just the homebrew formula-tap
<FromGitter>
<elorest> guess not.
<FromGitter>
<elorest> cool
<FromGitter>
<bigtunacan> It works so I'll take it :)
<FromGitter>
<elorest> sorry I wasn’t more help. Check out amber if your playing with web stuff in crystal
<FromGitter>
<bigtunacan> No; I appreciate it anyway.
<FromGitter>
<bigtunacan> Yeah; I saw some of the discussion going earlier today too.
<FromGitter>
<bigtunacan> Right now I'm spinning up a Kemal site.
<FromGitter>
<bigtunacan> As I get a better handle on how Crystal works.
<FromGitter>
<bigtunacan> But I'll definitely look at it.
<FromGitter>
<elorest> Amber provides some cool generators which get can get a full crud up and running very fast. Sometimes having working code to look at and modify helps and lot in learning languages as well.
<FromGitter>
<elorest> Anyway have a good night.
<FromGitter>
<bigtunacan> You too
<FromGitter>
<bigtunacan> I'm definitely planning on checking out Amber and Kemalyst both for future stuff.
<FromGitter>
<elorest> Don’t sell you stock quite yet but I’m pretty sure that kemalyst and amber are merging
<FromGitter>
<bigtunacan> I'm mostly interested in building out more educational materials and some middleware/handlers that can drop into any of the web frameworks that support handlers
<FromGitter>
<elorest> Have you looked at crack?
<FromGitter>
<bigtunacan> Yeah; I'm on there as a contributor
<FromGitter>
<elorest> oh cool
<FromGitter>
<bigtunacan> So Kemal's total barebones approach is a bit easier for doing that when I'm trying to spin up new dev on a handler
<FromGitter>
<bigtunacan> Not really caring about much actual other real functionality :)
<FromGitter>
<elorest> Have you seen amber’s pipeline… It makes it super easy to add in different handlers for different routes?
<FromGitter>
<bigtunacan> Then once I have things working like I expect I can test on Amber and Kemalyst
<FromGitter>
<drujensen> Question, does anyone know what is going on with Amethyst?
<FromGitter>
<elorest> Is anything going on?
<FromGitter>
<drujensen> If it’s a dead project, I would like to see it removed from some of the lists
<FromGitter>
<drujensen> because people will go their and not find any activity
<FromGitter>
<bigtunacan> Not yet; but I followed the discussion going on earlier today between @drujensen and team Amber
<FromGitter>
<drujensen> then think Crystal is not being supported
<FromGitter>
<elorest> Good point. We should probably summit a PR on awesome crystal
<FromGitter>
<bigtunacan> @drujensen I agree; I don't think it's just Amethyst though
<FromGitter>
<bigtunacan> I think a bunch of stuff should be removed as it looks like quite a few dead projects are still on there
<FromGitter>
<elorest> same with rust...
<FromGitter>
<elorest> maybe there should be an inactive flash or something...
<FromGitter>
<bigtunacan> If it's not kept up to date then the awesome list isn't so awesome
<FromGitter>
<drujensen> haha, right
<FromGitter>
<elorest> It’s still potentially useful to see that there is this huge out of date project.
<FromGitter>
<drujensen> not sure who would make the call though
<FromGitter>
<elorest> look at the last version of crystal in the shard.yml
<FromGitter>
<elorest> we could probably set up a script for that.
<FromGitter>
<elorest> one of these days lol
<FromGitter>
<drujensen> right, lol
<FromGitter>
<elorest> Hey do you think it would be useful to use flash for csrf so that it will automatically reset everytime?
<FromGitter>
<drujensen> I really like the Amethyst name and would pay to own it. :-)
<FromGitter>
<elorest> Can’t we… They don’t have a domain or anything.
<FromGitter>
<bigtunacan> lol
<FromGitter>
<bigtunacan> I picked up this domain last weekend
<FromGitter>
<bigtunacan> crystallizer.org
<FromGitter>
<drujensen> nice, like it
<FromGitter>
<bigtunacan> You ever used echojs or rubyflow?
<FromGitter>
<bigtunacan> Yeah; and I know there is the Crystal Weekly site.
<FromGitter>
<elorest> It’s more of a mailing list I think
<FromGitter>
<elorest> mailgun or something.
<FromGitter>
<bigtunacan> Those are all a curated mailing list type
<FromGitter>
<drujensen> this would be easy to build
<FromGitter>
<elorest> I’d like to see that written in crystal
<FromGitter>
<elorest> it’s awesome that it exists though.
<FromGitter>
<bigtunacan> This is more a social news aggregator that we can all submit to
<FromGitter>
<bigtunacan> That's what I'm doing with crystallizer.org. Same thing as echojs/rubyflow, but Crystal specific
<FromGitter>
<drujensen> cool! great idea
<FromGitter>
<drujensen> I will subscribe. :-)
<FromGitter>
<elorest> same
<FromGitter>
<bigtunacan> It's pretty simple; I'll have a v1 up and running in a week or two.
<FromGitter>
<mjago> Regarding awesome ruby - I noticed the curses entry is a single commit with no tests that barely pretends to work - yet there are several pretty good versions out in the wild - very misleading :worried:
Raimondi has joined #crystal-lang
<FromGitter>
<bigtunacan> I'll announce on here when it's live, and then just build out from there
<FromGitter>
<drujensen> should be a test to be on awesome crystal
<FromGitter>
<drujensen> > 10 stars and > 10 commits
<FromGitter>
<bigtunacan> Well shit; in that case I have several shards I can add to awesome crystal right now ;-)
<FromGitter>
<drujensen> lol
<FromGitter>
<bigtunacan> I thought I would wait until there was some working code... but hey
<FromGitter>
<mjago> seriously some quality control would be great @bigtunacan
<FromGitter>
<bigtunacan> Yeah; I'm sarcastic by nature, but I really agree with you.
<FromGitter>
<bigtunacan> I spent too much time digging through the list trying to find what I should really be using.
Raimondi has quit [Ping timeout: 268 seconds]
<FromGitter>
<bigtunacan> @drujensen Amethyst is running on the latest version of Crystal and was last updated a little less than a month ago.
<FromGitter>
<bigtunacan> Last commit was 12 days ago
<FromGitter>
<drujensen> oh, interesting. ok.
<FromGitter>
<bigtunacan> I dropped a PR on awesome that just strikes out old unsupported web frameworks. I'll see if V accepts if. If so then I may do some additional cleanup on it manually for now.
<FromGitter>
<bigtunacan> But some automation like @elorest suggested would be best
<FromGitter>
<drujensen> @bigtunacan thanks for taking the time to do that. very helpful!
<FromGitter>
<drujensen> :clap:
<FromGitter>
<bigtunacan> No problem
<FromGitter>
<sdogruyol> Hey all
<FromGitter>
<bigtunacan> Hey
<FromGitter>
<sdogruyol> I'll be speaking about Crystal at https://rubyc.eu/ today :)
<FromGitter>
<bigtunacan> Sweet! Good luck.
<FromGitter>
<bararchy> @sdogruyol amazing !!
<FromGitter>
<sdogruyol> Thank you :+1:
<FromGitter>
<bigtunacan> Is it going to get streamed or uploaded to YouTube or Vimeo later so we can check it out?
<FromGitter>
<sdogruyol> yeah
<FromGitter>
<sdogruyol> updated to youtube later
<FromGitter>
<bigtunacan> Nice
<FromGitter>
<bigtunacan> It's almost 3am here; time or sleep.
<FromGitter>
<bigtunacan> Goodnight all
<FromGitter>
<sdogruyol> good night
_whitelogger has joined #crystal-lang
<FromGitter>
<bararchy> It would be cool to have a live stream of "let's program X in Crystal" , where someone takes it upon himself to make a small program from scratch Live :)
Raimondi has joined #crystal-lang
Raimondi has quit [Ping timeout: 268 seconds]
<FromGitter>
<sdogruyol> Twitch streams Crystal
<RX14>
@sdogruyol that would be an entirely different stream: a lot more fun and a lot less productive
<FromGitter>
<sdogruyol> haha yes
<FromGitter>
<sdogruyol> i really like those kind of streams
<RX14>
so, I think we just merged the first step to windows support into master
<FromGitter>
<sdogruyol> yeah thank you @RX14
<FromGitter>
<sdogruyol> having a linker is definitely a good beginning
<FromGitter>
<sdogruyol> now you can add it to crane :P
<RX14>
it looks like just a series of small steps from here :)
<FromGitter>
<sdogruyol> and we can cross-compile to windows
<FromGitter>
<faultyserver> @sdogruyol @RX14 @bararchy I've done a few streams on Twitch where I've worked on Crystal projects. I'm actually going to be doing more this weekend working on a compiler for a play-language
<FromGitter>
<faultyserver> I want to see if I can get to a point of writing a simple compiler in under an hour so I can turn it into a presentation to give at meetups and such
<FromGitter>
<akzhan> @RX14 Thanks, it is.
Philpax_ has quit [Ping timeout: 260 seconds]
<FromGitter>
<fridgerator> I streamed on livecoding.tv a couple of times while building credit
tankfeeder has quit [Ping timeout: 240 seconds]
tankfeeder has joined #crystal-lang
guardianxx has joined #crystal-lang
tankfeeder has quit [Quit: Leaving]
<FromGitter>
<jwoertink> Anyone have a good idea for an internal counter for a method? I want a method where each time I call it, it will cycle through some numbers. I need it at the instance level though so I can use this method multiple times and have separate counters
<FromGitter>
<jwoertink> I guess I could just make a property to hold that variable
<crystal-gh>
[crystal] asterite pushed 1 new commit to master: https://git.io/vH2sa
<crystal-gh>
crystal/master a3b77d3 Ary Borenszweig: Fixed #4503: assume token_type is Bearer in OAuth2 when not specified.
guardianxx has quit [Read error: Connection reset by peer]
guardianxx has joined #crystal-lang
guardianxx has quit [Remote host closed the connection]
<FromGitter>
<elorest> Probably just an instance variable… I guess I’d have to see a gist or something.
<FromGitter>
<elorest> Is there a Constant or something in a shard that I could use to get the name of the program I’m currently running?
<FromGitter>
<elorest> basically the name of `src/myproject.cr`
<FromGitter>
<eliasjpr> Create a counter class that listens for the method calls
<FromGitter>
<eliasjpr> Something like an observer should do it elegantly
yogg-saron has joined #crystal-lang
snsei has joined #crystal-lang
<FromGitter>
<HarrisonTotty> Hello everyone! I am new to the Crystal language (as well as Ruby) after having worked mainly in C#/C++/Python for a while. I have a quick question concerning inheritance: ⏎ If I have a class `A` that has a particular instance variable `children` that is an array of `A`'s, how can another class `B < A` store objects of type `B` into `children`?
<FromGitter>
<HarrisonTotty> Essentially I am trying to write a computer algebra library where the `Expression` class contains an array of `children` which may be any type that inherits `Expression`. So that way I can have the classes `Symbol < Expression` and `Value < Expression` and thus say something like: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5933100ef2dd2dba06675606]
<FromGitter>
<HarrisonTotty> 1) meant to write `expr = Symbol.new("Sum", x, y, two)`
<FromGitter>
<elorest> I’m working on an example. Is this close to what you mean?
<FromGitter>
<HarrisonTotty> @elorest Essentially yes, but now my question is, can we store a class of type `B < A` into `@children`?
<FromGitter>
<HarrisonTotty> Also what is the difference between using `property`, `getter`, and just instance variables like `@children = [] of Expression`?
<FromGitter>
<HarrisonTotty> I assume this is something tranferred over from Ruby?
<FromGitter>
<HarrisonTotty> @elorest In your example you specify the array to be a union of types `(A | B | Nil)`. What about if I have potentially hundreds of class types that inherit `A`? I'm trying to avoid having to specify type unions...
<FromGitter>
<HarrisonTotty> I know that Crystal requires you to be a bit more specific, so that may be unavoidable...
<FromGitter>
<HarrisonTotty> In C# for instance you can store `B`'s in an array `A[]` provided `B : A`
<FromGitter>
<faultyserver> if `B < A`, you can just store them inside as you would in C#, C++, etc.
snsei has quit [Remote host closed the connection]
<FromGitter>
<faultyserver> Then, if you want to iterate over them, but use properties that are specific to `B`, you can either do `children.as(Array(B))` to cast the entire array for your operations, or you can iterate and cast each one individually, which may give better control if you're not sure that all elements of `children` will be `B`: ⏎ ⏎ ```code paste, see link``` [https://gitte
<FromGitter>
<faultyserver> Just a general suggestion: if you're building something to parse algebraic statements, you're going to want to build a tree, rather than a list.
<FromGitter>
<elorest> Is there a constant or something that I could call to get the name of my current app? ⏎ ⏎ `PROJECT => my_blog # for src/my_blog.cr`
<oprypin>
app name would presumably be something from shard.yml - that is not easily doable
<FromGitter>
<elorest> Yeah I could pull it from shard.yml or have `PROJECT_NAME= {{__FILE__}}`in my first file. I was just wondering if the system kept that information anywhere already.
gool has joined #crystal-lang
gool has quit [Client Quit]
<oprypin>
no i dont think so, PROJECT_NAME is a good bet
<oprypin>
PROGRAM_NAME is name of executable, obtained at runtime, changes if you rename it
<FromGitter>
<elorest> PROGRAM_NAME might be what I’m looking for.
<oprypin>
yeah but let me just emphasize again it's not the name of program.cr, it's the name of ./program
<FromGitter>
<elorest> yeah it’s close to what I want though...