Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • 00:34

    bakpakin on master

    Update to 1.16.0 Add linting page. Release 1.16.1 docs. (compare)

  • Jun 17 07:06
    pepe commented #710
  • Jun 16 23:36
    andrewchambers commented #710
  • Jun 16 20:51
    sogaiu commented #710
  • Jun 16 19:00
    pepe commented #710
  • Jun 16 06:18
    sogaiu opened #120
  • Jun 15 13:01
    Saikyun commented #710
  • Jun 15 00:45
    crocket commented #694
  • Jun 15 00:45
    crocket commented #694
  • Jun 15 00:34
    crocket commented #694
  • Jun 15 00:26
    sogaiu commented #694
  • Jun 15 00:25
    sogaiu commented #694
  • Jun 14 19:55

    bakpakin on newjpm

    Work on port of jpm to modules. More work on bringing jpm port … (compare)

  • Jun 14 18:04
    uvtc commented #709
  • Jun 14 17:28
    uvtc commented #694
  • Jun 14 10:29
    sogaiu opened #119
  • Jun 14 10:05
    pepe commented #710
  • Jun 14 00:17
    sogaiu commented #710
  • Jun 13 19:08
    pepe commented #710
  • Jun 13 07:04
    Saikyun commented #710
andrewchambers
@andrewchambers
why sorry? you didn't do or say anything wrong
kiti_Nomad
@Kiti-Nomad
I don't know enough knowledge
andrewchambers
@andrewchambers
well the word lisp seems to mean different things to different people
so if we say janet is a lisp, some people get upset, and if we say it isn't one, other people disagree
so people can judge for themselves i guess
crocket
@crocket
A lisp is just a language that uses parentheses as the basic buliding blocks.
Janet is a lisp.
I think janet's object system is similar to javascript's object system.
Both use prototypical inheritance.
prototypical inheritance does the job for defining environment, but I wouldn't use it beyond defining environment.
It is easy to mess up with prototypical inheritance.
I just use plain data structures.
andrewchambers
@andrewchambers
@crocket thats your definition, i don't think everyone would agree with you.
some people include things like cons cells in the definition of lisp
crocket
@crocket
What is a cons cell?
andrewchambers
@andrewchambers
other people seem to discount anything that uses [] or {}
from the lisp wikipedia page it says " Linked lists are one of Lisp's major data structures"
crocket
@crocket

wikipedia says

Lisp (historically LISP) is a family of programming languages with a long history and a distinctive, fully parenthesized prefix notation.

andrewchambers
@andrewchambers
yes but it also says
Linked lists are one of Lisp's major data structures
which is not true for janet
crocket
@crocket
That's not a requirement for a lisp.
A lisp is a language with a distinctive, fully parenthesized prefix notation.
andrewchambers
@andrewchambers
sure, this is a popular opinion
I personally call janet a lisp
im just saying some people object to that
which is also a fact
crocket
@crocket
They confuse a lisp implementation with a lisp as a language family.
By the way, even haskell implements a list with a linked list. Why doesn't janet use linked lists?
I like a linked list.
A linked list makes lazy evaluation easy.
andrewchambers
@andrewchambers
well you could make a linked list [1 [ 2 [3 nil]]]
out of tuples
but i don't know really
crocket
@crocket
That isn't lazily evaluated.
For lazy evluation in janet, you need a function.
Like [1 f].
(f) returns [2 f] or nil.
Clojure is also lazily evaluated by default.
andrewchambers
@andrewchambers
no it isn't
crocket
@crocket
What isn't?
andrewchambers
@andrewchambers
clojure is not lazily evaluated by default
crocket
@crocket
I mean clojure makes programmers use lazy data structures.
andrewchambers
@andrewchambers
yeah, the seq stuff is lazy i guess.
theres an example of doing something like this, but it isn't common in janet
crocket
@crocket
I would like to see WASM VMs replace JVM.
crocket
@crocket
set-wallpaper
#!/usr/bin/env janet
# kakoune: filetype=janet
(import sh)
(import argparse)

(defn main
  [&]
  (when-let [{"persist" persist :default wallpaper}
             (argparse/argparse
               "sets wallpaper with feh or swaybg."
               "persist" {:kind :flag
                          :help
                          "Make wallpaper change survive reboots."}
               :default {:kind :option
                         :help "wallpaper file"})]
    (if wallpaper
      (let [xdgConfigDir (os/getenv "XDG_CONFIG_HOME"
                                    (string (os/getenv "HOME") "/.config"))
            config (string xdgConfigDir "/wallpaper")]
        (when persist
          (with [f (file/open config :w)]
            (file/write f wallpaper)))
        (if (os/getenv "SWAYSOCK")
          (do
            (sh/run pkill swaybg > :null > [stderr :null])
            (sh/run nohup setsid -f swaybg -c "#000000" -i ,wallpaper -m fill
                    > :null > [stderr :null]))
          (sh/run feh --bg-fill --no-fehbg ,wallpaper)))
      (print "wallpaper filename is missing..."))))
crocket
@crocket
Integrating this as a keyboard shortcut with a file manager and an image viewer is better than any wallpaper setter.