<FromGitter>
... practices to emerge over time that may turn in to a semi official guide. :shrug:
<FromGitter>
<didactic-drunk> FYI crystal-posix is only a collection of shards where people can look in one place for posix like (or possibly native) functionality. Whatever packages you import I consider them owned by you. If I disagree I'll complain loudly via PR/pull but ultimately the decision is the package owners. The only code guide so far is: Fail on compile on unsupported systems instead of runtime errors. I expect best
maria_elis has quit [Ping timeout: 244 seconds]
maria_elis has joined #crystal-lang
Guest41 has joined #crystal-lang
Guest41 has quit [Client Quit]
<yxhuvud>
postmodern: There seems to be native raw syscall support coming in crystal 1.1 though, as part of the uring work.
<FromGitter>
<didactic-drunk> Guess I shouldn't have contacted kubo39
ua_ has quit [Ping timeout: 244 seconds]
larssg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<FromGitter>
<postmodern:matrix.org> @yxhuvud curious what the API will look like?
<FromGitter>
<postmodern:matrix.org> ah interesting, you define the syscalls first instead of passing arguments to `syscall(2)`
ur5us has quit [Ping timeout: 244 seconds]
m4xm4n has quit [Quit: Connection closed for inactivity]
deavmi has quit [Ping timeout: 268 seconds]
deavmi has joined #crystal-lang
larssg has joined #crystal-lang
mpp has joined #crystal-lang
billyruffian has joined #crystal-lang
billyruffian has quit [Remote host closed the connection]
<FromGitter>
<asterite> Whats the benefit of syscall? Can we avoid using it? It's bad for something I'm working on
<FromGitter>
<asterite> Actually, nevermind
<FromGitter>
<alex-kampa> I'm trying to figure out the simplest way to listen on 2 separate tcp ports, is this going to work: ⏎ `spawn do ⏎ while client = server1.accept? ⏎ ⏎ ```spawn process2(client)``` ... [https://gitter.im/crystal-lang/crystal?at=60ccc1aec705e53c1c9bff2e]
<FromGitter>
<naqvis> Crystal without `preview_mt` is single threaded, so as long as you call `server1.listen` it will block the main thread and code below will never get a chance to execute
<FromGitter>
<Blacksmoke16> use nginx to listen and forward to the crystal app :P
<FromGitter>
<naqvis> either you go with parallelism (i.e. via `-Dmt_preview`) or better go with two separate process each listening on its own port
<FromGitter>
<naqvis> or better as @Blacksmoke16 suggested, better to with some battle tested servers as proxy in-front
hexreel has joined #crystal-lang
frojnd has joined #crystal-lang
<frojnd>
Hi there
<frojnd>
I just noticeds under project/lib I have files of shards I removed from shard.yml How do I clean not used shard files?
<FromGitter>
<Blacksmoke16> `shards prune` would prob d oit
ur5us has quit [Read error: Connection reset by peer]
elf_fortrez has joined #crystal-lang
edegaru has joined #crystal-lang
<FromGitter>
<watzon> Guest59: Hard to know without some context. Where is this method defined?
<elf_fortrez>
i guess in the client
elf_fortrez has quit [Quit: Client closed]
elf_fortrez has joined #crystal-lang
<FromGitter>
<postmodern:matrix.org> @asterite: raw syscalls are mostly only useful for accessing OS-specific syscalls that libc doesn't support. Use case is mostly for libraries, so raw `sysacall(2)` access could be provided via a shard.
<FromGitter>
<HertzDevil> if the proc comes from crystal it contains the closure data
<FromGitter>
<HertzDevil> if the proc comes from c just use nil (i think)
<FromGitter>
<postmodern:matrix.org> @asterite: but I guess the linux io_uring stuff requires raw `syscall(2)` access for a few IO syscalls from crystal's stdlib.