#racket

/

      • mizu_no_oto joined the channel
      • dansa
        Is there a way to obtain the fields of a structure? For example, (define-struct posn (x y)). Is there a way to get (list x y)?
      • jerryj has quit
      • asumu
        dansa: not really, no.
      • Because structs in a sense don't have field names. They just have names of accessors/setters.
      • (this is why struct-type-info doesn't give you a list of fields)
      • dansa
        My situation is this. I started reading some values of a JSON into a structure. Then I wanted to put that structure into a database --- each field in column. I gave up on structures and built an assoc-list. I'm much happier with assoc-lists now. Otherwise I'd have a laborious job of spelling each field out.
      • asumu
        Yes, that or a hash table sounds like a more appropriate data structure for that.
      • dansa
        Yes, I considered sticking to the JSON object itself, but as it turns out I need some order sometimes. When it comes to inserting the data into the database, I need to guaranteed the order in which the fields come from (say) a list. The assoc-list gives me that. The hash would not, I think.
      • _sjs joined the channel
      • asumu
        Right, hash table iteration order is unspecified.
      • (and is a source of some bugs in Racket code sometimes :p)
      • dansa
        Another thing I'm wondering is this: when I extract data from the SQL engine, I'm building an assoc-list out of the column names. I couldn't find any ready-way to get that. The db doc also mentioned I should not rely on the structure of rows-result. But it's only through rows-result I can get column names, so I am depending on it. I was expecting Racket would make my life really easy in this area, but I building some infrastructure
      • for myself. It makes me wonder how people do it.
      • For instance, I don't want to name fields when they come from the database. I want to use the names of the columns. At least a start. I didn't find anything that could give me that out-of-the-box.
      • I even took a while to do these things because I kept on thinking I'd find something that would simply make it all very easy for me. No luck though.
      • cemerick joined the channel
      • xradionut joined the channel
      • mizu_no_oto joined the channel
      • tmtwd joined the channel
      • Lowl3v3l has quit
      • skinkitten joined the channel
      • skinkitten_ joined the channel
      • jao has quit
      • skinkitten_ has left the channel
      • mizu_no_oto joined the channel
      • skinkitten has quit
      • badkins has quit
      • hijink has quit
      • jxv joined the channel
      • jao joined the channel
      • jeapostrophe has quit
      • nicholasf joined the channel
      • xradionut has quit
      • htmldrum joined the channel
      • mizu_no_oto joined the channel
      • ArneBab_ joined the channel
      • nomicflux joined the channel
      • rgrinberg joined the channel
      • fluter joined the channel
      • jao has quit
      • ARCADIVS joined the channel
      • mizu_no_oto joined the channel
      • fluter joined the channel
      • nomicflux has quit
      • JoshS joined the channel
      • mizu_no_oto joined the channel
      • tmtwd joined the channel
      • htmldrum joined the channel
      • dan_f joined the channel
      • jxv has quit
      • fluter joined the channel
      • dan_f has quit
      • eli has quit
      • cemerick joined the channel
      • eli joined the channel
      • soegaard joined the channel
      • soegaard has quit
      • soegaard joined the channel
      • soegaard has quit
      • dan_f joined the channel
      • htmldrum has quit
      • htmldrum joined the channel
      • slack-irc-bot has quit
      • slack-irc-bot joined the channel
      • ozzloy_ has quit
      • khj joined the channel
      • jeapostrophe joined the channel
      • jeapostrophe has quit
      • htmldrum has quit
      • jeapostrophe joined the channel
      • htmldrum joined the channel
      • jeapostrophe has quit
      • nicholasf joined the channel
      • dan_f has quit
      • snoopy has quit
      • fluter has quit
      • hiredman has quit
      • znpy joined the channel
      • duper has quit
      • fluter joined the channel
      • duper joined the channel
      • xradionut joined the channel
      • xradionut has quit
      • lolisa joined the channel
      • nicholasf joined the channel
      • zenspider has quit
      • zenspider joined the channel
      • racketschemer joined the channel
      • racketschemer
        Hi!
      • Which version of opengl is handled by the racket wrapper?
      • jeapostrophe joined the channel
      • jeapostrophe has quit
      • soegaard joined the channel
      • Lowl3v3l joined the channel
      • ARCADIVS has quit
      • MolluskEmpire joined the channel
      • lolisa has quit
      • jeapostrophe joined the channel
      • klltkr joined the channel
      • kPb_in joined the channel
      • jeapostrophe has quit
      • hijink joined the channel
      • hijink has quit
      • badkins joined the channel
      • Ven_ joined the channel
      • JoshS has quit
      • jeapostrophe joined the channel
      • jeapostrophe has quit
      • jeapostrophe joined the channel
      • Ven_ has quit
      • jeapostrophe has quit
      • jeapostrophe joined the channel
      • jeapostrophe has quit
      • jeapostrophe joined the channel
      • jeapostrophe has quit
      • AndreasO joined the channel
      • hijink joined the channel
      • AndreasO has quit
      • hijink has quit
      • hijink joined the channel
      • lambda-smith joined the channel
      • nomicflux joined the channel
      • rgrinberg joined the channel
      • AndreasO joined the channel
      • nomicflux has quit
      • AndreasO has quit
      • JoshS joined the channel
      • nomicflux joined the channel
      • tmtwd joined the channel
      • hijink has quit
      • nomicflux has quit
      • vraid has quit
      • jeapostrophe joined the channel
      • Which version of opengl is handled by the racket wrapper?
      • jeapostrophe has quit
      • ecraven
        racketschemer: maybe look at the sources?
      • slack-irc-bot
        <leandro> hello guys! anyone has any real-life examples of REST-like web services built on top of `web-server/dispatch` that I could learn from? :slightly_smiling_face:
      • jeapostrophe joined the channel
      • PO6 joined the channel
      • PO6
        :( Why Racket is (very) slow?
      • A program written in C, C++, C# or Java are generally more efficient and faster than Racket.
      • ecraven
        PO6: where did you get that?
      • PO6
        ecraven, this is a true fact.
      • unfortunately :(
      • vraid joined the channel
      • ecraven
        PO6: that is certainly not true
      • I can write a program in any of these languages right now that is less efficient and slower than one in racket
      • Ven_ joined the channel
      • PO6
        ecraven, the .NET and JVM are faster than Racket's virtual machine, this is what I am talking about.