jhass changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.7.6 | Fund Crystals development: http://is.gd/X7PRtI | Paste > 3 lines of text to https://gist.github.com | GH: https://github.com/manastech/crystal | Docs: http://crystal-lang.org/docs/ | API: http://crystal-lang.org/api/ | Logs: http://irclog.whitequark.org/crystal-lang
wuehlmaus has quit [Ping timeout: 256 seconds]
wuehlmaus has joined #crystal-lang
qard has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
wuehlmaus is now known as Guest74945
dylanmei has quit [Quit: ZZZzzz…]
waj has joined #crystal-lang
NeverDie has joined #crystal-lang
Regexident has joined #crystal-lang
Regexident has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Regexident has joined #crystal-lang
waterlin1 has joined #crystal-lang
waterlink has quit [Ping timeout: 260 seconds]
dylanmei has joined #crystal-lang
waj has quit [Remote host closed the connection]
<crystal-gh> [crystal] asterite pushed 1 new commit to master: http://git.io/vG52H
<crystal-gh> crystal/master 1af348c Ary Borenszweig: `require` can now only be used at the top-level: never inside types, defs or expressions like "if". Fixes #1146
<travis-ci> manastech/crystal#1af348c (master - `require` can now only be used at the top-level: never inside types, defs or expressions like "if". Fixes #1146): The build passed. https://travis-ci.org/manastech/crystal/builds/78687237
waj has joined #crystal-lang
dylanmei has quit [Quit: ZZZzzz…]
Regexident has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dylanmei has joined #crystal-lang
havenwood has joined #crystal-lang
waj has quit [Read error: Connection reset by peer]
waj_ has joined #crystal-lang
trapped_ has joined #crystal-lang
iamstef has quit [Ping timeout: 252 seconds]
iamstef has joined #crystal-lang
trapped has quit [Ping timeout: 252 seconds]
tatey_ has quit []
tatey_ has joined #crystal-lang
tatey_ has quit [Client Quit]
waj_ has quit [Read error: Connection reset by peer]
waj has joined #crystal-lang
waterlin1 has quit [Ping timeout: 244 seconds]
tatey_ has joined #crystal-lang
waj has quit [Remote host closed the connection]
havenwood has quit [Quit: Textual IRC Client: www.textualapp.com]
havenwood has joined #crystal-lang
NeverDie has quit [Quit: I'm off to sleep. ZZZzzz…]
dylanmei has quit [Quit: ZZZzzz…]
tatey__ has joined #crystal-lang
tatey_ has quit [Ping timeout: 255 seconds]
tatey__ has quit [Ping timeout: 252 seconds]
ssvb has quit [Ping timeout: 272 seconds]
shout-user85 has joined #crystal-lang
shout-user85 is now known as jonahgeorge
Guest74945 is now known as wuehlmaus
<jonahgeorge> Hey everyone, curious about getting help with marshalling data from JSON into a class. My "endpoint" returns two different structures and I'm unsure how to handle the cases in Crystal. http://play.crystal-lang.org/#/r/do4
<jhass> jonahgeorge: maybe it also returns a matching http status code?
<jhass> then I'd go for something like if response.stats == 200; handle_food Food.from_json(response.body.not_nil!); else; handle_error Error.from_json(response.body.not_nil!); end
<jhass> *status
<jhass> eh, Array(Food).from_json of course
<jonahgeorge> jhass: Ok, that makes sense for these two cases. I was primarily curious if there is a better pattern for "unknown" JSON to a series of classes
<jhass> ?json_union
<jhass> that pretty much outlines the common patterns
BlaXpirit has joined #crystal-lang
<jhass> defining a mapping will not make JSON.parse magically use it though
<jonahgeorge> jhass: Awesome, I'll check that out
<jhass> so if you want to feed it into that you'll have to serialize (or keep the original serialization around) again after determining what it is and feed that into from_json
jonahgeorge has quit [Quit: Bye!]
kyrylo has joined #crystal-lang
Dreamer3 has quit [Ping timeout: 252 seconds]
tatey_ has joined #crystal-lang
Dreamer3 has joined #crystal-lang
jokke has quit [Remote host closed the connection]
jokke has joined #crystal-lang
havenwood has quit [Ping timeout: 244 seconds]
Ven has joined #crystal-lang
leafybasil has quit [Remote host closed the connection]
leafybasil has joined #crystal-lang
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
leafybasil has quit [Ping timeout: 246 seconds]
leafybasil has joined #crystal-lang
Regexident has joined #crystal-lang
Regexident has quit [Client Quit]
dyulax has joined #crystal-lang
Ven has joined #crystal-lang
oal has quit [Remote host closed the connection]
[spoiler] is now known as _spoiler_
_spoiler_ is now known as [spoiler]
waj has joined #crystal-lang
waj has quit [Ping timeout: 244 seconds]
ssvb has joined #crystal-lang
NeverDie has joined #crystal-lang
NeverDie has quit [Client Quit]
NeverDie has joined #crystal-lang
Ven has quit [Read error: Connection reset by peer]
Ven has joined #crystal-lang
<crystal-gh> [crystal] asterite pushed 5 new commits to master: http://git.io/vGFMp
<crystal-gh> crystal/master 0b61753 Ary Borenszweig: Fixed #1362: Misleading error message when passing incorrect type to lib fun
<crystal-gh> crystal/master f010b5e Ary Borenszweig: Documented Enum, and changed `Enum.from_value` to raise, and added `Enum.from_value?`
<crystal-gh> crystal/master a4111f3 Ary Borenszweig: Added `Array.product` and `Array.each_product` that accept splats
<crystal-gh> [crystal] asterite pushed 2 new commits to master: http://git.io/vGFDz
<crystal-gh> crystal/master 0ac2c2a Tobias Pfeiffer: Remove the Enumerable#first(n) alias for Enumerable#take(n)...
<crystal-gh> crystal/master d2c7724 Ary Borenszweig: Merge pull request #1257 from PragTob/remove-first-alias...
<crystal-gh> [crystal] asterite pushed 1 new commit to master: http://git.io/vGFDM
<crystal-gh> crystal/master f35671d Ary Borenszweig: Small fix in doc, now that Enumerable#first(n) is gone
tatey_ has quit []
<travis-ci> manastech/crystal#4e320fa (master - Updated Changelog): The build passed. https://travis-ci.org/manastech/crystal/builds/78748621
tatey_ has joined #crystal-lang
Ven has quit [Disconnected by services]
<travis-ci> manastech/crystal#d2c7724 (master - Merge pull request #1257 from PragTob/remove-first-alias): The build passed. https://travis-ci.org/manastech/crystal/builds/78748899
shadeslayer has quit [Ping timeout: 265 seconds]
bougyman has joined #crystal-lang
<travis-ci> manastech/crystal#f35671d (master - Small fix in doc, now that Enumerable#first(n) is gone): The build has errored. https://travis-ci.org/manastech/crystal/builds/78749083
shadeslayer has joined #crystal-lang
<travis-ci> manastech/crystal#f35671d (master - Small fix in doc, now that Enumerable#first(n) is gone): The build passed. https://travis-ci.org/manastech/crystal/builds/78749083
NeverDie has quit [Quit: I'm off to sleep. ZZZzzz…]
ledestin has joined #crystal-lang
Ven_ has joined #crystal-lang
waj has joined #crystal-lang
Ven_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Ven_ has joined #crystal-lang
havenwood has joined #crystal-lang
<trapped_> is there any way to only run the macro expansion pass so that i can check what the output is?
<bougyman> crystal has no repl?
<jhass> trapped_: check crystal browser
<jhass> bougyman: no, it's a compiled language, repl's are hard there ;)
<bougyman> jhass: umwut?
<bougyman> tell that to the lisps.
<trapped_> jhass: empty page body
<jhass> trapped_: point it to a file with toplevel code
<jhass> then navigate through to what you want to see
<trapped_> the code itself doesn't compile
<trapped_> that's why i want to debug macro generation
<jhass> you can put {{debug()}} into a macro to print it's expansion to stdout during compile
<trapped_> i'm not sure that works
<jhass> bougyman: you can't really compare lisp to an procedural language like crystal
<trapped_> the output is the same
<jhass> it must be literally {{debug()}}, not {{debug}} or so
<crystal-gh> [crystal] asterite pushed 1 new commit to master: http://git.io/vGbO0
<crystal-gh> crystal/master b94a0f5 Ary Borenszweig: CLI: moved browser, hierarchy and types inside a "tool" command
<trapped_> literally {{debug()}}
<jhass> if you see nothing it's not hit before the error is encountered
<trapped_> macro gen_h; {{debug()}}; [other text]; end
<trapped_> maybe the macro is not being expanded at all
<jhass> ah, I should mention it prints everything up to the point of the call
<jhass> if you put it at the start it prints nothing since there's nothing expanded yet
<trapped_> can't execute Generic in a macro
<trapped_> hmm
<jhass> huh
<trapped_> i think i found a better way to do what i wanted
<travis-ci> manastech/crystal#b94a0f5 (master - CLI: moved browser, hierarchy and types inside a "tool" command): The build has errored. https://travis-ci.org/manastech/crystal/builds/78765049
<crystal-gh> [crystal] asterite pushed 1 new commit to master: http://git.io/vGbll
<crystal-gh> crystal/master fcd8f30 Ary Borenszweig: Merge branch 'tool-impl'
<jhass> \o/
Ven_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<crystal-gh> [crystal] asterite pushed 2 new commits to master: http://git.io/vGbRL
<crystal-gh> crystal/master a52d007 Technorama Ltd: LibC error checking in dir.cr & file.cr...
<crystal-gh> crystal/master 1c7316c Ary Borenszweig: Merge pull request #1354 from technorama/f/dir_error_checking...
Ven_ has joined #crystal-lang
<travis-ci> manastech/crystal#fcd8f30 (master - Merge branch 'tool-impl'): The build passed. https://travis-ci.org/manastech/crystal/builds/78768439
<crystal-gh> [crystal] asterite closed pull request #1246: Add Deque (double-ended queue) (master...deque) http://git.io/vsW04
<bougyman> jhass: i'm not clear on why that has anything to do with baking a repl into a language. lisp is multi-paradigm, it can do procedural just fine.
<waj> bougyman: I think it's not impossible, but just a little hard. Types representation can mutate as you evaluate code and that conflicts right now with the way the codegen works.
<bougyman> waj: i wouldn't think it's easy. if it were more languages would do it. There's certainly plenty of reference material in the different lisp implementations on how to accomplish it, though.
<bougyman> they've had 5 decades to overcome the 'hardness' of it.
<waj> yup, although I'm not sure we could just copy the way lisp works into crystal
<crystal-gh> [crystal] asterite pushed 1 new commit to master: http://git.io/vGbzT
<crystal-gh> crystal/master d1d3616 Ary Borenszweig: Updated changelog and docs
<bougyman> there are a lot of lispish behaviors in crystal already.
<asterite> bougyman: can you have "undefined method" at runtime in lisp?
<bougyman> asterite: non-existent function, but yes.
<asterite> So for me that classifies as a not-compiled language
<bougyman> ah, well you said runtime.
<travis-ci> manastech/crystal#1c7316c (master - Merge pull request #1354 from technorama/f/dir_error_checking): The build passed. https://travis-ci.org/manastech/crystal/builds/78770546
<bougyman> you can't compile it.
<bougyman> but the repl is part of the runtime, too.
<waj> well... I think the term "compiled" is misleading nowadays
<asterite> but lisp is interpreted or compiled?
<bougyman> yes.
<bougyman> lisp is compiled, and intepreted.
<asterite> Yes, java is compiled... but interpreted :-s
NeverDie has joined #crystal-lang
<asterite> jhass: we'll probably make a new release later in the day (many bug fixes and improvements already), in case you have pending stuff
<trapped_> jhass: i found a better way to do what i wanted
<jhass> cool
<trapped_> ended up making it simpler and with less macros
<jhass> to both
<jhass> asterite: I don't like the new Channel.select going with those names into a release, but oh well
<asterite> jhass: but it's exactly the same interface as in Go
<jhass> they use receive_op as names too? ugh
<jhass> doesn't mean I have to like the names :P
<travis-ci> manastech/crystal#ce2f391 (master - Merge pull request #1246 from BlaXpirit/deque): The build passed. https://travis-ci.org/manastech/crystal/builds/78771016
<asterite> They don't use those names... maybe a better name is `receive_request` and `send_request`?
dylanmei has joined #crystal-lang
<jhass> well, you have my brainstorming under the commit :P
<asterite> I don't know, those names won't be used in code, they'll be expanded by the "select" AST node that we'll eventually add
<jhass> I feel like we could also have at least the common case abstracted
<jhass> Channel.receive_first(ch1, ch2)
<asterite> But `select` is "select the first one that..."
<jhass> and return the value, not the tuple because which one returned is also uninteresting in many cases IMO
<asterite> Oh, you mean because Enumerable#select returns an Array?
<jhass> I don't mean anything in particular
<asterite> Oh, and this won't be 1.0, so we have plenty of time to think of better names :)
<jhass> the whole interface feels rather crufty atm, it's fine to build language level abstractions upon but going into a release as an alternative free interface for now like that...
<travis-ci> manastech/crystal#d1d3616 (master - Updated changelog and docs): The build passed. https://travis-ci.org/manastech/crystal/builds/78772423
<jhass> I feel like either it should read nicely already or (or and) be hidden behind common case abstractions
<asterite> But you won't use that interface directly, you'll use `select; when val = ch.receive; puts val; end`
<jhass> I'm talking about now though
<asterite> Mm... later you'll have to refactor Channel.select calls to use the select expression, so you'll have to change it anyway, I think
<jhass> so what about value = Channel.receive_first(ch1, ch2, ..); and Chanel.send_first(value, ch1, ch2, ...) for now until language level select is a thing? I think sending and receiving at the same time will be the rare case
<asterite> I mean, in user code
<jhass> it's easy to do and reads so much nicer IMO
<asterite> We could do that. In fact I think I suggested the "receive" part to waj. If waj agrees, we can do it
<waj> we can add `receive_first` and `send_first` but it's not one or the other
<waj> and those methods would be using `Channel.select`
<jhass> sure, that's what I mean
<jhass> hide the interface for now in easy common case abstractions
<jhass> sort of like we do with Process.run actually
<waj> regarding, `send_op` and `receive_op`, I also would like to find better names
<waj> I suggested `_async`, but I now understand that they are not even async operations, because if they are not selected the operation is not performed at all
<waj> maybe something more explicit with the operation: `_case` or `_select_case`
<waj> that would make it more similar to Go :P
kostya has joined #crystal-lang
<asterite> jhass: want to add Channel.receive_first and Channel.send_first ?
<crystal-gh> [crystal] dfockler opened pull request #1364: Fix #1281 Changed error output for writing to read-opened file (master...fix-1281) http://git.io/vGb6N
<jhass> asterite: waj http://paste.mrzyx.de/pjpamplad would be my first pitch, any comments?
<asterite> Mmm... that [1] isn't good
<asterite> you need to know the index
<asterite> so you can know from which channel the value came
<asterite> and then do the cast...
<asterite> that's what the "select" expression will do for you :-)
<jhass> well, my claim is that in the common case you don't :P
<jhass> either you have uniform input and don't care about the source
<jhass> or you have diverse input and need to resolve the union anyway
<waj> but you can ignore the index later if you don't need it
<jhass> I can but it adds noise to the caller side
<jhass> if I care about it just don't use the abstraction for now
<jhass> like Process.run, if you need features the abstractions don't provide, don't use them
<waj> do you currently have any use of these?
<waj> you should have started from there :-)
<jhass> mh? DeBot was 0.6.1 times ;)
<waj> yup, but I mean I like to see real use cases to make decisions about the api
<crystal-gh> [crystal] jhass opened pull request #1365: Add basic Channel.select abstractions, Channel.receive_first, Channel.send_first (master...channel_select_first) http://git.io/vGbDV
<jhass> anyway, ^ is my proposal, take it or leave it ;)
<jhass> and yes I'm completely fine with dropping them once the language level support is there
<waj> I think you conviced me :)
<jhass> great :)
slash_nick has joined #crystal-lang
<jhass> oh, a slash_nick o/
<slash_nick> hallo!
dfockler has joined #crystal-lang
<jhass> o/
<jhass> 5 more
<jhass> dfockler: your git fu is strong enough for some squashing or should I guide you through it? :)
<dfockler> Yeah I need help :)
<slash_nick> Might be tough today... it's a 3 day weekend here in the states and I wouldn't be surprised if lots of folks are out til Tuesday
<jhass> alright, start with git checkout fix-1281; git rebase -i e0ca58344e8a4a2cfac97844f8fe41bbadfa92f1^;
<jhass> that should open your $EDITOR with a list of your commits
<dfockler> okay I'm there
<jhass> there keep the first one at pick and change the others to squash
<jhass> save & quit, (edit), save & quit
<crystal-gh> [crystal] asterite closed pull request #1365: Add basic Channel.select abstractions, Channel.receive_first, Channel.send_first (master...channel_select_first) http://git.io/vGbDV
<jhass> asterite: thanks!
<jhass> dfockler: confirm it looks nice with git log, then git push -f origin fix-1281
<dfockler> jhass: looks like it couldn't rebase everything
<jhass> how so?
<dfockler> error: could not apply efbc127
<jhass> huh
<jhass> you didn't reorder and you didn't drop a commit?
<dfockler> I don't think so
havenwood has quit [Quit: Textual IRC Client: www.textualapp.com]
<jhass> Oh, weird, my initial one was wrong I guess
<jhass> dfockler: alright, rollback, git rebase --abort
<jhass> we'll need to get a different rev to get the merge out, didn't realize it's an actual merge commit :P
<dzv> @asterite: Is there a structured way to handle fiber local data? I'm trying to handle db transactions transparently. db.query_like_methods needs to get a transaction object (if there is one) from Fiber.current
<jhass> dfockler: git remote -v lists usptream pointing to manastech/crystal or how did you set it up?
<travis-ci> manastech/crystal#e7982fe (master - Merge pull request #1365 from jhass/channel_select_first): The build passed. https://travis-ci.org/manastech/crystal/builds/78784269
<dfockler> yeah that's my upstream
<jhass> cool, then we start with git fetch upstream; git rebase -i upstream/master
<jhass> that now should only list your commits, sans the merge
<dfockler> nice, then just squash the last two?
<jhass> yep
<dfockler> do I need to merge new changes and rebase again?
<jhass> nope
<jhass> as long as it cleanly merges into master (github displays that) you don't need to merge
<dfockler> looks like someone pushed a change
<jhass> but a rebase in the way we did it now also applies your commits on top of the latest changes
<dfockler> so I can just do a git pull
<jhass> you mean because it rejects your push now?
<dfockler> yeah
<jhass> that's because we replaced/edited the commits
<jhass> just git push -f
<jhass> that's sane to do to your topic branches
<dfockler> Haha thanks for the help, I definitely need more git practice :P
<jhass> looking good, thank you!
<ytti> git has great UX
<jhass> tip: git commit --amend edits the last commit
<ytti> just punch in google what you want, then select stackexchange article, and copy paste the cryptic line
<jhass> heh
<ytti> yesterday i tried to figure how to see THIS_FILE commits
<ytti> and compare latest to latest-1
<ytti> but there probably isn't any way to abstractly refer to commits affecting specific file
<dfockler> I just need some of those blocks on my desk
<slash_nick> ytti: probably something to loop through refs calling git show --stat and checking for matches
<ytti> git log --follow -p file
<ytti> will show commits for that file
<ytti> but not specifically just X and X-1
<ytti> git log
<ytti> will tell commits affecting specific file
<ytti> but no way to abstractly refer to them without hash
<jhass> I guess some --online -n1 | cut | xargs magic then ;P
<jhass> or more --format %whatever to skip the cut
<ytti> yeah
rhaps0dy has quit [Remote host closed the connection]
<slash_nick> not `git log HEAD^..HEAD --follow -p`?
<asterite> dzv: I don't know about fiber-local data, you could reopen Fiber and use instance variables
<crystal-gh> [crystal] jhass closed pull request #1364: Fix #1281 Changed error output for writing to read-opened file (master...fix-1281) http://git.io/vGb6N
<jhass> asterite: haha, that's what I said too
<jhass> but it's not nice, especially if many libraries start to do it
* asterite whispers waj told me
<waj> :D
<asterite> but maybe there should be some other day... we should think hard... or just see what go does :-D
<dzv> is there a more structured way to do that? there's also the problem of leaking transactions. do i also hook in to finalize to abort/release unfinished transactions? i
<waj> using instance variables is probably the most efficient one
<jhass> I could imagine something like Java's ThreadLocal class
<jhass> interface wise
<crystal-gh> [crystal] luislavena opened pull request #1366: Correct formatting issues in changelog (master...tweak-changelog) http://git.io/vGNUc
elia has joined #crystal-lang
luislavena has joined #crystal-lang
<luislavena> howdy folks
<crystal-gh> [crystal] asterite closed pull request #1366: Correct formatting issues in changelog (master...tweak-changelog) http://git.io/vGNUc
<dzv> finalize may also come too late (or never if the gc doesn't run). if a transaction is held in lmdb it can block any other operation possibly deadlocking the app if it isn't released
<waj> dzv: there is currently no other way. Transactions and DB connections should override `finalize` to handle those situations
Ven_ has quit [Ping timeout: 240 seconds]
<jhass> luislavena: o/
<luislavena> seems you guys are hard at work wrapping for another release?
<luislavena> or is just because is friday? :D
elia has quit [Client Quit]
<waj> yup! new release is coming
<waj> dzv: how is that solved in other languages/frameworks?
<travis-ci> manastech/crystal#3ad3e68 (master - Merge pull request #1364 from dfockler/fix-1281): The build passed. https://travis-ci.org/manastech/crystal/builds/78787828
elia has joined #crystal-lang
<dzv> threadlocal + deadlocking for gc'd languages i assume.
<dzv> i think activerecord leaks or slowly regains connections if you don't explicitly free but i don't remember exactly
<dzv> perhaps running the finalizer immediately when the fiber block exits would solve the issue?
<waj> mm... what if there are still other references to the object
<dzv> hmm. maybe a finished method or set of callbacks?
<waj> I wouldn't include that in the stdlib by default. If you need callbacks you can always spawn the fiber with a begin/ensure to release resources before it finishes.
<jhass> mh, anything wrong with https://github.com/manastech/crystal/pull/1314 btw?
<dzv> not if i want transparent db access. the fiber is spawned by the users code or possibly libraries code
luislavena has quit [Remote host closed the connection]
<jhass> dzv: why not use a classic connection pool?
<willl> there are for sure situations where AR (and maybe others) just keep connecting over and over again, then people hit the 500 connection limit we set. see those tickets frequently
dfockler has quit [Remote host closed the connection]
<dzv> the finalizer/finished method is for returning resources to the pool and closing transactions
<travis-ci> manastech/crystal#c387322 (master - Merge pull request #1366 from luislavena/tweak-changelog): The build passed. https://travis-ci.org/manastech/crystal/builds/78788399
<dzv> otherwise the pool never gets it's resources back
<waj> I would say that if you must rely on the object finalization to reuse the connection, then there is something bad in the design
<jhass> shouldn't one fetch the connection from the pool only for the duration of query/transaction?
<jhass> and rather return it asap?
dfockler has joined #crystal-lang
<jhass> def transaction; @connection = @pool.fetch; yield @connection; ensure; @pool.return(@connection); end
<dzv> User.find(id). # display info about user.
<waj> jhass: oh no! the build got stuck again!? :(
<dzv> should that get wrapped in a transaction block?
<jhass> waj: that was before your fix ;)
<jhass> I just didn't rebase since
<waj> dzv: maybe not right there around that line, but if you're designing a web framework, for example, you can release the resources right before finishing with the request
waterlink has joined #crystal-lang
elia has quit [Quit: Computer has gone to sleep.]
<waj> jhass: oh, ok... my heart has stopped for a moment... :)
<jhass> heh, sorry I guess :P
<dzv> i'm not designing a web framework. i'm designing a db shard and i would prefer to not leak things if i can avoid it. i don't expect other programmers to handle every situation perfectly. they will leak if explicit freeing is required and wonder why their app stops responding
<dzv> willl mentioned this happens frequently with AR and it's a well known framework with well known pool semantics. if AR can't be used "correctly" then i think the design can be improved with a quick finish/finalize in the fiber
<willl> it's often, I think, due to an exception or timeout, and those cases not returning the connection to the pool. It's hard to track down when it's someone else's app
<waj> I think I like Go's approach now
<waj> btw... few days ago, I started with asterite to design a common DB interface
<dzv> go's is?
<waj> in Go, you create a DB object and perform queries to it. It maintains an internal pools of connections and you only get interested on a specific connection if you need to start a transaction
<willl> please don't make a terrible one like go's database/sql
<waj> anything we do will be open to discussion with all of you guys :)
<willl> go's you can't set session state at all, because they don't have a place to set that on each connection in the pool
<willl> also they "reconnect" but only five times, and they do it right away, so any transient network problem you just burn through all 5
<dzv> that's for raw sql connections. what about AR style object mapping with User.find?
<willl> also if you don't connect because of an error, they don't return an error until the first query you do
<waj> willl: I'm not sure I follow the issue of the session state
<willl> also if you don't know at the time you write your query how many columns you have, because all you can do is rows.Scan you're mostly screwed
<waj> dzv: can't AR work on top of that?
<willl> postgres you can `set time zone to 'UTC'` and such, and that is state that lives on that session
<willl> because you get a random thing from the pool each time, you can't know you have one with state set
<waj> but you can use `Begin` to get a Tx attached to a single connection
<willl> yeah but then you have to set the state each time you want, not just at first connection
<waj> oh... I see. So you'd like to have a callback for example, to execute on every open connection
<dzv> waj: User.find would still need the connection from Fiber.current but that can be monkey patched. the queries would need to be wrapped in Db.open blocks still. i dislike this requirement from an ease of use perspective
<willl> waj: yeah that'd work
<dzv> but maybe that is better since connections would probably be released sooner
<willl> but generally due to how terrible database/sql is, you should never use go if you want to use postgres. And the people on my team wrote go's postgres driver...... :(
<waj> dzv: if you don't need an explicit transaction then maybe you don't need to use a connection by fiber, am I right?
<waj> willl: hehe, I used the postgres driver myself and it wasn't that bad :)
<dzv> incorrect. transaction { u = User.find; u.something = 1; u.save } # the transaction isn't referenced in any method. they use Fiber.current behind the scenes to look it up
<dzv> same with the connection
<willl> waj: this is the pain you have to go through if you don't know how many columns, https://gist.github.com/will/7a36669b19f494b7262d also surprise strings are []byte now, good luck
<waj> willl: yup, I think we can do better than that, let's see... :)
<willl> yes :) in crystal-pg it's DB.exec("select * from foo")
luislavena has joined #crystal-lang
<waj> I only want to create a thin layer of abstraction for different connectors and also to handle the connection pooling
<willl> could be useful for other things too maybe
NeverDie has quit [Quit: I'm off to sleep. ZZZzzz…]
<waj> I didn't think of that, but starting with an adhoc db connection pooling, so every connector don't have to have their own
<asterite> maybe we should create an issue in the repo and continue the discussion there, so it doesn't get lost :)
<asterite> (later)
<waj> I wish we could be all on the same room with a whiteboard for this ;)
<dzv> and not db specific. general object pooling yes?
ledestin has quit [Ping timeout: 264 seconds]
<crystal-gh> [crystal] asterite closed pull request #1314: Raise Errno when failing to allocate a new fiber stack (master...fiber_allocate_error) http://git.io/vGYu0
<waj> something like what willl suggested? yup, maybe
waterlink has quit [Ping timeout: 244 seconds]
<dyulax> something like PHP's PDO?
<crystal-gh> [crystal] kumpelblase2 opened pull request #1369: Added convenience method to open a websocket to a server. (master...patch-1) http://git.io/vGNBq
<crystal-gh> [crystal] jwaldrip opened pull request #1370: don't require a Projectfile when generating docs (master...master) http://git.io/vGN0r
<dzv> separate from pooling a standard base library for SQL connection/columns/rows that pg, mysql and other drives to inherit from would be useful
<travis-ci> manastech/crystal#f6c847f (master - Merge pull request #1314 from jhass/fiber_allocate_error): The build passed. https://travis-ci.org/manastech/crystal/builds/78795066
leafybasil has quit [Remote host closed the connection]
havenwood has joined #crystal-lang
qard has joined #crystal-lang
havenn has joined #crystal-lang
havenwood has quit [Ping timeout: 240 seconds]
<trapped_> is there a builtin email address validator in crystal?
<wmoxam> nope
<trapped_> i'll use the regex then
<BlaXpirit> trapped_, beware that this is extremely difficult to get right
<BlaXpirit> your regex has to be either very permissive or huge
<trapped_> (i?)[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a0-9])?
<BlaXpirit> ...
<trapped_> i was using it in go, not sure if there's some strange syntax
<BlaXpirit> looks definitely wrong
<trapped_> i would've said that too but it works
<trapped_> or at least, it's been working for a year now without issue
<BlaXpirit> trapped_, found this cool email address. does it validate? 伊昭傑@郵件.商務
<trapped_> very well
<trapped_> it is unfortunate that i must admit it has happened to me before that i had to receive an email from a chinese address
<trapped_> however, all i could read was ������;
<asterite> Ugh, I'm now getting `/bin/sh: line 1: /usr/bin/cc: Argument list too long` when doing `make crystal spec`. Tried https://github.com/manastech/crystal/pull/1293 too but I get the same error :-(
<dzv> i was wondering how long it would take for that to happen
kostya has quit [Remote host closed the connection]
<BlaXpirit> oh no :s
elia has joined #crystal-lang
<asterite> Well, using relative filenames solves the problem for now :-)
<dzv> there are just too many files being linked together at once
<asterite> we were passing absolute filenames
<dzv> delays the problem for now
<asterite> and later we'll probably want to put generate code of nested types inside the container, to reduce the number of files
<dzv> any large crystal project will have the same problem
<asterite> dzv: how do you deal with it in large C code bases?
<dzv> idk. normally c has larger blocks of code in a file. crystal has lots of small files
<dzv> you could combine code in to multiple static libraries and link them at the end
<dylanmei> ls
<dzv> i don't think this is an xargs or loop solvable problem
<dzv> the linker needs all files passed to it as arguments
<BlaXpirit> loop is not applicable, no
<BlaXpirit> but what's wrong with xargs?
<dzv> xargs executes multiple commands if the list is too long
<BlaXpirit> oh :(
<dzv> lib1 = first X files. lib2 = next X files. ... link lib1..N
<crystal-gh> [crystal] asterite pushed 1 new commit to master: http://git.io/vGNyR
<crystal-gh> crystal/master ac14346 Ary Borenszweig: Use relative filenames to delay "Argument list too long" for now
qard has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<jhass> but into which limit did we run here?
<jhass> one of clang/gcc/ld itself?
<jhass> or one of darwin?
<jhass> or is it the shell?
<BlaXpirit> jhass, i think it's the shell
<BlaXpirit> the same happens for any command, there are many examples around the internet
<jhass> because ARGV on linux can get really really big these days
<BlaXpirit> most notable blah $(find blah)
<jhass> not for single argument size but in the number of arguments
<BlaXpirit> wow, does every crystal build write all these temporary files?
<BlaXpirit> i dont want my HDD to be worn so intensively
<jhass> kinda, they're used for caching
<BlaXpirit> i wish i could tell it to use /tmp
<jhass> that is crystal won't (or shouldn't) recompile modules that didn't change
<jhass> you can
<BlaXpirit> it's all isolated inside .crystal
<BlaXpirit> anyway
<jhass> CRYSTAL_CACHE_DIR="/tmp/whatever"
leafybasil has joined #crystal-lang
<BlaXpirit> that's nice
<BlaXpirit> looks like i need an alias
elia has quit [Quit: Computer has gone to sleep.]
<jhass> well, just export it in your .$SHELLrc?
<jhass> that's what I do
<BlaXpirit> sure
<BlaXpirit> oh export?
<jhass> yeah
<BlaXpirit> never even thought of that
<crystal-gh> [crystal] asterite pushed 1 new commit to master: http://git.io/vGNHE
<crystal-gh> crystal/master dc00424 Ary Borenszweig: Fixed `read(slice)` method of BufferedIO and ChunkedContnet: only read what's available
<BlaXpirit> but if it uses relative paths now, does it mean caches can conflict?
<jhass> asterite: what's getconf ARG_MAX returning for you?
<travis-ci> manastech/crystal#ac14346 (master - Use relative filenames to delay "Argument list too long" for now): The build passed. https://travis-ci.org/manastech/crystal/builds/78803056
<asterite> 262144
<BlaXpirit> 2097152 here
<asterite> Wow
<asterite> I need to change it :-P
<asterite> Gotta go now...!
<waj> why do we need to invoke the linker through the shell anyway?
<jhass> no idea
<jhass> well, does execve $PATH lookup? I can never remember
<BlaXpirit> i wish i knew about this earlier. so many files were written to my poor HDD :(
<waj> BlaXpirit: what changes now that you do? please don't leave Crystal! :)
<BlaXpirit> i finally redirected them to be written to RAM
<travis-ci> manastech/crystal#dc00424 (master - Fixed `read(slice)` method of BufferedIO and ChunkedContnet: only read what's available): The build passed. https://travis-ci.org/manastech/crystal/builds/78804143
<waj> oh, that's clever
<waj> is there native support for ramdisk in osx?
<jhass> mount | grep tmpfs ? idk
<BlaXpirit> maybe people should be warned
<BlaXpirit> especially SSD could be worn out so quickly
<jhass> it's a pretty normal thing for compilers to do heavy disk IO
<BlaXpirit> maybe
<BlaXpirit> but maybe because i care about these things so much i never had an HDD die on me
<waj> I thought those issues with SSD are things from the past
<waj> I had SSD for many years now
<BlaXpirit> i dunno, i think no matter what SSDs still have some limit on number of writes
<trapped_> is there no String.gsub! (modifies original instead of returning) ?
<BlaXpirit> even if it is much higher now
<BlaXpirit> trapped_, strings are immutable
<BlaXpirit> there is no operation at all that changes a string
<trapped_> hmm
<BlaXpirit> now that i think about it
<BlaXpirit> there shouldn't be any problem with writing these temporary files to the temporary folder by default
<jhass> I have it in my home actually to not litter them everywhere but nuking it significantly increases compile time for the compiler for me
trapped_ is now known as trapped
<jhass> also it's >800M for me by now, quite some RAM gone
<jhass> if it would reside there
<BlaXpirit> well that's just built up over time
<waj> can we delete unused files after a while?
<jhass> in /tmp/? there are some mechanisms iirc but I don't remember specifics
<BlaXpirit> uh /tmp usually clears on reboot
<BlaXpirit> but sure there are some people that don't reboot
<jhass> I reboot less than once a week
<BlaXpirit> just forget what i said :p
<BlaXpirit> my worries probably are groundless
<jhass> >> "foo".to_i64?
<DeBot> jhass: # => nil - http://carc.in/#/r/dr3
<jhass> good
Renich has joined #crystal-lang
<Renich> o/
<dzv> waj: needs shell for libraries that use has `foo-config --libs`
<Renich> Hey guys, learned about Crystal a few weeks ago. I was wondering, is there a Gentoo/Funtoo overlay?
<waj> Renich: not that I'm aware of
<Renich> waj: yeah... can't find one either
<waj> dzv: good point, maybe we should execute those before linking and parse the result then?
<dzv> i suggested that before. linker_options = libs.map { |l| l =~ /`/ ? shell_cmd(l).split : l }.flatten
<waj> Renich: if you want to make a Gentoo package maybe you can take some inspiration from the Arch pkgbuild
<trapped> is there anything like Array.flatten ?
<BlaXpirit> trapped, there is, but perhaps not released yet
dfockler has quit [Remote host closed the connection]
<trapped> i'll check in the gh repo
<waj> trapped: hopefully coming today!
<trapped> oh wait there actually is, but i was checking using http://carc.in and that's not on the latest commit
<trapped> i am on the latest commit on the other hand
Renich has quit [Ping timeout: 255 seconds]
Renich has joined #crystal-lang
<jhass> ugh, I think the http server (hello world example) does no longer respond to POST/with a body requests for me
Renich has quit [Ping timeout: 246 seconds]
<dzv> waj: read(slice) reads the first available bytes. thanks. but read(42) loops until 42 are read. that's inconsistent
Renich has joined #crystal-lang
<waj> dzv: I know, but `read(Int)` also returns a string, so we need to rethink that
BlaXpirit has quit [Quit: Konversation]
BlaXpirit has joined #crystal-lang
<jhass> can't it be that read(0) just hangs?
<jhass> self = #<HTTP::FixedLengthContent:0x561d23f45ac0 @io=#<TCPSocket:fd 9>, @remaining=4>
<jhass> slice.length = 2048
<jhass> count = 4
<jhass> self = #<HTTP::FixedLengthContent:0x561d23f45ac0 @io=#<TCPSocket:fd 9>, @remaining=0>
<jhass> slice.length = 2048
<jhass> getting that when doing an http request with a body
<dzv> that's mostly a naming issue correct? there's still the semantic issue of read(slice, count=10) and read_string(10) having the same behavior
<jhass> + one more count = 0
<jhass> return 0 if count == 0 in https://github.com/manastech/crystal/blob/master/src/http/content.cr#L19 fixes it but it doesn't feel like the right fix
<crystal-gh> [crystal] technorama opened pull request #1372: IO specs for partial read behavior (master...f/io_specs) http://git.io/vGAtG
<waj> jhass: it started to fail after last commit?
<jhass> I didn't bisect it yet
<jhass> yeah, actually it appears so
<jhass> waj: ^
<waj> yup, this will probably delay the release
<waj> dzv found that `read(Slice)` was blocking until the buffer is full and asterite tried to fix it
<jhass> and I was already wondering wth I broke in carcin :P
<dzv> would changing .read(slice) to .read_fully(slice) work in http/content.cr?
<dzv> that appears to be the desired behavior for ChunkedContent. not sure about the others
havenwood has joined #crystal-lang
blue_deref has joined #crystal-lang
havenn has quit [Ping timeout: 265 seconds]
Renich has quit [Quit: leaving]
benner_ has joined #crystal-lang
juancate_ has joined #crystal-lang
juancate has quit [Ping timeout: 244 seconds]
czaks has joined #crystal-lang
czaks has quit [Ping timeout: 244 seconds]
benner has quit [Ping timeout: 244 seconds]
fowlduck has joined #crystal-lang
havenwood has quit [Ping timeout: 246 seconds]
dfockler has joined #crystal-lang
elia has joined #crystal-lang
dylanmei has quit [Read error: Connection reset by peer]
elia has quit [Ping timeout: 250 seconds]
waterlink has joined #crystal-lang
trapped has quit [Read error: Connection reset by peer]
n0xff has quit [Ping timeout: 246 seconds]
trapped has joined #crystal-lang
dyulax has quit [Ping timeout: 268 seconds]
havenwood has joined #crystal-lang
<crystal-gh> [crystal] asterite pushed 1 new commit to master: http://git.io/vGA1r
<crystal-gh> crystal/master 2e4745e Ary Borenszweig: Fixed BufferedIO#read to not call unbuffered_read when given an empty slice.
trapped has quit [Read error: Connection reset by peer]
trapped has joined #crystal-lang
<asterite> jhass: dzv: we fixed the issue, the problem was in BufferedIO
Ven has joined #crystal-lang
<travis-ci> manastech/crystal#2e4745e (master - Fixed BufferedIO#read to not call unbuffered_read when given an empty slice.): The build passed. https://travis-ci.org/manastech/crystal/builds/78827450
<dzv> read(1000) still blocks if there is data available
<asterite> jhass: does the 2048 sample works for you if you change read_nonblock to just read?
fowlduck has quit [Remote host closed the connection]
dyulax has joined #crystal-lang
<jhass> asterite: mmh, quitting with escape is broken either way
qard has joined #crystal-lang
qard has quit [Client Quit]
qard has joined #crystal-lang
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
fowlduck has joined #crystal-lang
Ven has joined #crystal-lang
Renich has joined #crystal-lang
<Renich> I am trying to compile crystal
<Renich> I've been stuck at this for a long time already: http://fpaste.org/263811/44140405/
<BlaXpirit> Renich, well it seems like it's compiling
<Renich> BlaXpirit: is there a verbose way to do it?
<BlaXpirit> i mean, being stuck at that message is normal, but not for too too long
<BlaXpirit> i don t know
<BlaXpirit> do u have little RAM? but then it would've probably broken, not got stuck
<BlaXpirit> or maybe it uses swap :s
havenwood has quit [Ping timeout: 240 seconds]
NeverDie has joined #crystal-lang
BlaXpirit has quit [Quit: Konversation]
qard has quit [Ping timeout: 240 seconds]
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<jhass> Renich: long time means what actually?
<Renich> No, I have plenty of RAM and 6 cores. I've been at it for 4 hours already
<jhass> oO
<Renich> jhass: 4h
<Renich> yeah
<jhass> okay, definitely not normal
<Renich> jhass: the process is just using 1 core and it takes up to 25%
<Renich> my OS is Funtoo x86_64
<jhass> Travis compiles it, compiles the testsuite (much larger than the compiler) and runs the testsuite in under 7 minutes
qard has joined #crystal-lang
<jhass> which LLVM version?
<jhass> I think it got stuck, might be worth to kill it, make clean; rm -rf .crystal and try again
qard has quit [Client Quit]
dfockler has quit []
<jhass> jeez, 4h, you gentoo people have too much patience :P
<Renich> jhass: let me check
<Renich> jhass: 3.6.2
<Renich> jhass: ok, let me try that
<jhass> well, that's what I have too
<Renich> there was no .crystal
<Renich> but, anyway
<Renich> re-trying
<Renich> $ ps -aux | grep -i crystal
<Renich> renich 4650 25.9 0.0 13616 3168 pts/1 S+ 17:32 1:17 bash /home/renich/bin/crystal build -o .build/crystal src/compiler/crystal.cr
<jhass> Renich: actually might kill it again and try if make FLAGS="--stats" prints anything
<Renich> ok
dyulax has quit [Quit: This computer has gone to sleep]
<Renich> jhass: FLSGS='--stats' make or, literaly: make FLAGS="--stats"?
<jhass> literally
<Renich> OK; it's running; no extra output
<jhass> really?
<jhass> that's definitely not normal
<Renich> jhass: what would you suggest?
<jhass> does crystal eval 'puts "Hi"' work?
kyrylo has quit [Remote host closed the connection]
<Renich> let me try
<Renich> jhass: it hangs
<jhass> :(
<jhass> crystal --version ?
<Renich> OK, so the binary is not working, right?
<jhass> I think so
dyulax has joined #crystal-lang
<Renich> hanks
<Renich> hangs
<jhass> does it print version and --help?
<Renich> $ ll $( which crystal )
<Renich> lrwxrwxrwx 1 renich renich 26 sep 4 14:21 /home/renich/bin/crystal -> ../src/crystal/bin/crystal
<jhass> okay, strace --ff crystal --version
<Renich> and src/crystal is the latest clone of the master branch of the git repo
<jhass> oh
<jhass> oooh
<Renich> O_O
<jhass> that bug
<jhass> :D
<Renich> lol
<Renich> OK, so switch to a release, right?
<jhass> crystal is self hosted, you'll need the binary
<jhass> the repo contains none
<jhass> just a script that searches for it
<Renich> oh!
<jhass> and probably finds itself since you put it into the $PATH
<Renich> yeah
<Renich> ok, so, I get the binary and put it in PATH
<Renich> and this should work, right?
<jhass> pretty much
<Renich> OK, et me try
<jhass> and but its bin/crystal into your PATH
<jhass> (it's a script too but a different one :P)
<jhass> so if you got some portable shell code skills, https://github.com/manastech/crystal/blob/master/bin/crystal could definitely use some self-detection :P
dyulax has quit [Quit: This computer has gone to sleep]
<jhass> mmh, I guess another realpath call on the command -v output should do it
luislavena has quit [Remote host closed the connection]
<Renich> jhass: OK, good news. I got an error ;)
<jhass> \o/
<Renich> it seems my hardened configuration is getting in the way
<jhass> yeah, the official packages don't ship -fPIC libraries unfortunately
<Renich> jhass: oh well, I'll have to... <sigh>... recompile everything without hardened ;=)
<jhass> no
<Renich> what, just GCC?
<jhass> no
<Renich> really? cool!
<jhass> just make sure you don't set -fPIC or -fPIE for this call
<jhass> check your CFLAGS etc
<Renich> OK
<jhass> looks like -pie is another flag that might cause trouble
<Renich> jhass: I just see -pipe
<jhass> mmh
<Renich> let me check out my gcc config
<jhass> how about CFLAGS="-fno-PIC -fno-PIE -fno-pie", does that override it?
<jhass> -nopie might be a thing too
<Renich> let me see
<jhass> yeah, well I don't know how your hardening config is setup :P
<jhass> something somewhere sets -fPIC or -fPIE etc
<Renich> jhass: I'll just remove it
<jhass> you won't need to recompile anything, just linke without any of those flags
<jhass> *link
<Renich> yeah, the linker is the one complaining... gotta figure it out
<Renich> let me ask the guys at #funtoo
fowlduck has quit [Remote host closed the connection]
luislavena has joined #crystal-lang
<jhass> Renich: if funtoo has recent enough stuff you could also install these things https://github.com/manastech/crystal/wiki/All-required-libraries and I can ship you an .o that you should be able to link regardless
<Renich> yeah, was looking into that list as well
<Renich> that would rock ;)
<Renich> I am trying to create the ebuild so I can collaborate with the overlay so Funtoons and Gentoons can install crystal
<jhass> well, figuring out how to bootstrap from official stuff would certainly be preferable then though
<Renich> jhass: that is true
<jhass> that's what we do for arch, download the tarball there and recompile against arch's packages (and tell people that have hardening-wrapper installed to disable it for the package build)
<Renich> jhass: well, that's gonna be, pretty much, the path to follow
<Renich> jhass: thanks
<jhass> Renich: anyway, here's the .o: http://cloud.aeshna.de/u/mrzyx/crystal.o.gz
<jhass> gunzip it and cc crystal.o -o crystal `(llvm-config-3.6 --libs --system-libs --ldflags 2> /dev/null) || (llvm-config-3.5 --libs --system-libs --ldflags 2> /dev/null) || (llvm-config --libs --system-libs --ldflags 2>/dev/null)` -lstdc++ -levent -lrt -lpcl -lpcre -lm -lgc -lpthread -lunwind
<jhass> if that works that gives you a standalone crystal binary for your system that you can move anywhere
<jhass> well, you still need to set CRYSTAL_PATH="libs:/path/to/a/copy/of/the/stdlib"
<jhass> since it doesn't have that compiled in for your system
<Renich> jhass: thanks! I'll definitely try it
<jhass> heh, turning of hardening looks easier after all :P
waterlink has quit [Ping timeout: 260 seconds]
fowlduck has joined #crystal-lang
<Renich> lol
<Renich> first replaced the crystal binary you sent; backed up the original
<Renich> now, when I run it: ./crystal --version
<Renich> bash: ./crystal: cannot execute binary file: Exec format error
<jhass> it's not linked
<jhass> that's what the long command I pasted is for ;)
<Renich> yeah, sorry, hehehe
<Renich> cannot find pcl
<crystal-gh> [crystal] asterite pushed 2 new commits to master: http://git.io/vGxs0
<crystal-gh> crystal/master 3900e5a Ary Borenszweig: Small cleanups in HTTP Content
<crystal-gh> crystal/master 170f859 Ary Borenszweig: Added YAML::PullParser and use it in YAML::Parser
<Renich> so, let me install
trapped has quit [Read error: Connection reset by peer]
<travis-ci> manastech/crystal#170f859 (master - Added YAML::PullParser and use it in YAML::Parser): The build passed. https://travis-ci.org/manastech/crystal/builds/78845406
<Renich> tlc.. sorry
<Renich> tcl...
<Renich> man
waj has quit [Remote host closed the connection]
<Renich> jhass: disabled hardened and I am getting that now
<jhass> huh
<jhass> how about explicitly setting LIBRARY_PATH="/path/to/extracted/tarball/embedded/lib" ?
<Renich> OK
<jhass> you might need to get the official gc (bdw-gc) package patched for the crystal package to link against it https://projects.archlinux.org/svntogit/packages.git/tree/trunk/gc-7.4.2-Export-GC-push-all-eager.patch?h=packages/gc&id=2f4e623622ab7fd250c2b832837c62085c69e302
<Renich> LIBRARY_PATH="/home/renich/Downloads/crystal-0.7.6-1/embedded/lib" make
<jhass> yeah
<Renich> same error
<jhass> meh
<jhass> maybe with an export?
<Renich> OK
<jhass> export LIBRARY_PATH="..."
* Renich is checking the patch
waterlink has joined #crystal-lang
<jhass> maybe your gcc config is forbidding to link against the static libraries shipped with the tarball?
<jhass> idk
<jhass> nm embedded/lib/libgc.a | grep push_all_eager
<jhass> 00000000000027c3 T GC_push_all_eager
<jhass> U GC_push_all_eager
<jhass> definitely there
<Renich> renich@introdesk crystal $ nm embedded/lib/libgc.a | grep push_all_eager
<Renich> nm: 'embedded/lib/libgc.a': No such file
<Renich> that's on the downloaded tar.gz file (binary)
<jhass> huh
<jhass> I don't think so
<Renich> no, wait
<Renich> my mistake; that was on the git repo. It is on the tar
<Renich> OK, let me retrace my steps a little ...
<Renich> OK, let me retrace my steps a little ...
rhaps0dy has joined #crystal-lang
fowlduck has quit [Remote host closed the connection]