companion_cube changed the topic of #ocaml to: Discussion about the OCaml programming language | http://www.ocaml.org | OCaml 5.2.0 released: https://ocaml.org/releases/5.2.0 | Try OCaml in your browser: https://try.ocamlpro.com | Public channel logs at https://libera.irclog.whitequark.org/ocaml/
alfiee has joined #ocaml
alfiee has quit [Ping timeout: 272 seconds]
tremon has quit [Quit: getting boxed in]
alfiee has joined #ocaml
alfiee has quit [Ping timeout: 252 seconds]
Haudegen has quit [Quit: Bin weg.]
alfiee has joined #ocaml
alfiee has quit [Ping timeout: 252 seconds]
Tuplanolla has quit [Quit: Leaving.]
alfiee has joined #ocaml
alfiee has quit [Ping timeout: 268 seconds]
alfiee has joined #ocaml
alfiee has quit [Ping timeout: 268 seconds]
<companion_cube> woah, I got a PR in within 2 weeks!! 🎉
alfiee has joined #ocaml
alfiee has quit [Ping timeout: 252 seconds]
wbooze has joined #ocaml
cr1901 has quit [Quit: Leaving]
cr1901 has joined #ocaml
alfiee has joined #ocaml
alfiee has quit [Ping timeout: 244 seconds]
wbooze has quit [Ping timeout: 244 seconds]
wbooze has joined #ocaml
alfiee has joined #ocaml
alfiee has quit [Ping timeout: 260 seconds]
alfiee has joined #ocaml
alfiee has quit [Ping timeout: 265 seconds]
Serpent7776 has joined #ocaml
alfiee has joined #ocaml
alfiee has quit [Ping timeout: 248 seconds]
JuanDaugherty has joined #ocaml
alfiee has joined #ocaml
alfiee has quit [Ping timeout: 272 seconds]
alfiee has joined #ocaml
Haudegen has joined #ocaml
alfiee has quit [Ping timeout: 252 seconds]
tremon has joined #ocaml
igemnace has quit [Ping timeout: 252 seconds]
igemnace_ has joined #ocaml
igemnace_ is now known as igemnace
bartholin has joined #ocaml
alfiee has joined #ocaml
alfiee has quit [Ping timeout: 252 seconds]
bartholin has quit [Quit: Leaving]
no-name has joined #ocaml
wbooze has quit [Ping timeout: 265 seconds]
alfiee has joined #ocaml
alfiee has quit [Ping timeout: 248 seconds]
wbooze has joined #ocaml
alfiee has joined #ocaml
alfiee has quit [Ping timeout: 272 seconds]
olle has joined #ocaml
JuanDaugherty has quit [Quit: praxis.meansofproduction.biz (juan@acm.org)]
alfiee has joined #ocaml
alfiee has quit [Ping timeout: 245 seconds]
alfiee has joined #ocaml
alfiee has quit [Ping timeout: 248 seconds]
wbooze has quit [Ping timeout: 244 seconds]
mange has quit [Quit: Zzz...]
<Leonidas> companion_cube: new land-speed record camel riding! :)
alfiee has joined #ocaml
pi3ce has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
pi3ce has joined #ocaml
alfiee has quit [Ping timeout: 245 seconds]
Haudegen has quit [Quit: Bin weg.]
chiselfuse has quit [Write error: Connection reset by peer]
chiselfuse has joined #ocaml
alfiee has joined #ocaml
alfiee has quit [Ping timeout: 248 seconds]
Haudegen has joined #ocaml
rgrinberg has joined #ocaml
<discocaml> <cadetturnip8540> hi
alfiee has joined #ocaml
trillion_exabyte has quit [Ping timeout: 268 seconds]
alfiee has quit [Ping timeout: 272 seconds]
trillion_exabyte has joined #ocaml
remexre has quit [Ping timeout: 252 seconds]
pi3ce has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
pi3ce has joined #ocaml
remexre has joined #ocaml
rgrinberg has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
alfiee has joined #ocaml
alfiee has quit [Ping timeout: 248 seconds]
dawids_ has joined #ocaml
euphores has quit [Quit: Leaving.]
olle has quit [Ping timeout: 268 seconds]
euphores has joined #ocaml
Haudegen has quit [Quit: Bin weg.]
<discocaml> <sirius06615> I am a skilled full-stack developer with expertise in building scalable web and blockchain applications. On the frontend, I specialize in modern frameworks like React.js and Next.js to deliver seamless user experiences, while on the backend, I excel in Node.js, Express.js, and Python-based frameworks to create robust APIs and server-side logic. My database experience spans PostgreSQL, MongoDB, and cloud-based solutions like Firebase.
<discocaml> <sirius06615>
<discocaml> <sirius06615> In blockchain development, I have extensive experience with Ethereum, Solana, and SUI, using tools like Web3.js, ethers.js, and Hardhat to develop and deploy decentralized applications. I’ve worked on DeFi protocols, secure wallets, and NFT marketplaces, handling everything from smart contract creation to metadata integration. With strong cryptographic knowledge and hands-on experience in DevOps, I ensure secure and efficient application
alfiee has joined #ocaml
alfiee has quit [Ping timeout: 265 seconds]
Serpent7776 has quit [Ping timeout: 244 seconds]
dawids_ has quit [Remote host closed the connection]
pi3ce has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
pi3ce has joined #ocaml
rgrinberg has joined #ocaml
bartholin has joined #ocaml
alfiee has joined #ocaml
<companion_cube> This is not the right place to advertise your blockchain experience, sorry
alfiee has quit [Ping timeout: 252 seconds]
Haudegen has joined #ocaml
dawids_ has joined #ocaml
dawids_ has quit [Remote host closed the connection]
rgrinberg has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<za3k> I want to call some unix syscalls apparently not available in Unix. How do I do that?
<discocaml> <contificate> I'd just write such a stub
<discocaml> <contificate> e.g. a dune library with foreign_stubs stanza that refers to a C impl that just marshals `value`s then releases domain lock around the C syscall wrapper function
<za3k> How do I do this without dune?
<discocaml> <contificate> there's ocamlopt flags I'm sure
<za3k> i.e. using ocamlopt
<discocaml> <contificate> or you just supply the object file
Tuplanolla has joined #ocaml
<discocaml> <contificate> you do something like
<discocaml> <contificate> `gcc -I$(ocamlc -where) stub.c -c`
<discocaml> <contificate> which exposes the include path of `caml/` headers
<discocaml> <contificate> see https://ocaml.org/manual/5.3/intfc.html
<discocaml> <contificate> yeah, you can just pass the object to ocamlopt
<za3k> thanks contificate
<discocaml> <yawaramin> za3k: why without dune?
<za3k> because I have a working makefile without dune (and then I needed static linking which looked like a nightmare in dune, so i'll probably keep it that way)
<discocaml> <contificate> a slight annoyance is that `foreign_stubs` is only valid within `library` stanzas in dune, but the usual design of dune projects mitigates this: so maybe not worth doing for a small thing
<za3k> i couldn't figure out how to set up dune halfway, but perhaps next project
<za3k> this is my first ocaml program
<discocaml> <contificate> well be sure to post here if you need help with it later
<za3k> i'm trying to noticed terminal resizes with signalfd(2)
<discocaml> <contificate> notty (a TUI library) has provisions for handling SIGWINCH
<discocaml> <contificate> but writing a stub will be fun, so do that
<discocaml> <contificate> that said, signals are probably fairly tedious
<discocaml> <contificate> compared to the usual stub that just does slim wrapping of some C function
<za3k> it's okay, i just need to return a file descriptor
<discocaml> <contificate> oh, I see, signalfd mitigates some of the pain
<discocaml> <contificate> I think `file_descr` remains opaque in OCaml's UNIX library
<discocaml> <contificate> but impl wise is just an integer (?)
<za3k> i noticed that Sys is also missing most of the signals, but luckily it's exposed as an int (for masking the signal)
alfiee has joined #ocaml
alfiee has quit [Ping timeout: 260 seconds]
<discocaml> <gooby_diatonic> We shouldn't doubt the OCaml stdlib designers, if something isn't in the stdlib surely it's harmful and should not be used
alfiee has joined #ocaml
alfiee has quit [Ping timeout: 265 seconds]
<dh`> yes, file handles in unix are just integers
alfiee has joined #ocaml
alfiee has quit [Ping timeout: 245 seconds]
Haudegen has quit [Quit: Bin weg.]
Haudegen has joined #ocaml
<discocaml> <yawaramin> in Unix, sure. on Windows, no
<za3k> actually is that going to be a problem trying to return a Unix.file_descr from C, that it's opaque? (trying to get everything non-C-related working before tackling that so haven't looked yet)
alfiee has joined #ocaml
alfiee has quit [Ping timeout: 252 seconds]
<za3k> ok i realized i can use the self-pipe trick (make a pair of handlers with Unix.pipe, have the signal handler for SIGWINCH write to one, select on the other) to sidestep needing to write C code
<dh`> yawaramin: is the Unix stdlib module for Windows?
<za3k> There was a request to expose it (and more relevantly, make them printable for debugging): https://github.com/ocaml/ocaml/issues/9052
<za3k> It got auto-closed as inactive
* dh` doesn't approve of auto-closing issues
<discocaml> <yawaramin> dh`: yes, unless noted otherwise in the API docs
alfiee has joined #ocaml
alfiee has quit [Ping timeout: 252 seconds]
malte has quit [Remote host closed the connection]
malte has joined #ocaml
<dh`> and it doesn't use the windows C compiler's numeric file descriptor interfaces, that have been there since the DOS days?
malte has quit [Remote host closed the connection]
alfiee has joined #ocaml
malte has joined #ocaml
alfiee has quit [Ping timeout: 260 seconds]
malte has quit [Remote host closed the connection]
malte has joined #ocaml
bartholin has quit [Quit: Leaving]
malte has quit [Remote host closed the connection]
malte has joined #ocaml
<za3k> how do I type-annotate an optional argument with a default value?
<discocaml> <._null._> let f ?(a : int = 0) () = 0
<za3k> thanks! that was weirdly missing from https://ocaml.org/docs/labels
alfiee has joined #ocaml
<za3k> also really want to do let default = ... in let f ?(a : (a->b->c) = default) () = 0 here
<za3k> but no let in let, which is probably for the best error-wise :)
<za3k> i'd shoot myself in the foot
malte has quit [Remote host closed the connection]
<discocaml> <yawaramin> dh`: it's numeric, but it's not an `int`. it's a `HANDLE`
<discocaml> <yawaramin> dh: it's numeric, but it's not an `int`. it's a `HANDLE`
alfiee has quit [Ping timeout: 244 seconds]
malte has joined #ocaml
mange has joined #ocaml