Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 19:45
    mohd-akram synchronize #11439
  • 19:14
    straight-shoota synchronize #11499
  • 18:48
    mgomes ready_for_review #11482
  • 18:20
    HertzDevil labeled #11482
  • 18:20
    HertzDevil labeled #11482
  • 18:17
    HertzDevil synchronize #11495
  • 18:02
    HertzDevil labeled #11503
  • 18:02
    HertzDevil labeled #11503
  • 18:02
    HertzDevil labeled #11503
  • 18:02
    HertzDevil opened #11503
  • 17:42
    mgomes edited #11482
  • 17:28
    mgomes synchronize #11482
  • 15:42
    straight-shoota closed #11501
  • 15:27
    straight-shoota labeled #11501
  • 15:27
    straight-shoota unlabeled #11501
  • 13:04
    HertzDevil synchronize #11502
  • 11:47
    HertzDevil synchronize #11496
  • 11:47
    HertzDevil synchronize #11495
  • 10:48
    HertzDevil labeled #11502
  • 10:48
    HertzDevil labeled #11502
George Dietrich
@Blacksmoke16
private top level aliases are scoped to the file they're defined in
From IRC (bridge bot)
@FromIRC
<mfiano> Oh! I wasn't aware that program-level private stuff was file-local
From IRC (bridge bot)
@FromIRC
<mfiano> That is great
mfiano
@mjfiano:matrix.org
[m]
test
Taupiqueur
@alexherbo2
why I can't refer to Scope in Snippet::Parser?
I have Snippet::Scope struct defined, it can't find it
George Dietrich
@Blacksmoke16
can you share the code/error?
Taupiqueur
@alexherbo2
George Dietrich
@Blacksmoke16
seems the error is coming from YAML::Serializable, can you include more of the strack trace?
Taupiqueur
@alexherbo2
it's odd because if I replace struct Snippet::Scope { with struct Scope, it finds it
George Dietrich
@Blacksmoke16
what happens if you rename the struct to like Snippet::Scope2
Taupiqueur
@alexherbo2
Same error
Can it be due to my forwarded block in Walk filter?
George Dietrich
@Blacksmoke16
im not sure
Taupiqueur
@alexherbo2
I haven't found a way to use return like in other filtering methods
mfiano
@mjfiano:matrix.org
[m]
Any Crystal books published yet?
George Dietrich
@Blacksmoke16
one, but it's pre 1.0
mfiano
@mjfiano:matrix.org
[m]
(or WIP)
George Dietrich
@Blacksmoke16
is one that i know of that it's the works at least
mfiano
@mjfiano:matrix.org
[m]
Ah is that mentioned on the homepage somewhere?
George Dietrich
@Blacksmoke16
dont think so
mfiano
@mjfiano:matrix.org
[m]
Ah "Programming Crystal" I take it
George Dietrich
@Blacksmoke16
yea, id prob just wait for the other to come out, as it'll be more up to date and such
mfiano
@mjfiano:matrix.org
[m]
What's this other one?
George Dietrich
@Blacksmoke16
it's WIP atm, but should be out later this year
mfiano
@mjfiano:matrix.org
[m]
Is the name or link still WIP?
George Dietrich
@Blacksmoke16
its still being written so both?
mfiano
@mjfiano:matrix.org
[m]
Ah I see. I suppose it was just mentioned in passing here or the forums then.
George Dietrich
@Blacksmoke16
https://crystal-lang.org/reference/syntax_and_semantics/index.html is also very good if you haven't read thru it yet
mfiano
@mjfiano:matrix.org
[m]
I read the whole thing yesterday.
George Dietrich
@Blacksmoke16
:thumbsup: nice
mfiano
@mjfiano:matrix.org
[m]
Working my way through the stdlib api docs now
(while writing code, because no book will teach you to do :))
Benjamin Wade
@RespiteSage
Advent of Code is also a very good source for exercises, especially if you want to learn the standard library. There's a lot of opportunity to use the very useful methods on Iterable/Enumerable/Indexable/Array.
mfiano
@mjfiano:matrix.org
[m]
I have a problem with AoC even with the language I've been using for ~20 years...not very good at human descriptions of problems with tons red herrings
Benjamin Wade
@RespiteSage
That's fair.
I tend to use Crystal pretty often to implement math routines that I find interesting (e.g. I've recently been interested in Lucas Sequences for estimating roots), so that could also be another way to practice, if you find that interesting.
mfiano
@mjfiano:matrix.org
[m]
Yes, I am writing a little linear algebra library to practice, actually.
Benjamin Wade
@RespiteSage
:thumbsup:
mfiano
@mjfiano:matrix.org
[m]
Does Crystal have the distinction of shallow vs deep copying builtin?
clone vs dup i take it?
George Dietrich
@Blacksmoke16
yes
mfiano
@mjfiano:matrix.org
[m]
Thanks, and the last question before lunch: Is there any way to emit the disassembly, or at the very least, the IR, of a given method (preferably the former)?
George Dietrich
@Blacksmoke16
IR meaning LLVM IR yea?
mfiano
@mjfiano:matrix.org
[m]
Yes, though that is foreign to me so preferably the machine code (asm)
George Dietrich
@Blacksmoke16
--emit [asm|obj|llvm-bc|llvm-ir] Comma separated list of types of output for the compiler to emit