Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 11:08
    straight-shoota closed #12193
  • 11:08
    straight-shoota closed #12278
  • 11:08
    straight-shoota closed #12384
  • 11:07
    straight-shoota closed #11255
  • 11:07
    straight-shoota closed #10973
  • 11:06
    straight-shoota closed #6447
  • 11:06
    straight-shoota closed #12353
  • 07:31
    straight-shoota labeled #12392
  • 03:41
    Blacksmoke16 edited #12393
  • 01:59
    Blacksmoke16 edited #12393
  • 01:57
    Blacksmoke16 edited #12393
  • 01:57
    Blacksmoke16 edited #12393
  • 01:49
    Blacksmoke16 labeled #12393
  • 01:49
    Blacksmoke16 labeled #12393
  • 01:49
    Blacksmoke16 labeled #12393
  • 01:49
    Blacksmoke16 opened #12393
  • 01:09
    phil294 edited #12392
  • 01:08
    phil294 edited #12392
  • 01:07
    phil294 edited #12392
  • 01:00
    phil294 edited #12392
unreadable
@unreadable
Yeah, that's good too
How can I/
?
I tried with a slice but gave me an error
I'm mainly looking to read the request body of a form
Ghost
@ghost~55586c4815522ed4b3e08557
you're probably looking for IO#gets_to_end to read the whole IO to a String
Bar Hofesh
@bararchy
What kind of sort does Array#sort uses ?
From IRC (bridge bot)
@FromIRC
<Yxhuvud> @bararchy: I can recommend diving into the source for that kind of questions. The source is quite readable.
Ghost
@ghost~55586c4815522ed4b3e08557
iirc it's a really fast sorting algorithm, faster than the one in C++ stdlib
Bar Hofesh
@bararchy
Ok, it seems to use quick sort
Oh, also heap sort
Ghost
@ghost~55586c4815522ed4b3e08557
here is the pr: crystal-lang/crystal#3514
it's intro sort, never heard of it though..
Bar Hofesh
@bararchy
Cool
I'll read on it on wikipedia sounds interesting
unreadable
@unreadable
Finally I got it. I was using ctx.reques.body instead of ctx.params.body with kemal
Hanyuan Li
@hanyuone
How do I use libui.cr?
I want to run the samples, but I have no idea how :(
unreadable
@unreadable
Is crystal regexp fast?
From IRC (bridge bot)
@FromIRC
<bmcginty> @krypton97: fast enough for the bits I've used it for.
<bmcginty> @krypton97: if you want to check for yourself, try using the benchmark module.
<RX14> @krypton97 it uses libpcre which is very optimised
unreadable
@unreadable
I'm looking to do some validation
Hanyuan Li
@hanyuone
Argh C is confusing :(
From IRC (bridge bot)
@FromIRC
<Yxhuvud> rx14: But libPCRE is not statically linked, is it? Because if not, then the minimal cost is the cost for walking the linking, which is not necessarily insignificant.
<RX14> wat?
<RX14> it's linked once when you start the program
<RX14> then it makes no difference
<RX14> disregarding LTO
Hanyuan Li
@hanyuone
Argh how do you build GTK+ w/ Homebrew
From IRC (bridge bot)
@FromIRC
<Yxhuvud> sure but calling functions in it DO make a difference as it is always a jump or two away.
<RX14> no
<RX14> it's just a normal function call
<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?
From IRC (bridge bot)
@FromIRC
<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: