freenode/lisp - IRC Chatlog
Search
10:28:35
edgar-rft
loke: probably yes, but there are *many different* package formats. Which one are you talking about?
10:29:40
iago
that was what I was thinking, binary format is so application dependent that it would be hard to write a generic library to decode it
10:29:56
loke
edgar-rft: Specifically, I need to decide TCP headers. I know the format, and I can easily do it manually using lots of LOGAND and ASH
10:30:15
loke
But if there a package that allows me to neatly declare the format, things would be easier.
10:33:39
ogamita
iago: it's not hard to write a generic library: you define a DSL to describe binary format and to get generated automatically the functions to access it.
10:34:50
ogamita
iago: see for example https://gitlab.com/com-informatimago/com-informatimago/blob/master/common-lisp/data-encoding/data-encoding.lisp
10:35:56
ogamita
iago: and https://gitlab.com/com-informatimago/com-informatimago/blob/master/common-lisp/data-encoding/data-encoding-test.lisp
10:37:10
ogamita
iago: notice in data-encoding-test.lisp how definining a binary format and using it as easy as defining and using a structure or a CLOS class.
10:41:27
Xach
loke: binary-types and possibly others. and a core example in PCL is doing it via CLOS.
10:41:30
loke
iago: However, libpcap itself doesn't include any functions to parse packets. You get binary blobs.
10:42:07
loke
Here's my pcap code in case anyone is interesting. It's a work in progress: https://github.com/lokedhs/trivial-pcap
10:43:17
Xach
loke: i've often thought about rolling my own, so often that i think probably many others have, but i can't remember names
11:10:29
_death
also I once wrote a python.struct-like thingy for ad hoc munging https://github.com/death/constantia/blob/master/struct.lisp
11:52:17
sjl
cool, ELS schedule is posted http://european-lisp-symposium.org/editions/2017/content-programme-full.html
12:31:39
beach
easye: There is a tradition, but things are different this year because of the co-location with <programming>
12:32:06
beach
easye: So the banquet is on Wednesday, and it's for the entire <programming> conference.
12:33:10
beach
There is nothing organized for just ELS, and the banquet is not included in the price for just the symposium and the workshops.
12:36:00
easye
+1 on an April 3d dinner. But I have no cycles to help organize (working on abcl-1.5.0)
13:35:30
beach
So here is an idea for a cute feature of Common Lisp mode of Second Climacs: Hold the mouse over a lexical variable, and the possible definitions (such as LET bindings or assignments that may determine its value at that point) will be highlighted. Other uses of the same variable (including assignments that can not determine its value at that point) will be highlighted differently.
13:39:55
beach
It involves computing so-called DU and UD chains, but that can be done since I have a complete parse of the code.
15:22:05
ogamita
Now, depending on your hardware, it may be more efficent to fork threads and write different parts of the blob from different threads.
15:23:38
dxtr
We are migrating our ecommerce system and I have to import product images for 70k products
15:26:56
ogamita
Nowadays, we have large RAM so you can avoid hitting the SSD until you have the final file in general.
15:30:51
dxtr
#<SB-SYS:FD-STREAM for "file /home/dxtr/quicklisp/local-projects/imageimport/catalog/product/l/u/lulz" {1001F8B533}> is not a character output stream.
15:38:46
didi
So http://lisptips.com/post/53970107740/adding-an-item-to-a-sorted-list taught me how to add an item to a sorted list. But what if I want to add an item only if it is not a duplicate of an item already in the list?