Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Aug 11 21:54
    straight-shoota milestoned #12377
  • Aug 11 21:11
    straight-shoota closed #12355
  • Aug 11 18:26
    straight-shoota closed #12351
  • Aug 11 18:26
    straight-shoota closed #12374
  • Aug 11 17:19
    Blacksmoke16 labeled #12377
  • Aug 11 17:19
    Blacksmoke16 labeled #12377
  • Aug 11 17:15
    dscottboggs opened #12377
  • Aug 11 16:26
    Blacksmoke16 closed #8093
  • Aug 11 16:26
    Blacksmoke16 labeled #8093
  • Aug 11 15:48
    Blacksmoke16 labeled #12376
  • Aug 11 15:48
    Blacksmoke16 labeled #12376
  • Aug 11 15:20
    straight-shoota milestoned #12374
  • Aug 11 15:20
    wontruefree opened #12376
  • Aug 11 15:20
    wontruefree labeled #12376
  • Aug 11 14:53
    asterite labeled #12375
  • Aug 11 14:53
    asterite labeled #12375
  • Aug 11 14:53
    asterite opened #12375
  • Aug 11 13:04
    asterite synchronize #12374
  • Aug 11 12:47
    straight-shoota milestoned #12355
  • Aug 11 12:20
    asterite labeled #12374
Isaac Sloan
@elorest
Is there such a thing as a private macro?
Faustino Aguilar
@faustinoaq

<oprypin> what's your use case?

None, I was reading flow documentation, and then I ask me if there is something similar on Crystal, but the @mverzilli answer solved my question. :+1:

can someone help explain the usage of fun outside of a lib declaration to me?

I think the fun usage outside libs is very limited, fun doesn't support overloading and only support basic types, I think it is more like a C function, thinking on shared libraries or similar stuff.

Faustino Aguilar
@faustinoaq
@nickbclifford :point_up_2:
Pawan Dubey
@pawandubey
@bew Sorry for the late reply. Yes I saw your wiki - pretty good. I didn't do so much research. I knew that I wanted to parse PEGs, and I liked the DSL of Parslet. I looked at D's Pegged, Clojure's Instaparse, Haskell's Earley and a couple from Go. Although I didn't spend much time ruminating and went to implementation.
From IRC (bridge bot)
@FromIRC
<oprypin> @elorest, you can put a macro in a private module
Ekrem Karaca
@ekremkaraca
Morning πŸŒ„πŸ‘‹
I am now trying to install Crystal via Linuxbrew
I think we should include it to the book
Serdar Dogruyol - Sedo セド
@sdogruyol
Morning everyone
Ekrem Karaca
@ekremkaraca
Llvm is too big: 3 GB
Why did I add --with-llvm option
I am so pişman :(
Serdar Dogruyol - Sedo セド
@sdogruyol
lol
Ekrem Karaca
@ekremkaraca
Finally I have built it in 14 min 12 sec
Serdar Dogruyol - Sedo セド
@sdogruyol
you have some low specs?
Ekrem Karaca
@ekremkaraca
I wonder what llvm source contains?
Yep
Serdar Dogruyol - Sedo セド
@sdogruyol
LLVM is a beast, lots of C++
Ekrem Karaca
@ekremkaraca
6GB ram with i5
Serdar Dogruyol - Sedo セド
@sdogruyol
CPU?
Ekrem Karaca
@ekremkaraca
4x with 2 ghz
Serdar Dogruyol - Sedo セド
@sdogruyol
that must be the cultprit
Ekrem Karaca
@ekremkaraca
I bought it in 2011
Serdar Dogruyol - Sedo セド
@sdogruyol
yeah
that explains
From IRC (bridge bot)
@FromIRC
<Groogy> Morning!
<femto> class Hierarchy def foo end def self.methods {{@type.methods}} # using all_subclasses for illustration end end class A < Hierarchy; end class B < A; end class C < B; end puts Hierarchy.methods
<femto> how do I get all the methods of a class?
<Groogy> doesn't it show there?
<femto> Syntax error in expanded macro: macro_4594465744:1: can't define def inside def [def foo ^ ================================================================================ {{@type.methods}} # using all_subclasses for illustration
<femto> in src/hello2.cr:11: macro didn't expand to a valid program, it expanded to: ================================================================================ -------------------------------------------------------------------------------- 1. [def foo 2. end]
From IRC (bridge bot)
@FromIRC
<Groogy> you probably have to do something more sensible than {{@type.methods}} since that probably just expands into the methods own defintion it seems
<Groogy> methods is a collection of ASTNodes is my guess you probably have to create a macro that converts them to like an array of strings
<Groogy> or similar
Cris Ward
@crisward
@sdogruyol morning! - finally got around to adding this to github - https://github.com/crisward/mailer
Serdar Dogruyol - Sedo セド
@sdogruyol
wow congrats @crisward :tada:
Ghost
@ghost~55586c4815522ed4b3e08557
femto, use @type.methods.map &.name.stringify
Ghost
@ghost~55586c4815522ed4b3e08557
What is this type syntax *{Int32, Int32} (from https://github.com/crystal-lang/crystal/issues/5037#issuecomment-332381702)
Should it mean something specific in his example?
Serdar Dogruyol - Sedo セド
@sdogruyol
deconstructing the tuple?
(haven't looked at the issue)
Ghost
@ghost~55586c4815522ed4b3e08557
Look at it please (or below)
It's used in def bla(*arg : *{Int32, Int32})
From IRC (bridge bot)
@FromIRC
<oprypin> @bew, it's invalid syntax, hence the error
<oprypin> except that the compiler should say invalid syntax not break
Ghost
@ghost~55586c4815522ed4b3e08557
Okay, makes sense
From IRC (bridge bot)
@FromIRC
<Papierkorb_> Morning