ChanServ changed the topic of #crystal-lang to: The Crystal programming language | https://crystal-lang.org | Fund Crystal's development: https://crystal-lang.org/sponsors | GH: https://github.com/crystal-lang/crystal | Docs: https://crystal-lang.org/docs | Gitter: https://gitter.im/crystal-lang/crystal
chachasmooth_ has joined #crystal-lang
chachasmooth has quit [Ping timeout: 272 seconds]
<FromGitter> <void-witch> @vectorselector extremely glad i'm not the only one that's done this exact thing lmao
f1reflyylmao has joined #crystal-lang
f1refly has quit [Ping timeout: 260 seconds]
f1reflyylmao is now known as f1refly
hendursaga has quit [Ping timeout: 268 seconds]
hendursaga has joined #crystal-lang
willamin_ has joined #crystal-lang
fifr_ has joined #crystal-lang
dostoyev1ky has joined #crystal-lang
fifr has quit [*.net *.split]
^ has quit [*.net *.split]
ua_ has quit [*.net *.split]
dostoyevsky has quit [*.net *.split]
willamin has quit [*.net *.split]
PixeLInc has quit [*.net *.split]
willamin_ is now known as willamin
^ has joined #crystal-lang
PixeLInc has joined #crystal-lang
ua_ has joined #crystal-lang
zorp has joined #crystal-lang
zorp has quit [Ping timeout: 276 seconds]
_ht has joined #crystal-lang
hendursa1 has joined #crystal-lang
hendursaga has quit [Ping timeout: 268 seconds]
zorp has joined #crystal-lang
DTZUZO has joined #crystal-lang
DTZUZO has quit [Client Quit]
DTZUZU has joined #crystal-lang
DTZUZU_ has joined #crystal-lang
richbridger has quit [Remote host closed the connection]
DTZUZU_ has quit [Read error: Connection reset by peer]
DTZUZU has quit [Ping timeout: 276 seconds]
dostoyev1ky is now known as dostoyevsky
alexherbo2 has joined #crystal-lang
lchapoguzman has joined #crystal-lang
richbridger has joined #crystal-lang
lchapoguzman has quit [Ping timeout: 258 seconds]
hightower2 has joined #crystal-lang
<hightower2> What's my best bet to get 0.35.1 and shards on alpine? 'apk add crystal' gets me 0.34.0
<hightower2> (and there's on 0.35.1 in https://dev.alpinelinux.org/archive/crystal/ )
<FromGitter> <Blacksmoke16> `shards install --ignore-crystal-deps` or something liket hat
<FromGitter> <Blacksmoke16> `--ignore-crystal-version`
<hightower2> no no I mean, my issue is not difference in version between shards and crystal. I just want crystal 0.35.1 on alpine
<FromGitter> <Blacksmoke16> the docker imagine would be easiest
<FromGitter> <Blacksmoke16> or just download the `0.35.1` binary off github
<straight-shoota> 0.35.1 is in the package repository for alpine 3.13, you should be able to install it on other alpine releases using `apk --repository`
alexherbo26 has joined #crystal-lang
<straight-shoota> apart from that, dockerimage `crystallang/crystal:0.35.1-alpine` or just the tarball from github releases should work, too
alexherbo2 has quit [Ping timeout: 260 seconds]
alexherbo26 is now known as alexherbo2
dostoyevsky has quit [Quit: leaving]
dostoyevsky has joined #crystal-lang
hightower2 has quit [Ping timeout: 256 seconds]
_ht has quit [Read error: Connection reset by peer]
_ht has joined #crystal-lang
_ht has quit [Ping timeout: 246 seconds]
_ht has joined #crystal-lang
_ht has quit [Read error: Connection reset by peer]
_ht has joined #crystal-lang
<Andriamanitra> is stdlib Array's insertion (in the middle) O(1)? if not is there any ordered stdlib collection that does have fast insertions in the middle?
<Andriamanitra> or i guess partially ordered (heap) would be good enough for my problem too
<FromGitter> <jrei:matrix.org> Not 100% sure, I think it is
<FromGitter> <jrei:matrix.org> What I'm sure it Deque or Hash are not O(1)
<straight-shoota> inserting in the middle can't be O(1) for array because it need to shift items to the left/right
<FromGitter> <jrei:matrix.org> ha right
<FromGitter> <jrei:matrix.org> I missread
<FromGitter> <jrei:matrix.org> but changing a value in the middle is O(1)
<FromGitter> <jrei:matrix.org> your best bet is to know the size of the array in advance
<straight-shoota> could try this: https://github.com/abvdasker/crystal-linked-list
<Andriamanitra> i'm doing a codewars problem so i'm limited to stdlib
<Andriamanitra> i guess i'll have to code my own heap
<FromGitter> <jrei:matrix.org> you don't know the size?
<straight-shoota> yeah, stdlib doesn't have that
<straight-shoota> (at least not in the public API, there are some internal linked list implementations=
<Andriamanitra> also i don't think linked list is good enough, it's O(n) for inserting in the middle
<Andriamanitra> or well i guess the insertion itself is fast but you need to find the index first which is O(n)
<straight-shoota> yeah it's only constant if you already have the position where you want to insert
<FromGitter> <jrei:matrix.org> How can anything be O(1) if we don't know the size? A malloc will be needed at some point anyway
<straight-shoota> yeah I can't see how O(1) would be possible inserting in the middle of any data structure
<Andriamanitra> could be that O(log n) is the best possible
<FromGitter> <jrei:matrix.org> ...I don't really understand: what's is wanted at the end?
<FromGitter> <jrei:matrix.org> you've already tried Array and didn't work well, or cant use it?
<Andriamanitra> i've tried a bunch of things and nothing was fast enough so far -- the problem requires solution to be O(n log n) and my attempts were i think O(n^2)
<Andriamanitra> basically i will need something that stays sorted as i add stuff to it, so probably a heap or other tree structure
<FromGitter> <watzon:matrix.org> Could you share the problem?
andremedeiros has quit [Read error: Connection reset by peer]
andremedeiros has joined #crystal-lang
andremedeiros has quit [Read error: Connection reset by peer]
andremedeiros has joined #crystal-lang
teardown has quit [Ping timeout: 268 seconds]
teardown has joined #crystal-lang
teardown has quit [Remote host closed the connection]
teardown has joined #crystal-lang
alexherbo2 has quit [Ping timeout: 246 seconds]
alexherbo2 has joined #crystal-lang
alexherbo2 has quit [Excess Flood]
alexherbo2 has joined #crystal-lang
alexherbo26 has joined #crystal-lang
alexherbo2 has quit [Ping timeout: 245 seconds]
alexherbo26 is now known as alexherbo2
_ht has quit [Remote host closed the connection]
alexherbo2 has quit [Ping timeout: 245 seconds]
zorp has quit [Ping timeout: 276 seconds]