jhass changed the topic of #crystal-lang to: The Crystal programming language | https://crystal-lang.org | Crystal 0.35.1 | 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
deavmi has quit [Ping timeout: 268 seconds]
deavmi has joined #crystal-lang
_whitelogger has joined #crystal-lang
<FromGitter> <grkek> @jhass I wonder if you will bind gtk4 as well
<FromGitter> <grkek> that would be awesome :)
<FromGitter> <grkek> writing html and getting 60 fps gui sounds quite tasty
<FromGitter> <grkek> @riffraff169 my main goal is to blow up and act like i dont know nobody
f1reflyylmao has joined #crystal-lang
f1refly has quit [Ping timeout: 240 seconds]
_whitelogger has joined #crystal-lang
avane has joined #crystal-lang
teardown has quit [Ping timeout: 240 seconds]
teardown has joined #crystal-lang
teardown has quit [Remote host closed the connection]
teardown has joined #crystal-lang
Liothen has quit [Ping timeout: 264 seconds]
Liothen has joined #crystal-lang
Liothen has quit [Read error: Connection reset by peer]
Liothen has joined #crystal-lang
<FromGitter> <grkek> check this shit out
<FromGitter> <grkek> https://ibb.co/jZvGLhg
<FromGitter> <grkek> all HTML
<FromGitter> <grkek> 4 lines of crystal code
<FromGitter> <grkek> mostly done using javascript
<FromGitter> <grkek> all native
<FromGitter> <grkek> the gif sucks ass cuz it didn't record the frames properly
<FromGitter> <grkek> again as you can see all native
yukai has quit [Ping timeout: 246 seconds]
teardown_ has joined #crystal-lang
teardown has quit [Ping timeout: 240 seconds]
zorp has joined #crystal-lang
zorp has quit [Remote host closed the connection]
zorp has joined #crystal-lang
<jhass> grkek: it might alread just work! I haven't tried with the latest build
<jhass> definitely already did gtk4 compat fixes https://github.com/jhass/crystal-gobject/issues/35
<jhass> but I guess if you forgo the shims and helpers shipped, you can already use it
<FromGitter> <grkek> Oh shit
<FromGitter> <grkek> so if I just change 3.0 to 4.0 I get GTK4?
<jhass> maybe :D
<jhass> but yeah, that's basically the idea and so is the magic of gobject introspection :)
<jhass> might be time to extract gtk3 and gtk4 shards finally, idk
yxhuvud has quit [Quit: No Ping reply in 180 seconds.]
yxhuvud has joined #crystal-lang
<FromGitter> <grkek> YES
<FromGitter> <grkek> do it B-)
<jhass> heh, I was hoping you would :P
teardown has joined #crystal-lang
teardown_ has quit [Remote host closed the connection]
<frojnd> I'm trying to save output of system("bash ~/my_script) into variable but it gives me just bool... https://crystal-lang.org/api/master/toplevel.html#system(command:String,args=nil):Bool-class-method my command outputs a string how can I save that string into variable
<frojnd> Is there a way to save output of command into variable?
<jhass> use backticks, `command`
<FromGitter> <HertzDevil> `` `command` ``
<FromGitter> <HertzDevil> to do it in markdown you have to surround your code with double backticks :)
<jhass> https://crystal-lang.org/api/0.35.1/toplevel.html#%60(command):String-class-method
<jhass> not a problem in IRC :)
<FromGitter> <HertzDevil> does it mean if someone posts a code block the irc people will see the triple backticks verbatim
<frojnd> Like this: system(`bash my_script`) ?
<jhass> frojnd: no, drop the system, just the backticks
<jhass> HerzDevil: depends a bit, most of the time the bridge bot replaces it with a link
<FromGitter> <HertzDevil> interesting
<frojnd> Ok thank you jhass
<jhass> because you'll mess up most people's clients with posting tons of code anyhow
<frojnd> How can I write a rule: "Bla 10,13-14" is equal "Bla 10:13-24" So basically if chars and numbers equal string is the same? Ignore `:,-"
<jhass> .delete(%(`:,")) == .delete(%(`:,")) ?
<frojnd> This works wonderfull
<frojnd> Well not so wonderfull
<frojnd> Ok found what an issue was... getting string from echo or printf differs
<frojnd> It appears echo adds a new line
<frojnd> Ad in printf does not...
<frojnd> So if you are echoing something into the crystal var you have an issue
<jhass> .chomp
<frojnd> Argh I gotta use crystal lang :) not just crystal in my searches hehe
<frojnd> Or just directly searching crystal lang api doc site
<jhass> that's like a... crystal pacman?
<frojnd> Looks like it o_O
psydroid has quit [*.net *.split]
z64 has quit [*.net *.split]
bougyman has quit [*.net *.split]
psydroid has joined #crystal-lang
bougyman has joined #crystal-lang
z64 has joined #crystal-lang
psydroid has quit [Max SendQ exceeded]
bougyman has quit [Max SendQ exceeded]
bougyman has joined #crystal-lang
ryanprior has quit [Ping timeout: 246 seconds]
ryanprior has joined #crystal-lang
ryanprior has quit [Quit: Bridge terminating on SIGTERM]
psydroid has joined #crystal-lang
return0e[m] has joined #crystal-lang
ryanprior has joined #crystal-lang
<frojnd> Any good reading on how should one structure project... make it clean?
<frojnd> In crystal lang
zorp has quit [Ping timeout: 268 seconds]
<FromGitter> <RespiteSage> I don't know of any articles about that in specific. Most projects I've seen follow the basic structure that you get from `crystal init`. I tend to like Crystal apps (as opposed to shards) where there's a driver file (often `src/<app_name>.cr`) and a separate configuration handling file (`src/configuration.cr`), and then everything else is in a module directory (e.g. `src/<app_name>/...`).
<FromGitter> <RespiteSage> For a shard, I've mostly seen that the `src/<app_name>.cr` file only has constants or is empty, functioning primarily to `require` other files, and most of the functionality is in the aforementioned `src/<app_name>/` directory.
* FromGitter * Blacksmoke16 doesnt like the `app_name` subdir
<FromGitter> <Blacksmoke16> is there any benefit to it versus just including everything within `src`?
companion_cube has left #crystal-lang ["WeeChat 2.9"]
<oprypin> no
<FromGitter> <Blacksmoke16> my point exactly :p
<FromGitter> <RespiteSage> I like the convention of having the module in a subdirectory.
<FromGitter> <RespiteSage> It just feels more organized to me.
* FromGitter * RespiteSage shrugs.
<FromGitter> <naqvis> :plus1: from me, as I also like to organize module in subdirectory
<FromGitter> <naqvis> so its just a habit which only costs extra bytes on disk :P
teardown has quit [Ping timeout: 240 seconds]
teardown has joined #crystal-lang
HumanG33k has quit [Remote host closed the connection]
HumanG33k has joined #crystal-lang
DTZUZU_ has joined #crystal-lang
DTZUZU has quit [Ping timeout: 272 seconds]
HumanG33k has quit [Ping timeout: 272 seconds]
HumanG33k has joined #crystal-lang
renich has joined #crystal-lang
<FromGitter> <wyhaines> I like `src/<whatever>/` myself, mostly because of higher level organizational opinions. I might have a few things in the `src` which are very general to the overall project, and thus belong at the root, but everything else goes down a level. That also gives me the freedom to decide that `src/<something-else>/` can also live there -- presumably something that isn't generic enough to necessarily warrant it's
<FromGitter> ... own shard, but is distinct enough in concept to warrant it's own directory hierarchy. ⏎ ⏎ That said, I have oodles of projects (mostly in Ruby) where I didn't follow that convention and just put stuff right at the top level.
renich has quit [Quit: Leaving.]