<dostoyevsky2>
I use a docker container these days as my dev environment... is there a way I could compile a crystal program for osx from linux/inside a docker container?
<FromGitter>
<Blacksmoke16> mac doesn't support static binaries so that might be a bit tricky, however assuming its the same arch and the mac has the libraries installed it should work fine
<FromGitter>
<Blacksmoke16> libraries like ones crystal runtime depends on, i.e. the dynamically linked ones
<FromGitter>
<Blacksmoke16> would be easier to just build on the mac
ur5us has quit [Remote host closed the connection]
ur5us has joined #crystal-lang
<postmodern>
so crystal prefers grammatically correct method names, like `includes?`. What are people's opinions on "indices" vs "indexes"?
<riza>
do what you think is rightd
<riza>
a classing example in the rails world is "medium" is the proper singular of "media" but nobody knows that
ur5us has quit [Ping timeout: 252 seconds]
ur5us has joined #crystal-lang
ur5us has quit [Ping timeout: 246 seconds]
ur5us has joined #crystal-lang
<postmodern>
do people using write tests for `delegate`ed methods?
<postmodern>
does `crystal doc` not support inline html, like <code> ?
ur5us has quit [Ping timeout: 272 seconds]
<FromGitter>
<oprypin:matrix.org> postmodern, yeah it probably doesn't, (assuming you tried it?) https://github.com/mkdocstrings/crystal supports it, though. what's your use case?
ur5us has joined #crystal-lang
ur5us has quit [Ping timeout: 252 seconds]
ur5us has joined #crystal-lang
ur5us has quit [Ping timeout: 258 seconds]
<postmodern>
oprypin, just trying to format a README so that `crystal doc` renders the proper html
<postmodern>
oprypin, unfortunately all of the markdown parsers (github, ruby's kramdowm, and crystal's) all disagree on how to escape ` within a `...` or <code>`</code> element.
<postmodern>
i fear this is an unwinnable battle between the doc generator markdown implementation, and whatever werid version github is using to render markdown.
<FromGitter>
<oprypin:matrix.org> postmodern, prior to me abandoning the use of that generator, i always used to rip out that generated readme. nobody needs it there. and no, GitHub Markdown is most definitely not the weird one of the two.
<FromGitter>
<oprypin:matrix.org> i used to put a redirect to the main module's page. ⏎ and yes it's an unwinnable battle, but also a pointless battle
<postmodern>
oprypin, the README is important as it's the first thing people see. it's the landing page. GitHub just needs to fix their unpredictable markdown generator...
<FromGitter>
<oprypin:matrix.org> GitHub has the best markdown generator I know. and crystal's one never really reached completeness
<postmodern>
i'm personally not a fan of how dry-rb projects have an almost empty README that just links to some external web page. I don't want to have to clink through links, just tell me what the project is, how to use it, etc
<FromGitter>
<oprypin:matrix.org> postmodern, people can see the readme on github
<postmodern>
oprypin, check out kramdown. it. just. works.
<FromGitter>
<oprypin:matrix.org> why would i, if no system uses it
<FromGitter>
<oprypin:matrix.org> for me github just works
<jhass[m]>
problem is we all should be using commonmark and not markdown
<postmodern>
oprypin, github does not work for me. it's markdown rendering does not seem render ``` or `\`` or <code>`</code> correctly causing a cascading effect https://github.com/postmodern/chars.rb#features if i work around said issies, then i break commonmark or ruby's kramdown (which is pretty much bullet proof)
<FromGitter>
<oprypin:matrix.org> postmodern, anyway if you want good Markdown rendering and well integrated text+API docs, just use https://mkdocstrings.github.io/crystal/
<postmodern>
oprypin, and does that work for the README.md on github as well :)
<jhass[m]>
maybe it likes it as an entity? &
<jhass[m]>
`
<postmodern>
see i want both proper documentation generation and a README which renders correctly on GitHub
<jhass[m]>
probably not inside code tags
<FromGitter>
<oprypin:matrix.org> eh there are definitely differences in Markdown rendering but much much fewer of them
<postmodern>
but "<code>`</code>" worked in kramdown, doesn't seem to work in `crystal doc`, so that seems like an issue
<FromGitter>
<oprypin:matrix.org> again, crystal doc's Markdown is completely broken. *that* i would say is a waste of time
notzmv has joined #crystal-lang
notzmv has quit [Remote host closed the connection]
notzmv has joined #crystal-lang
notzmv has quit [Ping timeout: 246 seconds]
postmodern has quit [Quit: Leaving]
<FromGitter>
<nanobowers> I've run into an issue where Crystal's Array#fill doesnt work the same as Ruby's (it doesnt allocate additional space, but throws an IndexError), but not sure if this is intentional. ⏎ ⏎ ```a.fill(9,1,2) ⏎ Unhandled exception: Index out of bounds (IndexError)``` [https://gitter.im/crystal-lang/crystal?at=60e5ab6b8c12474d8cf28f6c]
<FromGitter>
<nanobowers> Unsure if the correct course of action is to file an issue, or manage this myself, though i havent seen a non-private method to increase capacity prior to running the #fill
<FromGitter>
<Blacksmoke16> it should prob result in you not trying to overfill an array
<FromGitter>
<nanobowers> not sure I grok your statement, are you suggesting this is an intentional safety feature to prevent me from overfilling the Array?
Welog- has quit [Remote host closed the connection]
Welog has joined #crystal-lang
notzmv has joined #crystal-lang
notzmv has quit [Ping timeout: 252 seconds]
_whitelogger has joined #crystal-lang
notzmv has joined #crystal-lang
<FromGitter>
<RespiteSage> Is @redcodefinal around?
notzmv has quit [Remote host closed the connection]
<FromGitter>
<oprypin:matrix.org> @RespiteSage: sadly only on discord. "sol.vin"
<FromGitter>
<RespiteSage> Alright, thank you. I'll hop over there, then.
foxxx0 has quit [Quit: foxxx0]
lanodan has quit [Quit: WeeChat 3.1]
lanodan has joined #crystal-lang
<FromGitter>
<RespiteSage> Wait, is the conference not actually happening on Discord?
<FromGitter>
<RespiteSage> Or is that where the side discussions will be?
<FromGitter>
<krzyczak> Hello. Can I have a question about the conference. I would like to attend but I won't be able to be on all sessions. Will the conference be recorded?
<FromGitter>
<RespiteSage> Yes, I believe they've said that everything will be recorded and publicly available afterward.
<FromGitter>
<lodenos> It’s Horrible how it’s writed
<FromGitter>
<lodenos> I don’t understand my own code
<FromGitter>
<Blacksmoke16> oo another framework :P
<FromGitter>
<lodenos> it’s more a library than a framework
<FromGitter>
<Blacksmoke16> unfortunately there just isnt a good way to have clean macro code because you can't define reusable macro methods (yet?)
<FromGitter>
<Blacksmoke16> could probably just add more comments or something, id also suggest writing some tests, be easier to ensure its working at least
<FromGitter>
<lodenos> Right, thx for the anser, I hope one day we can reuse macro methods can be really powefull
<FromGitter>
<Blacksmoke16> have you considered using annotations instead of the hash?
<FromGitter>
<lodenos> I never try that on my own code
<FromGitter>
<Blacksmoke16> looks like a good use case for them. However the downside is there isn't a way to iterate over all methods with an annotation, so would need to think of a way around that.
<FromGitter>
<Blacksmoke16> but :shrug: just a thought
<FromGitter>
<lodenos> With this lib I’ve only one object a bit useless
<FromGitter>
<Blacksmoke16> benchmarks like that are mainly just testing the router, is fairly easy to have a faster framework, but then the framework itself isn't much of a framework
<FromGitter>
<Blacksmoke16> pretty sure all the crystal ones on there are using `HTTP::Server`, so to be faster than that you might need to get creative
<FromGitter>
<lodenos> Learn to optimize to the maximum helps to understand in detail the suptiles of the language and its conception. I can imagine.
<FromGitter>
<didactic-drunk> Why doesn't `Bytes.new` call `GC.malloc_atomic`? How does it get it's memory or any other `Pointer.malloc`? I'm attempting to track `malloc` usage and my monkey patches don't run.
<FromGitter>
<oprypin:matrix.org> @didactic-drunk: it seems that the memory allocated for pointers isn't assumed to be atomic then
<FromGitter>
<oprypin:matrix.org> atomic, as I understand, being a declaration that that memory will not contain GC-relevant pointers
<FromGitter>
<oprypin:matrix.org> for arrays a choice was made to always assume that their memory will not contain undeclared pointers, that's where u get malloc_atomic, but it's not used always