<FromGitter>
<elorest> Maybe. I didn't see that in the change log. Either way how would I get the response now?
<FromGitter>
<elorest> Any ideas?
Ven`` has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cremes has joined #crystal-lang
cremes has quit [Client Quit]
<jnyw>
Hi, i'm working on a cli app. I thought all the files would go in src/ but after going through the crystal-lang book it seems I should be putting files in lib/. Can anyone explain to me the difference between lib/src for the source files?
<jnyw>
also i'm trying to add tests for some of my functions but it keeps exiting with 0 tests run when i run 'crystal spec'. It looks like it's because it's supposed to exit when no args are passed to it BUT i tried to pass a valid option to it '--output' and it just gives me OptionParser::InvalidOption. How should I be testing individual classes/the app as a whole?
<jnyw>
any help would be appreciated thanks
Ven`` has joined #crystal-lang
Ven`` has quit [Ping timeout: 260 seconds]
_whitelogger has joined #crystal-lang
relyks has joined #crystal-lang
<FromGitter>
<elorest> <jnyw> lib is where all of your deps go.
<FromGitter>
<elorest> everything else should go in src/project_name/
<crystal-gh>
[crystal] matiasgarciaisaia pushed 1 new commit to master: https://git.io/vbx8L
<crystal-gh>
crystal/master 4c8e71a Matías García Isaía: Update LICENSE's copyright year...
<jnyw>
whoops. thanks for clearing that up elorest. I think I figured it out now, the spec_helper.cr was running my app because it was requiring the src/<project name>.cr file instead of spec/<project name>/* like I intended. got it working now. :)
<FromGitter>
<bararchy> Is there anyway I can marshal a class? via msgpack only native types are allowed
<oprypin>
bararchy, maybe Papierkorb/cannon is relevant. or maybe msgpack shard has something like jsonmapping
<oprypin>
or custom written code never hurt anyone
<FromGitter>
<elorest> @bararchy MessagePack only supports a few types by design... but you should be able to map them in ok though.
<FromGitter>
<bararchy> it does, but the type you map can only be made of native types, so I can have MyType as long as it's basiclly combination of basic types
<FromGitter>
<elorest> MessagePack is the only decent binary serialization shard we have currently
<FromGitter>
<elorest> Yeah for sure. would be nice if we had grpc or something.
<FromGitter>
<elorest> messagePack over tcp works pretty good though.
<FromGitter>
<bararchy> Oh, cannon can actually handle classes
<FromGitter>
<straight-shoota> @elorest, jnyw You don't need to put files in `src/project_name`. `src` is just fine, there won't be any namespace collisions like in Ruby.
<oprypin>
it's a very bad habit, also encouraged by `crystal init`'s templae
<oprypin>
i hate the way projects lay out their files so much omg
<FromGitter>
<straight-shoota> oprypin #5428 removes that
<FromGitter>
<straight-shoota> I'm not particularly fond of hard dependency on shards either, but for this purpose it seems legit.
<FromGitter>
<straight-shoota> `crystal init` is perhaps the first real compiler command run by novice developers following a Crystal tutorial. So it should have all batteries included and can assume that `shards` is available because thats what you should begin with.
<FromGitter>
<straight-shoota> It is very opinionated but dedicated towards developer happiness.
<FromGitter>
<straight-shoota> And it's good for the ecosystem that people use shards
<FromGitter>
<bararchy> isn't it better to use Symbol instead of Strings?
<FromGitter>
<bararchy> coming from Ruby i know it's encourged
<FromGitter>
<bararchy> for uniqness and performance
<oprypin>
strings is so extremely bad that it doesn't need to be mentioned
<FromGitter>
<bararchy> so... enums?
<oprypin>
in some cases yes
<oprypin>
in the case of activation function, how about actually passing a function?
<oprypin>
meanwhile, the spam bots are warning up, in #travis atm
<FromGitter>
<bararchy> the activation functions are pretty static, in the sense you will likely choose one of the existing ones and not just roll you'r own, which means that it makes sense to choose from X options
<FromGitter>
<bararchy> or you actually mean pass `SHAInet.sigmod` for example?
<oprypin>
something like that
<FromGitter>
<bararchy> hm...
<oprypin>
you're not losing anything by this, but instead gaining compile time error handling and infinite flexibility
<FromGitter>
<bararchy> let me play around with it
<oprypin>
these symbols totally destroy compile time error handling, but it's not even the worst part
cremes has joined #crystal-lang
<FromGitter>
<bararchy> what is the worst part then? :)
<crystal-gh>
[crystal] asterite pushed 1 new commit to master: https://git.io/vbxrd
<crystal-gh>
crystal/master dadbeb6 TSUYUSATO Kitsune: Fix String#sub with negative index...
<RX14>
oh so ary's back... and on the core team?
<RX14>
i'm half of the opinion he'd probably have more fun if he wasn't
<Papierkorb>
He did write a lengthy new years resolution on the ML
<RX14>
i saw it
<Papierkorb>
You even replied to it
<RX14>
well not a new year's resolution
<RX14>
but I took from that that he'd be coming back as a contributor
<RX14>
guess I assumed wrong
<Papierkorb>
Oh, my dict says I assumed 'new years res' to mean something slightly different.
<RX14>
maybe I misread it
<RX14>
aand the replies to the mailing list have gotten into opinion again
<RX14>
never would have guessed
<FromGitter>
<bararchy> lol
<Papierkorb>
The ML hasn't been that historically significant for proposing changes, so no harm done
<RX14>
@asterite please milestone PRs after merging!
<RX14>
hopefully ary gets an email about that in about... 3 hours
<RX14>
thanks gitter
<Papierkorb>
It's a shame btw, there have been two attempts (At least one successful) at porting Qt5.cr to Mac OS already. One in here and another guy reached me via email. Haven't heard back from either.
<Papierkorb>
Would be kinda ironic if windows gets a native port before mac
<dom96>
Nice of Ary to mention Nim :)
<FromGitter>
<asterite> RX14 I'm back as a core team member because some PRs are easy to merge and most of the time it's just your approval, so I could help speed up things a bit. But I won't feel pressure to fix bugs and improve things anymore, only if I find the task non-boring or straight forward. Others can fix bugs and improve things too.
<RX14>
@asterite thanks!
<RX14>
hopefully more manas people will have more time to do run of the mill PR reviews soon
<FromGitter>
<asterite> It would be nice, yes
<RX14>
they've told me they'll be able to make a much larger commitment in january
<woodruffw>
what's the right way to unpack binary data in crystal? right now i'm using a `Slice(UInt8)` and interpreting it via `.to_unsafe.as(Pointer(Int32)).value`, but this feels a little clunky/messy