dominikh changed the topic of #cinch to: The IRC Framework | Latest version: Cinch 2.1.0
irsol has quit [Remote host closed the connection]
djbkd has joined #cinch
irsol has joined #cinch
Azure has quit [Read error: Connection reset by peer]
Azure has joined #cinch
djbkd has quit [Ping timeout: 245 seconds]
djbkd has joined #cinch
djbkd has quit [Quit: My people need me...]
Trenal has quit [Ping timeout: 240 seconds]
Trenal has joined #cinch
postmodern has quit [Quit: Leaving]
catepillar has quit [*.net *.split]
catepillar has joined #cinch
<Netfeed>
dominikh: i'm trying to write some sort of sql-interface for shits and giggles, and i'd like to show my row sets into structs
<Netfeed>
(i which channel this is:)
<dominikh>
Netfeed: just use an existing library, like sqlx :)
<Netfeed>
yeah, i know i probably should use that instead, (and i know i have way too little go skills atm), but i just wanted to try and see if i could, and there's so much crap in sqlx
<dominikh>
reflection is hard to get right in Go :)
<Netfeed>
i've noticed, it's even easier in java :P
<dominikh>
it's that way by design, though. reflection in Go should be a last resort, not a default solution
<dominikh>
(it's also something that should only be touched by people who have a proper and good understanding of Go's type system)
<Netfeed>
fuck that :)
<Netfeed>
this problem would be much easier if there where some sort of generics
* dominikh
sighs
<dominikh>
generics would not even help you here in any way.
<Netfeed>
i would be able to do the .(T) conversion though and i'd be done
<Netfeed>
and i know the stance in what the go-devs thinks about generics :)
<dominikh>
and how do you know, statically, at compile time, the field name, if it comes from an sql query? :)
<dominikh>
so great, you've got an isntance of T. you don't know what fields it has, you don't know what fields to assign to
<Netfeed>
well, the runtime has to solve that for me *cough*
<dominikh>
maybe you're looking for an interpreted language? :)
<dominikh>
I heard Ruby is quite dynamic :P
<Netfeed>
it works in java doesn't it?
<dominikh>
it works in Go, too, and probably in pretty much the same way: reflection. compile-time stuff like generics still won't help you here, it's strictly a runtime problem
<Netfeed>
sqlx has solved it, that means that i can solve it, but i'm starting to think that this will take more time than i have to make it workable and it would probably be easier to just write the interface upon sqlx than database/sql :(
<dominikh>
of course it's solveable. and of course it'll take time, especially if one is new to Go
<dominikh>
or reflection. or both.
<Netfeed>
and i would have written this in another language, but i need threads, and loads of them and i don't really want to use the jvm and i'd like to learn go :)
<dominikh>
and you're learning it the wrong way ;)
<Netfeed>
trial by fire
<dominikh>
let's hope you're a dragon then.
<Netfeed>
you sound a bit pessimistic :)
<Netfeed>
this would be so much easier in perl :P
<dominikh>
well, use perl then :P
<dominikh>
I'm sure perl got threads
<Gizmokid2005>
Oh you're a riot dominikh. I'm glad I've stuck around so far :)
<Netfeed>
what's the fun in that
<dominikh>
if that's your definition of a riot, you must have very boring friends :P
<Gizmokid2005>
dominikh: you're implying I have friends :P
<Netfeed>
awh, don't be a bummer
<Netfeed>
ok, yeah, sqlx went a little bit faster to implement than doing it myself :)
<dominikh>
no kidding
<dominikh>
fwiw, the sqlx dev is a good dev
<Netfeed>
i'm not doubting that
Zackio has quit [Ping timeout: 260 seconds]
postmodern has joined #cinch
djbkd has joined #cinch
djbkd has quit [Remote host closed the connection]
djbkd has joined #cinch
_djbkd has joined #cinch
djbkd has quit [Ping timeout: 264 seconds]
_djbkd has quit [Ping timeout: 250 seconds]
djbkd has joined #cinch
djbkd has quit [Remote host closed the connection]
sarkyniin has joined #cinch
<sarkyniin>
hey
<sarkyniin>
how do I check if a user is op/sop/admin?