<bmcginty>
Is there a way to get a list of any objects crystal creates, as well as a list of the objects it deletes before they are deleted? I'm trying to track down a memory leak, and it'd be way easier if I could see which objects where hanging around between gc.collect calls.
greengriminal has quit [Quit: This computer has gone to sleep]
sp4rrow has quit [Quit: The Internet needs a break and I need a cookie]
sp4rrow has joined #crystal-lang
sp4rrow has quit [Client Quit]
Renich[m] has joined #crystal-lang
thelonelyghost has joined #crystal-lang
braidn[m] has joined #crystal-lang
byteflame has joined #crystal-lang
vegai has joined #crystal-lang
TheGillies has joined #crystal-lang
rizo[m] has joined #crystal-lang
jplatte has joined #crystal-lang
watzon has joined #crystal-lang
sija[m] has joined #crystal-lang
hightower2 has quit [Read error: Connection reset by peer]
<byteflame>
Whoops, the first line in `request` should be `req = HTTP::Request.new method, path, headers, body`
<FromGitter>
<Qwerp-Derp> I'm thinking of making a YAML-based GUI library as a binding for CrSFML, is this a good idea?
<FromGitter>
<Qwerp-Derp> So you write YAML and stuff for making your GUI, instead of loads of function calls
<FromGitter>
<Qwerp-Derp> I'm not sure if this would be a good idea, but eh
<watzon>
Querp-Derp: This is probably the one and only instance where I would suggest using XML, but something like that is definitely needed. No one wants to code all of that sh** by hand
<FromGitter>
<Qwerp-Derp> Maybe something like this?
<FromGitter>
<Qwerp-Derp> I can't really think of good syntax
<watzon>
I guess something like that could work out. Either way, as long as I don’t have to write actual code to make a button. I mean come on
<FromGitter>
<Qwerp-Derp> My plan is you write a Button class with all of the commands and stuff in it
<FromGitter>
<Qwerp-Derp> And then you write how it's going to be laid out using something like YAML
<watzon>
Rust actually has a plethora of GUI API wrappers, but I don’t think I’ve seen one yet that allows the use of XML or anything else to abstract away the actual design portion
<FromGitter>
<Qwerp-Derp> I can't really think of a good syntax though
<oprypin>
Qwerp-Derp, i personally have always preferred writing guis in code. sometimes you want to customize it based on conditions, or even more frequently add items in a loop. xml abstraction falls apart soooo often
<watzon>
oprypin as always you have a good point
<oprypin>
and with Crystal being very good at DSLs maybe the advantage is even bigger
<watzon>
That's what I'm saying. I think XML would be better than YAML, but a DSL would be better than any other solution really
<oprypin>
Qt does it very similarly to yaml fwiw
<oprypin>
oh also sfml is absolutely terrible at UI. its abstractions don't help with it at all and perhaps are even harmful. to make good ui out of it you reinvent all the code aside from very basics. and with how annoying crsfml is to install, might as well do it with a different lib
<oprypin>
then again, yesterday i happened to write a multiline text editing widget for it
<FromGitter>
<bararchy> the libui seems like a simple good chiose no ?
<oprypin>
i honestly have no idea. last time i checked the bindings exposed raw lib funcs so i was immediately deterred
<oprypin>
Qt is the best, I'm very eager to hear from Papierkorb
<FromGitter>
<bararchy> oprypin, do you know if he has a repo up ?
<FromGitter>
<bararchy> for QT
<watzon>
Are we sure he actually has worked on QT bindings? I know he has `cute`, but that's just "inspired" by QT
<FromGitter>
<LuckyChicken91_twitter> why do you not see any use of that
thews has quit [Ping timeout: 240 seconds]
<oprypin>
why write something that will only work on some Linux distributions
<RX14>
is it just me or are github notifications beig weird?
thews has joined #crystal-lang
<RX14>
I got a notification for #4824 but nothing changed
<FromGitter>
<LuckyChicken91_twitter> oh i didnt knewed that its just working on some linux distribution
<FromGitter>
<bararchy> @LuckyChicken91_twitter It's X-Server binding , so only work on stuff that uses x-server, which is most of the Linux distrebutions, and those running weston usually support x11 overlay
greengriminal has joined #crystal-lang
<oprypin>
so um Python has this neat convention where you write a module and it's meant to be used elsewhere but if you execute that module directly you get some tiny demo of it. i can't seem to find anything similar in Crystal
<FromGitter>
<GetRektByMe> I started to write something with it at https://github.com/WeebWare/Weebsite but realised 🤔 I don't actually know what it would be or why it would need a JSON API
<FromGitter>
<GetRektByMe> So I stopped writing it lol
<FromGitter>
<GetRektByMe> What is the go-to lib for cryptography?
<FromGitter>
<LuckyChicken91_twitter> hello why is my sort-all-needless-spaces-out-program not working? https://carc.in/#/r/2isy/edit
<FromGitter>
<GetRektByMe> Can you specify a bit more? What about it isn't working
<FromGitter>
<LuckyChicken91_twitter> its making not what it should do
<FromGitter>
<LuckyChicken91_twitter> look at the program. I maked comments
<watzon>
Just use regex?
<FromGitter>
<LuckyChicken91_twitter> i never used regex
sz0 has quit [Quit: Connection closed for inactivity]
sp4rrow has quit [Ping timeout: 246 seconds]
<oprypin>
could also use `.split().join(" ")`
<oprypin>
LuckyChicken91_twitter, the problem with your code is that when you modify the string, all the indices of the following characters shift to the left, so you end up deleting the wrong things afterwards
<oprypin>
as characters, so relying on your unicode font support
<brycek>
anyone ever mess with crystal on arm-none-eabi?
<watzon>
I don't think crystal compiles to arm rn
<brycek>
as far as my noodling with it goes, it seems like it wants dynamic linking and i'm not sure how big the stdlib would be if linking statically
<brycek>
i see notes about it working armhf-linux
<watzon>
Well maybe I’m wrong then haha
<brycek>
well it's a fair point, armhf isn't arm
<brycek>
(the "hf" means hardware floating point)
<brycek>
and the existing stuff presumes an OS and files and other things arm-none-eabi doesn't have
<RX14>
brycek, i think arm should work with hf or not
<RX14>
the issue is the none eabi
<RX14>
if you have no os you cannot use the stdlib
<RX14>
the stdlib requires a libc and a libc requires an OS
<brycek>
or just jamming the parts of libc you use into the blob :/
<RX14>
and what is libc going to syscall with no os?
<RX14>
strace an empty crystal program
<RX14>
you will not find the result empty
sp4rrow has joined #crystal-lang
sp4rrow has quit [Ping timeout: 276 seconds]
<brycek>
it'd do what the os does: write to memory mapped to periphs or special registers
<RX14>
you expect the linux libc to automatically do what the OS does without an OS?
<RX14>
if you want something to do what the OS does, write an OS
<brycek>
ain't my first rodeo, i've done embedded and other no-os stuff before, just wondering if anyone else had with crystal or if it'd be a lot of new work/resarch/etc.
<FromGitter>
<kazzkiq> Before using password, it worked like a charm.
<watzon>
Looks like the @ is being escaped
<Papierkorb>
not to mention the missing colon
<watzon>
That too
<FromGitter>
<kazzkiq> Colon?
<watzon>
Between the username and password
<FromGitter>
<fridgerator> its in the `CONNECTION` variable, but no in the error
<watzon>
Weird
<watzon>
Upload your code as a gist or something
<FromGitter>
<jwoertink> Anyone here using micrate?
<FromGitter>
<jwoertink> I just tried installing from using `brew tap` and `brew install` and I get the `dyld: Library not loaded: /usr/local/opt/libevent/lib/libevent-2.0.5.dylib` error when running
<FromGitter>
<kazzkiq> Found the error, my password had an "at" (`@`), which was conflicting with the syntax from the connection. Even by trying to escape the "@" in the password, the error was still happening.
<FromGitter>
<jwoertink> using the latest crystal
<FromGitter>
<kazzkiq> Removing this character solved the problem.
<FromGitter>
<krypton97> crystal run src/app.cr ⏎ Error in src/app.cr:3: while requiring "kemal-session-redis": can't find file 'kemal-session-redis' relative to '/home/alex/Projects/Crystal/app/src' ⏎ ⏎ require "kemal-session-redis" [https://gitter.im/crystal-lang/crystal?at=5990af12210ac269207d1148]
<FromGitter>
<krypton97> I've installed the dependency
sp4rrow has joined #crystal-lang
<FromGitter>
<fridgerator> @jwoertink yes I usually end up having to symlink different libevent in its place
balduin has joined #crystal-lang
<FromGitter>
<jwoertink> I was hoping to just hop in and start cranking stuff out.
<FromGitter>
<krypton97> I've read that, thanks. I was actually wondering to do it the kemal way
<FromGitter>
<johnjansen> kemal is built on top of the stdlib http stuff .. and provides a dsl for routing etc … ill look at the kemal code, but im sure @sdogruyol will defer things like this to the stdlib
<FromGitter>
<krypton97> nice
<FromGitter>
<johnjansen> wait, it looks like kemal handles this
<Papierkorb>
`struct Foo; YAML.mapping(bar: String?); end; Foo.from_yaml(%<bar: "# I'm not a comment">)` Kaboom.
<Papierkorb>
Union(String | Nil).from_yaml will pull the "next thing" (#read_raw), and then call String.from_yaml(that_thing), which now redoes the cycle and expects a YAML document. And now that_thing suddenly becomes a true comment.
sp4rrow has joined #crystal-lang
Guest10468 has quit [Quit: WeeChat 1.9]
<Papierkorb>
(yadda use `nilable`)
<crystal-gh>
[crystal] RX14 closed pull request #4824: Remove bare array creation from multi assign (master...feature/remove_auto_array) https://git.io/v7HmR