freenode/#lisp - IRC Chatlog
Search
4:08:46
red-dot
Is anyone aware of CL libraries for working with Google cloud? With the exception of https://github.com/death/gcm, nothing seems to turn up in searches.
4:24:36
p_l
red-dot: nothing available at the moment, should be quite quickly doable as they all follow REST quite well
4:41:14
red-dot
For anyone interested in Google APIs in Swagger (Google has its own version of Swagger): https://groups.google.com/forum/#!topic/google-apis-discovery/NdreD8_xWOk
4:48:04
red-dot
Finally, for someone wanting to generate a client via Swagger, this seem to be the only option out there for CL: https://github.com/incjung/cl-swagger-codegen
5:32:11
stylewarning
Open sourced MAGICL, a linear algebra library. Definitely a WIP and the high-level interface is rough around the edges. Please send improvements, PRs, issues, or design suggestions! https://github.com/rigetticomputing/magicl
5:55:38
aeth
stylewarning: Did your team consider using :downcase help with the readability of your generated files like blas-cffi.lisp?
6:23:46
|3b|
ACTION usually tries to make generated code look nice if possible, going to see it from M-. often enough :)
10:09:58
aeth
return-from works in functions, apparently. And apparently this works: (defun foo () (return-from foo 42) "Hi")
10:15:18
Shinmera
_death: Confusing how? And yes, there's no lisp type, just a common-lisp one. I'll see about completion.
10:17:03
aeth
paule32: Use cond and and instead of two ifs and then you can get rid of the return-froms and just use the implicit return without changing really anything else in your structure.
10:19:59
Shinmera
beach: I'm more astounded that people in here don't learn that helping in this case is pointless and only increases overall suffering.
10:27:40
stylewarning
aeth: it has been preferable to do things like (defun foo () (when condition (return-from foo 42)) [ ... long logic code ... ])
10:29:04
aeth
shrdlu68: This should probably be taken to #clnoobs where the exact same question was asked by paule32
10:31:26
aeth
stylewarning: off topic here, but there is a ##python-friendly that is "like #python, but friendlier" according to its topic
10:32:09
shrdlu68
return-from is a simple way to exit from necessarily complex functions with a given value.
10:32:12
aeth
This is an endless source of wisdom (as long as the topic of the channel is SEOed enough). http://irc.netsplit.de/channels/?net=freenode
10:32:28
beach
Shinmera: I am willing to give them the benefit of the doubt, assuming they haven't seen the recurring behavior.
10:33:07
stylewarning
I wonder if I can hijack beach's compiler work to help make static analyzers for code style
10:33:41
Shinmera
stylewarning: I wouldn't call it "hijack", I'm pretty sure such a thing is within his interests.
10:35:36
aeth
stylewarning: It's interesting that you use return-from heavily. I've used early return statements a lot in most other languages, but in CL.
10:36:42
stylewarning
aeth: Maybe "heavily" is too strong a word, but it occurs frequently enough in code that didn't manage to lend itself well to functional style
10:39:18
stylewarning
aeth: I'll see if I can dig up an example later, but they all fall into the category of rewriting a top-level IF/COND like (if condition <short result> <long processing code>) to (when condition (return-from ...)) <long code>
10:39:41
aeth
Shinmera: I was going to say that that's still quite a bit but then I remembered how large your Github is.
10:41:05
aeth
stylewarning: Yeah, I've seen and used that pattern in other languages, it's just that I guess idiomatic CL for some reason tends to avoid that sort of thing, at least in my CL.
10:41:37
stylewarning
aeth: it's true with my CL as well. Ideally code is refactored that you can return to expression-oriented thinking
10:54:41
borodust
Xach: in a tweet you mentioned suggestions, so... :) would be awesome if there will be a quicklisp badge that tells whether system is building or not (not unlike travis and appveyor badges)
11:05:44
azrazalea
Ha :P, nice job me. Not a command prompt!!! Anyway: https://gitlab.com/snippets/1695720 is my .sbclrc and for some reason i'm getting https://gitlab.com/snippets/1695721 when it tries to load linedit. Is linedit broken right now or something? I checked and as far as I can tell i'm not using a local version or anything like that.
11:06:06
azrazalea
(also hi, i've been gone forever (and for the most part still am) cause life and stuff)
11:15:11
stylewarning
man oh man, old lisp code from ca. 1980s is so terrible. Half the files are custom load scripts
11:16:15
azrazalea
borodust: Thanks <3. I'll probably dissapear again for a bit. I _do_ plan on being around again once my life settles.
11:16:29
stylewarning
(before people jump on me for making a bold, offensive claim, i don't mean all code from the 80s is terrible and the state of affairs was any better in any other language)
12:07:24
Xach
borodust: where to put this badge? like make a png and host it to include in readme.md or something?
12:08:35
Xach
stylewarning: i haven't spelunked *too* much, but the custom load scripts i saw were usually pretty simple. like, a list of files to load in a loop.
12:28:36
borodust
Xach: yeah, like return different png/svg by the same url depending on the build status
12:29:14
borodust
Xach: like those on top of readme here: https://github.com/borodust/bodge-chipmunk/blob/master/README.md
12:29:53
borodust
url is always the same but services return different images depending on the build status
12:30:22
Shinmera
borodust: Usually you want to have a link to the respective project's page as well
12:32:50
shrdlu68
I'm not sure, reading the clhs page on order of execution (loop macro) whether a while clause in the middle of for clauses is executed after the for clauses before it and before the for clauses after it.
13:24:00
stylewarning
I wonder if there’s an expedient way to compile something like Standard ML into Lisp with existing implementations.
13:26:41
scymtym
stylewarning: you may be interested in http://www.ccs.neu.edu/home/stchang/pubs/ckg-popl2017.pdf
13:47:49
phoe
I want to inspect two different objects at a time. I can work around it by opening a second emacs, but I don't want to overkill.
14:51:38
pjb
That's because irc is like google's mapreduce: you ask one question, you get a hundred of answers, and you have to reduce it to a single meaningful information.
15:04:14
jmercouris
I find it best to usually just describe the problem instead of just mentioning it :P
15:06:57
pjb
It's a rare occurence, when somebody asks a question on irc without having some troubles…
15:07:27
megachombass
on the state this is, he gonna notice is copy pasta and i risk way more than a 0
15:08:26
phoe
megachombass: post your problem instead of complaining about it. this way we might actually be able to help you.
15:08:48
pjb
If you asked a question about your troubbles, we could help, but just stating trivia won't.
15:09:49
megachombass
i think that i didnt refactor the code enough of this lisp VM for the teacher dont notice is copy pasta from somewhere else
15:10:31
megachombass
im alone on this project, and i doubt that in the 30h left i have, i can code something correct
15:10:35
jmercouris
If your solution to passing an assignment is refactoring it until it is no longer recognizable as palgueraized (sp?), then you should drop the class
15:11:12
pjb
drdo: sorry, indeed, it was MrDo, not DrDo. https://pausescreen.files.wordpress.com/2010/11/mr-do-snes.jpg
15:11:33
jmercouris
That's unfortunate, post your issue, and assignment, what you've done so far, and let's see if we can help you get through it
15:11:49
jmercouris
We won't give you the answers per se, at least I won't, but I will try to guide you through it
15:12:57
pjb
If you asked about those issues, we could help, but you keep talking about irrelevant things, like troubles and university dropping.
15:13:22
megachombass
if you're up to follow step by step how im trying to implement it, then there is still a chance
15:15:02
pjb
megachombass: also, what I forgot to mention, is that when you build abstrations, you can test them independently from the rest of the program. So you can test it incrementaly, module by module.
15:16:02
megachombass
then lets try it module by module. starting by the choice of the structure. i like the defstruct
15:22:46
Bike
though it is off topic, your class seems to have entirely failed to prepare you for this assignment. assuming others are having problems, you should probably complain.
15:28:23
megachombass
i did attend to that class, as i do with every other class and i do pay attention, simply this is way to hard with the few instructions he gave in class
15:29:03
megachombass
btw this site codeshare.io is great as everyone with the link can interact with the code in real time
15:30:30
jmercouris
So, I have some strange issues with read-line, sometimes when I type backspace in a terminal after invoking read-line, it will print characters "rubout" instead of actually deleting the previous character
15:31:39
dim
CL-USER> (with-open-file (s "/Users/dim/dev/temp/pgloader-issues/733/asist.tiplis.csv" :direction :input :element-type 'character :external-format :utf-8) (format nil "~{~x~^ ~}" (mapcar #'char-code (list (read-char s) (read-char s) (read-char s) (read-char s))))) gives me "FEFF 31 3B 27"
15:31:50
dim
you might recon the UTF-8 BOM, as in https://en.wikipedia.org/wiki/Byte_order_mark#UTF-8
15:32:24
dim
Note: The UTF-8 representation of the BOM is the (hexadecimal) byte sequence 0xEF,0xBB,0xBF. A text editor or web browser misinterpreting the text as ISO-8859-1 or CP1252 will display the characters  for this.
15:34:43
megachombass
and for testing if my code still works.... one sec i create a test at the end of the file.
15:34:48
dim
using (format nil "~{~x~^ ~}" (list (read-byte s) (read-byte s) (read-byte s))) shows "EF BB BF", more to the point maybe
15:36:42
dim
my understanding is that it would be safe to always ignore the sequence #xef #xbb #xbf at the beginning of an UTF-8 encoded file... but well... here be dragons?
15:37:03
jmercouris
megachombass: this is some of the strangest looking lisp i've seen with hanging indent parens
15:38:29
jmercouris
does this have to be in Lisp? or did you choose lisp? if it doesn't have to be in lisp, why don't you write it in a language you know?
15:41:29
megachombass
if it was in c, python java or anything i know, i would've created my own vm from scratch and ispire myself on existing VM's. but in lisp im forced to copy pasta an existing one, and even to modify it its a pain for me
15:41:51
pjb
jmercouris: in the preferences of the terminal, in the Advanced tab, you have a checkbox "Delete sends Control-H" this checkbox must be in accord with stty erase.
15:42:28
jmercouris
pjb: It only occurs in ansi-term in emacs, so far on #emacs, the best help I've gotten was "lololol"
15:43:31
pjb
jmercouris: but this is the same principle. What does ansi-term in emacs send when you press DEL? What is stty erase configured to?
15:45:13
pjb
megachombass: the point of the exercise, is to make you write lisp from scratch! How would you learn lisp otherwise?
15:48:47
Bike
eh. writing a vm in an unfamiliar language with, apparently, zero support, is a bit much. maybe you could ask your classmates what resources they used.
15:52:15
megachombass
we were 3 classmates on this project, other 2 literally left me alone coz they abandonated
15:52:16
jmercouris
Maybe I got lucky, but I think that generally people in this world are good, if not at least neutral
15:52:43
Bike
i'm just saying, you have no idea what you're doing. you've stated as much. you were not prepared. either your class is doing poorly in general because of poor instruction, or you weren't paying attention. in the former case, you need to talk to the department.
15:53:04
pjb
megachombass: try: (let ((*print-circle* nil)) (pprint (macroexpand '(defstruct vm r0 r1 r2 r3 pc sp fp))))
15:53:28
jmercouris
I'm almost of the opinion that you should not attempt to complete the project and instead focus on getting an extension, or going through the appropriate channels as Bike suggested
15:54:21
pjb
It is assumed that students at university level be autonomous. Basically, teachers say: learn this. and the student go and learn this.
15:55:04
pjb
Foremost, when they already know 4 other this that are like it, and when there are a lot of resources on the internet and in libraries about it, and when learning this mainly involves writing programs in this language…