Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 08:23
    caspiano edited #10531
  • Dec 08 23:04
    HertzDevil edited #12623
  • Dec 08 22:57
    Blacksmoke16 edited #9745
  • Dec 08 22:57
    Blacksmoke16 labeled #9745
  • Dec 08 22:57
    Blacksmoke16 labeled #9745
  • Dec 08 22:54
    HertzDevil labeled #12828
  • Dec 08 22:54
    HertzDevil labeled #12828
  • Dec 08 22:54
    HertzDevil opened #12828
  • Dec 08 22:34
    straight-shoota edited #12827
  • Dec 08 22:32
    straight-shoota edited #12827
  • Dec 08 22:29
    straight-shoota labeled #12827
  • Dec 08 22:29
    straight-shoota labeled #12827
  • Dec 08 22:29
    straight-shoota opened #12827
  • Dec 08 22:15
    straight-shoota closed #12814
  • Dec 08 17:12
    straight-shoota assigned #12814
  • Dec 08 17:12
    straight-shoota assigned #12813
  • Dec 08 17:12
    straight-shoota assigned #12809
  • Dec 08 17:12
    straight-shoota assigned #12802
  • Dec 08 17:12
    straight-shoota assigned #12797
  • Dec 08 17:12
    straight-shoota assigned #12664
George Dietrich
@Blacksmoke16
yup
From IRC (bridge bot)
@FromIRC
<alekhine> Wow, that is... some new information
George Dietrich
@Blacksmoke16
has its uses, but if thats all you need just write up a bash script
From IRC (bridge bot)
@FromIRC
<alekhine> Nah, I want a compiled language
<alekhine> So, here's my real question
<alekhine> Is crystal fun to write?
George Dietrich
@Blacksmoke16
i think so yes, but i dont think it'll help you much if all you want to do is execute a bunch of shell commands
From IRC (bridge bot)
@FromIRC
<alekhine> I've been learning for about a year and a half, but I have not yet found a language I really enjoy using
<alekhine> Lol, don't worry about that. That was just something I wasn't aware of, I won't be wrapping all my scripts in c now
George Dietrich
@Blacksmoke16
that's what bash is for :)
From IRC (bridge bot)
@FromIRC
<alekhine> lol you're right. or python i guess
George Dietrich
@Blacksmoke16
python wouldn't help much either if all you want to do is like
cd /some/dir
cp /some/thing.txt ./
some command --foo
From IRC (bridge bot)
@FromIRC
<alekhine> Bash is still very good at file manipulation. Though I use fish :⁠)
George Dietrich
@Blacksmoke16
by bash i more so kinda meant .sh file
or whatever shell you use yea
From IRC (bridge bot)
@FromIRC
<alekhine> Yeah, Shell languages
<alekhine> Well that answers my questions, I'll go install crystal
George Dietrich
@Blacksmoke16
:thumbsup:
From IRC (bridge bot)
@FromIRC
<alekhine> night
From IRC (bridge bot)
@FromIRC
<ua_> I kinda wonder why he's set on compiled language
From IRC (bridge bot)
@FromIRC
<kevinsjoberg> Is this a bug or not? https://play.crystal-lang.org/#/r/bjk8 I know @Blacksmoke16 was playing around with this a bit yesterday, but I don't know for a fact if its a bug or a limitation. Would like to try fix it if its a bug.
<kevinsjoberg> Perhaps I should fail it as a bug in upstream and see what the outcome is?
<kevinsjoberg> file*
Kirk Haines
@wyhaines

Your add_b does work. What fails is actually the puts.

Add a macro line to show you B after you assign to it:

    {%
      B[key] = { type: @type.name, value: value }
      pp B
    %}

You will see that data is being added.

What is failing is the non-macro access to either A::B or C::B.

From IRC (bridge bot)
@FromIRC
<kevinsjoberg> @wyhaines, sorry I should have been clear. Yes, the macro works. I know the puts is the culprit, but I'd still expect it to work.
From IRC (bridge bot)
@FromIRC
<kevinsjoberg> Why is it breaking upon trying to access the constant at runtime?
Kirk Haines
@wyhaines

The error is being thrown from the c rystal_sigfault_handler, and my guess right now is that there is some sort of loop that is entered in the compiled code, but not the interpreted code, which is why there is the behavior difference.

I'd be curious to see if it still fails on the current crystal main branch, since at least some of that code has changed a little.

From IRC (bridge bot)
@FromIRC
<mfiano> Hello :⁠)
<mfiano> New user here. How long has crystal-lang.org been down?
<jhass[m]> Seems up for me :⁠)
From IRC (bridge bot)
@FromIRC
<mfiano> Odd. It is down for me both at home and at work. Secure connection failed due to PR_END_OF_FILE_ERROR
<jhass[m]> maybe some common "security software"?
From IRC (bridge bot)
@FromIRC
<kevinsjoberg> Up for me as well.
<mfiano> I don't have any such thing, but finally seems to work now and I did nothing.
<mfiano> Sorry for the noise :⁠)
Taupiqueur
@alexherbo2
do you have an example of use for iterator of?
From IRC (bridge bot)
@FromIRC
<jhass[m]> The single element overload specifically?
Quinton Miller
@HertzDevil
it seems to happen because you are adding a MacroId to that NamedTuple
this also breaks for example
A = [] of Int32
{% A << "1".id %}
A
Unhandled exception: can't execute `__temp_499[0] = 1` at eval:1:5: `1` has no type (Exception)
Nikolaii Lodenos
@lodenos
I’ve a little question about Int128 how work’s behing that’s use SSE4 or not ?
From IRC (bridge bot)
@FromIRC
<kevinsjoberg> @HertzDevil should it break though?
<kevinsjoberg> Looking at the compiler code, it’s clear MacroId is the culprit, but I still think it should be able to deduce the type here.
From IRC (bridge bot)
@FromIRC
<mfiano> Curious, why does crystal not have traditional block-level symbol table semantics?
George Dietrich
@Blacksmoke16
:shrug: maybe a better question for the forums?
From IRC (bridge bot)
@FromIRC
<terminalpusher> where can I watch the recorded video of the Crystal 1.0 conference?
George Dietrich
@Blacksmoke16
they're not released publicly yet