Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 02:38
    HertzDevil synchronize #10803
  • 02:37
    HertzDevil synchronize #10839
  • 02:35
    HertzDevil synchronize #10954
  • 02:34
    HertzDevil synchronize #11954
  • 02:32
    HertzDevil synchronize #12352
  • 02:31
    HertzDevil synchronize #12087
  • 02:31
    HertzDevil synchronize #12145
  • 02:30
    HertzDevil synchronize #12242
  • 02:29
    HertzDevil synchronize #12244
  • 02:25
    HertzDevil synchronize #12278
  • 00:56
    Blacksmoke16 labeled #12381
  • 00:56
    Blacksmoke16 labeled #12381
  • 00:52
    asterite opened #12381
  • Aug 12 20:35
    asterite closed #12379
  • Aug 12 20:35
    asterite reopened #12379
  • Aug 12 20:35
    asterite closed #12379
  • Aug 12 20:24
    phil294 edited #12380
  • Aug 12 20:19
    phil294 edited #12380
  • Aug 12 20:19
    phil294 edited #12380
  • Aug 12 20:10
    phil294 edited #12380
From IRC (bridge bot)
@FromIRC
<Papierkorb> Union(String | Nil).from_yaml will pull the "next thing" (#read_raw), and then call String.from_yaml(that_thing), which now redoes the cycle and expects a YAML document. And now that_thing suddenly becomes a true comment.
<Papierkorb> (yadda use nilable)
From IRC (bridge bot)
@FromIRC
<hightower2> Hey Papierkorb I just got an idea how I'm going to support calling <parent>.new_listener.emit( <signal>.name) when a signal is installed in Cute
<hightower2> I am going to simply open the Cute::Signal class and add the property :‚Ā†parent
<hightower2> Then in the parent class, when I list all its signals in an array anyway, I'll just go over those signals and set their #parent=
<hightower2> This will be just fine and won't require me to modify the 'macro signal' or anything inside Cute
<hightower2> Yet the signals will know their parent, and inside on() they will be able to do super; parent.new_listener.emit....
From IRC (bridge bot)
@FromIRC
<jokke> h
<jokke> Whops
Ghost
@ghost~55586c4815522ed4b3e08557
`test`
cool, just discovered that one can (inline) code blocks having ` :)
sevk
@sevk
[1,2] - [1]
unreadable
@unreadable
how can I convert IO type to String?
Ghost
@ghost~55586c4815522ed4b3e08557
you can read from the IO
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...