Hacker Newsnew | past | comments | ask | show | jobs | submit | grault's commentslogin

You don't have to reinvent a thing, just use some ffi (foreign function interface) implementation and call into whatever you want.


To add to this reply, interfacing in C with Common Lisp is pretty easy today. There are at least two portable libraries to do this.

Also, you can also interface with Java libraries on the JVM by using the ABCL lisp implementation.


>There are at least two portable libraries to do this.

What are they?


One is CFFI, widely known and well documented, with tutorial and tooling:

https://common-lisp.net/project/cffi/

The other was UFFI, older; but then there are others. In fact, there are a ton of other projects for doing FFI in Common Lisp!

http://www.cliki.net/FFI

And then you can also use the FFI functionalities provided by the particular Lisp implementation (i.e. SBCL, LispWorks, ABCL, etc.)

However, the use of a portable library like CFFI means that you can take your code that runs correctly in SBCL, and then run the very same code in CLISP (other Lisp implementation) with no change at all.

CFFI works for the following Lisp implementations or "compilers": ABCL, Allegro CL, Clasp, CLISP, Clozure CL, CMUCL, Corman CL, ECL, GCL, LispWorks, MCL, SBCL and the Scieneer CL.

That's a lot of implementations!


Sure is a lot. Thanks!



Interestingly there is a CFFI module in Python too. Maybe they got the idea from Lisp.


Um, i'm not sure. Python was designed with C compatibility as a main feature since the start, anyways.


The cffi module in python came from pypy (which broke the cpython c api) - but both the python ctypes module and cffi use libffi:

https://en.m.wikipedia.org/wiki/Libffi


Interesting info, thanks.


Are there performance implications using FFI ?


There can be, but they mostly have to do with moving things around in memory and garbage collection. An FFI has to marshall in-memory data structures from Lisp into the form C expects, and then move C's results back into Lisp's world. Sometimes your program will have to do this manually but the FFI usually takes care of simple cases like pointers and atomic types. Still, it's not cost-free because at minimum the removal and insertion of tags has to happen.

A related problem is word alignment; getting this right is important for passing data from Lisp to vector processors (and to a GPU I presume, but I haven't done that).

The other issue is GC: When the C function is running, it's important that Lisp's garbage collector not move the memory C is using. Some Lisp implementations do the laziest thing and just stop Lisp until C returns. Others are more sophisticated and keep C's heap separate -- but that requires more copying. Still others mark the memory C uses in a way that tells the GC "don't touch" but that can lead to pathological fragmentation in extreme cases.

The above makes it sound worse than it is. 99% of my use of a Lisp FFI has resulted in a performance increase because C is in general about twice as fast as CL for low-level stuff--which is one of the reasons to use an FFI in the first place.


Linkedin demanded me to log in to read.. I'd be happy to read this w/o logging in / registering. Are you aware of a non-Linkedin link?



Worked fine for me on Chrome


Same on Safari, didn't have to login to read.


Works for me on Firefox


With noscript on...


I read it on android via Materialistic just fine. I don't even have a LI account


Iinteresting.. Lynx/Curl gave me the page straight away, Chrome though keeps redirecting me to the "register or login" page.

edit --

It's some Javascript based redirect, I can see this in curl: ... "baseRedirect":"https://www.linkedin.com/uas/login?session_redirect="}--> ...

I'm not investigating further.


Wrt search, I guess it's seen as an orthogonal problem and meant to be dealt with by indexing / search services..


In that case though, why claim to be "decentralized"? That to me means one large, interconnected network, which one can access through any of its members. Mastodon is decentralized; you can make an account on any server and search and follow users on any other server without leaving. Bittorrent is decentralized, you can grab info from the DHT then connect to peers and download stuff.

If it depends on an index/searching service, how is the network itself any more decentralized than say an FTP server? I wouldn't call FTP decentralized.


I'd expect to see something like this in the FAQ section: How is it possible to diff/merge Skov program soucre trees?

Just asking, it's definitely possible. I used to work at a CAD company, they did some dev work to do these with building models...


Ideally, Skov would need an integrated version control system that understands the visual code.

But now, all you can do is export your code to text files (Ctrl+S) and use traditional text-based diff/merge/version control tools.


This is the right answer, at least for visual dataflow. It should be done by diff/merge of graphs, displayed visually, not by converting it into a text-based format and using something like git, Perforce, or cvs. Dataflow can be expressed textually, but you'd have a hard time following the code.


I'd be in favor of having some standard "code review markup language", which could contain review comments and workflows. Then you would be able to put these in files and make those files part of your repository (ie commit/push).

Then, you could build various frontends to handle these in a user friendly way if you like. But also, would be accessible and editable in your favorite text editor.


As long as the tools and processes don't get in the way of communication because they require comments to be written in a particular format or in a precise place. Too often, such tools end up in discouraging the very thing they're supposed to help.


This is something I've been thinking about quite a lot lately – I considered extending our git-flow a bit to contain review branches (or something comparable). If you'd like to chat a bit about potential solutions for your approach just drop me a line!


We solve this via gatekeeper rules (repository administrator defines rules such as who needs to review which part of code, or whose code needs to be reviewed (intern team for instance needs to be reviewed by core team etc), or what commit message rule should be followed etc.

A typical review process suggested by GitPlex can be found here: http://wiki.pmease.com/display/GP10/Iterative+Review+with+Pu...



Personally, I NOP-ed all arrow keys _and_ hjkl also, after I found myself keeping j pressed to get to an area at the bottom of the window. Which would be an L. Then NOP-ed, bit by bit, many other things which could be done faster. 90% of my movements are search, BWtf{} and some scrolling with zt zz zb. The only case I found the lack of hjkl problematic so far is in block visual mode.

Another anti-pattern I did was Da and dWi, NOP-ed them and forced myself to start using C and cW respectively. Not much of an achievement, but feels better :) Same for x, I deleted whole words with x, then pressed i, I removed the mapping of x.

Conclusion: in case you think you have an anti-pattern, just NOP the mappings. In case one or two turns out to be too much of restriction, you could always remove the NOP mapping later.


I started combining {} with zt zz zb. I feel like it mimics physical handling of a scroll. This requires some empty lines though. In case I work with dense text, I usually switch to H/M/L also (combined with zt zz zb).

I have to mention that for navigation purposes, f/F is only useful with ;, otherwise you could find yourself looking through the line for a suitable character which slows you down. With ; it's enough to pick a "rare" character on the line which is near to/in the desired object.

Next to c2f, ci" (and ci) etc) could be really useful when you end up being in the middle of a string literal and just want to change the whole thing. Or in the middle of an expression in parens - http://fuckyeahvim.tumblr.com/image/122373002741


ct" or even ci" (or ci) ci] etc) is really useful to reset the inner contents of text delimited by ")] etc.. I use these a lot - http://fuckyeahvim.tumblr.com/image/122372862496


ci", ci), ci]... I love these, and use them all the time.


In FastMail you could already search based on some of the email headers, like from:thatpurplecompany.com (or has:attachment, https://www.fastmail.fm/help/receive/search.html) and then you could save the search.. It's visually not that rich, but it solves your problem.

Tagging (for me) is more about ad-hoc grouping. As giving it a thought right now it's even hard for me to come up with a realistic use case.


Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: