Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 12:39
    straight-shoota milestoned #12523
  • 12:39
    straight-shoota milestoned #12523
  • 12:37
    straight-shoota reopened #12490
  • 12:37
    straight-shoota demilestoned #10412
  • 12:37
    straight-shoota demilestoned #10412
  • 09:31
    asterite synchronize #12520
  • 04:14
    HertzDevil edited #12523
  • 04:13
    HertzDevil edited #12523
  • 04:11
    HertzDevil synchronize #12523
  • 03:25
    HertzDevil edited #11840
  • 03:20
    HertzDevil synchronize #12364
  • 03:19
    HertzDevil synchronize #11840
  • 02:24
    HertzDevil labeled #12516
  • 02:24
    HertzDevil labeled #12523
  • 02:24
    HertzDevil labeled #12523
  • 02:24
    HertzDevil labeled #12523
  • 02:24
    HertzDevil opened #12523
  • 01:29
    HertzDevil closed #12519
  • 01:29
    HertzDevil closed #12517
  • 01:24
    HertzDevil synchronize #11840
John Jansen
@johnjansen
wait, it looks like kemal handles this
@krypton97
unreadable
@unreadable
hm, I was trying this
params = ctx.request.body
ctx.response.print params["email"]
and got #
I mean params only
not params["email"]
John Jansen
@johnjansen
was it a application/x-www-form-urlencoded
unreadable
@unreadable
    <form action="/users/signup" method="post">
        <div class="form-group">
            <label>Username</label>
            <input type="text" class="form-control" name="username">
        </div>
        <div class="form-group">
            <label>Email</label>
            <input type="text" class="form-control" name="email">
        </div>
        <div class="form-group">
            <label>Password</label>
            <input type="password" class="form-control" name="password">
        </div>
        <div class="form-group">
            <label>Confirm Password</label>
            <input type="password" class="form-control" name="confirm">
        </div>
        <button type="submit" class="btn btn-warning btn-lg">Signup</button>
    </form>
Just a simple form
From IRC (bridge bot)
@FromIRC
<Papierkorb> ... I got the compiler to compile args = [ ] and then throw an runtime exception
<Papierkorb> That's a new creative one
unreadable
@unreadable
It has to be args = [] of type
From IRC (bridge bot)
@FromIRC
<Papierkorb> Sure. The point is that that shouldn't even compile in the first place.
unreadable
@unreadable
Still beta..
unreadable
@unreadable
Huston, we have a problem..
From IRC (bridge bot)
@FromIRC
<Papierkorb> struct Foo; YAML.mapping(bar: String?); end; Foo.from_yaml(%<bar: "# I'm not a comment">) Kaboom.
<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?