Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 13:47
    straight-shoota closed #12051
  • 13:47
    straight-shoota closed #12050
  • 12:17
    beta-ziliani edited #7318
  • May 15 08:43
    r00ster91 closed #7318
  • May 15 08:17
    r00ster91 closed #7690
  • May 14 17:01
    Blacksmoke16 labeled #11995
  • May 14 13:03
    webhive closed #12055
  • May 14 10:19
    straight-shoota milestoned #12051
  • May 14 10:00
    I3oris edited #12051
  • May 14 08:45
    oprypin review_requested #11977
  • May 13 23:29
    Blacksmoke16 unlabeled #12061
  • May 13 22:56
    Blacksmoke16 edited #12061
  • May 13 22:56
    Blacksmoke16 edited #12061
  • May 13 22:54
    Blacksmoke16 labeled #12061
  • May 13 22:54
    Blacksmoke16 labeled #12061
  • May 13 22:54
    Blacksmoke16 labeled #12061
  • May 13 22:54
    Blacksmoke16 opened #12061
  • May 13 20:14
    straight-shoota labeled #12060
  • May 13 20:14
    straight-shoota labeled #12060
  • May 13 20:14
    straight-shoota opened #12060
Kent 'picat' Gruber
@picatz
I think macros themselves are already pretty powerful ( and confusing if you didn't write the macro ).
I'm personally in the camp of not over-using/abusing macros; and most of the code I've used them for has been for purely syntax sugar-look'n stuff because I like it when my code is pretty.
Matias Garcia Isaia
@mgarciaisaia
Actually the song goes like "- Hey, this language doesn't have #send. - No, but you can use macros should you need them"
Nick Franken
@fridgerator
lol
:musical_note:
Rubi
@codenoid
morning :sparkles:
From IRC (bridge bot)
@FromIRC
<watzon> @codenoid: you're wondering what macros are for?
Rubi
@codenoid
iyas,
From IRC (bridge bot)
@FromIRC
<KAsmic> Hi hi, has anyone used the libui bindings? I want to know what "AreaHandler" is, and how to call it?
Dru Jensen
@drujensen
@codenoid have you ever used the JSON.mapping macro? This is probably the best example of usng a macro. It allows you to specify which properties will be mapped in your .to_json method. https://github.com/crystal-lang/crystal/blob/e2a1389e8165fb097c785524337d7bb7b550a086/src/json/mapping.cr#L9
From IRC (bridge bot)
@FromIRC
<watzon> @codenoid: basically the purpose of a macro is code generation. Macros generate Crystal code at compile time and insert that code into the AST
<watzon> That way you can dynamically create classes, methods, etc
Rubi
@codenoid
way you can dynamically create classes, methods, etc o, ok, thanks @drujensen @watzon
cevarief
@cevarief
@drujensen So this is heavily used in amber scaffolding generator?
From IRC (bridge bot)
@FromIRC
<Groogy> Morning!
Rubi
@codenoid
hi,,
From IRC (bridge bot)
@FromIRC
<txdv> good morning
Rubi
@codenoid
context.response.headers = "some value" # HTTP::Server am i wrong ?
Rubi
@codenoid
o, headers need an hash value, but what a simple way to use res.headers (all data inside res.headers) to response.headers
Romain Franceschini
@RomainFranceschini
hey guys, when I'll be able to drink in this magnificent cup? https://twitter.com/CrystalLanguage/status/855080421075406848
From IRC (bridge bot)
@FromIRC
<Groogy> I want to know as well
Bar Hofesh
@bararchy
Cool !
Akzhan Abdulin
@akzhan
Wow, )
Rubi
@codenoid
res.headers.each { |k, v| context.response.headers[k] = v }
context.response.print res.body
why context.response.print res.body doesnt give the output
From IRC (bridge bot)
@FromIRC
<ShalokShalom> can i use {} instead of do/end
<ShalokShalom> while i saw no do at all until
<Groogy> yeah though they do have different lexical meanings
<Groogy> in what order they are evaluated etc.
<Groogy> "The difference between using do ... end and { ... } is that do ... end binds to the left-most call, while { ... } binds to the right-most call:"
<ShalokShalom> thanks a lot
<ShalokShalom> is there something like a Ruby to Crystal converter?
BONNAURE Olivier
@solisoft
Hi there, does anyone is working with JWT ?
From IRC (bridge bot)
@FromIRC
<oprypin> ShalokShalom, what brings you here?
Rubi
@codenoid
why ?
res.headers.each { |k, v| context.response.headers[k] = v }
context.response.print res.body # doesnt give me output, after first line code
From IRC (bridge bot)
@FromIRC
<ShalokShalom_> @oprypin: Rubys Syntax and Crystals Speed
Ghost
@ghost~55586c4815522ed4b3e08557
I can't remember why we can't use Threads directly in crystal? I know that fibers and channels are the way to go, but what's the issue with threads? IO? Scheduler (probably)? GC?
From IRC (bridge bot)
@FromIRC
<RX14> @bew all of the above
<Papierkorb> Even in the future you won't be using Threads directly.
<RX14> IO is an issue because it depends on the scheduler which isn't thread safe
<RX14> and GC needed tweaks too
Serdar Dogruyol - Sedo セド
@sdogruyol
@RX14 are you gonna distribute a staticaly built crystal with docker?
From IRC (bridge bot)
@FromIRC
<RX14> what?
Serdar Dogruyol - Sedo セド
@sdogruyol
ugh wrong sentence
Rubi
@codenoid
eh, btw, can i make a portable app with crystal, how about os library and dependencies ?
Serdar Dogruyol - Sedo セド
@sdogruyol
i remember you talking about building a docker image for a statically linked crystal
From IRC (bridge bot)
@FromIRC
<RX14> better
<RX14> building a statically compiled crystal distribution in docker