ChanServ changed the topic of #crystal-lang to: The Crystal programming language | https://crystal-lang.org | Fund Crystal's development: https://crystal-lang.org/sponsors | GH: https://github.com/crystal-lang/crystal | Docs: https://crystal-lang.org/docs | Gitter: https://gitter.im/crystal-lang/crystal
watzon1 has quit [Quit: watzon1]
watzon1 has joined #crystal-lang
<FromGitter> <skinnyjames> Hi all, I have a question / use case around providing context to specs. (sure this has been brought up before) ⏎ I'm writing a webdriver client, and I'd like to provide a browser to a grouping of examples, as seen here: https://gist.github.com/skinnyjames/3734634e78309e1b218b90dbedb8fefa ⏎ ⏎ The issue I'm having is that the block finishes once the examples are declared, but not run (which makes
<FromGitter> ... sense) ⏎ So the browser shuts down before any examples have the chance to target it. ... [https://gitter.im/crystal-lang/crystal?at=612d72781179346966eeb77a]
<FromGitter> <Blacksmoke16> if you want to stay within the stdlib features, you'd have to just move that method to within the `it` bocks
<FromGitter> <skinnyjames> ah, so I'd have to spin up a browser per example then?
<FromGitter> <Blacksmoke16> hmm
<FromGitter> <Blacksmoke16> might be able to use class vars within a like `before/after_all` hook
<FromGitter> <Blacksmoke16> i.e. get started in the before hook and torn down in the after
<FromGitter> <Blacksmoke16> kinda meh because it's super easy to bleed context between specs using that var :/
<FromGitter> <Blacksmoke16> could also just use larger `it` blocks :shrug:
<watzon1> Another webdriver client? Are you aware of https://github.com/watzon/marionette?
<FromGitter> <Blacksmoke16> cough https://www.cypress.io/ cough
<FromGitter> <Blacksmoke16> :P
<FromGitter> <skinnyjames> This webdriver client aims to be more like watir
<FromGitter> <skinnyjames> supports regex, and nested locators
<FromGitter> <skinnyjames> I dig cypress though
<watzon1> Idk why I'm watzon1 here. I registered watzon on freenode and libera, but it says it couldn't use the desired nickname here.
<FromGitter> <Blacksmoke16> *imposter*
* watzon1 runs
hightower4 has joined #crystal-lang
hightower3 has quit [Ping timeout: 244 seconds]
watzon1 has quit [Quit: watzon1]
watzon has joined #crystal-lang
ur5us has quit [Ping timeout: 240 seconds]
delucks has left #crystal-lang [#crystal-lang]
nopcOde has joined #crystal-lang
nopc0de_ has quit [Ping timeout: 252 seconds]
<raz> you're not alone, blacksmoke had this problem 15 times :p
ur5us has joined #crystal-lang
sagax has quit [Excess Flood]
Elouin has quit [Quit: Ping timeout (120 seconds)]
Elouin has joined #crystal-lang
ur5us has quit [Ping timeout: 252 seconds]
watzon has quit [Remote host closed the connection]
watzon has joined #crystal-lang
elf_fortrez has joined #crystal-lang
elf_fortrez has quit [Quit: Client closed]
Guest24 has joined #crystal-lang
Guest24 has quit [Quit: Client closed]
<hightower4> Hey let's say I have an existing method like this: https://play.crystal-lang.org/#/r/buka . Now I'd like to make this dependent on the annotation attached to the instance variable which is being deserialized using this function, so that in the end, this becomes possible: https://play.crystal-lang.org/#/r/bukb
<hightower4> Can you point me in the right direction how to begin with that?
<hightower4> Well I guess that's too broad of a question
dostoyevsky2 has quit [Quit: leaving]
dostoyevsky2 has joined #crystal-lang
jhass[m] has quit [Quit: Bridge terminating on SIGTERM]
fifr[m] has quit [Quit: Bridge terminating on SIGTERM]
hamoko has quit [Quit: Bridge terminating on SIGTERM]
jhass[m] has joined #crystal-lang
fifr[m] has joined #crystal-lang
hamoko has joined #crystal-lang
<FromGitter> <Blacksmoke16> you would need some way to reference the type/ivar within a macro to access the annotation
<hightower4> yeah, figured it out in the meantime, thanks
<FromGitter> <Blacksmoke16> 👍
<hightower4> (needed to do it on a different level, and pass the annotation as argument to the final function)
<hightower4> (rather than accessing the annotation directly from that function)
<FromGitter> <Blacksmoke16> gotcha
<hightower4> By the way, I've collected my Crystal wishlist here: https://github.com/crystallabs/crysterm/blob/master/CRYSTAL-WISHLIST.md
elf_fortrez has joined #crystal-lang
elf_fortrez has quit [Ping timeout: 256 seconds]
<FromGitter> <jfontan> Is Windows going to be officially supported in 1.2?
<FromGitter> <jfontan> I don't see anything about it in the milestone
elf_fortrez has joined #crystal-lang
<FromGitter> <Blacksmoke16> not as part of 1.2 afaik
elf_fortrez has quit [Ping timeout: 256 seconds]
elf_fortrez has joined #crystal-lang
elf_fortrez has quit [Ping timeout: 256 seconds]
jrayhawk_ is now known as jrayhawk
elf_fortrez has joined #crystal-lang
watzon has quit [Quit: watzon]
watzon has joined #crystal-lang
<watzon> Yay I have my nick now
<watzon> No more watzon1
<FromGitter> <Blacksmoke16> grats ;P
<watzon> Now to get a bouncer set up again
<watzon> We should write one in Crystal ;)
watzon has quit [Quit: WeeChat 3.2]
watzon has joined #crystal-lang
watzon has quit [Client Quit]
watzon has joined #crystal-lang
elf_fortrez has quit [Ping timeout: 256 seconds]
nopc0de_ has joined #crystal-lang
nopcOde has quit [Ping timeout: 244 seconds]
watzon has quit [Quit: WeeChat 3.2]
watzon has joined #crystal-lang
ur5us has joined #crystal-lang
hightower4 has quit [Ping timeout: 252 seconds]
oprypin has quit [Quit: Bye]
oprypin has joined #crystal-lang
<raz> man, mint is really cool
<raz> still wrapping my head around all the Maybe's and haskellisms but already starting to wish crystal had those types of enum's, too :P
<FromGitter> <Blacksmoke16> Oh?
<raz> yup. i'm sure they have a sciency name but i don't know it. essentially you can have enum values with values. e.g. `enum SessionStatus { LoggedOut; LoggedIn(User) }`
<raz> meaning your enum can be "LoggedOut" or "LoggedIn with an instance of a User"
<FromGitter> <Blacksmoke16> In crystal that would just be a union
<raz> hmmm kinda, i guess
<FromGitter> <Blacksmoke16> With an alias as the name
<raz> yea i suppose you can also model it with classes/structs
<raz> but i found it kinda neat to do it "on the fly" like that
<FromGitter> <Blacksmoke16> yea it def has some abstractions to reduce the boilerplate at least
<raz> i assume most of it is lifted from haskell, but don't know enough of that to know for sure
<raz> but yea, the amount of boilerplate you don't have to write is ridiculous. i'm still expecting to bump into limitations at some point, so far it has been suspiciously smooth
<raz> mint-ui is a joy