<discocaml>
<jo.blade> Hello, I don't really know in which channel to ask this. How do you distribute your ocaml program to windows users ? I'm running Linux but many of my friends are on windows and don't have the skill to install complicated things.
<discocaml>
<jo.blade> Is there a way to easily distribute my program to them ? Is there a way to build native windows executable without windows ?
<discocaml>
<ada2k> i think that needs packages to manually be added to that repo though. if you need stuff that isn't there the brute force approach i've taken before is to spin up a windows 10 instance in vagrant and install opam 2.2
dh` has quit [Ping timeout: 252 seconds]
dh` has joined #ocaml
<discocaml>
<darrenldl> or use the official github workflow
<discocaml>
<darrenldl> (if github repo ofc)
YuGiOhJCJ has quit [Quit: YuGiOhJCJ]
olle has joined #ocaml
<olle>
Hm what's a common external DSL used with OCaml? Dune uses some S-expression thingy?
tomku has quit [Ping timeout: 260 seconds]
tomku has joined #ocaml
dev2 has quit [Ping timeout: 264 seconds]
<Leonidas>
Yeah, dune has dune-lang and s-expressions are fairly common in Jane Street code. I think some projects also use Lua 2.5?
<Leonidas>
Some projects = {soupault,}
<olle>
Hm
<olle>
Leonidas: ok :)
average has quit [Quit: Connection closed for inactivity]
<olle>
What's dune-lang? o0
<olle>
Same as s-expressions?
<olle>
I'm looking at S-expr as a DSL for a project, and might want to add simple lambdas and possibly macros too, like a tiny elisp.
dev2 has joined #ocaml
<Leonidas>
olle: dune-lang is what dune calls it's s-expressions
<discocaml>
<drupyog> well, it *implements* 2.5, which is a bit more understandable :p
<olle>
Oh
<Leonidas>
Exactly, it's not a binding. A binding to lua 5.1 exists as well
<olle>
Yea
<olle>
The pro of using s-expr is you don't need to define an AST
<discocaml>
<drupyog> (also, it's a quite peculiar style of bindings)
<companion_cube>
it's also probably incredibly slow, but anyway
<discocaml>
<drupyog> (also, it's a quite peculiar style of bindings, with lot's of ways to customize the interpreter)
<olle>
With s-expr you lex and parse in one go.
<olle>
Into a generic tree struct
<olle>
Makes me wonder why Lisp failed, hehe
<discocaml>
<ada2k> lisp failed?
<companion_cube>
it never succeeded, I guess :D
<olle>
Hehehe
<companion_cube>
is that the same as failing, idk
<discocaml>
<ada2k> ppl still use scheme and clojure. if we’re gonna count niche as failure caml has a lot to answer for
<companion_cube>
for sure
<companion_cube>
from my corner it looks like clojure is more popular than OCaml, which is probably more popular (in real applications) than scheme?
<companion_cube>
fighting for scraps
<discocaml>
<ada2k> haha
<olle>
Lisp had kinda bigger ambitiouns once
<olle>
ambitiens?
<discocaml>
<ada2k> bring back lisp machines!
<olle>
Yea, and Forth machines too! \o/
<discocaml>
<Kali> forth cpus are so cool
<discocaml>
<Kali> greenarrays makes some really nice ones
<discocaml>
<ada2k> x86 could’ve standardised around open boot, instead we have forthless uefi
<discocaml>
<ada2k> how cruel
<discocaml>
<Kali> from my experience clojure is WAY more popular than ocaml at least in terms of visibility
<discocaml>
<Kali> the only reason i ever found ocaml was because the rust wikipedia page mentioned it as an inspiration
<discocaml>
<Kali> i've never run into it outside of fp spaces
<discocaml>
<Kali> but clojure i've seen mentioned fairly often
<olle>
I guess the concept from Lisp won in a sense
<olle>
concepts
<olle>
Like GC, lexical scoping, first-class functions
<discocaml>
<Kali> i'm on a server that has a lot of programmers on it even though it isn't a programming server; clojure is mentioned by about 13 different people and ocaml has only ever been brought up by me
<discocaml>
<ada2k> if you count lisp-y languages it completly won
<discocaml>
<ada2k> javascript was started as a lisp with java syntax and now it's on everything
<companion_cube>
meh, js is not a lisp
<companion_cube>
it doesn't have a single lisp feature that java doesn't also have
<discocaml>
<ada2k> lisp-y
<olle>
Yea, to be in the Lisp family more firmly, you need this code-is-data thing too, I think.
<olle>
companion_cube: Java imitates Lisp eh ;)
<olle>
Well why not
<Leonidas>
companion_cube: lack of typing :P
<companion_cube>
lisp-y covers 99% of managed language at this point
<discocaml>
<drupyog> javascript is a lisp in the same sense than JJ abram makes science fiction sequels
<companion_cube>
if all you want is closures and GC
<companion_cube>
Leonidas: java can be untyped too if you want :p
<companion_cube>
there's tons of compile time reflection
<discocaml>
<ada2k> java didn't even have closures until java 8.
<companion_cube>
err
<discocaml>
<drupyog> it doesn't look at the source material, doesn't understand it, and does his own wrong thing instead :p
<companion_cube>
runtime reflection
<discocaml>
<drupyog> it doesn't look at the source material, doesn't understand it, and does its own wrong thing instead :p
<discocaml>
<drupyog> In any case, given the fact that scheme is basically lisp, but fixed. And Racket was a new name for scheme, I would say lisp succeeded plenty 🙂
<olle>
I'd say 99% of devs at least code in a lang where code is NOT data :D
<companion_cube>
you can emit jvm bytecode from java, all is well :p
<olle>
emit?
<olle>
compile?
<companion_cube>
both afaik
<companion_cube>
I think that's how clojure works
<discocaml>
<ada2k> all code is data if you count eval :p
<companion_cube>
well in OCaml you can't have eval
<companion_cube>
(outside the toplevel, but that's not most OCaml programs)
<discocaml>
<ada2k> if we're gonna get into "java supports lisp" level technicallity
<companion_cube>
and so java is still as lispy as js :)
<companion_cube>
if you want a real lisp-in-disguise, try elixir
<companion_cube>
(or julia, I think?)
TCZ has joined #ocaml
<olle>
Ah to be able to choose programming languages
<olle>
That's why I'm looking at S-expr, elisp and Forth - I can embed them in PHP with ~100 lines or so
olle has quit [Ping timeout: 252 seconds]
waleee has joined #ocaml
waleee has quit [Ping timeout: 255 seconds]
mbuf has joined #ocaml
TCZ has quit []
mbuf has quit [Quit: Leaving]
mbuf has joined #ocaml
lain` has quit [Remote host closed the connection]
lain` has joined #ocaml
mbuf has quit [Quit: Leaving]
tomku has quit [Ping timeout: 252 seconds]
tomku has joined #ocaml
Anarchos has quit [Quit: Vision[]: i've been blurred!]
myrkraverk__ has joined #ocaml
myrkraverk_ has quit [Read error: Connection reset by peer]
waleee has joined #ocaml
TCZ has joined #ocaml
<discocaml>
<lukstafi> How do you choose which version number to put in your `dune-project` `(lang dune ...)` stanza?
<discocaml>
<lukstafi> I was surprised by warning 30, after a brief googling found it was caused by having an old version in there. (But actually it was better to not use same label name in this particular case.)
<discocaml>
<ada2k> i just use 3.12
<discocaml>
<ada2k> can't remember why
<discocaml>
<ada2k> i think cause it had some thing i wanted and ships as a binary on alpine linux
<discocaml>
<._null._> I think the general rule is to use the latest available
<discocaml>
<sim642> I would say the opposite: the oldest that has everything you need. If you use the latest, then only the latest dune can build it. Using the oldest supports the biggest range
<discocaml>
<sim642> And dune is supposed to be forward compatible like that
<discocaml>
<deepspacejohn> Is there somewhere that lists the differences across dune lang versions?
tomku has quit [Ping timeout: 276 seconds]
tomku has joined #ocaml
Anarchos has joined #ocaml
<companion_cube>
Alas, no
<companion_cube>
Dune's docs are its weakest part
Serpent7776 has quit [Ping timeout: 255 seconds]
<discocaml>
<ada2k> i forget readthedocs is still up until i have to look at dune
<discocaml>
<anmonteiro> the changelog
<discocaml>
<ada2k> a (since 3.2) would be nice. i don’t know if they have that or not
<discocaml>
<anmonteiro> docs have it
<discocaml>
<anmonteiro> docs should have it
<discocaml>
<deepspacejohn> I guess what’s not intuitive to me is that the dune lang numbers map to dune version numbers, but not all new dune features are controlled by the dune lang setting and not all versions introduce changes to dune lang (or is that incorrect?). The changelog has a lot of entries and only mentions dune lang a few times.
<discocaml>
<deepspacejohn> If I wanted to, say, pick the lowest possible dune lang value that has the minimal set of features I want, it doesn’t seem like there’s an easy way to compare them
<discocaml>
<deepspacejohn> In practice I just use whatever version number of dune I have installed and only change it if there’s ever a new feature that I need
szkl has quit [Quit: Connection closed for inactivity]
<discocaml>
<getzapped.> why is elixir lisp in disguise?
<waleee>
I presume you would use the same arguments as those for ruby
<waleee>
I'm not convinced either of them is any good, the one lisp-like feature is macros I guess but that's not that lisp-specific
<discocaml>
<getzapped.> ah it kind of makes sense when you look at how macros parse out source code, the quoted expressions do heavily resemble lisp
<companion_cube>
@getzapped macros, with a form of homoiconicity
Anarchos has quit [Quit: Vision[]: i've been blurred!]
<discocaml>
<getzapped.> ```
<discocaml>
<getzapped.> {:if, [],
<discocaml>
<getzapped.> [{:!, [], [true]},
<discocaml>
<getzapped.> [do: {{:., [],
<discocaml>
<getzapped.> [{:__aliases__,
<discocaml>
<getzapped.> [], [:IO]},
<discocaml>
<getzapped.> :puts]}, [], ["this should never be printed"]}]]}
<discocaml>
<getzapped.> ```
<discocaml>
<getzapped.> does look like lisp with {} instead of ()
<companion_cube>
Tuples and atoms
<companion_cube>
Not that different than lists and atoms
<discocaml>
<getzapped.> its official, elixir is sugar over lisp
bartholin has quit [Quit: Leaving]
<discocaml>
<ada2k> ruby doesn’t really have macros
<companion_cube>
Elixir is lisp but actually not too ugly for the mainstream
<companion_cube>
Can't wait for typed elixir tbh
<waleee>
I would honestly take the parens instead of the endless "end"-stacking
<discocaml>
<getzapped.> i dont mind how lisp looks tbf
<discocaml>
<getzapped.> typed elixir will be great
<discocaml>
<getzapped.> i really like gleam with static types and beam concurrency, but sometimes it feels a bit too simple, and elixir is quite a bit more expressive with its macro system and operator overloading.
trillion_exabyte has quit [Ping timeout: 252 seconds]
trillion_exabyte has joined #ocaml
torretto has quit [Ping timeout: 260 seconds]
torretto has joined #ocaml
<companion_cube>
Gleam is reinventing otp, right? :s
Tuplanolla has quit [Quit: Leaving.]
<discocaml>
<ada2k> typed elixir sounds cool.
<discocaml>
<ada2k> i haven’t written any yet, dynamic types turn me off