Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Feb 07 18:12
    HertzDevil labeled #13052
  • Feb 07 18:12
    HertzDevil labeled #13052
  • Feb 07 18:12
    HertzDevil labeled #13052
  • Feb 07 18:12
    HertzDevil opened #13052
  • Feb 07 17:49
    straight-shoota closed #13051
  • Feb 07 17:46
    beta-ziliani milestoned #13051
  • Feb 07 17:46
    beta-ziliani milestoned #13051
  • Feb 07 14:03
    beta-ziliani review_requested #13050
  • Feb 07 13:59
    straight-shoota labeled #13051
  • Feb 07 13:59
    straight-shoota assigned #13051
  • Feb 07 13:59
    straight-shoota opened #13051
  • Feb 07 13:50
    straight-shoota milestoned #13050
  • Feb 07 13:50
    straight-shoota milestoned #13050
  • Feb 07 13:47
    Blacksmoke16 labeled #13050
  • Feb 07 13:47
    Blacksmoke16 labeled #13050
  • Feb 07 13:47
    Blacksmoke16 labeled #13050
  • Feb 07 13:47
    Blacksmoke16 labeled #13050
  • Feb 07 13:39
    bcardiff opened #13050
  • Feb 07 10:33
    straight-shoota closed #12965
  • Feb 07 10:33
    straight-shoota closed #12966
George Dietrich
@Blacksmoke16
oh, shards install --production fails if there isnt a shard.lock
ah crystal-lang/shards#473, the snap plugin needs updated in that case
my as well port it to the v2 plugin system too. Guess I know what ill be doing this weekend :P
From IRC (bridge bot)
@FromIRC
<straight-shoota> It seems there's no v2 plugin for Crystal yet...
From IRC (bridge bot)
@FromIRC
<yxhuvud> Hmm. So why do I get errors? It'd be nice to figure it out :⁠(
From IRC (bridge bot)
@FromIRC
<f1refly> Is work currently going on to support crystal on the m1 mac with homebrew? I introduced one of my colleagues to it about a year ago and he can't use his scripts any more since changing his work computer
From IRC (bridge bot)
@FromIRC
<mps> f1refly: unstall alpine linux in qemu and then you can run crystal in VM
<mps> it works pretty fast
<straight-shoota> On our side aarch64_darwin is completely supported. It's just that an LLVM bug prevented upgrading to LLVM 11.
<straight-shoota> I hear crystal runs very well with Rosetta on M1 chips
<f1refly> neat, i'll tell him
From IRC (bridge bot)
@FromIRC
<yxhuvud> oh, I might have found my issue. I didn't initialize one of the fields I sent into things and apparently it wasn't set to 0 by default. :x
George Dietrich
@Blacksmoke16
@straight-shoota yea planning on taking a stab at porting it to v2 this weekend prob
shouldn't be too bad. In the meantime ill replace --production with --without-development to get the v1 working again at least
is it expected that shards build --production works without a shard.lock?
From IRC (bridge bot)
@FromIRC
<straight-shoota> No, in 0.15.0 --production implies --frozen. Prior to that it was intended to work like this, but it was not enforced.
George Dietrich
@Blacksmoke16
gotcha. and is there a point in doing an install before a build. couldn't we simplify the build process to just like shards build --without-development, iirc the catch is that doesn't run post install hooks or something?
nvm, tested it and it did
Taupiqueur
@alexherbo2
Is there an alternative to partition but with find?
George Dietrich
@Blacksmoke16
use .index and then idx - 1 idx + 1?
Taupiqueur
@alexherbo2
I think to delete, which get the element and remove from the array
In a directory list, I need to get a yaml file
George Dietrich
@Blacksmoke16
array.index(value).try { |idx| array.delete_at (idx - 1)..(idx +1) }
something like that maybe?
Taupiqueur
@alexherbo2
And other files are snippets
George Dietrich
@Blacksmoke16
not sure i follow
Taupiqueur
@alexherbo2
I have an array of paths, where I need to get the scope.yml, it can be present or not, and evaluate its content, I need to separate it from the snippets files in the file list
returns the value if found, otherwise nil
Taupiqueur
@alexherbo2
Yep, I think delete is close to partition for a single element and with mutation
Kirk Haines
@wyhaines
@alexherbo2 I am still not completely clear on what you are doing, but maybe my little find shard might make it easier? https://github.com/wyhaines/find.cr It lets you traverse a path, acting on what you find, with a really simple API. So you could handle your scope.yml files separately from the rest of the files pretty easily.
didactic-drunk
@didactic-drunk
file.pos returns 0 after write. Is this a bug?
George Dietrich
@Blacksmoke16
Probably just need to flush
didactic-drunk
@didactic-drunk
Is this by design or leaky abstraction?
George Dietrich
@Blacksmoke16
It flushs at the end, so I'd say by design
I think there's a way to make it always flush
.sync = true maybe
didactic-drunk
@didactic-drunk
It I set sync = false performance takes a nose dive with binary files writing 1-4 bytes at a time.
George Dietrich
@Blacksmoke16
makes sense
didactic-drunk
@didactic-drunk

Is crystal master backwards compatible with 1.0.0? If yes I have this

Error: can't cast Jennifer::QueryBuilder::ModelQuery(T)
to Jennifer::QueryBuilder::ModelQuery(T)

imdrasil/jennifer.cr#373

Rishav Sharan
@rishavs
has anyone integrated their crystal project with Sign in with Google/Apple oauths? I can use some reference here
George Dietrich
@Blacksmoke16
are they any diff than normal OAuth? Is a module in the stdlib you can use
Rishav Sharan
@rishavs
Basic principle is the same, but the clientside sdk are supposed to take care of all the refreshing and the hygiene stuff.
George Dietrich
@Blacksmoke16
if they're spec compliant you could leverage https://crystal-lang.org/api/master/OAuth2.html
From IRC (bridge bot)
@FromIRC
<mps> would someone on gitter type one message, I'm trying to rewrite irssi triggers to rewrite gitter messages
Johannes Müller
@straight-shoota
one message
From IRC (bridge bot)
@FromIRC
<mps> thanks
Rishav Sharan
@rishavs
two message
From IRC (bridge bot)
@FromIRC
<mps> also thanks
Lewis E. Bogan
@lebogan
 Hi. After a lot of head scratching and mild cussing, I finally managed to compile crystal 1.0.0 on a Raspberry Pi 4 running Raspbian Buster 10. Why? Cuz Crystal is cool. `crystal -v` shows the version minus the compile date. Ok. When I try to build an application I get this error: `Error: can't find file 'prelude'` 'prelude' is located in /usr/share/crystal/src.  How do I tell crystal that? Thanks