a thoughtful web.
Share good ideas and conversation.   Login or Take a Tour!
bhrgunatha's profile
bhrgunatha


stats
following: 45
followed tags: 68
followed domains: 4
badges given: 1 of 5
hubskier for: 2029 days

recent comments, posts, and shares:
bhrgunatha  ·  5 hours ago  ·  link  ·    ·  parent  ·  post: I'm having all four of my wisdom teeth out in 12 hours, kinda freaked out.

    woke up from anesthesia prematurely twice now,

legit nightmare fuel.

bhrgunatha  ·  9 hours ago  ·  link  ·    ·  parent  ·  post: I'm having all four of my wisdom teeth out in 12 hours, kinda freaked out.

Everyone's heard a horror story but you never hear the majority of cases where everything's fine. After my first was removed (afternoon) I had to teach (evening). The only problem was drinking water because it was out of a fountain and too cold.

I only had a local anaesthetic so the worst part is the initial injection but they gave me a topical anaesthetic to make that easier. The sensation of pressure and the sound were unpleasant.

Pay attention to the after care instructions!

bhrgunatha  ·  2 days ago  ·  link  ·    ·  parent  ·  post: Why is my bash loop not working?

I don't know why, but the ffmpeg wiki says you can avoid generating the input file.

I'd be tempted to just loop through the sub directories (ls -d */) and copy/paste the wiki example.

e.g.: https://pastebin.com/Mak34iye

bhrgunatha  ·  4 days ago  ·  link  ·    ·  parent  ·  post: GNU Guile 3.0.0 released

Sorry in advance, I'm verbose as fuck and don't know your background.

    Why do people like lisp so much?

I think it boils down to two things but everyone has their own point of view.

1. Homoiconicity (see later)

2. The ability to change both the way the program is read and evaluated.

It might be apocryphal but people say Lisp is named due to List Processing.

At its heart what seems to most annoy people about it - all those parentheses - turns out to be one of its killer features. As bfv pointed out the programs you write are exactly the same representation as the lists used by the language. This is called homoiconicity. Since bfv already highlighted the REPL - Read , Eval, Print, Loop - I want to expand a bit on what I think is the heart of Lisp the read and eval parts.

This is only conceptual,high level and very handwavy so the actual details vary wildly and factually.

Most languages - whether compiled or interpreted - need a pre-processing step - called parsing (READ!) - that turns the text representation (your program) into an internal representation called an AST (abstract syntax tree). An interpreted language will take the AST and run it by interpreting it (EVAL!). That is convert the into the actions of the program you wrote. It might have to interpret parts of the AST over and over again and each time has to figure out what to do.

A compiled language analyses the AST much more deeply and converts it into a representation the machine itself can execute - the computer's own binary machine code. Since this is only done once (at the time of compilation) there is no need to keep or interpret the AST over and over again to take the actions as the program runs - the computer does that itself. That is why compiled languages are generally faster than interpreted languages - because the compiler takes more time analysing the AST to see how best to convert it into the binary instructions the computer itself executes. . Also the interpreter is a program itself which the actual machine is executing and that extra layer has a toll. Note there are 2 phases for both interpreted and compiled - I like the diagram's use of pre-processing and processing to represent that.

Back to Lisp.

Lisp also has separate pre-processing and processing phases. BUT (and this is one of those killer features) your program can hook into the pre-processing phase using Lisp's infamous macros. The pre-processing phase of Lisp transforms your program (which thanks to homoiconicity is a just a bunch of Lists) and converts them according to both the macros provided by whatever flavour of Lisp your using and the macros you wrote as part of your program. These transformation use the full power of language too and because your program is just a bunch of lists, it's really straightforward to transform them. Yes, the full power of the language means your macros can also use the other macros at the pre-processing phase too.

What's more you can hook into the parsing part of pre-processing which basically means you can invent your own syntax - even if it's not based on lists - as long as the end result of that is in the format (lists!) the rest of the language understands.

The processing phase then takes the transformed code (which are now legitimate lists your favourite Lisp flavour can understand) and executes it.

For example this cheeky monkey takes C source code during the pre-processing phase and transforms it into a list - (run-c-program <c source code>) then during the processing phase "run-c-program" shells out to compile and execute the C-program.

You might cry foul about now and say "but then lisp is interpreted" but actually the choice of compiled or interpreted is truly and deeply an implementation detail and some exceptional computer scientists have converted the whole process into one that uses the compiled model.

I'm not going to waste more time to cover what a JIT compiler is but this announcement is notable because Guile now has a JIT compiler.

    And what does it mean for a language to be a dialect of lisp (scheme)?

I think if it conforms to the above model then it's in the lisp family.

There are many decisions and tradeoffs when you design a language. I think perhaps the 4 most interesting lisp languages are Common Lisp, Racket, Clojure and Emacs Lisp.

A big difference between Scheme and most other Lisps is the macro system and Racket has extended the Scheme model to the point where the designers call it a language laboratory rather than a language. For example when you install racket - it includes Scheme (both standards R5RS and R6RS), Datalog (logic programming), Typed Racket (static type checking), Lazy Racket (lazy evaluation), Algol 60 - no seriously!, Scribble (a language for making documentation), Slideshow, and many others.

bhrgunatha  ·  4 days ago  ·  link  ·    ·  parent  ·  post: GNU Guile 3.0.0 released

Don Box's Sheme is Love was my "the first one is free" - although I didn't get it at the time. Reading it back now I can see why, it's a pretty bad sales pitch, but it stuck in my mind. Later I read The Nature of Lisp and that was it. These days I'm on that 99.1% pure Sky blue crystal but it's stiil Sheme underneath. <3

bhrgunatha  ·  7 days ago  ·  link  ·    ·  parent  ·  post: 365th Weekly "Share Some Music You've Been Into Lately"

Inspired while rewatching The Leftovers recently - someone id'd this song.

Very unme.

bhrgunatha  ·  15 days ago  ·  link  ·    ·  parent  ·  post: George Washington

The epitome of the blossoming internet - especially youtube.

Still hilarious and awesome.

Everyone has their favourite line.

bhrgunatha  ·  34 days ago  ·  link  ·    ·  parent  ·  post: How to develop an online ticket booking system?

Looks like ddi_dev's account got embroiled about 10 weeks ago in the ultra-competitive cut throat business of hubski account monetisation.

bhrgunatha  ·  47 days ago  ·  link  ·    ·  parent  ·  post: Record For Cross-Country Cannonball Run Shattered

That was entertaining.

I didn't know "Have you tried turning it off and turning it on again" was a thing for cars.

With luck there's still some scope to shave off more time.

bhrgunatha  ·  54 days ago  ·  link  ·    ·  parent  ·  post: 63 Up Review: NYT

Despite the flaws I love this series. It's so compelling, watching how people do (and don't) change during their lives.

As the spectre of sickness and death inevitably haunts any future episodes in the series, I wonder if there will even be a 70 let alone an 84. Apted's nearly 80 himself.

bhrgunatha  ·  67 days ago  ·  link  ·    ·  parent  ·  post: Boot Sector Games

Love it.

    I suspect that the people had more fun writing the games than they did playing them.

Yes!