Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 15:55
    Blacksmoke16 closed #13047
  • 15:53
    serge-hulne closed #13047
  • 15:45
    Blacksmoke16 edited #13047
  • 15:42
    serge-hulne labeled #13047
  • 15:42
    serge-hulne opened #13047
  • 02:16
    renovate[bot] edited #12735
  • Feb 04 23:27
    straight-shoota milestoned #12966
  • Feb 04 23:27
    straight-shoota milestoned #12966
  • Feb 04 22:45
    Blacksmoke16 synchronize #12966
  • Feb 04 12:51
    straight-shoota closed #12224
  • Feb 04 12:51
    straight-shoota closed #13034
  • Feb 04 12:15
    straight-shoota milestoned #12921
  • Feb 04 12:15
    straight-shoota milestoned #12921
  • Feb 04 10:44
    straight-shoota edited #12921
  • Feb 04 02:39
    cyangle synchronize #12921
  • Feb 04 01:08
    cyangle synchronize #12921
  • Feb 04 01:08
    cyangle synchronize #12921
  • Feb 03 22:11
    straight-shoota labeled #12794
  • Feb 03 22:11
    straight-shoota assigned #12794
  • Feb 03 22:07
    straight-shoota synchronize #12959
IO::Memory shouldn't be involved.
<frojnd> DEFAULT_CREATE_PERMISSIONS, encoding = nil, invalid = nil) : self) ?
From IRC (bridge bot)
@FromIRC
<frojnd> @oprypin https://carc.in/#/r/d4op I get No such file
<frojnd> But then again maybe I don't understand how to write to file
oprypin
@oprypin:matrix.org
[m]
frojnd, maybe the directory "some_file" doesn't exist
the code is all good, also should delete this line as well io = IO::Memory.new io.gets_to_end
From IRC (bridge bot)
@FromIRC
<frojnd> @oprypin it doesn't since it didn't extract it. Hm I have to create it by hand?
oprypin
@oprypin:matrix.org
[m]
yes
From IRC (bridge bot)
@FromIRC
<frojnd> If I delete that io line, what should I put inside IO.copy()
<frojnd> Just IO.copy(io.gets_to_end, f)
oprypin
@oprypin:matrix.org
[m]
literally just delete that line, no other change compared to https://carc.in/#/r/d4op
that is because you already have |io|
frojnd,
From IRC (bridge bot)
@FromIRC
<frojnd> I see
<frojnd> I have to use typeof more often in this lerning proccess
<frojnd> Thank you oprypin
From IRC (bridge bot)
@FromIRC
<Sankalp> Hi #crystal-lang
George Dietrich
@Blacksmoke16
o/
From IRC (bridge bot)
@FromIRC
<Sankalp> Set{1,2,3}.map(...) returns an Array
<Sankalp> Is this expected?
George Dietrich
@Blacksmoke16
i think so
could call .to_set on it
From IRC (bridge bot)
@FromIRC
<Sankalp> True
George Dietrich
@Blacksmoke16

https://crystal-lang.org/api/1.4.1/Enumerable.html

Note that most search and filter methods traverse an Enumerable eagerly, producing an Array as the result. For a lazy alternative refer to the Iterator and Iterable modules.

From IRC (bridge bot)
@FromIRC
<Sankalp> Ahh.. I see.
<Sankalp> Thank you, Blacksmoke16!
Kirill Zvonov
@kzvonov
Hey guys! I've a problem installing Crystal on my M1 Pro Chip inside a docker container. To be precise (1) I have M1 Pro chip (2) I have a container with ruby powered by Debian 11 (3) I'm trying to run this script RUN curl -fsSL https://crystal-lang.org/install.sh | bash
I suppose I can compile it from the source code, but are there any guides about it?
From IRC (bridge bot)
@FromIRC
<Sankalp> There's a guide on how to install it on a debian system https://crystal-lang.org/install/on_debian/
Kirill Zvonov
@kzvonov
Yep, there's, but it doesn't work for Mac M1 Pro Chip when you are installing crystal in a Docker container
(1) % docker run --rm -it debian bash
(2) apt update && apt install curl
(3) curl -fsSL https://crystal-lang.org/install.sh | bash
(4) crystal -> bash: crystal: command not found
It doesn't work
From IRC (bridge bot)
@FromIRC
<frojnd> @kzvonov what does the output say after you run curl ... command ?
<frojnd> @kzvanov also add dpkg -l |grep crystal to docker and see the output
Kirill Zvonov
@kzvonov
dpkg -l |grep crystal
ii  crystal1.2-docs                    1.2.2-1+1.103                  all          Documentation for the Crystal Programming Language
ii  crystal1.2-samples                 1.2.2-1+1.103                  all          Sample code for the Crystal Programming Language
@FromIRC frojnd thanks for helping
From IRC (bridge bot)
@FromIRC
@kzvonov, I'm a bot, bleep, bloop. I relay messages between IRC (#crystal-lang on irc.libera.chat) and here
<frojnd> @kzvanov can you also paste the output of: curl -fsSL https://crystal-lang.org/install.sh | bash
From IRC (bridge bot)
@FromIRC
<frojnd> Maybe because you are on arm?
Kirill Zvonov
@kzvonov
any suggestions?
From IRC (bridge bot)
@FromIRC
<frojnd> I know there were some experimenting with arm but more on https://forum.crystal-lang.org https://forum.crystal-lang.org/t/docker-images-for-arm-rpi/1105/6?
Kirill Zvonov
@kzvonov
Thanks!
George Dietrich
@Blacksmoke16
Paul M. Lambert
@plambert
Dumb, quick question: anyone know of a relatively loose date/time string parser that allows a whole lot of common patterns? Like 2022-05-02 06:07:08 and 5/2/2022 6pm and such?
Not looking for anything perfect, just to allow CLI users the chance to use whatever format they try first...
moe
@moe:busyloop.net
[m]
didn't find one when i last looked
shouldn't be too hard to port one of the ruby ones tho, if you're so inclined. e.g. https://github.com/mojombo/chronic