<FromGitter>
<Blacksmoke16> main benefits : ⏎ 1) im thinking it could be made in a format agnostic way (i.e. yaml/json etc could share the same metadata) and just implement th actual logic based on that metadata ⏎ 2) much more flexible around if a property should be serialized ⏎ 3) when combined with DI, makes it quite powerful as you can inject ACL services or the current request etc [htt
<FromGitter>
<elorest> Yeah I think that was most of a coding exercise. I tried getting him to join amber once and he said he had just written that for fun one month and wasn't using crystal anymore.
return0e_ has quit [Ping timeout: 248 seconds]
<FromGitter>
<absolutejam_gitlab> Aw, but he wrote Sentry and that's a good little Crystal showcase
<FromGitter>
<watzon> Lol interesting. It is above Kemal in the techempower benchmark right now
laaron has left #crystal-lang ["Leaving"]
<FromGitter>
<absolutejam_gitlab> Jesus, macOS is a PITA for statically linking
<FromGitter>
<absolutejam_gitlab> had to copy libevent to a different dir so that it stopped using the dynlib
<FromGitter>
<watzon> @mavu you need to import json first
<FromGitter>
<watzon> `require "json"`
<FromGitter>
<mavu> doh!
<FromGitter>
<mavu> thanks >.>
alex`` has joined #crystal-lang
<FromGitter>
<watzon> No worries. Sometimes you don't need to do that because something else you're importing is already importing json, so it can be easy to forget
<FromGitter>
<mavu> yeah, othertimes its just being dumb :P
<FromGitter>
<absolutejam_gitlab> When trying to compile crystal 0.30.1 (crystal-git) on Manjaro
<FromGitter>
<absolutejam_gitlab> Anyone else had issues? I've seen a couple of other people in here using Arch or derivatives
<FromGitter>
<tenebrousedge> yes, people on Arch and derivatives have been having issues. Not that one, that I've seen, though
lucasb has joined #crystal-lang
rohitpaulk has joined #crystal-lang
<FromGitter>
<absolutejam_gitlab> tatties.
<FromGitter>
<kniknoo> I'm about to dive into the LLVM intro tutorial. Am I correct in understanding that Crystal's LLVM class is all I need?
Yxhuvud has quit [Remote host closed the connection]
<FromGitter>
<tenebrousedge> you can check the unit tests to see if they require other things
<FromGitter>
<kniknoo> Cool, noted. Thank you.
rohitpaulk has quit [Ping timeout: 272 seconds]
<FromGitter>
<absolutejam_gitlab> it's so freaking weird writing Elixir now
<FromGitter>
<absolutejam_gitlab> after writing only Crystal for the last few weeks
<FromGitter>
<tenebrousedge> oh?
<FromGitter>
<absolutejam_gitlab> Just minor differences
<FromGitter>
<absolutejam_gitlab> `defmodule Foo.bar` vs `module Foo::Bar`, `def foo(num) do` vs `def foo(num : Int64)`
<FromGitter>
<absolutejam_gitlab> I mean, there's obviously big differences, but they're not catching me out haha
<FromGitter>
<tenebrousedge> ah
duane has joined #crystal-lang
devil_tu1 has joined #crystal-lang
devil_tux has quit [Ping timeout: 244 seconds]
duane has quit [Ping timeout: 272 seconds]
devil_tu1 has quit [Ping timeout: 272 seconds]
<FromGitter>
<kniknoo> I just realized, due to my workflow of writing each class in playground before integrating it, I bet I'd be a lot more likely to both use and rely on unit tests if there were a spec tab on the playground. I *want* to get into the unit test habit, but due to playground being the most efficient means I have for on-the-fly testing it's more an afterthought than TDD.
<FromGitter>
<tenebrousedge> few people working on real code actually do TDD
<FromGitter>
<tenebrousedge> even DHH walked it back
<FromGitter>
<tenebrousedge> a lot of the time, your requirements aren't clear or solid enough to be able to do so
<FromGitter>
<kniknoo> Hmmm, understood. I still wouldn't mind a spec that runs with the kind of feedback that the playground allows.
<FromGitter>
<tenebrousedge> the only time that I've actually written tests in advance was for very small and well-defined problems
<FromGitter>
<tenebrousedge> well, you can do that
<FromGitter>
<tenebrousedge> just write the tests in the same playground
<FromGitter>
<kniknoo> Indeed. Will need to learn more about the web side at some point.
<FromGitter>
<kniknoo> Oh
<FromGitter>
<kniknoo> :D ok
<FromGitter>
<kniknoo> require "spec" and follow the format inline?
<FromGitter>
<tenebrousedge> yup
<FromGitter>
<kniknoo> cool, thanks!
<FromGitter>
<tenebrousedge> 👍
ht_ has joined #crystal-lang
ht_ has quit [Quit: ht_]
ht_ has joined #crystal-lang
<FromGitter>
<kniknoo> Is it worth it for me to be learning to process STDIN one char at a time or should I do gets_to_end and lex the result?
<FromGitter>
<dscottboggs_gitlab> I was thinking of maybe just dumping the data as JSON and trying to find a generic tool for graphing JSON data, but I'll certainly give that a try first
<rkeene>
It's meant for bandwidth so it reads values 2 tuples from a text file, in and out -- each tuple is time,value
<rkeene>
You can license it however you want if you do anything with it -- I just wrote it to plot some bandwidth data for a tool I wrote 15+ years ago
<FromGitter>
<absolutejam_gitlab> Jesus christ rkeene
<rkeene>
Hmm ?
<FromGitter>
<absolutejam_gitlab> You mad man writing that in bash
<rkeene>
:-D
<FromGitter>
<tenebrousedge> I mean, 15 years ago that made more sense
<rkeene>
It's not too bad, most of the mathy stuff is in awk
<rkeene>
The bash version is much newer
<FromGitter>
<tenebrousedge> :(
<rkeene>
I wanted a simple line chart tool that I could easily include as part of my CI stuff for a project and bash was the easiest way
<rkeene>
OpenNebula used ruby heavily, but everything in the distribution was cross-compiled
<FromGitter>
<naqvis> How to add inner-xml to an XML `element`? Calling `text` on `element` is escaping the contents. I've string representation of xml and want to add that to an xml element.
<FromGitter>
<sam0x17> so what is the current trick for installing `micrate` as a CLI app? I thought shards was now at a point where we can install global binaries, or is that not the case
<FromGitter>
<Blacksmoke16> oh so you have a string that has xml content
<FromGitter>
<Blacksmoke16> but afaik its handling it properly so you have valid xml
<FromGitter>
<naqvis> i tried that, but that makes that as 'cdata'
<FromGitter>
<Blacksmoke16> whats the end goal here?
<FromGitter>
<naqvis> i'm working on XMPP protocol and XMPP message expects XHTML to be as inner xml
<FromGitter>
<lebogan> Just a warning note on compile with Crystal 0.30.1 on Fedora 30 running on vagrant vm with Virtualbox 6.0 provider. Error didn't occur on Crystal 0.30.0. Also happened on a Centos7 vm. ⏎ ⏎ Ran similar test compiles on my host machine running Fedora 30. Same error with 0.30.1 but, ok on 0.30.0. ⏎ ⏎ ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5d545d96d03a7c63e6298b44]
<FromGitter>
<lebogan> @Blacksmoke16 Thanks. I traced the error to crystal-email shard. Made the changes on my local copy and ok. Will post an issue on the relevant github repo.
<FromGitter>
<Blacksmoke16> 👍
<FromGitter>
<Blacksmoke16> is prob fine to just not use the `--error-on-warnings` for now
<mps_>
j8r: in my test it builds ok, but fails on 'make spec'
<FromGitter>
<j8r> i built on alpine edge, with crystal from latest
<mps_>
will post build log to tpaste.us later if you will be here
<FromGitter>
<j8r> I have to build on latest?
<mps_>
on edge, latest is v3.10, i.e. latest stable
<FromGitter>
<j8r> but we have to add the 3.10 repo
<FromGitter>
<j8r> to have crystal
<mps_>
no, just edge
<FromGitter>
<j8r> but crystal, which is absent on edge
<mps_>
static version needed to build is downloaded from dev.alpinelinux.org as tarball
<FromGitter>
<sam0x17> it has a lot of the dependencies people forget to add that tend to be broken e.g. lzma etc
<FromGitter>
<j8r> @sam0x17 how do you add the static linking hack for llvm?
<FromGitter>
<j8r> and better to have a minimal image, to have our own based on it with `from`
<FromGitter>
<sam0x17> yeah for my purposes I need a general purpose one that works with arbitrary shards, which is why I made that one
<FromGitter>
<sam0x17> `docker run --rm -it -v $PWD:/app -w /app durosoft/crystal-alpine:latest crystal build test.cr -o output --release --static --no-debug` the `--no-debug` tends to fix random linking issues sometimes for no apparent reason
<FromGitter>
<sam0x17> my main philosophy being that anything that could be included via the stdlib should be buildable from my base image
<FromGitter>
<sam0x17> not sure if that's true, but in practice it has been for me
<FromGitter>
<Blacksmoke16> *lets find out*
<FromGitter>
<j8r> so you will end up installing most `-dev`and `-static` alpine packages
<FromGitter>
<sam0x17> basically
<FromGitter>
<sam0x17> if I missed any let me know xD
<FromGitter>
<sam0x17> hold on I have a one liner for it I think
<FromGitter>
<j8r> so we won't be sure what's libraries are really needed for our app
<FromGitter>
<sam0x17> yeah you will have to play with different and weird orderings of --link-flags typically to fix that
<FromGitter>
<sam0x17> I had to do a dance with that when using crystallang/crystal
<FromGitter>
<sam0x17> but switching to alpine fixed this particular issue for me
<FromGitter>
<j8r> mps I know what was my issue here, I didn't `make clean`
<mps_>
ah, good. 'abuild clean'
<FromGitter>
<sam0x17> yeah looks like I dont have that snippet anymore sorry
<FromGitter>
<sam0x17> but feel free to use my image as a starting point, and let me know if there is a dev library that you added that made it work @Blacksmoke16
<FromGitter>
<j8r> mps I'm just using the git repo, no abuild yet
<mps_>
aha, ok then
<mps_>
but you can download static crystal 0.29.0 from dev.alpinelinux.org and use it to build new version
<FromGitter>
<j8r> mps to avoid running the whole spec suite, what was the failing one? (I use qemu, very slow)
<FromGitter>
<j8r> mps yes I do
<mps_>
sigfault, iirc
<FromGitter>
<j8r> directly, hooooo 💀
<mps_>
Invalid memory access (signal 11) at address 0x20
<FromGitter>
<naqvis> @Blacksmoke16 I got that sorted out by parsing the html via `XML#parse_html`, iterating through the nodes, adding them to `XML::Builder`. Good I didn't imply any dirty hack 😆