<FromGitter>
<Blacksmoke16> ... i did suggest using make and you said you did and still errors
<FromGitter>
<Blacksmoke16> because make is the primary entrypoint into compiling crystal
<FromGitter>
<Blacksmoke16> a PR to add it would be 🙏
<FromGitter>
<lebogan> Yes, I used make but without the target= flag. My mistake :faceplant:
<FromGitter>
<Blacksmoke16> even then im surprised it would happen even w/o that...
<FromGitter>
<Blacksmoke16> also i had no idea make has auto generated help like that
<FromGitter>
<Blacksmoke16> is pretty sweet
DeBot has quit [Ping timeout: 248 seconds]
straight-shoota has quit [Ping timeout: 276 seconds]
jhass has quit [Ping timeout: 276 seconds]
DeBot has joined #crystal-lang
jhass has joined #crystal-lang
straight-shoota has joined #crystal-lang
straight-shoota has quit [Ping timeout: 248 seconds]
jhass has quit [Ping timeout: 276 seconds]
notzmv has joined #crystal-lang
Vexatos_ has quit [Quit: Client Quit]
Vexatos has joined #crystal-lang
DeBot_ has joined #crystal-lang
DeBot has quit [Ping timeout: 260 seconds]
jhass has joined #crystal-lang
straight-shoota has joined #crystal-lang
DeBot_ has quit [Quit: Crystal IRC]
jhass has quit [Client Quit]
straight-shoota has quit [Client Quit]
dukester has joined #crystal-lang
dukester has left #crystal-lang [#crystal-lang]
DeBot has joined #crystal-lang
jhass has joined #crystal-lang
straight-shoota has joined #crystal-lang
ur5us has quit [Remote host closed the connection]
ur5us has joined #crystal-lang
ur5us has quit [Ping timeout: 240 seconds]
ur5us has joined #crystal-lang
jhass[m] has quit [Quit: Bridge terminating on SIGTERM]
jhass[m] has joined #crystal-lang
analogsalad has joined #crystal-lang
notzmv has quit [Ping timeout: 250 seconds]
<frojnd>
Hi there.
<frojnd>
I'm trying to copy file that is inside .zip Not read it. I know how to read it https://crystal-lang.org/api/1.4.1/Compress/Zip/File.html but is there a way to copy it somewhere so I can than use other system apps to manipulate/use that file?
jmdaemon has quit [Ping timeout: 250 seconds]
analogsalad has quit [Quit: bye]
<FromGitter>
<oprypin:matrix.org> frojnd, open the file from zip, you get a readable io. inside, open the destination path, you get a writable io. inside, use https://crystal-lang.org/api/1.4.1/IO.html#copy%28src%2Cdst%29%3AInt64-class-method
<FromGitter>
<oprypin:matrix.org> frojnd, yea that would be https://crystal-lang.org/api/1.4.1/File.html#open%28filename%3APath%7CString%2Cmode%3D%22r%22%2Cperm%3DDEFAULT_CREATE_PERMISSIONS%2Cencoding%3Dnil%2Cinvalid%3Dnil%29%3Aself-class-method
<FromGitter>
<oprypin:matrix.org> IO::Memory shouldn't be involved.
<frojnd>
So I should ditch https://crystal-lang.org/api/1.4.1/IO.html#copy%28src%2Cdst%29%3AInt64-class-method "def self.copy" and rather try the https://crystal-lang.org/api/1.4.1/File.html#open%28filename%3APath%7CString%2Cmode%3D%22r%22%2Cperm%3DDEFAULT_CREATE_PERMISSIONS%2Cencoding%3Dnil%2Cinvalid%3Dnil%29%3Aself-class-method (def self.open(filename : Path | String, mode = "r", perm =
<frojnd>
But then again maybe I don't understand how to write to file
<FromGitter>
<oprypin:matrix.org> frojnd, maybe the directory "some_file" doesn't exist
<FromGitter>
<oprypin:matrix.org> the code is all good, also should delete this line as well `io = IO::Memory.new io.gets_to_end`
<frojnd>
@oprypin it doesn't since it didn't extract it. Hm I have to create it by hand?
<FromGitter>
<oprypin:matrix.org> yes
<frojnd>
If I delete that io line, what should I put inside IO.copy()
<frojnd>
Just IO.copy(io.gets_to_end, f)
<FromGitter>
<oprypin:matrix.org> literally just delete that line, no other change compared to https://carc.in/#/r/d4op ⏎ that is because you already have |io|
<FromGitter>
<oprypin:matrix.org> frojnd,
<frojnd>
I see
<frojnd>
I have to use typeof more often in this lerning proccess
<frojnd>
Thank you oprypin
HumanG33k has quit [Ping timeout: 260 seconds]
HumanG33k has joined #crystal-lang
Sankalp has joined #crystal-lang
notzmv has joined #crystal-lang
<Sankalp>
Hi #crystal-lang
<FromGitter>
<Blacksmoke16> o/
<Sankalp>
Set{1,2,3}.map(...) returns an Array
<Sankalp>
Is this expected?
<FromGitter>
<Blacksmoke16> i think so
<FromGitter>
<Blacksmoke16> could call `.to_set` on it
<Sankalp>
True
<FromGitter>
<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.