<FromGitter>
<tenebrousedge> you shouldn't need the `sum` var
<FromGitter>
<tenebrousedge> I don't care if you think it's more readable with it
<oprypin>
k
<oprypin>
ImAHopelessDev_gitlab: that's nice code you shared. glad you found this concept
<oprypin>
if u have a very big list of items and weights, this can be sped up with bisect at the end :>
<FromGitter>
<ImAHopelessDev_gitlab> thanks for the help! i'm just glad i go tthe concept actually working cause when I viewed that answer my brain was like WTF is this guy saying. then i was like, wait a minute let me try this with crystal on the playground lol
<FromGitter>
<laynef> Hey guys do you guys have something like JIRA to the divide the work. This community is huge and is the coolest shit in tech right now. Even if people don't know. I could help set it up right now if I knew
<FromGitter>
<tenebrousedge> the github issues list is a thing
<FromGitter>
<ImAHopelessDev_gitlab> What is JIRA?
<FromGitter>
<tenebrousedge> JIRA is an obnoxious project management tool
<FromGitter>
<tenebrousedge> no, I'm sure it works fine for some people
<FromGitter>
<ImAHopelessDev_gitlab> yeah, github issues prob take care of that
<FromGitter>
<Acciaiodigitale> @oprypin If you followed my forum thread you can see I only do a propose (plattform indipendent and not in Slack direction) but after two comments someone already takes some initiative and probably in the direction that majority likes. It is not probably the best solution in absoute, but goes in the right direction. ⏎ You use IRC. How many millenials do you think are willing to use IRC as a platform?
<FromGitter>
... You have to think in plural terms of a community if you wanna see Crystal grows.
<oprypin>
@Acciaiodigitale: i don't know what you're trying to say by millennials but i'm that and we have many younger people
<oprypin>
others will use gitter no problem
<FromGitter>
<Acciaiodigitale> You think what likes yourself and no other @oprypin
<oprypin>
@Acciaiodigitale: i don't see your data backing up the claim that people would not use Crystal (or was it just about not interacting with the community?) because they don't like the chat option
<FromGitter>
<Acciaiodigitale> I never say that: I say that language where is present a common point to link the arguments related to the language (and projects) have flourishing community (and meetups and so on) ⏎ I don't take you any number: go and see yourselves, I took the examples.
<oprypin>
anyway the larger point is that this discussion happens not so rarely and always just ends up with a tiny part of the community splitting into yet another new chat
<FromGitter>
<Acciaiodigitale> I'm not talking about plattform
<oprypin>
@Acciaiodigitale: i mean I'm not gonna look at any of the corporate backed ones, it's just well advertised
<oprypin>
that doesn't leave you with much
<FromGitter>
<Acciaiodigitale> @oprypin every time I read a chat from you I read: "I". This is why our discussion is going nowhere.
<oprypin>
that's all i can do to respond to a claim without data. add at least one data point
<FromGitter>
<Acciaiodigitale> Can I copy and paste the previouse response now?
ur5us has quit [Ping timeout: 260 seconds]
HumanGeek has joined #crystal-lang
Human_G33k has quit [Ping timeout: 250 seconds]
<oprypin>
whats a good way to write 2 specs that are, say, 10 and 11 lines each, and the only difference between them is one is missing 1 line of code? i could start with {%for and {%if but hmm
ur5us has joined #crystal-lang
<oprypin>
well thats a new one. never would've expected `File.chmod(path, 0)` to cause OverflowError :D (this is windows)
<oprypin>
aha it's just the constant `DWORD.new(-1)` being used :D instant overflow
kz82 has joined #crystal-lang
<kz82>
ret = Hash(String, String | Array(Hash(String, String))).new
<oprypin>
Stephie, no, that doesn't play nicely with my implementation plan
<Stephie>
how does it make a difference?
<oprypin>
Stephie, well for one, Crystal::System::Process cannot rely on anything that is in Process
<Stephie>
oh
<oprypin>
so instead i chose to let it always deal with the native os pid type
<Stephie>
mmh
<Stephie>
so far, the `Crystal::System` stuff has *always* returned the same type
<oprypin>
oh damn 😅
<Stephie>
it's always had an identical type interface between platforms
<Stephie>
it's kinda weird to mess that up to me
<Stephie>
but i'm not *super* opposed if it's not feasible to change
<Stephie>
i'd be fine with just like
<Stephie>
alias Process::PID = Int64 just moved before the crystal/system/process require
<Stephie>
lol
<oprypin>
Stephie, the sufficient rule that i follow is that if one method returns A or B depending on system then other methods will accept A or B with 100% correspondence
<Stephie>
yeah
<Stephie>
hmm
<Stephie>
one way to do it is to define `Crystal::System::Process::PID` inside `src/crystal/system/process.cr`
<FromGitter>
<tenebrousedge> @naqvis they're getting a failing test running crystal's tests
<FromGitter>
<naqvis> thanks @tenebrousedge ,yeah saw that, but was trying to dig into code to see what could be the cause. Also did a quick test on 0.34.0 and its returning correct value ⏎ ⏎ ```HTTP::Cookie::Parser.parse_set_cookie("bla=1; max-age=0").try &.expired? # => true``` [https://gitter.im/crystal-lang/crystal?at=5e907e9cd021c45cc7d8dbdb]
<FromGitter>
<tenebrousedge> well, either `Time.utc` isn't returning the correct value on their system, or `expires` is being set to something wonky
<FromGitter>
<stronny> and ok may mean different things, and I dislike python
<FromGitter>
<stronny> you can't write portable low level code without ifdefs
blassin has quit [Client Quit]
<oprypin>
we're not forbidding ifdefs
<FromGitter>
<deiv> @tenebrousedge @naqvis any clue about that cookie spec fail ?
<FromGitter>
<stronny> my understanding is if you need a portable program, you either factor in ther differences in conditional blocks or factor out the common code into a lib and write two programs
<FromGitter>
<naqvis> can you double check the line number is correct for that particular case? interesting enough if spec can't find any `it` on provided line, it just reports all good 😆
<FromGitter>
<deiv> Im running all on the spec file
<mps>
I'm thinking of just copying them in alpine apk and put somewhere in system path, maybe /usr/lib/crystal/shards/
<FromGitter>
<j8r> have you also updated the Crystal compiler package?!
<mps>
yes, 0.34.0
<FromGitter>
<j8r> Great :D
<mps>
but only on x86_64 :(
<mps>
had to disable aarch64, though we tried hard as you know
<FromGitter>
<j8r> Yes ;(
<FromGitter>
<stronny> I think I understand the problem now
<FromGitter>
<stronny> Where does shards package come from?
<FromGitter>
<j8r> mps: I'll ping the PR, so you would have just to use the updated Makefile
<FromGitter>
<stronny> Just add the dependencies right there
<mps>
j8r: ok, thanks
<FromGitter>
<j8r> from a commit from master with the change
<oprypin>
mps, just consider it part of shards sources?
<mps>
oprypin: I did already locally, but I need to make proper distro package
<FromGitter>
<stronny> why wouldn't it be proper?
<oprypin>
i think arch is gonna do this `source=(shards-$pkgver.tar.gz::https://github.com/crystal-lang/shards/archive/v$pkgver.tar.gz molinillo-$_molinillo_ver.tar.gz::https://github.com/crystal-lang/crystal-molinillo/archive/v$_molinillo_ver.tar.gz)`
<mps>
stronny: because then shards have to makedpends on self, which is not allowed for distro
<FromGitter>
<stronny> no, that's not what we suggest
<oprypin>
mps, i fail to see how it's makedepends
<mps>
oprypin: yes, I have similar as this in current testing APKBUILD
<FromGitter>
<stronny> you don't use shards to do `shards install` inside shards shard
<oprypin>
right
<FromGitter>
<stronny> you just clone the dependecies manually
<mps>
you need shards to pull and make crystal-molinillo
<oprypin>
no
<FromGitter>
<stronny> no you don't
<oprypin>
shards is just a fancy wget anyway 😂
<mps>
true
<mps>
sorry, I worded this not understandably
<FromGitter>
<stronny> it would be harder if crystal-molinillo itself depended on something, but it's standalone
<mps>
but anyway I need shards binary to pull crystal-molinillo
<FromGitter>
<stronny> why?
<FromGitter>
<stronny> what is it that shards do that you can't do without shards?
<mps>
stronny: because crystal-molinillo is not shards source tree
<FromGitter>
<j8r> Or just have molinillo, is some way
<mps>
oprypin: it is ok, we download sources during build
<oprypin>
Blacksmoke16, no, the star by itself is a different thing
<FromGitter>
<Blacksmoke16> if the splat doesnt have a name, those values are essentially lost
<oprypin>
no it's a different thing
<oprypin>
theres no splat there
<FromGitter>
<Blacksmoke16> star means args after have to be named
<oprypin>
yea
<mps>
though we 'cache' sources, but always checj hash and if they differ download again
<mps>
s/checj/check/
<FromGitter>
<Blacksmoke16> so without a name on the star, those values are lost, otherwise they get captured in that splat arg
<oprypin>
that is incorrect, nothing can be lost, u just cant pass extra values
<oprypin>
```def f(a, b, *, c); end; f(1,2,3,c:4)``` doesnt work
<oprypin>
```f(1,2,c:4)``` works
<FromGitter>
<Blacksmoke16> ah good point
<FromGitter>
<grkek> Noted
<FromGitter>
<neutrinog> Where should I go if I want to get some feedback on a crystal shard I've been working on? I have a 3D rendering engine that I think is stable enough to warrant some outside input https://github.com/neutrinog/prism
<oprypin>
forum or here
<FromGitter>
<neutrinog> Well then. Consider that a request for comments 😊
<oprypin>
neutrinog, is that VSCode or what
<FromGitter>
<neutrinog> Vscode
<oprypin>
dang
<oprypin>
sometimes i wish i wasnt locked into KDE ecosystem 😂
<FromGitter>
<neutrinog> Gnome's where it's at 😉
<FromGitter>
<kinxer> @neutrinog That looks really cool. I'm definitely going to try it out.
<FromGitter>
<asterite> Nice! It works on mac too
<FromGitter>
<j8r> It uses OpenGL?
claudiuinberlin has joined #crystal-lang
<claudiuinberlin>
hello
<claudiuinberlin>
on mac, trying to install crystal
claudiuinberlin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
yxhuvud has joined #crystal-lang
_ht has quit [Quit: _ht]
<sorcus>
neutrinog: Looks really cool ;-)
<FromGitter>
<tenebrousedge> fuck yes
<FromGitter>
<tenebrousedge> I've been wanting `match?` for so long
<sorcus>
tenebrousedge: :-D
<FromGitter>
<watzon> Hmm this new Log module doesn't work quite as expected
<sorcus>
watzon: Why?
<FromGitter>
<watzon> The only way I get output is if I use `Log.setup_from_env` and explicitly set a log level, even though the default level is `Info` and that's what I'm logging to. Also even if I do that, it fails to work if I try doing `Log.for("something").info`
<sorcus>
watzon: Maybe this is a bug? X-)
<FromGitter>
<watzon> Maybe
<FromGitter>
<watzon> It's new so I don't expect it to be perfect, but it would be nice if it at least kind of worked
<FromGitter>
<Blacksmoke16> how are you using it exactly?