rohitpaulk has quit [Quit: Ping timeout (120 seconds)]
rohitpaulk has joined #crystal-lang
ma__ has joined #crystal-lang
ma__ has quit [Client Quit]
rohitpaulk has quit [Ping timeout: 265 seconds]
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 268 seconds]
f1refly has quit [Ping timeout: 250 seconds]
f1refly has joined #crystal-lang
Nekka has quit [Ping timeout: 265 seconds]
Nekka has joined #crystal-lang
* FromGitter
* igor-alexandrov waves "Hello"
<FromGitter>
<igor-alexandrov> Based on my pull request https://github.com/crystal-lang/crystal/pull/8345 I wanna pay my attention to CSV class. What do you think should be added? Currently I have two ideas: add an option that will apply String#presence to each field or add `converters` options that will work like in Ruby CSV https://docs.ruby-lang.org/en/2.6.0/CSV.html. What do you think?
<FromGitter>
<ImAHopelessDev_gitlab> Awww CSV, my dear friend
ht_ has quit [Quit: ht_]
absolutejam2 has joined #crystal-lang
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 240 seconds]
absolutejam2 has quit [Ping timeout: 245 seconds]
<FromGitter>
<igor-alexandrov> @vlazar I mean that I wanna add this option to `CSV.new`, `CSV.parse` and `CSV.each_row`
teardown is now known as someone
someone is now known as teardown
flaviodesousa has joined #crystal-lang
absolutejam2 has joined #crystal-lang
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 276 seconds]
dwdv has joined #crystal-lang
absolutejam2 has quit [Ping timeout: 265 seconds]
absolutejam2 has joined #crystal-lang
<FromGitter>
<vlazar> @igor-alexandrov Because of many options CSV.new API in Ruby is huge https://docs.ruby-lang.org/en/2.6.0/CSV.html#method-c-new ⏎ I wonder if this should be copied to Crystal or a more modular solution would be a better experience.
<FromGitter>
<vlazar> Maybe Ruby's API grew from 1-2 options by gradually adding 1 more useful option and now it is what it is.
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 250 seconds]
<FromGitter>
<lbarasti> Looking at the `select` statement, should `Channel#receive?` be supported, too? In other words, should `receive_select_action?` exist?
absolutejam2 has quit [Ping timeout: 240 seconds]
absolutejam2 has joined #crystal-lang
<FromGitter>
<igor-alexandrov> @vlazar good point. What do you mean by modular solution?
<FromGitter>
<firejox> @lbarasti 👍
duane has quit [Ping timeout: 240 seconds]
DTZUZO has quit [Ping timeout: 276 seconds]
<FromGitter>
<vlazar> @igor-alexandrov At least not sticking all options in single method. Maybe find some options that makes sense to group, extract to separate classes where it makes sense/doesn't hurt performance.
duane has joined #crystal-lang
fifr[m] has quit [Remote host closed the connection]
beepdog has quit [Read error: Connection reset by peer]
ternarysolo has quit [Read error: Connection reset by peer]
olbat[m] has quit [Remote host closed the connection]
erdnaxeli has quit [Remote host closed the connection]
vegai has quit [Remote host closed the connection]
absolutejam2 has quit [Ping timeout: 240 seconds]
absolutejam2 has joined #crystal-lang
alexherbo2 has joined #crystal-lang
Human_G33k has joined #crystal-lang
duane has quit [Ping timeout: 264 seconds]
HumanGeek has quit [Ping timeout: 240 seconds]
duane has joined #crystal-lang
<FromGitter>
<ImAHopelessDev_gitlab> good morning
<FromGitter>
<kinxer> Mornin', Girng.
<FromGitter>
<ImAHopelessDev_gitlab> :)
absolutejam2 has quit [Ping timeout: 246 seconds]
ht_ has joined #crystal-lang
alexherbo20 has joined #crystal-lang
alexherbo2 has quit [Ping timeout: 264 seconds]
<FromGitter>
<wontruefree> Does Crystal's GC have memory compression?
DTZUZO has joined #crystal-lang
alexherbo201 has joined #crystal-lang
alexherbo20 has quit [Ping timeout: 245 seconds]
alexherbo201 has quit [Ping timeout: 246 seconds]
<Yxhuvud>
wontruefree: No.
alexherbo201 has joined #crystal-lang
<Yxhuvud>
Also it is quite hard to arrange with a conservative GC.
<FromGitter>
<wontruefree> my understanding is if you only use malloc and free it can do a lot of cool stuff
<FromGitter>
<wontruefree> if you use mmap or anything else I think it can be a problem
<FromGitter>
<wontruefree> looks like boehm might implement their own malloc
<FromGitter>
<kinxer> Interesting.
<FromGitter>
<wontruefree> yeah it is a really cool project
<Yxhuvud>
wontrufree: It might well be possible to implement mesh, and having a unified memory system that handles both allocation and garbage and reuses structures between them might have some nice synergies.
<FromGitter>
<wontruefree> they have used it on firefox and some other big projects
<FromGitter>
<wontruefree> dont know who has adopted it
<FromGitter>
<wontruefree> Yxhuvud do you think it would have to be implemented in the boehm project
<Yxhuvud>
Either that or replace it. :shrug:.
<Yxhuvud>
I doubt boehm reimplements malloc. It is likely just a wrapper around malloc so that they can keep track of what is allocated
<Yxhuvud>
Could be wrong though.
<FromGitter>
<wontruefree> I am look through it now but I dont know yet
<FromGitter>
<lbarasti> ideas for a macro-based pipe operator à la clojure/elixir?
<FromGitter>
<tenebrousedge> why a macro? and what would that let you do that you can't do already?
<FromGitter>
<lbarasti> > Can you have a macro that operates on a token before it? ⏎ ⏎ investigating that
dwdv has joined #crystal-lang
<FromGitter>
<asterite> you can't implement the pipe operator with that syntax in current crystal
<FromGitter>
<lbarasti> mhmhm, this is something I've noted before, that the semantic step of the compiler happens before the expansion. I feel like that limits the range of things we can do quite a lot
<FromGitter>
<tenebrousedge> @asterite has anyone suggested adding `then` to Crystal?
<FromGitter>
<lbarasti> @asterite would it make sense to experiment with positioning the macro expansion step *before* the semantic step?
<FromGitter>
<lbarasti> > you can't implement the pipe operator with that syntax in current crystal ⏎ ⏎ Thanks, I'm sure this is not the first time you have to answer this question XD
<FromGitter>
<lbarasti> would get us somewhere, if everything was a Proc
<FromGitter>
<kinxer> `Proc`s are generic (so that their argument types are specified), which makes them more verbose.
<FromGitter>
<kinxer> Also, `first.pipe(->do_this(String, String), second)` doesn't really read like `second` will be passed to `do_this`.
<FromGitter>
<lbarasti> all right folks, I withdraw my intention, I'll stick to the norm. Thanks for the exploratory session :)
<FromGitter>
<kinxer> Yeah, I think that may just not be a crystalline (crystallic? crystomatic? facetious?) way of writing code.
<FromGitter>
<tenebrousedge> I mean, I don't think there's anything inherently wrong with the idea. Obviously the specific syntax is a no-go
<FromGitter>
<tenebrousedge> I'd definitely support `Object#then`
<FromGitter>
<kinxer> Right, but the difference is that it seems like `|>` changes how methods are interpreted after it (e.g. `first |> do_this(second)` re-interprets `second` as the second argument and `first` as the first). That seems outside of the behavior I'd ever expect from Crystal.
<FromGitter>
<tenebrousedge> yes, it makes more sense in Elixir
<FromGitter>
<lbarasti> I wouldn't say it's something Elixir specific. Clojure does it, `sh` does it. It's just that I don't see that happening without macro support
<FromGitter>
<tenebrousedge> `sh` does what now?
<FromGitter>
<lbarasti> I'm thinking of `|`, is that wrong?
<FromGitter>
<tenebrousedge> in practice, probably not
duane has joined #crystal-lang
dwdv has quit [Ping timeout: 246 seconds]
<FromGitter>
<absolutejam_twitter> Well it works completely differently in sh
<FromGitter>
<absolutejam_twitter> I always loved how powershell did it
<FromGitter>
<absolutejam_twitter> Super flexible
<FromGitter>
<tenebrousedge> if powershell were less verbose it would be very interesting
<FromGitter>
<absolutejam_twitter> Elixir and clojure threading are nice if you have consistent function signatures
<FromGitter>
<absolutejam_twitter> You can make it so but yeah, just the wus it is
<FromGitter>
<absolutejam_twitter> Was a Windows sysdmin so I really liked it
<FromGitter>
<absolutejam_twitter> I was thinking about this earlier funnily enough and a `then` method came to mind
<FromGitter>
<absolutejam_twitter> Is that in Ruby?
<FromGitter>
<absolutejam_twitter> Would you architect it to stop at `nil`s or something?
<FromGitter>
<tenebrousedge> yes, it's in Ruby. No, `nil` is a valid value
<FromGitter>
<tenebrousedge> if you wanted you could do `then &.not_nil!.then `
<FromGitter>
<tenebrousedge> it really is just `yield self`
<FromGitter>
<absolutejam_gitlab> ah fair enough, just for chaining then
<FromGitter>
<absolutejam_gitlab> wait, is that different to `tap`?
<FromGitter>
<tenebrousedge> `tap` is `yield self; self`
absolutejam2 has joined #crystal-lang
<FromGitter>
<absolutejam_gitlab> I really like Elixir's `with` statement to
<FromGitter>
<tenebrousedge> is that necessary in Crystal?
<FromGitter>
<absolutejam_gitlab> Not really, or perhaps not that exactly
<FromGitter>
<absolutejam_gitlab> I just like the railroad style of transformation/validation chain with a break-out clause
<FromGitter>
<absolutejam_gitlab> But that works a lot better in a functional language
<FromGitter>
<tenebrousedge> Crystal has first-class functions
<FromGitter>
<tenebrousedge> what would a Crystalline example of `with` look like?
<FromGitter>
<absolutejam_gitlab> Probably just method chaining but with a try catch wrapping it? 😆
<FromGitter>
<absolutejam_gitlab> My brain seems to default to pattern matching and piping, but that's bolstered by immutability and proper pattern matching
<FromGitter>
<absolutejam_gitlab> Not sure if it's a case of 'wow, we can make Crystal super flexible and accommodate other styles' or 'how can we conflate this language?'
<FromGitter>
<absolutejam_gitlab> I'm coming round to the `&.foo` syntax a little
<FromGitter>
<absolutejam_gitlab> The thing with proper piping, is that it relies on pure functions like `String.upcase("foo")` instead of methods `"foo".upcase`
<FromGitter>
<tenebrousedge> yes
<FromGitter>
<tenebrousedge> eso no me gusta
<FromGitter>
<absolutejam_gitlab> somebody go implement them all please
<FromGitter>
<tenebrousedge> D:
<FromGitter>
<absolutejam_gitlab> Looking into Elm at the same time so I'm in that mode
<FromGitter>
<tenebrousedge> have you evaluated Opal?
<FromGitter>
<absolutejam_gitlab> the SQL-style comma on the next line thing is weird
<FromGitter>
<absolutejam_gitlab> but I get it. It's just ugly
<FromGitter>
<absolutejam_gitlab> never heard of it
<FromGitter>
<absolutejam_gitlab> jesus christ Elm is weird
<FromGitter>
<absolutejam_gitlab> is it a lisp
<FromGitter>
<absolutejam_gitlab> is it js
<FromGitter>
<absolutejam_gitlab> what is it
<FromGitter>
<meltheadorable> opal 😒
ht_ has quit [Remote host closed the connection]
<FromGitter>
<tenebrousedge> I wasn't a big fan of PHP-to-JS transpilation, when I encountered it. But Ruby has pretty flexible syntax. If it were a choice between React/Typescript and Opal...
<FromGitter>
<absolutejam_gitlab> why do people use Medium
sagax has joined #crystal-lang
<FromGitter>
<meltheadorable> project itself is whatever, but the dev team is total jerks, i wouldn’t want to need to interact with the project or it’s community because of it
<FromGitter>
<meltheadorable> which makes opal a nonstarter for me
<FromGitter>
<absolutejam_gitlab> Is that the thing you see when you've read a few?
<FromGitter>
<absolutejam_gitlab> You can get round it by going incognito but it's just stupid
<FromGitter>
<meltheadorable> its main contributor posted a bunch of anti-LGBT rants all over twitter a couple years back, and one of the main contributors at the time went off about it and started evangelizing against codes of conduct and etc, they adopted a code of conduct briefly at the behest of the repo owner, then promptly undid it and replaced it with one that doesn’t actually include any anti-discrimination language
<FromGitter>
<meltheadorable> walking disaster
<FromGitter>
<tenebrousedge> thank you for the information, I'll cross it off my list
<FromGitter>
<meltheadorable> yeah it’s unfortunate, interesting project on a technical level, but that kind of infrastructure IMO i’d need to feel comfortable interacting with the devs and community to get help/support and the devs and community decided to make their project unsafe to participate in
<FromGitter>
<kinxer> @absolutejam_gitlab ⏎ ⏎ > Medium will never meter a story without the writer’s permission. ⏎ and ⏎ > If my story is eligible to be part of the paywall, will Medium always show a paywall? ... [https://gitter.im/crystal-lang/crystal?at=5daf6b1710bd4128a1425433]
absolutejam2 has quit [Ping timeout: 252 seconds]
<FromGitter>
<alehander42> @meltheadorable i really think this is not fair from you: opal is a fine project, and the tweets i found were perfectly reasonable to me
absolutejam2 has joined #crystal-lang
absolutejam2 has quit [Ping timeout: 246 seconds]
Human_G33k has quit [Remote host closed the connection]
Human_G33k has joined #crystal-lang
vegai has joined #crystal-lang
vegai has quit [Ping timeout: 245 seconds]
vegai has joined #crystal-lang
olbat[m] has joined #crystal-lang
erdnaxeli has joined #crystal-lang
ternarysolo has joined #crystal-lang
beepdog has joined #crystal-lang
Human_G33k has quit [Remote host closed the connection]