Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 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
  • 00:58
    phil294 edited #12392
  • 00:58
    phil294 edited #12392
  • 00:57
    phil294 edited #12392
  • 00:56
    phil294 edited #12392
  • 00:55
    phil294 labeled #12392
  • 00:55
    phil294 opened #12392
  • Aug 15 23:55
    HertzDevil labeled #12391
  • Aug 15 23:55
    HertzDevil labeled #12391
George Dietrich
@Blacksmoke16
when using WHERE id IN ($1)
From IRC (bridge bot)
@FromIRC
<SamantazFox_> yes
George Dietrich
@Blacksmoke16
about about that + WHERE id IN ($1::text[])
From IRC (bridge bot)
@FromIRC
<SamantazFox_> gimme a sec
<SamantazFox_> Unhandled exception: operator does not exist: text = text[]
<SamantazFox_> trying without the parenthesis
<SamantazFox_> (and yes, I've removed args: from the query_all call)
<SamantazFox_> Nope, another error without parenthesis
George Dietrich
@Blacksmoke16
you need args:
From IRC (bridge bot)
@FromIRC
<SamantazFox_> args is used to pass an array of arguments, that are mapped to $1, $2 $3 and so on
<SamantazFox_> In my case, I want to provide the array directly
George Dietrich
@Blacksmoke16
yea you're right, not what you want
im sure theres a way...
Scott
@dscottboggs:matrix.org
[m]
is there an easy way to tell if an optional dependency (like GMP or regex) is installed in order to fall back on a different implementation?
George Dietrich
@Blacksmoke16
be easier to just say, hey go install this
Benjamin Wade
@RespiteSage
Yeah, I recall reading recently (maybe on the forum) about a way of doing that at runtime, but I think that's the hardest (followed by doing it at compile-time, then by just telling users to install something).
Though that's about using .so files at runtime, so maybe there's an easier way of just checking if they're there.
Benjamin Wade
@RespiteSage
I guess if your executable has permissions to run ldconfig, you could just run that using Process.
moe
@moe:busyloop.net
[m]
yea, i would rather do that at compile time (and link statically if at all possible). runtime deps are nothing but pain. having random binaries break after an apt upgrade is no fun.
Sean Gregory
@skinnyjames

Running into an interesting issue trying to work with libgit2 bindings - libgit2 passes the same payload of typeVoid* to each remote callback when cloning

so to intercept each callback from crystal, I have to pass an object containing all the callbacks (essentially a {} of String => AliasForCallbackFunctions) for each type.

Boxing the object and passing it through causes an invalid memory access error, whereas not passing it does not. I've been able to pass single boxed blocks for payloads so far, wondering what I might be doing wrong here.

oprypin
@oprypin:matrix.org
[m]
@skinnyjames: I'm fully sure that I could help you. also willing to do so. but can't look into it today. also maybe missing some details
1 reply
why do you need to pass an object containing all callbacks? why not just pass a class instance with normal methods?
Sean Gregory
@skinnyjames
I think I'm wanting the callbacks to be defined by the consumer of the lib.
1 reply
oprypin
@oprypin:matrix.org
[m]
@skinnyjames: what's the implementation of on_credentials_acquire ?
I'd think that it should be @on_credentials_acquirw = block
if so, that can be a getter on some object
and then you just box that object and pass that as Void*
Sean Gregory
@skinnyjames
for sure, I tried that too
oprypin
@oprypin:matrix.org
[m]
then can we perhaps look at the code from when you tried this?
Sean Gregory
@skinnyjames
yeah one sec
I'm currently noticing that it blows up if I pass Box.box("hello") as the payload
so it is probably unrelated?
oprypin
@oprypin:matrix.org
[m]
weird 🤔
how do you unbox? maybe there's just some basic mistake ¯\_(ツ)_/¯
Sean Gregory
@skinnyjames
it blows up without unboxing
I think the bindings might be messed up? (I'm definitely still learning
oprypin
@oprypin:matrix.org
[m]
the thing is, if you box something, you need to store that persistently as an instance variable or whatever. so that could be what's missing
bindings could be messed up too, who knows
Sean Gregory
@skinnyjames
hmmm
oprypin
@oprypin:matrix.org
[m]
if you could publish the code in a way that one can just run it and see the crash, that'd be quite a productive way to try to solve this. though i probably won't get to it today
1 reply
Sean Gregory
@skinnyjames
yup! sorry it's pretty divergent at the moment, I'll clean it up and push a branch
Was trying to debug, so I commented out the specs
curious though what this means: int (*)(git_remote_completion_t, void *) in the context of a callback function.
I feel like I'm misinterpreting it
moe
@moe:busyloop.net
[m]
Kornel Góra
@kornel_gora_twitter
Hi is crystal good language to start programing and is there any resource to learn for non programer ?
George Dietrich
@Blacksmoke16
it depends id say
not going to have as much learning resources due to it being newer, also might not be as smooth as experience if you're on windows
Kornel Góra
@kornel_gora_twitter
my main system is Mac Os what resource do you recommend to start ? and is js learn
necessarily for crystal ?
something like:
      options = Grits::Cloning::CloneOptions.default
      options.fetch_options.on_credentials_acquire do |credential, url, username|
        # handle credentials
        credential
      end
      Grits::Repo.clone("git@github.com:skinnyjames/grits.git", "./directory", options)