Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Dec 01 23:53
    straight-shoota opened #12816
  • Dec 01 23:07
    straight-shoota edited #12814
  • Dec 01 23:01
    straight-shoota synchronize #12814
  • Dec 01 22:59
    straight-shoota edited #12814
  • Dec 01 22:58
    straight-shoota edited #12814
  • Dec 01 22:58
    straight-shoota edited #12814
  • Dec 01 22:55
    homonoidian opened #12815
  • Dec 01 22:55
    homonoidian labeled #12815
  • Dec 01 22:53
    straight-shoota edited #12814
  • Dec 01 22:53
    straight-shoota edited #12814
  • Dec 01 22:52
    straight-shoota edited #12814
  • Dec 01 22:52
    straight-shoota edited #12814
  • Dec 01 22:51
    straight-shoota labeled #12814
  • Dec 01 22:51
    straight-shoota labeled #12814
  • Dec 01 22:51
    straight-shoota labeled #12814
  • Dec 01 22:51
    straight-shoota opened #12814
  • Dec 01 22:16
    straight-shoota labeled #12813
  • Dec 01 22:16
    straight-shoota labeled #12813
  • Dec 01 22:16
    straight-shoota labeled #12813
  • Dec 01 22:16
    straight-shoota opened #12813
From IRC (bridge bot)
@FromIRC
<bmcginty> I'm blanking out on something here. I've got a pointer of data being returned from a library (libpq). Somehow, when the gc is running, it's segfaulting. I have a suspition it's trying to collect something from libpq land that libpq has already handled. Anyone seen anything like this before or have suggestions on where to go from here?
<bmcginty> fault is in gc_clear_stack_inner, for what that's worth. I've also taken the pointer, created a second pointer, and copied everything over with Pointer.malloc(original_pointer_size) { |i| original_pointer[i] }. so the original pointer shouldn't be used outside of that one area in the program...
Hanyuan Li
@hanyuone
Does anyone know where to start with making a C binding for GTK+?
It honestly seems like a monumental task
Because I have basically 0 knowledge of C
From IRC (bridge bot)
@FromIRC
<Papierkorb> Beginning with Gtk in that case doesn't sound like a good idea tbh
<Papierkorb> The issue isn't even writing the pure binding itself. The issue is first getting structures right, and then the correct integration
<Papierkorb> In terms of Gtk, you also have to deal with GObject, and suddenly you have inheritance in C you have to wrap too.
From IRC (bridge bot)
@FromIRC
<RX14> i havent used gobject but it sounds like a terrible idea
Serdar Dogruyol - Sedo セド
@sdogruyol
hey everyone
Ghost
@ghost~55586c4815522ed4b3e08557
hey @sdogruyol ;)
Serdar Dogruyol - Sedo セド
@sdogruyol
hey @bew, how are you?
Ghost
@ghost~55586c4815522ed4b3e08557
good! it seems to be a long time, did you take some vacation?
Serdar Dogruyol - Sedo セド
@sdogruyol
yeah, I've just returned from a vacation
Ghost
@ghost~55586c4815522ed4b3e08557
good! So you're ready to return in your crystal ambassador role? ;)
Serdar Dogruyol - Sedo セド
@sdogruyol
I'll do my best :+1:
From IRC (bridge bot)
@FromIRC
<bmcginty> I goofed. not a gc issue (again, when will I learn). I was recursively calling a function.
<RX14> bmcginty, easy way to tell is stackoverflow has "(n times)" in one of the backtraces
unreadable
@unreadable
I find crystal so much more productive than go. Kinda reminds me about node.js but simpler hehe
And no async stuffs hehe
LuckyChicken
@LuckyChicken91_twitter
yes crystal is really awesome
Serdar Dogruyol - Sedo セド
@sdogruyol
@krypton97 indeed :100:
unreadable
@unreadable
wondering id there's something similar with try/catch block in crystal o.O
Ghost
@ghost~55586c4815522ed4b3e08557
unreadable
@unreadable
Yeah, I've found that
gonna play with it
rn
unreadable
@unreadable
begin/rescue/else works like a charm
Well done crystal team. No more err != nil bs..
Serdar Dogruyol - Sedo セド
@sdogruyol
Oh, what do you mean?
unreadable
@unreadable
err != nil is specific to Golang. Go libraries are written that way so they always return an error (nil or something else)
Serdar Dogruyol - Sedo セド
@sdogruyol
Ahh, now i get it
I don't like that kind of error handling
unreadable
@unreadable
It's a pain..doing assertion for every function it's not productive at all
cevarief
@cevarief
Hi, i'm new to crystal any crud sample with sqlite or any rdbms ?
It has some nice samples
cevarief
@cevarief
@krypton97 Thank you.
unreadable
@unreadable
If you need any help I'm here. Currently working with sqlite as well
From IRC (bridge bot)
@FromIRC
<jokke> hey
Serdar Dogruyol - Sedo セド
@sdogruyol
hey @jokke
From IRC (bridge bot)
@FromIRC
<jokke> if i were to develop an alternative stdlib, how would i provide a prelude file for it?
<jokke> i tried putting a file "prelude.cr" in src/<project_name>/
Serdar Dogruyol - Sedo セド
@sdogruyol
can't you do that with --prelude ?
From IRC (bridge bot)
@FromIRC
<jokke> and then compiling something with --prelude prelude
<jokke> but that just seems to include the standard prelude
<jokke> at least it let me use puts, which isn't in my stdlib
Ghost
@ghost~55586c4815522ed4b3e08557
you need --prelude "./prelude"
From IRC (bridge bot)
@FromIRC
<jokke> @bew: and what if i want to build another project which uses my stdlib as a dep?