Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 05:03
    kramerul synchronize #12404
  • Aug 19 18:56
    asterite ready_for_review #12405
  • Aug 19 18:56
    asterite edited #12405
  • Aug 19 17:43
    asterite labeled #12405
  • Aug 19 16:38
    Blacksmoke16 labeled #12405
  • Aug 19 16:38
    Blacksmoke16 labeled #12405
  • Aug 19 16:02
    asterite synchronize #12405
  • Aug 19 16:01
    asterite opened #12405
  • Aug 19 15:34
    kramerul synchronize #12404
  • Aug 19 15:23
    kramerul synchronize #12404
  • Aug 19 15:13
    kramerul synchronize #12404
  • Aug 19 15:10
    kramerul synchronize #12404
  • Aug 19 15:08
    Blacksmoke16 labeled #12404
  • Aug 19 15:08
    Blacksmoke16 labeled #12404
  • Aug 19 15:08
    Blacksmoke16 labeled #12404
  • Aug 19 15:06
    wonderix opened #12404
  • Aug 19 14:20
    asterite closed #12403
  • Aug 19 12:42
    straight-shoota milestoned #12403
  • Aug 19 12:42
    straight-shoota milestoned #12403
  • Aug 19 12:03
    asterite synchronize #12403
From IRC (bridge bot)
@FromIRC
<RX14> if you're working with binary data, IO::Memory and Bytes should be what you use
<hightower2> @RX14, right, was just about to say that, thanks
Chris Watson
@watzon
Anyone know where stddef.h would come from? I seem to be missing it. Reinstalled clang and gcc already
Never mind, I found it in /usr/lib/gcc/x86_64-pc-linux-gnu/7.1.1/include, but clang seems to not be picking it up for some reason. I'm trying to use crystal_lib and it keeps telling me /usr/include/sys/types.h:145:10: fatal error: 'stddef.h' file not found
From IRC (bridge bot)
@FromIRC
<hightower2> I am trying to write data to a socket, and invoke some method/callback when the data is actually written out. Is there a built-in way for this?
Doug
@DougEverly
@drosehn see if https://github.com/DougEverly/daemonize.cr works for you
Chris Watson
@watzon
What would the Crystal equivilent of unsigned long be?
Would I do $var_name : Float64?
Zatherz
@zatherz
unsigned long is an integer type
long is, at least on most platforms that crystal targets, Int64
crystal doesn't have things like unsigned, it's separate types, so UInt64
@bararchy @watzon Thanks, I'm gonna use these results for https://gitlab.com/zatherz/magicjson
I'm gonna have an always_ordered option that makes it use force ordered, otherwise I'm gonna use naive w/ reset
Chris Watson
@watzon
Ooh awesome
Good going using GitLab
sevk
@sevk
make crystal as a human language , similar to short english .
Zatherz
@zatherz
what
Chris Watson
@watzon
:confused:
sevk
@sevk
easy++
Chris Watson
@watzon
Anyone know what these would be in a Crystal Lib file?
void numa_init (void);
void numa_uninit (void);
I tried fun numa_init, but it's telling me can't find function numa_init (Exception)
Matias Garcia Isaia
@mgarciaisaia
@watzon doesn't fun numa_init : Void work?
Chris Watson
@watzon
@mgarciaisaia nope. Still says it can't find the function
Oh well, I don't think it's an important one to include
Matias Garcia Isaia
@mgarciaisaia
The Crystal Way™ would be something like:
lib Numa
  fun init = numa_init : Void
  # ...
end
So your code calls Numa.init instead of an ugly, C-like name
Chris Watson
@watzon
Is it possible to wrap static functions? Like https://gitlab.com/procps-ng/procps/blob/master/proc/readproc.c#L89
crystal_lib seems to not like them
Ghost
@ghost~5457d9aedb8155e6700d0c69
good day, Crystalians!
I had a little problem with my PC ... it died...
so, now, I am working on a brand new laptop
it has Fedora 26
and installed crystal
almost everything works... I just got that error when I tried the playground
the package lacks dependencies, probably. You should add the missing ssl lib
Matias Garcia Isaia
@mgarciaisaia
Hi @renich! Yeah, packages don't list dependencies yet :/
sudo dnf -y install openssl-devel may do the trick for you - check https://github.com/crystal-lang/crystal/wiki/All-required-libraries#fedora for more packages than you actually need
@watzon not really that sure about static. May it be something with inline, instead?
Ghost
@ghost~5457d9aedb8155e6700d0c69
@mgarciaisaia hmmm.. odd.. libssl is provided openssl-libs and it is installed
Matias Garcia Isaia
@mgarciaisaia
Not sure how does the Crystal <--> C interop works :(
Chris Watson
@watzon
@mgarciaisaia well what I'm looking at is a static inline void function
sevk
@sevk
["a","b"] - ["a"] # this is useful @Sija
Chris Watson
@watzon
Apparently extern variables are unsupported?
Jason Waldrip
@jwaldrip
TIL: that crystal binaries are not truly portable. i.e. I cannto build on ubuntu and run on alpine... because of the bohem gc requirement.
so... with that said, is there an ongoing discussion on bringing a crystal based GC to the language. Making it 100% crystal?
John Jansen
@johnjansen
@jwaldrip didnt we have this discussion at code camp?
Jason Waldrip
@jwaldrip
Oh we did...
John Jansen
@johnjansen
or were you just muttering to yourself ;-)
i was sitting close