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
Elias Perez
@eliasjpr
Maybe is not a bug maybe is a feature :D
maybe this is why https://carc.in/#/r/2sv9
Cris Ward
@crisward
Just open sourced this - https://github.com/crisward/mailer
Ary Borenszweig
@asterite
When you don't use a constant it's not typed, so a constant can be used as a placeholder in macros
That is, when you don't use that constant at runtime
Also known has hack #123 (just kidding)
But Elixir does something similar, only with attributes (which only exist at compile-time, I think)
Kingsley Lewis
@vonKingsley
is there a way to tell crystal to always use some link-flags, so i don't forget to pass --link-flags -I/usr/local/opt/openssl/include --link-flags -L/usr/local/opt/openssl/lib each time
José Rodrigues
@joselfr
@vonKingsley I don't know if you can configure crystal for that but you can do a shell alias. Or better a makefile.
Kingsley Lewis
@vonKingsley
thanks @jose-rodrigues i think ill add it to a shell alias
Claudio Holanda
@kazzkiq
@crisward Awesome! Will take a look at it tonight. Thanks!
Ary Borenszweig
@asterite
You can use @[Link] on LibC
Cris Ward
@crisward
@kazzkiq raise an issue if you have any problems. Took me a while to originally get the apis working ok, but pretty sure everything is there now, except the stuff mentioned in the Readme.
From IRC (bridge bot)
@FromIRC
<oprypin> @vonKingsley, have u tried {LD_,}LIBRARY_PATH=/usr/local/opt/openssl/lib crystal run blah
<oprypin> in which case, export {LD_,}LIBRARY_PATH=/usr/local/opt/openssl/lib in your shell and proceed normally
Kingsley Lewis
@vonKingsley
@oprypin I originally just tried LIBRARY_PATH=/usr/local/opt/openssl/lib crystal run which didn't work for me
From IRC (bridge bot)
@FromIRC
<oprypin> LIBRARY_PATH is for build LD_LIBRARY_PATH is for execution. so have u tried both?
Kingsley Lewis
@vonKingsley
@oprypin just tried it and it still didn't work for me, still links to openssl 0.9.8
From IRC (bridge bot)
@FromIRC
<oprypin> @vonKingsley, how are you checking that? it does not link to any particular openssl
<oprypin> you must use LD_LIBRARY_PATH when running the resulting binary
<oprypin> that's when the override happens
Kingsley Lewis
@vonKingsley
i was checking two ways 1 with otool -L on the binary. and the other was running a wireshark and checking if it was using tls 1.2, trying to troublshoot an tls issue
From IRC (bridge bot)
@FromIRC
<oprypin> ok but did u start those with LD_LIBRARY_PATH
Kingsley Lewis
@vonKingsley
Yeah I tried LD_LIBRARY_PATH=/usr/local/opt/openssl/lib crystal run tls_test.cr and it was still using, TLS V1. no worries on it. i got to run but i'll figure something out.
Faustino Aguilar
@faustinoaq
I know you should use LIBRARY_PATH at compile time and LD_LIBRARY_PATH at run time. so:
$ LIBRARY_PATH=/my/lib/path crystal build myprogram.cr
$ LD_LIBRARY_PATH=/my/lib/path ./myprogram

<oprypin> LIBRARY_PATH is for build LD_LIBRARY_PATH is for execution. so have u tried both?

I just see it :sweat_smile:

Faustino Aguilar
@faustinoaq

Does Crystal have something like Intersection Types ? [0]

[0] - https://flow.org/en/docs/types/intersections/

Ghost
@ghost~55586c4815522ed4b3e08557
@faustinoaq I don't get it, what's the difference with our unions?
Faustino Aguilar
@faustinoaq

I'm a bit confused, because I think unions behave differently [0]

[0] - https://flow.org/en/docs/types/unions/

Maybe it's not valid to compare Flow & Crystal :sweat_smile:

Ghost
@ghost~55586c4815522ed4b3e08557
From the given examples, I don't think intersection type is relevant in Crystal
ezrast
@ezrast
You might want to require that an object's class includes two different modules
Ghost
@ghost~55586c4815522ed4b3e08557
oh right
ezrast
@ezrast
I don't know what a real use case would look like though
Ghost
@ghost~55586c4815522ed4b3e08557
no idea too
From IRC (bridge bot)
@FromIRC
<oprypin> @faustinoaq, what's your use case?
Martin Verzilli
@mverzilli
when you're augmenting JS with Flow it makes sense because then you can annotate a param as "whatever you send here should have an attribute X and an attribute Y"
Ghost
@ghost~55586c4815522ed4b3e08557
pinging @asterite will maybe bring a little light here
yes @mverzilli that's what I was thinking too
Martin Verzilli
@mverzilli
in JS it's common to use ad-hoc objects to sort of gimmick named arguments, for example
Flow is a huge attempt at reverse engineering common patterns of use in JS and type-check them
well "reverse engineering" is a very poor choice of terminology :P, it'd be more "capturing"
Nick Clifford
@nickbclifford
can someone help explain the usage of fun outside of a lib declaration to me?
I've seen it used in some issues as a way to mess with the definition of main
but I don't fully understand how that works
Rubi
@codenoid
finally, crystal and @ysbaddaden selenium used in my office <3
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: