ChanServ changed the topic of #crystal-lang to: The Crystal programming language | | Fund Crystal's development: | GH: | Docs: | Gitter:
<FromGitter> <> Wait what
<FromGitter> <> test
<FromGitter> <skurhse> 🔮
<FromGitter> <skurhse> is athena like rails w/o dhh or somefin'
<FromGitter> <skurhse> it seems more like rack
<FromGitter> <Blacksmoke16> its based on Symfony and Spring
<FromGitter> <Blacksmoke16> (non ruby frameworks)
sagax has quit [Ping timeout: 256 seconds]
<FromGitter> <skurhse> like the IoC container?
<FromGitter> <Blacksmoke16> yea, thats a core part of things
<FromGitter> <skurhse> dependency injection is a specific type of inversion-of-control
<FromGitter> <skurhse> according to martin fowler
sgt_chuckles has joined #crystal-lang
<FromGitter> <skurhse> i do this thing
<FromGitter> <skurhse> where I write web apps that are cats
<FromGitter> <skurhse> let me do this rq with athena
<FromGitter> <Blacksmoke16> 🤔 mmk
<FromGitter> <skurhse> meow
<FromGitter> <skurhse> also s/o rq
<FromGitter> <skurhse> sorbet led me down this path of discovery ending with crystal
<sgt_chuckles> are there any blockchain platforms or projects written in crystal?
<FromGitter> <Blacksmoke16>
<FromGitter> <skurhse> i think you mean distributed ledger
<FromGitter> <skurhse> I know not of these chains of blocks
<sgt_chuckles> axentro looks legit
<FromGitter> <skurhse> does it?
<FromGitter> <skurhse> copyright 2020
<FromGitter> <skurhse> sry I will stop trolling
<FromGitter> <skurhse> i have not done anything with shards yet so this will be interesting
<FromGitter> <skurhse> i'm just going to assume it works like bundler
<FromGitter> <skurhse> no `shards add athena` qq
<FromGitter> <Blacksmoke16>, was rejected
<FromGitter> <Blacksmoke16> er thats a diff thing
<FromGitter> <Blacksmoke16> this one
<FromGitter> <skurhse> this way I have to manually edit a yaml file
<FromGitter> <skurhse> which makes me sad
<FromGitter> <Blacksmoke16> :shrug: oh well
<FromGitter> <skurhse> oh wait i can use yq
<FromGitter> <skurhse> or oq wink wink
<FromGitter> <mattrberry> Is it possible to look up methods by their name at runtime?
<FromGitter> <Blacksmoke16> no
<FromGitter> <Blacksmoke16> not unless you do something yourself
<FromGitter> <mattrberry> Sounds good. I was debating making a macro that builds a hash from name to method, but makes more sense just to keep it simple for now in that case
<FromGitter> <mattrberry> Thanks
<FromGitter> <Blacksmoke16> using a macro to generate a case on a string arg and all the related method could work
<FromGitter> <Blacksmoke16> downside of that is the return type would be a union of *all* the methods
<FromGitter> <Blacksmoke16> call*
<FromGitter> <skurhse> ```code paste, see link``` []
<FromGitter> <Blacksmoke16> would have been less typing to just copy paste it in :S
<FromGitter> <skurhse> template your projects
<FromGitter> <skurhse> if your memory is garbage like mine it makes sense
<FromGitter> <skurhse> #trauma
<FromGitter> <skurhse> unexpected markdown
<FromGitter> <skurhse> seriously tho wtb add
<FromGitter> <skurhse> i suppose that assumes a gem server equivalent
<FromGitter> <skurhse> i suppose you can argue that makes you vulnerable to supply-chain attacks
<FromGitter> <skurhse> as an enterprise there is the use case for a private gemserver
<FromGitter> <Blacksmoke16> shards doesnt have either of those as its based entirely on VCS
<FromGitter> <Blacksmoke16> at least you cant privately host it or something
<FromGitter> <skurhse>
<FromGitter> <Blacksmoke16> but someone could totally just remove their shard you're using, and you're pretty much out of luck
<FromGitter> <Blacksmoke16> thats just an index of shards, *not* where things are installed from/stored in
<FromGitter> <Blacksmoke16> what about it?
<FromGitter> <skurhse> it's a git wrapper
<FromGitter> <Blacksmoke16> yup
<FromGitter> <skurhse> golang has an interesting approach to this goproxy
<FromGitter> <skurhse>
<FromGitter> <Blacksmoke16> also supports a few other resolution methods, but git is the main one
<FromGitter> <skurhse> it graphs dependencies
<FromGitter> <skurhse> because you publish the framework with it's own shard.yml?
<FromGitter> <skurhse> pretty cool
<FromGitter> <skurhse> with dotnet you can do ⏎ ⏎ ``` dotnet new tool-manifest ⏎ dotnet tool install Microsoft.dotnet-openapi ``` []
<FromGitter> <skurhse> and then I can do `dotnet tool run dotnet-openapi add url`
<FromGitter> <skurhse> it would be cool to have an `athena new mvc`
<FromGitter> <skurhse> or somefin
<FromGitter> <skurhse> nightly is mad
<FromGitter> <skurhse> ```code paste, see link``` []
<FromGitter> <skurhse> this only happens with your sample code for some reason
brw has quit [*.net *.split]
dostoyevsky2 has quit [*.net *.split]
straight-shoota has quit [*.net *.split]
sgt_chuckles has quit [Remote host closed the connection]
brw has joined #crystal-lang
dostoyevsky2 has joined #crystal-lang
straight-shoota has joined #crystal-lang
<FromGitter> <skurhse> `sudo apt-get install r-base-dev` solved it
dostoyevsky2 has quit [Max SendQ exceeded]
<FromGitter> <skurhse> i have no idea why
<FromGitter> <skurhse> lol
dostoyevsky2 has joined #crystal-lang
<FromGitter> <skurhse> is there a way I can bind to specific socket
<FromGitter> <skurhse>,host,reuse_port,ssl_context,*,prepend_handlers)
<FromGitter> <skurhse> is there a way I get serve raw strings
<FromGitter> <skurhse> I just want to serve raw string `Meow World!` but instead I am serving `"Meow World!"`
<FromGitter> <skurhse> `ATH::Response`
<FromGitter> <skurhse> uwu
moe[m] has left #crystal-lang [#crystal-lang]
sorcus has joined #crystal-lang
notzmv has quit [Ping timeout: 240 seconds]
Liothen has quit [Ping timeout: 268 seconds]
Liothen has joined #crystal-lang
sagax has joined #crystal-lang
notzmv has joined #crystal-lang
<FromGitter> <Blacksmoke16> 😅 haha, yea by default things are JSON serialized, so can use a response obj to bypass that
analogsalad has joined #crystal-lang
sorcus has quit [Quit: WeeChat 3.4]
sorcus has joined #crystal-lang
Welog- has joined #crystal-lang
oprypin has quit [*.net *.split]
DeBot has quit [*.net *.split]
jhass has quit [*.net *.split]
FromGitter has quit [*.net *.split]
Elouin has quit [*.net *.split]
rymiel has quit [*.net *.split]
Welog has quit [*.net *.split]
maxpowa has quit [*.net *.split]
antoszka has quit [*.net *.split]
olbat has quit [*.net *.split]
frojnd has quit [*.net *.split]
[R] has quit [*.net *.split]
kevinsjoberg has quit [*.net *.split]
notzmv has quit [*.net *.split]
xiamx has quit [*.net *.split]
jhass[m] has quit [*.net *.split]
spuun has quit [*.net *.split]
analogsalad has quit [*.net *.split]
ua__ has quit [*.net *.split]
SamantazFox has quit [*.net *.split]
Vexatos has quit [*.net *.split]
wolfshappen has quit [*.net *.split]
greenbigfrog has quit [*.net *.split]
dannyAAM has quit [*.net *.split]
adam12 has quit [*.net *.split]
riza has quit [*.net *.split]
raz has quit [*.net *.split]
kiwiroy has quit [*.net *.split]
pusewic|away_ has quit [*.net *.split]
peer has quit [*.net *.split]
Stephie has quit [*.net *.split]
antoszka-r has quit [*.net *.split]
jrayhawk has quit [*.net *.split]
dom96 has quit [*.net *.split]
Flipez has quit [*.net *.split]
mattt2 has quit [*.net *.split]
fifr[m] has quit [*.net *.split]
xybre has quit [*.net *.split]
HumanG33k has quit [*.net *.split]
pixel has quit [*.net *.split]
sorcus has quit [*.net *.split]
yxhuvud has quit [*.net *.split]
mookie has quit [*.net *.split]
repo has quit [*.net *.split]
sagax has quit [*.net *.split]
Liothen has quit [*.net *.split]
f1refly has quit [*.net *.split]
void09 has quit [*.net *.split]
markmarkmark has quit [*.net *.split]
lanodan has quit [*.net *.split]
avane has quit [*.net *.split]
oprypin_ has joined #crystal-lang
maxpowa has joined #crystal-lang
jhass has joined #crystal-lang
frojnd1 has joined #crystal-lang
ua__ has joined #crystal-lang
Vexatos has joined #crystal-lang
f1refly has joined #crystal-lang
xiamx has joined #crystal-lang
jhass[m] has joined #crystal-lang
void09 has joined #crystal-lang
adam12 has joined #crystal-lang
fifr[m] has joined #crystal-lang
wolfshappen has joined #crystal-lang
greenbigfrog has joined #crystal-lang
[R] has joined #crystal-lang
dannyAAM has joined #crystal-lang
kevinsjoberg has joined #crystal-lang
kiwiroy has joined #crystal-lang
spuun has joined #crystal-lang
raz has joined #crystal-lang
riza has joined #crystal-lang
peer has joined #crystal-lang
Stephie has joined #crystal-lang
notzmv has joined #crystal-lang
Elouin has joined #crystal-lang
rymiel_ has joined #crystal-lang
sagax has joined #crystal-lang
sorcus has joined #crystal-lang
SamantazFox has joined #crystal-lang
Liothen has joined #crystal-lang
yxhuvud has joined #crystal-lang
antoszka has joined #crystal-lang
analogsalad has joined #crystal-lang
FromGitter has joined #crystal-lang
pixel has joined #crystal-lang
olbat__ has joined #crystal-lang
pusewic|away_ has joined #crystal-lang
HumanG33k has joined #crystal-lang
antoszka-r has joined #crystal-lang
jrayhawk has joined #crystal-lang
mattt2 has joined #crystal-lang
lanodan has joined #crystal-lang
xybre has joined #crystal-lang
mookie has joined #crystal-lang
repo has joined #crystal-lang
markmarkmark has joined #crystal-lang
dom96 has joined #crystal-lang
Flipez has joined #crystal-lang
avane has joined #crystal-lang
Welog- has quit [Remote host closed the connection]
Welog has joined #crystal-lang
<FromGitter> <jfontan> I have a variable that can be some type or nil. I make sure is not nil at some point. How can I tell the compiler is not nil? I'm using `.as(type)` but maybe there is another way. Here's the piece of code doing this: ⏎ ⏎ ```code paste, see link``` []
<FromGitter> <Blacksmoke16> ```if head = @head ⏎ # head is not nil here ⏎ end``` []
<FromGitter> <Blacksmoke16> or maybe `#try`
<FromGitter> <jfontan> thanks. I'll try
<FromGitter> <jfontan> ah, that's new for me
<FromGitter> <Blacksmoke16> hmm for this case might be a better way
<FromGitter> <Blacksmoke16> prob could just use `not_nil!` here
<FromGitter> <Blacksmoke16> given its kinda like a lazily initialization versus just a nil check
<FromGitter> <Blacksmoke16> another option could be the block version of `getter` macro, depending on your needs
<FromGitter> <rishavs> What might be a good way to chain functions? ⏎ For example, I want to do something like this; ⏎ ⏎ ```code paste, see link``` []
<FromGitter> <Blacksmoke16> `5 + 2 - 1` :P
<FromGitter> <Blacksmoke16> those are all method calls fwiw
<FromGitter> <rishavs> 😅 Yeah, thats the struggle. I am actually trying to add a bunch of transformations to an input string and doing it the oops way felt weird
<FromGitter> <Blacksmoke16> string methods return the new string, so wouldnt be too bad
<FromGitter> <jfontan> maybe you can create a class that contains an int and methods that modify its value and return self
<FromGitter> <jfontan> ```code paste, see link``` []
analogsalad has left #crystal-lang [#crystal-lang]
oprypin_ has quit [Ping timeout: 240 seconds]
oprypin has joined #crystal-lang