* dmiles though has a few extra bytes nowadays
<aeth> dmiles: The problem is that a lot of the structs probably become specialized arrays.
<dmiles> aeth: ah .. i see.. the name would not fit anymore
<aeth> e.g. (simple-array single-float (3))
<aeth> It would be nice if there was a way to do heterogeneous but typed arrays, though. Where e.g. the first element is a symbol and the next 3 are single-float.
<aeth> Make this 2 dimensional and it's even more useful because now you have a pattern
nopoliti1 has quit [Ping timeout: 240 seconds]
nopolitica has joined #lisp
JuanDaugherty has joined #lisp
oleo has quit [Ping timeout: 252 seconds]
<dmiles> you meant like.. #(layout{type:signedByte} #(0,-1,2,45)) ?
* dmiles removes the commas before anyone notices
fikka has quit [Ping timeout: 260 seconds]
nirved has quit [Quit: Leaving]
hhdave has quit [Quit: hhdave]
dieggsy has quit [Remote host closed the connection]
ACE_Recliner has quit [Read error: Connection reset by peer]
dieggsy has joined #lisp
Karl_Dscc has quit [Remote host closed the connection]
nowhere_man has joined #lisp
pierpa has joined #lisp
<holycow> hmmm
<holycow> okay so now i have a spreadsheet with 30 000 rows and rows counted. calc counts the rows, inserts a line and prints total and groups by date so i get total number of entries per day.
<holycow> that is perfect
<holycow> any suggestions on how to collect all of the subtotals and pull them all into a separate worksheet? i'm not googling an obvious way to do something like that.
fikka has joined #lisp
<JuanDaugherty> a lisp spreadsheet?
igemnace has joined #lisp
<holycow> oh jesus
<holycow> wrong channel
<holycow> sorry!
jonh has left #lisp ["WeeChat 0.4.2"]
Poetifox is now known as Poeticode
markong has quit [Ping timeout: 252 seconds]
<JuanDaugherty> (there actually are several)
<holycow> hmm, although, strangely using lisp with a csv export of the data might just be the fastest
<holycow> hmmmmm
eivarv has quit [Quit: Sleep]
<pjb> aeth: you can do whatever you want, just do it, this is lisp!
<pjb> (let ((typed-vector (cons #(foo 1 2 3) #(symbol fixnum fixnum fixnum)))) (setf (tvref typed-vector 1) 4.4)) => type-error
capitaomorte has quit [Ping timeout: 252 seconds]
<pjb> aeth: don't ask that the implementation provides all the silly ideas you have (unless you're the implementor!)
<aeth> pjb: I'd do it even lazier than that and implement it as a struct
wxie has joined #lisp
<aeth> then *only* tvref would be required, since the implementation will probably handle the types for me when using a struct
<aeth> It would also print as expected with a defmethod print-object on the type created by the struct
pagnol has quit [Ping timeout: 256 seconds]
Pixel_Outlaw has joined #lisp
wxie has quit [Ping timeout: 256 seconds]
<aeth> (defstruct typed-vector-fixnum (name :name :type symbol) (slot-0 0 :type fixnum) (slot-1 0 :type fixnum) (slot-2 0 :type fixnum))
Cymew has joined #lisp
<aeth> (defmethod print-object ((object typed-vector-fixnum) stream) (format stream "#(~A ~D ~D ~D)" (typed-vector-fixnum-name object) (typed-vector-fixnum-slot-0 object) (typed-vector-fixnum-slot-1 object) (typed-vector-fixnum-slot-2 object)))
<aeth> (make-typed-vector-fixnum :name :hello-world)
<aeth> pjb: Just that, with an aditional aref-like function also defined. Fairly easy to generate with macros, too. Might only be efficient for short things. ^
Cymew has quit [Read error: Connection reset by peer]
Cymew has joined #lisp
wxie has joined #lisp
<aeth> And tvref could be defined as an inline specialization via specialization-store with the new type definition creating a new defspecialization in addition to the defstruct and the print-object.
Oladon has joined #lisp
atgreen_ has joined #lisp
atgreen has quit [Ping timeout: 240 seconds]
cross has quit [Ping timeout: 240 seconds]
atgreen_ is now known as atgreen
windblow has quit [Ping timeout: 248 seconds]
mejja has quit [Quit: mejja]
cross has joined #lisp
Cymew has quit [Ping timeout: 256 seconds]
arescorpio has joined #lisp
Cymew has joined #lisp
<pjb> aeth: note that if you write: (defstruct (typed-vector-fixnum (:type vector)) (name :name :type symbol) (slot-0 0 :type fixnum) (slot-1 0 :type fixnum) (slot-2 0 :type fixnum)) then the structure "accessors" should still check the types, but indeed, you would need a custom aref for those vectors.
<pjb> aeth: but for this custom aref, you will need to keep the type of each slot, unless you hardwire it in a aref specific to each structure type.
holycow has quit [Quit: Lost terminal]
<aeth> pjb: specialization-store can handle the dispatch. Efficient inline dispatch if you keep the type, runtime dispatch if it's generic. I don't think specializations can handle setters, though, which would be problematic for an accessor like a fooref in specialization-store, which will probably require a getter and a setter. That may be patchable depending on the architecture, though, and a patch would probably be simpler than a new scheme wit
Cymew has quit [Ping timeout: 252 seconds]
<aeth> with a fresh library
<aeth> pjb: I think the main issue is that most of the novel things will be stored in T arrays or T cons cells or T hash-tables, which *will* lose the type information.
wxie has quit [Ping timeout: 256 seconds]
<aeth> If implementors would have to address any of that, that is what they'd have to address, not any specific data structure.
Cymew has joined #lisp
rumbler31 has joined #lisp
<aeth> T cons cells are easy to replace with typed cons cells because of their simplicity. Just do the struct approach again. Arrays and hash-tables would be trickier.
FreeBirdLjj has joined #lisp
turkja has joined #lisp
White_Flame has quit [Remote host closed the connection]
<aeth> As soon as you want to put this faked-via-structs typed vector into a long array (e.g. 1024 long)... I think that's where this falls apart.
White_Flame has joined #lisp
White_Flame has quit [Remote host closed the connection]
White_Flame has joined #lisp
FreeBirdLjj has quit [Ping timeout: 252 seconds]
terpri has joined #lisp
Cymew has quit [Ping timeout: 256 seconds]
warweasle has joined #lisp
Cymew has joined #lisp
z3t0 has joined #lisp
CrazyEddy has joined #lisp
Cymew has quit [Ping timeout: 264 seconds]
z3t0 has quit [Remote host closed the connection]
z3t0 has joined #lisp
Cymew has joined #lisp
fikka has quit [Ping timeout: 240 seconds]
Cymew has quit [Ping timeout: 264 seconds]
fikka has joined #lisp
Cymew has joined #lisp
z3t0 has quit [Remote host closed the connection]
Cymew has quit [Ping timeout: 260 seconds]
Cymew has joined #lisp
z3t0 has joined #lisp
Cymew has quit [Read error: Connection reset by peer]
z3t0_ has joined #lisp
z3t0 has quit [Read error: Connection reset by peer]
Cymew has joined #lisp
z3t0 has joined #lisp
Tobbi has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Cymew has quit [Ping timeout: 240 seconds]
windblow has joined #lisp
z3t0_ has quit [Ping timeout: 252 seconds]
Cymew has joined #lisp
muyinliu has quit [Quit: Textual IRC Client: www.textualapp.com]
Cymew has quit [Ping timeout: 240 seconds]
Cymew has joined #lisp
Cymew has quit [Ping timeout: 268 seconds]
rumbler31 has quit [Remote host closed the connection]
Cymew has joined #lisp
fikka has quit [Ping timeout: 264 seconds]
Pixel_Outlaw has quit [Remote host closed the connection]
Cymew has quit [Ping timeout: 256 seconds]
brendyn has joined #lisp
Cymew has joined #lisp
nydel has quit [Read error: Connection reset by peer]
fikka has joined #lisp
Cymew has quit [Ping timeout: 240 seconds]
gilez has joined #lisp
emaczen has quit [Remote host closed the connection]
mitc0185 has joined #lisp
<mitc0185> hey
d4ryus2 has joined #lisp
mitc0185 has quit [Remote host closed the connection]
mitc0185 has joined #lisp
d4ryus1 has quit [Ping timeout: 248 seconds]
nydel has joined #lisp
<pjb> aeth: I don't understand this fad for specialized arrays. Using T everywhere means that the same code is used everywhere all the time, therefore way fewer I-cache lines are needed, therefore the program runs much faster.
red-dot has quit [Remote host closed the connection]
tripty has quit [Read error: Connection reset by peer]
gilez has quit [Ping timeout: 248 seconds]
Cymew has joined #lisp
<aeth> pjb: I don't commonly write code actually inteded for T. I generally write code that either gets type inferred well or code that gets type inferred poorly and can benefit from type declarations. The latter case is generally numbers and arrays. (Type declarations or check-type in the former case would just move the type error to the top of the function instead of somewhere else, and not actually improve the compilation.)
<aeth> (defun foo (x) (car x)) ; x is going to have to be a list or a type error, and SBCL knows this
<aeth> s/inteded/intended/
fikka has quit [Ping timeout: 252 seconds]
tripty has joined #lisp
Cymew has quit [Ping timeout: 256 seconds]
damke_ has joined #lisp
warweasle has quit [Quit: Leaving]
damke has quit [Ping timeout: 264 seconds]
<pjb> aeth: what about a cons tree? or just a cons?
<aeth> Oh, and afaik most of the second case can probably be avoided if everything was put it one compilation-unit (e.g. one file).
<aeth> pjb: (listp (cons 1 2)) or (typep (cons 1 2) 'list)
<aeth> You're using the Scheme definition of a list, in CL a proper list.
Cymew has joined #lisp
<White_Flame> pjb: i-cache pressure would have an upper bound by type. d-cache pressure is by footprint, which I'd think would hurt more for non-specialized
fikka has joined #lisp
<White_Flame> erm, by array footprint, as well as boxing
zhoujingrui has joined #lisp
mepian has quit [Quit: Leaving]
nika has joined #lisp
<White_Flame> really, the only thing that makes sense for specialization is unboxed numeric types, IMO
arescorpio has quit [Excess Flood]
<aeth> White_Flame: What about structs that primarily contain unboxed numeric types? They could also benefit from specialization.
<White_Flame> hmm, yeah I guess. As long as the types are known by whoever's accessing the array
<aeth> Also, arrays and structs can unbox things that are normally boxed, e.g. double-float and even (unsigned-byte 64)
<White_Flame> yeah, that's kind of the point of specialization ;)
<aeth> So at least until we move to 68-bit CPUs, they're useful for hacks.
<aeth> Is there any chance that Intel or AMD will make an x86-68?
<White_Flame> Itanium68 vs amd68
Cymew has quit [Ping timeout: 264 seconds]
Pixel_Outlaw has joined #lisp
ebzzry has joined #lisp
zhoujingrui has quit [Quit: Leaving]
kamog has quit [Quit: Leaving.]
mepian has joined #lisp
fikka has quit [Ping timeout: 260 seconds]
windblow has quit [Quit: windblow]
fikka has joined #lisp
djuber has joined #lisp
dtornabene has joined #lisp
atgreen_ has joined #lisp
nullniverse has joined #lisp
atgreen has quit [Ping timeout: 256 seconds]
atgreen_ is now known as atgreen
safe has joined #lisp
sjl has joined #lisp
red-dot has joined #lisp
milanj has quit [Quit: This computer has gone to sleep]
<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.
quazimodo has joined #lisp
sjl has quit [Ping timeout: 240 seconds]
sz0 has joined #lisp
turkja has quit [Ping timeout: 240 seconds]
fikka has quit [Ping timeout: 240 seconds]
nydel has quit [Read error: Connection reset by peer]
bkst has quit [Ping timeout: 248 seconds]
<p_l> red-dot: nothing available at the moment, should be quite quickly doable as they all follow REST quite well
<red-dot> Ah, right. Thanks. REST makes it easy.
eschatologist has quit [Ping timeout: 276 seconds]
<red-dot> Anyone have a recommendation for a package for working with REST interfaces?
eschatologist has joined #lisp
<p_l> not really
JuanDaugherty has quit [Remote host closed the connection]
<p_l> red-dot: also, console.cloud.google.com will happily generate sample requests for you
bkst has joined #lisp
<red-dot> Too bad there is no swagger description
<red-dot> Oh, apparently there is. Now they call it "OpenAPI Specification".
fikka has joined #lisp
<red-dot> Not sure if that is the Google APIs themselves, or client written ones.
nopolitica has quit [Quit: WeeChat 1.9]
<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
zazzerino has quit [Ping timeout: 260 seconds]
<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
schoppenhauer has quit [Ping timeout: 260 seconds]
schoppenhauer has joined #lisp
LocaMocha has joined #lisp
LocaMocha has quit [Max SendQ exceeded]
LocaMocha has joined #lisp
fikka has quit [Ping timeout: 252 seconds]
fikka has joined #lisp
atgreen has quit [Quit: atgreen]
dieggsy has quit [Ping timeout: 252 seconds]
jack_rabbit has quit [Ping timeout: 276 seconds]
shka_ has joined #lisp
LocaMocha is now known as Sauvin
jack_rabbit has joined #lisp
Oladon has quit [Quit: Leaving.]
<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
jack_rabbit has quit [Ping timeout: 276 seconds]
dddddd has quit [Remote host closed the connection]
pierpa has quit [Ping timeout: 260 seconds]
damke has joined #lisp
fikka has quit [Ping timeout: 260 seconds]
damke_ has quit [Ping timeout: 264 seconds]
jack_rabbit has joined #lisp
fikka has joined #lisp
sjl has joined #lisp
<aeth> stylewarning: Did your team consider using :downcase help with the readability of your generated files like blas-cffi.lisp?
<aeth> (or :invert)
sjl has quit [Ping timeout: 240 seconds]
damke_ has joined #lisp
damke has quit [Ping timeout: 264 seconds]
<mitc0185> hello?
red-dot has quit [Quit: Going offline, see ya! (www.adiirc.com)]
mitc0185 has quit [Quit: leaving]
milanj has joined #lisp
Arcaelyx has quit [Quit: Textual IRC Client: www.textualapp.com]
<raynold> ahh it's a wonderful day :-D
<stylewarning> aeth I was ok making absolutely clear it was generated code
<stylewarning> But good suggestion
fikka has quit [Ping timeout: 268 seconds]
* |3b| usually tries to make generated code look nice if possible, going to see it from M-. often enough :)
<|3b|> sometimes with comment at the top saying it is generated so don't edit it
red-dot has joined #lisp
fikka has joined #lisp
dented42 has joined #lisp
smasta has joined #lisp
smurfrobot has quit [Read error: Connection reset by peer]
smurfrobot has joined #lisp
z3t0_ has joined #lisp
z3t0 has quit [Read error: Connection reset by peer]
<beach> Good morning everyone!
<phoe> beach: good morning!
<phoe> Ha, I actually woke up after the night when you say "good morning".
sz0 has quit [Quit: Connection closed for inactivity]
Pixel_Outlaw has quit [Remote host closed the connection]
smasta has quit [Ping timeout: 268 seconds]
rippa has joined #lisp
pjb has quit [Ping timeout: 256 seconds]
fikka has quit [Ping timeout: 248 seconds]
wxie has joined #lisp
igemnace has quit [Quit: WeeChat 2.0.1]
fikka has joined #lisp
Karl_Dscc has joined #lisp
fikka has quit [Ping timeout: 264 seconds]
fikka has joined #lisp
makomo has joined #lisp
wxie has quit [Quit: Bye.]
pjb has joined #lisp
parjanya has joined #lisp
Kevslinger has quit [Quit: Connection closed for inactivity]
fikka has quit [Ping timeout: 256 seconds]
fikka has joined #lisp
dented42 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dtornabene has quit [Quit: Leaving]
nullniverse has quit [Quit: Leaving]
fikka has quit [Ping timeout: 246 seconds]
mishoo has joined #lisp
Ven`` has joined #lisp
fikka has joined #lisp
Ven`` has quit [Ping timeout: 252 seconds]
z3t0_ has quit [Ping timeout: 264 seconds]
pjb has quit [Ping timeout: 256 seconds]
fikka has quit [Ping timeout: 256 seconds]
jack_rabbit has quit [Ping timeout: 252 seconds]
Murii has joined #lisp
Karl_Dscc has quit [Remote host closed the connection]
fikka has joined #lisp
z3t0 has joined #lisp
nowhere_man has quit [Remote host closed the connection]
JonSmith has quit [Remote host closed the connection]
z3t0 has quit [Remote host closed the connection]
shifty has joined #lisp
nowhere_man has joined #lisp
vlatkoB has quit [Remote host closed the connection]
Amplituhedron has quit [Read error: Connection reset by peer]
nowhere_man has quit [Read error: Connection reset by peer]
nowhere_man has joined #lisp
jack_rabbit has joined #lisp
nowhere_man has quit [Read error: Connection reset by peer]
nowhere_man has joined #lisp
safe has quit [Read error: Connection reset by peer]
Amplituhedron has joined #lisp
jmercouris has joined #lisp
jack_rabbit has quit [Ping timeout: 252 seconds]
fikka has quit [Ping timeout: 240 seconds]
jack_rabbit has joined #lisp
jack_rabbit has quit [Read error: Connection reset by peer]
jack_rabbit has joined #lisp
shrdlu68 has joined #lisp
damke has joined #lisp
fikka has joined #lisp
damke_ has quit [Ping timeout: 264 seconds]
visof has joined #lisp
nirved has joined #lisp
nowhere_man has quit [Ping timeout: 264 seconds]
<shka_> good day everyone
<beach> Hello shka_.
marusich has joined #lisp
<phoe> hey
<beach> Hello phoe.
JonSmith has joined #lisp
fdfdf has joined #lisp
jmercouris has quit [Ping timeout: 248 seconds]
mgsk has joined #lisp
JonSmith has quit [Ping timeout: 256 seconds]
sjl has joined #lisp
windblow has joined #lisp
fikka has quit [Ping timeout: 248 seconds]
lnostdal has joined #lisp
sjl has quit [Ping timeout: 240 seconds]
fikka has joined #lisp
milanj has quit [Quit: This computer has gone to sleep]
random-nick has joined #lisp
<paule32> hello
<paule32> i can't find the error:
<paule32> 1
<paule32> *** - SYSTEM::%STRUCTURE-REF: 1 is not a structure of type WIRE
thijso has joined #lisp
<jackdaniel> I doubt anyone will read into this atraciously formatted code
<beach> Certainly not me.
<beach> Some people never learn, it seems.
payphone has left #lisp ["ERC (IRC client for Emacs 24.5.1)"]
Amplituhedron has quit [Read error: Connection reset by peer]
<paule32> ok, i get it
quazimodo has quit [Ping timeout: 240 seconds]
<aeth> return-from?
<aeth> return-from works in functions, apparently. And apparently this works: (defun foo () (return-from foo 42) "Hi")
sjl has joined #lisp
_mjl has joined #lisp
red-dot has quit [Quit: Going offline, see ya! (www.adiirc.com)]
sjl has quit [Ping timeout: 252 seconds]
<aeth> I wonder if *any* package in Quicklisp uses return-from to return from a function
<Shinmera> _death: Confusing how? And yes, there's no lisp type, just a common-lisp one. I'll see about completion.
<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.
<aeth> each line can be one conditional. (cond ((and (= i1 0) (= i2 0)) 0) ...)
quazimodo has joined #lisp
<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.
markong has joined #lisp
<stylewarning> aeth: we use RETURN-FROM quite a bit in imperative code
JonSmith has joined #lisp
<stylewarning> aeth: it has been preferable to do things like (defun foo () (when condition (return-from foo 42)) [ ... long logic code ... ])
<stylewarning> you could use an IF/COND but it needlessly increases the nesting depth
<shrdlu68> paule32: Use "and" and "or" instead of chaining ifs like that.
red-dot has joined #lisp
<aeth> shrdlu68: This should probably be taken to #clnoobs where the exact same question was asked by paule32
<aeth> It's a good channel for this sort of thing
<stylewarning> aeth: is there a #python-noobs channel?
<aeth> considering how large Python is, probably
<stylewarning> idk, the main channel seems pretty noob friendly to me :)
sz0 has joined #lisp
<stylewarning> I hope we can be too.
hhdave has joined #lisp
<aeth> stylewarning: off topic here, but there is a ##python-friendly that is "like #python, but friendlier" according to its topic
<stylewarning> haha
<stylewarning> #lisp-but-not-so-curmudgeonly
JonSmith has quit [Ping timeout: 240 seconds]
<shrdlu68> return-from is a simple way to exit from necessarily complex functions with a given value.
<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
<stylewarning> shrdlu68: it can definitely be a code smell
<beach> Shinmera: I am willing to give them the benefit of the doubt, assuming they haven't seen the recurring behavior.
<Shinmera> beach: They've been in here long enough that they must have.
<beach> Hmm.
<aeth> Shinmera: I have seen paule32 in here once or twice before, iirc.
<stylewarning> I wonder if I can hijack beach's compiler work to help make static analyzers for code style
<stylewarning> something like a better lisp-critic
<beach> Sure, that might work.
<Shinmera> stylewarning: I wouldn't call it "hijack", I'm pretty sure such a thing is within his interests.
<stylewarning> Shinmera: I like using edgy words.
<stylewarning> xX_Styl3-Warn1ng_Xx, etc
Amplituhedron has joined #lisp
<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.
<aeth> I wonder what kind of code it is.
<aeth> Do you have any examples?
<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
djuber has quit [Ping timeout: 256 seconds]
<Shinmera> Over (almost) all of my projects I've used return-from exactly... 50 times.
<Shinmera> So that's extremely little.
eivarv has joined #lisp
<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>
<aeth> Shinmera: I was going to say that that's still quite a bit but then I remembered how large your Github is.
<stylewarning> sorry, not top-level in the usual sense, but top-level in the func def
<Shinmera> aeth: :)
marusich has quit [Ping timeout: 265 seconds]
<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.
<stylewarning> aeth: it's true with my CL as well. Ideally code is refactored that you can return to expression-oriented thinking
<aeth> Ah, good point, "expression-oriented thinking" is a nice way of putting it.
marusich has joined #lisp
<aeth> And just that does wind up changing a lot of small details.
quazimodo has quit [Ping timeout: 240 seconds]
eivarv has quit [Client Quit]
damke_ has joined #lisp
arbv has quit [Ping timeout: 240 seconds]
damke has quit [Ping timeout: 264 seconds]
oleo has joined #lisp
X-Scale has joined #lisp
X-Scale has left #lisp [#lisp]
eschatologist has quit [Ping timeout: 264 seconds]
Tobbi has joined #lisp
varjag has joined #lisp
eivarv has joined #lisp
<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)
eivarv has quit [Quit: Sleep]
arbv has joined #lisp
<azrazalea> ls
jmercouris has joined #lisp
damke has joined #lisp
zooey has quit [Ping timeout: 255 seconds]
damke_ has quit [Ping timeout: 264 seconds]
zooey has joined #lisp
arbv has quit [Ping timeout: 240 seconds]
pedh has joined #lisp
<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.
<azrazalea> (also hi, i've been gone forever (and for the most part still am) cause life and stuff)
<azrazalea> FWIW, i'm on the latest quicklisp dist
arbv has joined #lisp
<paule32> aeth: i get it
pedh has quit [Quit: pedh]
spacebat1 has joined #lisp
<borodust> wb azrazalea
spacebat1 is now known as sbat
<stylewarning> man oh man, old lisp code from ca. 1980s is so terrible. Half the files are custom load scripts
hhdave has quit [Quit: hhdave]
<azrazalea> borodust: Thanks <3. I'll probably dissapear again for a bit. I _do_ plan on being around again once my life settles.
<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)
<azrazalea> Still got a game to right after all :)
<azrazalea> write*
sjl has joined #lisp
<azrazalea> Though, my next lisp will be a slackbot
arbv has quit [Ping timeout: 264 seconds]
sjl has quit [Ping timeout: 256 seconds]
arbv has joined #lisp
eivarv has joined #lisp
quazimodo has joined #lisp
arbv has quit [Ping timeout: 260 seconds]
red-dot has quit [Quit: Going offline, see ya! (www.adiirc.com)]
red-dot has joined #lisp
arbv has joined #lisp
scymtym has quit [Ping timeout: 252 seconds]
attila_lendvai has joined #lisp
marusich has quit [Ping timeout: 252 seconds]
marusich has joined #lisp
void_pointer has joined #lisp
attila_lendvai has quit [Quit: Leaving.]
attila_lendvai has joined #lisp
arbv has quit [Quit: ZNC - http://znc.in]
arbv has joined #lisp
pedh has joined #lisp
turkja has joined #lisp
arbv has quit [Ping timeout: 240 seconds]
troydm has quit [Quit: What is Hope? That all of your wishes and all of your dreams come true? To turn back time because things were not supposed to happen like that (C) Rau Le Creuset]
arbv has joined #lisp
scymtym has joined #lisp
pedh has quit [Quit: pedh]
fikka has quit [Ping timeout: 268 seconds]
eivarv has quit [Quit: Sleep]
fikka has joined #lisp
<Xach> borodust: where to put this badge? like make a png and host it to include in readme.md or something?
* Xach likes this idea
shifty has quit [Ping timeout: 240 seconds]
<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.
<Shinmera> Yeah that's the idea
<Xach> I don't have a good way to link to the latest status, though.
eivarv has joined #lisp
dcluna has quit [Ping timeout: 264 seconds]
fikka has quit [Ping timeout: 256 seconds]
dcluna has joined #lisp
atgreen has joined #lisp
marusich has quit [Quit: Leaving]
aindilis` has quit [Ping timeout: 264 seconds]
<Xach> hmm
fikka has joined #lisp
<Shinmera> Would need a redirect thing that goes to the latest page.
JonSmith has joined #lisp
<borodust> Xach: yeah, like return different png/svg by the same url depending on the build status
<borodust> Xach: like those on top of readme here: https://github.com/borodust/bodge-chipmunk/blob/master/README.md
<borodust> url is always the same but services return different images depending on the build status
<Shinmera> borodust: Usually you want to have a link to the respective project's page as well
red-dot has quit [Quit: Going offline, see ya! (www.adiirc.com)]
<Shinmera> so you do need a page that can redirect to the latest report
<borodust> Shinmera: that would be awesome too
red-dot has joined #lisp
<borodust> but at least having a status is already very nice!
<Xach> I'll look into S3 redirects. Maybe they're more straightforward than I remember
JonSmith has quit [Ping timeout: 240 seconds]
<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.
<shrdlu68> clhs 6.1.1.6
<beach> They are executed in the order they appear.
<shrdlu68> Great! Thanks beach
<ebrasca> Hi
<beach> Hello ebrasca.
<shrdlu68> ebrasca: Good afternoon!
<beach> shrdlu68: The WHILE clause should be seen as a terminate-if-false.
khisanth__ has joined #lisp
sz0 has quit [Quit: Connection closed for inactivity]
schoppenhauer has quit [Ping timeout: 248 seconds]
atgreen has quit [Quit: atgreen]
khisanth_ has quit [Ping timeout: 240 seconds]
schoppenhauer has joined #lisp
pagnol has joined #lisp
eivarv has quit [Quit: Sleep]
fikka has quit [Ping timeout: 240 seconds]
_mjl has quit [Ping timeout: 252 seconds]
solyd has joined #lisp
eivarv has joined #lisp
BitPuffin has joined #lisp
oleo has quit [Ping timeout: 252 seconds]
eivarv has quit [Quit: Sleep]
wigust- has quit [Ping timeout: 260 seconds]
Folkol has joined #lisp
<stylewarning> I’m really interested in having a statically typed eDSL in Lisp
<stylewarning> I wonder if there’s an expedient way to compile something like Standard ML into Lisp with existing implementations.
fikka has joined #lisp
<scymtym> stylewarning: you may be interested in http://www.ccs.neu.edu/home/stchang/pubs/ckg-popl2017.pdf
oleo has joined #lisp
<stylewarning> scymtym: cool, haven’t seen it
samla has joined #lisp
Murii has quit [Quit: WeeChat 1.4]
Achylles has joined #lisp
dddddd has joined #lisp
EvW has joined #lisp
samla has quit [Quit: Mutter: www.mutterirc.com]
Folkol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
solyd has quit [Quit: solyd]
shrdlu68 has quit [Remote host closed the connection]
samla has joined #lisp
<phoe> Can I have two separate inspectors in slime?
<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.
Murii has joined #lisp
samla has quit [Ping timeout: 256 seconds]
selesdepselesnul has joined #lisp
pagnol has quit [Ping timeout: 256 seconds]
shrdlu68 has joined #lisp
red-dot has quit [Quit: Going offline, see ya! (www.adiirc.com)]
shrdlu68 has quit [Ping timeout: 252 seconds]
shrdlu68 has joined #lisp
shrdlu68 has quit [Ping timeout: 268 seconds]
kamog has joined #lisp
shrdlu68 has joined #lisp
random-nick has quit [Remote host closed the connection]
vap1 has quit [Ping timeout: 240 seconds]
random-nick has joined #lisp
fikka has quit [Ping timeout: 264 seconds]
megachombass has joined #lisp
<megachombass> pjb: you there?
red-dot has joined #lisp
zazzerino has joined #lisp
rumbler31 has joined #lisp
fikka has joined #lisp
shrdlu68 has quit [Ping timeout: 240 seconds]
pjb has joined #lisp
pjb has quit [Remote host closed the connection]
pjb has joined #lisp
dieggsy has joined #lisp
wigust has joined #lisp
<phoe> megachombass: feel free to post your questions publicly
nowhere_man has joined #lisp
<beach> phoe: You don't understand what you are asking.
<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.
dieggsy has quit [Remote host closed the connection]
atgreen has joined #lisp
<pjb> megachombass: I'm here!
shrdlu68 has joined #lisp
dieggsy has joined #lisp
<pjb> megachombass: To see if pjb is here, you can use the command: /whois pjb
EvW has quit [Ping timeout: 252 seconds]
djuber has joined #lisp
djuber has quit [Read error: Connection reset by peer]
shrdlu68 has quit [Ping timeout: 240 seconds]
<megachombass> i was trying to implement what you told me yestarday
<jmercouris> beach: lol :D
<megachombass> but got some troubles
nowhere_man has quit [Ping timeout: 256 seconds]
<pjb> troubles occur.
<jmercouris> I find it best to usually just describe the problem instead of just mentioning it :P
<pjb> It's a rare occurence, when somebody asks a question on irc without having some troubles…
<megachombass> meh, i think i will just not send this VM and fk this ill have a 0
<megachombass> on the state this is, he gonna notice is copy pasta and i risk way more than a 0
<pjb> megachombass: it's the week end, our telepathic powers are low.
<jmercouris> megachombass: I have literally no idea what it is you are trying to say
<phoe> megachombass: post your problem instead of complaining about it. this way we might actually be able to help you.
<jmercouris> phoe: I think beach was right
<pjb> If you asked a question about your troubbles, we could help, but just stating trivia won't.
scottj has joined #lisp
<pjb> beach's always right.
<beach> Heh.
<phoe> jmercouris: I am slowly starting to think the same.
<jmercouris> except for when he's wrong :P
<drdo> I too have troubles
shrdlu68 has joined #lisp
<jmercouris> Don't we all have our own troubles in one way or another?
<pjb> drdo: I once wrote the specifications for a drdo.
<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
<drdo> pjb: There's more of me? I must meet them at once!
<jmercouris> megachombass: I think you should drop the class
<megachombass> im alone on this project, and i doubt that in the 30h left i have, i can code something correct
<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
<megachombass> sadly if i dropp that class, i have to drop university
<megachombass> and more i look at it, more i think its going to be the case
<pjb> drdo: sorry, indeed, it was MrDo, not DrDo. https://pausescreen.files.wordpress.com/2010/11/mr-do-snes.jpg
<pjb> drdo: uniqueness restored.
<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
<jmercouris> We won't give you the answers per se, at least I won't, but I will try to guide you through it
<pjb> megachombass: don't be too pessimistic.
<pjb> megachombass: did you try to introduce abstractions as I explained?
<megachombass> ive tried a bit, sadly i run into issues in implementing it
<pjb> If you asked about those issues, we could help, but you keep talking about irrelevant things, like troubles and university dropping.
<pjb> This is #lisp, not #university-life
<megachombass> if you're up to follow step by step how im trying to implement it, then there is still a chance
shrdlu68 has quit [Ping timeout: 256 seconds]
theBlackDragon has quit [Remote host closed the connection]
<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.
warweasle has joined #lisp
jack_rabbit has quit [Ping timeout: 246 seconds]
<megachombass> then lets try it module by module. starting by the choice of the structure. i like the defstruct
milanj has joined #lisp
<megachombass> most likely because its sounds like C
selesdepselesnul has quit [Quit: Leaving]
<pjb> Great.
hhdave has joined #lisp
<pjb> Do you have tests?
<pjb> If you modify your program, how do you ensure it still works?
<jmercouris> pjb: Tests are for the weak
<jmercouris> in case it isn't clear to everyone, I am joking
<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.
<pjb> Strong AI says: yes.
<jmercouris> Bike: Unless of course they didn't attend the class or pay attention
<Bike> i'm being charitable.
<pjb> Well, we see only one asking about this project, so…
hhdave has quit [Ping timeout: 248 seconds]
hhdave has joined #lisp
eivarv has joined #lisp
jack_rabbit has joined #lisp
fikka has quit [Ping timeout: 252 seconds]
<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
<megachombass> so
<megachombass> ive created a VM struct.
<megachombass> btw this site codeshare.io is great as everyone with the link can interact with the code in real time
<beach> *sigh*
shrdlu68 has joined #lisp
<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
<jmercouris> why is that?
<beach> Maybe you need to use DEL instead of backspace.
<jmercouris> I should clarify that I am on a mac, and I don't actually have a backspace key
<jmercouris> it says "delete"
<jmercouris> but not in the sense that it deletes forward
<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"
<dim> you might recon the UTF-8 BOM, as in https://en.wikipedia.org/wiki/Byte_order_mark#UTF-8
<dim> what's the canonical way to deal with that in CL?
<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.
rumbler31 has quit [Remote host closed the connection]
red-dot has quit [Quit: Going offline, see ya! (www.adiirc.com)]
red-dot has joined #lisp
<megachombass> and for testing if my code still works.... one sec i create a test at the end of the file.
<dim> using (format nil "~{~x~^ ~}" (list (read-byte s) (read-byte s) (read-byte s))) shows "EF BB BF", more to the point maybe
<dim> (with opening the file with :element-type '(unsigned-byte 8))
<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?
<jmercouris> megachombass: this is some of the strangest looking lisp i've seen with hanging indent parens
eivarv has quit [Quit: Sleep]
<megachombass> added a fibo test at the end of the file.
<megachombass> jmercouris: i used emacs to indent! ive learnt that lesson :P
<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?
<megachombass> be sure i would've never chosen a language i dont know to make this
<megachombass> it have to be in lisp
shrdlu68 has quit [Ping timeout: 240 seconds]
capitaomorte has joined #lisp
<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
<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.
<Bike> did your class teach you lisp, at all?
shrdlu68 has joined #lisp
<jmercouris> pjb: It only occurs in ansi-term in emacs, so far on #emacs, the best help I've gotten was "lololol"
fikka has joined #lisp
<pjb> jmercouris: if you don't check "Delete sends Control-H", then you should stty erase ^?
<pjb> jmercouris: if you check "Delete sends Control-H", then you should stty erase ^H
<pjb> jmercouris: Now what occurs in emacs, remains in emacs.
<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?
<jmercouris> Not sure, let me investigate
<pjb> jmercouris: do you run emacs in a terminal?
<jmercouris> no, I run GUI emacs
<pjb> ok.
<pjb> megachombass: the point of the exercise, is to make you write lisp from scratch! How would you learn lisp otherwise?
eivarv has joined #lisp
<megachombass> pjb: with examples
<pjb> megachombass: then you only learn to read, not to write.
<megachombass> added the instructions to see if the test works
<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.
<megachombass> if you think classmates are gonna share something haha
<megachombass> well, so after the struc is created
<megachombass> i read the pastebin you wrote yesterday
vap1 has joined #lisp
vaporatorius has joined #lisp
vaporatorius has joined #lisp
<megachombass> pjb: (defun vm-R0 (VM) (get VM :R0)) will not work with a struct i guess
<Bike> uh, yeah, i do think that?
<jmercouris> My classmates were always really helpful
<megachombass> we were 3 classmates on this project, other 2 literally left me alone coz they abandonated
<jmercouris> Maybe I got lucky, but I think that generally people in this world are good, if not at least neutral
<megachombass> i will try my best to have atleast something to present
<pjb> megachombass: the defstruct will define a function named vm-r0 already.
<jmercouris> Should your teacher not take into account that the other 2 have dropped out?
<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.
<pjb> megachombass: try: (let ((*print-circle* nil)) (pprint (macroexpand '(defstruct vm r0 r1 r2 r3 pc sp fp))))
<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
<Shinmera> jmercouris: This already is the extension
<jmercouris> Well then, hindsight is 20/20 I guess
<pjb> It is assumed that students at university level be autonomous. Basically, teachers say: learn this. and the student go and learn this.
<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…
<jmercouris> pjb: I guess this is probably true in France, and the comments are in French, so I assume this student is also French, so you're probably right, in the US it is a different story
<jmercouris> in the US we pay a lot of money for education, and we expect that the teachers teach
<pjb> There's no need for a boring teacher reading the tutorial aloud. You can use your TextToSpeak app for that.
<megachombass> in france university is free, and i guess thats why teachers dont give a fk
<pjb> On the other hand, if the student doesn't start early, he cannot come to the teacher with his questions soon enough.
<megachombass> well, pprint prints alot of stuff, but i guess nothing interesting as ive not set values to it
<pjb> megachombass: in that you should see a defun vm-r0
<megachombass> let me see
<megachombass> yes, it has created some defun
<megachombass> so this has autogenerated ascessors for that struct right?
<pjb> therefore you can remove the old vm-r0 from your sources. And all the similar function that have been generated by the defstruct macro.
<pjb> Yes.
<megachombass> but, the functions are not generated in my sources?
<pjb> If you put the defstruct in your sources, yes they will be.
turkja has quit [Ping timeout: 246 seconds]
<megachombass> well, i have put the defstruct in my source, and the soruce is still the same
<pjb> So, in lisp, defstruct does more than a C struct. In C, it only declares a type. In Common Lisp, it also defines utility functions: a constructor, a copier, accessors, a serializer and deserializer.
<megachombass> even after load
<pjb> yes.
<pjb> Just put the defstruct at the beginning of your file.
<megachombass> with the (let ((*print-circle* nil)) (pprint (macroexpand '(defstruct vm r0 r1 r2 r3 pc sp fp)))) ? or that is just for me to se in lisp interpreter whats going on?
<pjb> the later.
<megachombass> okey so i just put defstruct and load the file, and it should add functions to my source
<megachombass> lets ee
<megachombass> see*
<pjb> but erase the old functions such as vm-r0, otherwise they will override the one defined by the defstruct.
EvW1 has joined #lisp
<megachombass> i dont have any vm-r0. what is the equivalent in my code?
<pjb> If you don't have it, then it's good.
<pjb> Now you need to replace the occurences of (get vm :foo) by (vm-foo vm)
<megachombass> https://codeshare.io/GkwJYA <== all changes i apply on my sourcecode are updated there
<megachombass> ive added the struct def and the start of my file, loaded file, still everything the same on source
<pjb> DeuxiemeElement is not an abstraction. There is already first, second, third, … tenth in CL.
<pjb> Replace (get VM :PC) by (vm-pc vm) everywhere. And similarly for all the (get VM …)
<megachombass> okey one sec
<pjb> An instruction is not composed of elements. It's composed of an operand, an argument and a second argument.
<beach> I hope this assignment is due soon.
<pjb> Elements are what are in list, and Lisp, being a List Processing language, already provide functions to operate on lists such as first rest member second third etc.
<pjb> beach: -29 hours.
<megachombass> i have untill tomorrow midnight
<megachombass> well give me a sec to apply the changes
<pjb> Clearly, it was intended for you to learn lisp and program the assignment during the Christmas holidays.
<megachombass> yes, but it wasnt the only assignement
<megachombass> knowing all exams were past week
<megachombass> i will pass everything but this nightmare
<megachombass> hum
attila_lendvai has quit [Ping timeout: 240 seconds]
eivarv has quit [Read error: Connection reset by peer]
varjag has quit [Ping timeout: 256 seconds]
<beach> I don't believe the story about not being taught the language for a second.
hifitim has joined #lisp
<jackdaniel> weaseling from assignments isn't a noble thing to do ,) especially that it misses the point
<jackdaniel> assignments are not something to be finished but rather a mean to a goal of understanding something
<shrdlu68> Those of us who didn't learn to code in class look on in bewilderment.
eivarv has joined #lisp
attila_lendvai has joined #lisp
igemnace has joined #lisp
vlatkoB has joined #lisp
attila_lendvai has quit [Client Quit]
turkja has joined #lisp
saemcro has joined #lisp
varjag has joined #lisp
<shrdlu68> Back in school I used to hate the exam season because it meant I could code less. Also because the libraries, usually serene hide-outs, would see a sudden surge in visitors.
hifitim has quit [Quit: Leaving]
asarch has joined #lisp
<jackdaniel> on the other hand being honest that it is an assignment is much better than trying to lie that it is not
varjag has quit [Ping timeout: 268 seconds]
brendyn has quit [Ping timeout: 268 seconds]
Kevslinger has joined #lisp
orivej has joined #lisp
jmercouris has quit [Ping timeout: 240 seconds]
dieggsy has quit [Remote host closed the connection]
<megachombass> by remplacing
<megachombass> seems this gives problems
<megachombass> (defun make-vm (&optional (vm 'vm) (tmem 10000)) ;;ca initialise les "variables" (setf (vm-vm) vm)
<megachombass> it says *** - EVAL/APPLY: Too few arguments (1 instead of at least 2) given to (SETF VM-VM)
dieggsy has joined #lisp
<megachombass> (defun make-vm (&optional (vm 'vm) (tmem 10000)) (setf (vm-vm) vm))
red-dot has quit [Quit: Going offline, see ya! (www.adiirc.com)]
<megachombass> let me update the state of the code
red-dot has joined #lisp
<megachombass> if i execute (test 'test') it fks up there
<megachombass> (test 'test)
<pjb> megachombass: defstruct also creates a make-vm function.
<pjb> Try it!
<megachombass> the thing is i still dont see the functions created as you said
<megachombass> check the code, thats how my source is
<pjb> (vm-SP) must be written (vm-SP vm), and (setf (vm-SP vm) (+ (vm-SP vm) 1)) can be written (incf (vm-sp vm))
<pjb> megachombass: it's in the macroexpansion!
Rawriful has joined #lisp
<megachombass> oh so the functions are created but i can only see them by printing right?
<pjb> yes.
<megachombass> then i could wait for years
<megachombass> well, let me rechange all the (vm-SP) by (vm-SP vm) see if it works
<pjb> For the simple fields, you can give an initial value in the defstruct form.
<pjb> For fields needing more complex initialization, you can wrap another constructor: https://codeshare.io/2pzoLX
<pjb> There are other ways to do it, but for now this will do.
scottj has quit [Quit: leaving]
tkd has quit [Ping timeout: 256 seconds]
<pjb> megachombass: merge resetmemory with make-vm-with-memory-size: https://codeshare.io/2pzoLX
turkja has quit [Ping timeout: 240 seconds]
visof has quit [Ping timeout: 256 seconds]
rumbler31 has joined #lisp
tkd has joined #lisp
<pjb> Then: (make-vm-with-memory-size 100) --> #S(vm :r0 0 :r1 0 :r2 0 :r3 0 :pc 99 :lc 99 :sp 100 :fp 0 :dpp 0 :de 0 :dpg 0 :taille 100 :memtab #(0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0) :etiq #<hash-table :test eql size 0/107 #x302005C1DC9D> :etiqnr #<hash-table :test eql size
<pjb>
<pjb> #x302005C1D2FD>)
<pjb> What prints #S(vm …) is the "serializer", the printer function that is defined by defstruct for the structure. This syntax can be read back. (But #< cannot, so you would have to use #.(make-hash-table) instead.
<megachombass> hum
<pjb> You need to update the code using make-vm, of course. For example: https://codeshare.io/2pzoLX
<megachombass> but this suposes that i cant have only 1 vm running
<megachombass> as you dont name it as a parameter in the new make-vm function
<pjb> (list (make-vm-with-memory-size 4) (make-vm-with-memory-size 10)) #| --> (#S(vm :r0 0 :r1 0 :r2 0 :r3 0 :pc 3 :lc 3 :sp 100 :fp 0 :dpp 0 :de 0 :dpg 0 :taille 4 :memtab #(0 0 0 0) :etiq #<hash-table :test eql size 0/31 #x302005C7E56D> :etiqnr #<hash-table :test eql size 1/31 #x302005C7E16D>) #S(vm :r0 0 :r1 0 :r2 0 :r3 0 :pc 9 :lc 9 :sp 100 :fp 0 :dpp 0 :de 0 :dpg 0 :taille 10 :memtab #(0 0 0 0 0 0 0 0 0 0) :etiq #<hash-table :tes
<pjb> size 0/31 #x302005C7DC5D> :etiqnr #<hash-table :test eql size 1/31 #x302005C7D85D>)) |#
<pjb> You can have as many VM as you want.
<pjb> Just call make-vm-with-memory-size again.
<pjb> make-vm is a constructor, it returns a new VM each time it's called.
<pjb> make-vm-with-memory-size too.
turkja has joined #lisp
vap1 has quit [Quit: Leaving]
orivej has quit [Ping timeout: 256 seconds]
<megachombass> oh, indeed
<megachombass> let me a couple minutes to assimilate what you've wrrient
namosca has joined #lisp
<megachombass> written*
namosca has left #lisp [#lisp]
<pjb> If you wanted to simulate a multi-processor system, you could even create multiple VM with the same memory! :-)
fisxoj has joined #lisp
<pjb> megachombass: notice that the vm-taille field is useless, since (vm-taille vm) == (length (vm-memtab vm))
JonSmith has joined #lisp
fisxoj has quit [Client Quit]
<pjb> If you need to use it, you can (defun vm-taille (vm) (length (vm-memtab vm))) and remove it from the field. This way you would ensure that it is always automatically the right value.
puchacz has joined #lisp
theBlackDragon has joined #lisp
<megachombass> EVAL/APPLY: Trop d'arguments pour MAKE-VM.
<megachombass> as you calling make-vm in your make-vm-with size it fks up there
JonSmith has quit [Ping timeout: 256 seconds]
<megachombass> but why call make-vm in make-vm-with size if the VM have already default values when creating the struct?
milanj has quit [Quit: This computer has gone to sleep]
jonh has joined #lisp
<megachombass> pjb: also, you're not resetting the memory of the vm in this function
eivarv has quit [Quit: Sleep]
warweasle has quit [Quit: Leaving]
Arcaelyx has joined #lisp
<megachombass> pjb: hit me up when you're back, since ive literally fked up my source code and cant manage to make coexist your make-vm-with-memory-size with the rest of the code
capitaomorte has quit [Remote host closed the connection]
Oladon has joined #lisp
EvW1 has quit [Ping timeout: 252 seconds]
hhdave has quit [Ping timeout: 256 seconds]
hhdave has joined #lisp
<flip214> does CL-SQL include some function that, given the database structure and two tables A and B, gives a query relating both, even across multiple joins?
<flip214> I'm aware that such a join might be possible across multiple ways, so returning a list of queries would be okay, too.
<flip214> The usecase is for some generic web frontend - given a user, show the records that may be accessed (by relations to the user record)
<flip214> So I guess this would be using CLOS/MOP (or the SQL structure directly)
ghast has joined #lisp
solyd has joined #lisp
Pixel_Outlaw has joined #lisp
red-dot has quit [Quit: Going offline, see ya! (www.adiirc.com)]
red-dot has joined #lisp
<ghast> hello. sbcl question. is it okay to do (sb-ext:save-lisp-and-die "core") a proper way to get a core file for SBCL ? it seems to fail after loading cl-json into the image
<phoe> ghast: how does it fail?
turkja has quit [Ping timeout: 256 seconds]
warweasle has joined #lisp
<ghast> where can i paste the output ?
<flip214> http://quickdocs.org/clsql-orm/ is the sentence "Of course, database-type has to be :postgresql." still true, or are other DBs supported as well?
<flip214> ghast: paste.net, pastebin.com, etc.
<phoe> flip214: a brief look at the source states that there is code for handling several databases
<flip214> phoe: thanks, I found a clsql-mysql-introspect, too... I'd need something for Oracle, though.
<flip214> ghast: which SBCL version?
<ghast> SBCL 1.3.12
<phoe> ghast: show us a backtrace
<flip214> hmmm... can you do an upgrade? that's a bit old already, not sure whether someone has that version around to do investigations
<phoe> and also update to a newer SBCL
<ghast> how can i give you a backtrace ?
<phoe> in SBCL error prompt, type BACKTRACE
<paule32> hello
<phoe> the debugger should give you a backtrace.
<paule32> is it possible to make names at runtime?
<paule32> like: (alias (dotimes (n 11) (gate-and-n)) gate-and)
<phoe> paule32: I suggest you go to #clnoobs.
<_death> Shinmera: in elisp an optional parameter cannot take a default value in the arglist
<pjb> megachombass: EVAL/APPLY: Trop d'arguments pour MAKE-VM. probably comes from the fact that you overrode the make-vm function defined by defstruct!
<phoe> ghast: this is an error in SAVE-LISP-AND-DIE, seems like something very internal to SBCL.
<phoe> Update, and try again.
nyef has quit [Ping timeout: 264 seconds]
<ghast> mmmh, i see. obscure stuff right ?
zooey has quit [Ping timeout: 255 seconds]
<phoe> ghast: I have no idea.
<phoe> If it's a bug in SBCL, then it might already have been fixed.
<phoe> Therefore, update first, and if it still fails, file a bug ticket on SBCL.
<megachombass> pjb: yes, i noticed i didnt errase my make-vm. now the thing is, it cant make the hashtables as its says etiq and etiqnr are not symbols: :ETIQ #S(HASH-TABLE :TEST FASTHASH-EQL) :ETIQNR #S(HASH-TABLE :TEST FASTHASH-EQL (NB . 0))) is not a symbol
<ghast> some weird combination of using cl-json before dumping the image just makes my sbcl go mad. i'll try updating sbcl later and see what happens
<ghast> perhaps that might fix it. (i hope).
<phoe> ghast: let's hope so.
<phoe> if it doesn't, then file a bug ticket.
<phoe> or rather, ask on #sbcl first.
<pjb> megachombass: the reason why call make-vm in make-vm-with-memory-size is to allocate the memtab abd the hash-tables. You're right that this can be avoided, but as I said, it would require more sophisticated lisping such as https://codeshare.io/2pzoLX ; but since you're a newbie, I wanted to preset the simplier code.
<phoe> then file a bug ticket.
<pjb> megachombass: with that new defstruct, you don't need make-vm-with-memory-size, and instead, you can call (make-vm) for a default size of 1000 or (make-vm 10000) to specify the size.
asarch has quit [Remote host closed the connection]
misv has quit [Quit: leaving]
<ghast> phoe: ok, thanks bro!
<megachombass> let me see
asarch has joined #lisp
<_death> ghast: what is your sbcl version
zooey has joined #lisp
<pjb> megachombass: when you have errors saying that a list is not a symbol, it probably comes from an error in the parentheses.
<_death> ghast: ah, you already mentioned.. an ancient version
fikka has quit [Ping timeout: 265 seconds]
<pjb> megachombass: in emacs, you can type C-M-< M-x replace-regexp (get vm :\([a-z0-9]*\)) RET (vm-\1 vm) RET to replace the old calls to the new calls.
fikka has joined #lisp
<megachombass> y pretty sure it was a fail with one of my remplacements
<megachombass> im going to start over again
scymtym has quit [Ping timeout: 252 seconds]
<megachombass> says me C-M-< is undefined
<ghast> ok, it works in the new version :). [solved]
Myk267 has joined #lisp
smurfrobot has quit [Remote host closed the connection]
<zazzerino> megachombass: try shift+alt+< then M-x replace-regexp ...
fikka has quit [Ping timeout: 256 seconds]
<zazzerino> or actually, C-x h would be better
<zazzerino> it should select the entire buffer, then you can run M-x replace-regexp ... on the selected region
eivarv has joined #lisp
<megachombass> ok so i try again
<megachombass> i select the whole buffer
<pjb> megachombass: https://codeshare.io/2pzoLX
<pjb> You need to replace the last (get vm …) which are used to get and set slots by name.
fikka has joined #lisp
<pjb> cf. the property and (setf property) functions.
<pjb> megachombass: when you launch emacs, it tells you to read the tutorial by typing Control-h t. In the tutorial, you will learn what C-M-< means.
<megachombass> c-m-< is control+alt+< ?
<pjb> No, not on my keyboard.
<pjb> My keyboard distinguishes Meta- from Alt-.
<pjb> In emacs, key chords are given symbolically, because the actual mapping vary and is configurable.
<pjb> For example, you could have to type Escape, Control-Shift-comma for C-M-<
<megachombass> hum
<pjb> The truth is that is the command: beginning-of-buffer You can run this command by typing: M-x beginning-of-buffer RET
<megachombass> well alt+x opens the command
<pjb> then emacs would tell you what keychord could be used (in the minibuffer).
<megachombass> there i can type replace-regexp
<megachombass> then i guess i can put (get vm :\([a-z0-9]*\)) RET (vm-\1 vm)
<pjb> you can also ask it with C-h w
<pjb> C-h w beginning-of-buffer RET or read the whole documentation with C-h f beginning-of-buffer RET
<pjb> yes
nika has quit [Quit: Leaving...]
<megachombass> seems he wants to replace (get vm :\([a-z0-9]*\)) RET (vm-\1 vm) RET with something
fikka has quit [Ping timeout: 268 seconds]
ghast has left #lisp ["ERC (IRC client for Emacs 25.2.1)"]
<pjb> megachombass: what the tutorial told you about "RET" ?
fikka has joined #lisp
<megachombass> i cant even open the tutorial jesus
<megachombass> wait a sec i reopen everything
<megachombass> as C+g doesnt put me back on my code
<zazzerino> pjb: you are truly a saint
<pjb> megachombass: I said: Control-h t
<megachombass> it opens me the todolist
<megachombass> i guess the todo list isnt the tutorial
<pjb> It should open the tutorial.
<pjb> instead you can type: M-x emacs-tutorial RET
Myk267 has quit [Quit: Leaving]
<megachombass> and thing is this todo list overrides my source code, and dont know how to go backwards
<pjb> Well, RET is not mentionned in the tutorial apparently.
<pjb> It means: "press the Return key".
solyd has quit [Ping timeout: 264 seconds]
<megachombass> oh
<megachombass> so
<pjb> megachombass: you can manipulate windows with C-x 1, C-x 2, C-x 3, C-x 0, C-x o and C-x B and C-x b
<pjb> C-u C-x C-o is also useful when you have more than 2 windows open.
nowhere_man has joined #lisp
Karl_Dscc has joined #lisp
<megachombass> so
<megachombass> i select everything with C-x h
<megachombass> open command line with M-x
<megachombass> i type replace regex
<megachombass> done
<megachombass> it ask me what i want to replace
<megachombass> i type in (get vm :\([a-z0-9]*\))
<megachombass> but if i press return
<megachombass> obviousy it deletes my last character
<megachombass> i doubt that's what i want to do
<pjb> Then it asks for the replacement.
<pjb> (vm-\1 vm)
<megachombass> nvm
<megachombass> return= enter
fikka has quit [Ping timeout: 248 seconds]
<megachombass> 86 ocurrencies
<megachombass> ok ok, now atleast i know how to remplace with regular expresions with emacs
<pjb> But now if you search for (get vm you will see that there remains 3 of them.
<megachombass> im really gonna learn more about emacs and lisp after my project. i just cant accept to feel so dumb
<pjb> megachombass: to search use C-s
<pjb> C-s (get vm RET
<pjb> Then C-s C-s etc to skip to the following occurences.
red-dot has quit [Quit: Going offline, see ya! (www.adiirc.com)]
fikka has joined #lisp
red-dot has joined #lisp
<megachombass> yep
<megachombass> so i still have 3 ocurrencies
scymtym has joined #lisp
smurfrobot has joined #lisp
<pjb> megachombass: check the property and (setf property) functions in the paste.
<pjb> megachombass: you can replace those get with property.
<megachombass> noticed you've forgoten BP each time
rumbler31 has quit [Remote host closed the connection]
Kevslinger has quit [Quit: Connection closed for inactivity]
<pjb> megachombass: you forgot it too, since I copy/pasted…
<pjb> Add whatever you want.
<megachombass> i maybe forgot it to then, my bad
<megachombass> well one sec
<pjb> It's important to keep all the definition relevant to a single abstraction together, so you can easily keep consistency, when you make such modifications.
smurfrobot has quit [Ping timeout: 260 seconds]
<megachombass> so (get vm adr) becompes (proprety (vm adr)) ?
<pjb> (property vm adr)
<pjb> the property function takes 2 arguments. Why are you trying to pass only 1?
<megachombass> oh yes
<megachombass> so used to call a function like fun(x,y) as in other languages
fikka has quit [Ping timeout: 260 seconds]
fikka has joined #lisp
easieste has joined #lisp
smurfrobot has joined #lisp
<megachombass> okey, so let me update current code
<megachombass> i have the same error as before
<megachombass> :ETIQ #S(HASH-TABLE :TEST FASTHASH-EQL (FIBO . 9999)) :ETIQNR #S(HASH-TABLE :TEST FASTHASH-EQL (NB . 0))> is not a symbol
<megachombass> i have to rechange my useless functions and use first second etc
smurfrobot has quit [Ping timeout: 264 seconds]
easieste has quit [Quit: easieste]
drewc has joined #lisp
drewc_ has quit [Ping timeout: 248 seconds]
EvW has joined #lisp
pjb` has joined #lisp
pjb has quit [Ping timeout: 240 seconds]
fikka has quit [Ping timeout: 256 seconds]
<pjb`> megachombass: perhaps you have old code in the image that's interfering.
<pjb`> megachombass: try to reboot your lisp.
pjb` is now known as pjb
omilu has joined #lisp
<megachombass> going to try
fikka has joined #lisp
<makomo> megachombass: how long until the deadline?
warweasle has quit [Quit: Leaving]
<megachombass> tomorrow midnight
<makomo> hah, i also have a deadline on that exact date
<megachombass> for the same thing?
<makomo> but since i'm in a team with another guy and we split our work, it's his worry
<makomo> hm, well, almost. it's also compiler-related
<makomo> but it's a simple C-like language
<makomo> i wrote the semantic analyzer last time, he's writing the codegen today
<megachombass> pjb: on fresh Clisp. i load the file, then (test) and still same eror
<pjb> Try: (compile-file "your-file.lisp") and see if you get compilation errors.
<megachombass> 0 error 38 warningsq
shifty has joined #lisp
Myk267 has joined #lisp
<pjb> Correct all those warnings.
<pjb> Using the ccl compiler, I get more serious errors, on your file.
<megachombass> hum
fikka has quit [Ping timeout: 260 seconds]
<megachombass> hence the old version was working, was returning 5
<megachombass> wich is fibo of 5
fikka has joined #lisp
atgreen has quit [Quit: atgreen]
<pjb> This is why it's important to have a test! :-)
<pjb>
<pjb> So now you know there's a regression, and you need to debug the modifications.
atgreen has joined #lisp
<pjb> How many warnings remaining?
atgreen has quit [Client Quit]
<megachombass> brb in 20 mins
<makomo> can very much agree with what pjb said, having a test suite to run after you make a change is great
smurfrobot has joined #lisp
<cryptomarauder> any lisp blockchains yet?
<cryptomarauder> lispchains
smurfrobot has quit [Ping timeout: 240 seconds]
gilez has joined #lisp
dented42 has joined #lisp
<zazzerino> sure, the beautifully named "Scheme Coin". https://gist.github.com/BusFactor1Inc/8a4dd842fdab81d84cfa8138a56b1725
ebzzry has quit [Ping timeout: 240 seconds]
fikka has quit [Ping timeout: 260 seconds]
<zazzerino> Also, there's a list dialect that targets the ethereum platform. It's called "Pyramid Scheme". http://www.michaelburge.us/2017/11/28/write-your-next-ethereum-contract-in-pyramid-scheme.html
<stylewarning> billstclair wrote a nice ledger program
random-nick has quit [Quit: quit]
Folkol has joined #lisp
smurfrobot has joined #lisp
red-dot has quit [Quit: Going offline, see ya! (www.adiirc.com)]
Amplituhedron has quit [Read error: Connection reset by peer]
red-dot has joined #lisp
dented42 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rumbler31 has joined #lisp
smurfrobot has quit [Ping timeout: 256 seconds]
Admin_ has joined #lisp
<megachombass> im back
<megachombass> time to fix all those warnings
windblow has quit [Ping timeout: 265 seconds]
kamog has quit [Quit: Leaving.]
fikka has joined #lisp
kini has quit [Quit: No Ping reply in 180 seconds.]
damke_ has joined #lisp
kini has joined #lisp
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
fikka has quit [Ping timeout: 252 seconds]
arbv has quit [Ping timeout: 276 seconds]
damke has quit [Ping timeout: 263 seconds]
arbv has joined #lisp
nowhere_man has quit [Quit: Konversation terminated!]
nowhere_man has joined #lisp
easieste has joined #lisp
igemnace has quit [Ping timeout: 256 seconds]
<ebrasca> megachombass: Your code has strange parentesis colocations.
easieste has quit [Client Quit]
Amplituhedron has joined #lisp
eschatologist has joined #lisp
borei has joined #lisp
mlf has joined #lisp
<borei> hi all
<phoe> hey Borei
<phoe> I mean
<phoe> hey borei
<borei> :-)
<phoe> (:
Admin_ has quit [Quit: Admin_]
<borei> i have quick question abt function naming. Does lisp provide some sort of function overload (like it's done in C++ - one name, but different signature). I can achive this functionality using &rest and &key options, but it will require to create some additional logic in the function itself
<phoe> borei: no.
<phoe> #'FOO is always #'FOO.
<megachombass> pjb: well, ive got ride of almost all warnings . one reduntant it says WARNING: in EXEC in lines 109..144 : CASE : Le choix QUOTE se répète: (CASE INSTRUCT ('MOVE (MOVE VM PARAMETRE PARAMETRE2)) ('INCR (OPERATIONVM VM '+ '(:DIESE 1) PARAMETRE)) ('DECR (OPERATIONVM VM '- '(:DIESE 1) PARAMETRE)) ('ADD (OPERATIONVM VM '+ PARAMETRE PARAMETRE2)) ..........etc
<phoe> if anything, you have the generic function mechanism.
atgreen has joined #lisp
<phoe> also, in Lisp, you can pass an argument of any type to a function - that's the "ultimate" function overloading.
<borei> true
<phoe> If you want efficiency, you can use compiler macros, that can check types at compile-time and generate more efficient code for known types.
<phoe> that's another kind of function overloading.
<phoe> and generic dispatch, which is yet another, object-oriented way of function overloading.
<phoe> in other words: Lisp can't overload functions because it has nothing to overload.
<borei> hmm
<phoe> &key and &rest are yet another way of overloading, this time with relation to argument arity.
<borei> ok, here is example - function translate, it can take one argument r (as a vector), or x, ,y ,z - numbers
<borei> what would be "lispiest" approach ?
<megachombass> Pjb: code with almost all warnings removed https://codeshare.io/GkwJYA
tokik has quit [Quit: leaving]
solyd has joined #lisp
solyd has quit [Client Quit]
<phoe> borei: IMO, make #'translate accept a sequence
<pjb> megachombass: there are still those problems: https://codeshare.io/GAQKR8
<pjb> megachombass: (detected by ccl).
<phoe> and then call (translate vector) or (translate (list x y z))
<megachombass> In exec: Duplicate keyform quote in case statement. this one i dont see whats the problem. seems he think the case is the same
<megachombass> because they all start with '
<phoe> borei: with a compiler macro for most optimized cases, like an argument of type (simple-array (unsigned-byte 8) (3))
fikka has joined #lisp
<phoe> or vector of double-floats
<phoe> or whatever else you expect to put into that function
<borei> ok, ic
<borei> tks for heads-up !
<aeth> There is a library
varjag has joined #lisp
<phoe> aeth: ?
<aeth> If you're using a supported implementation you can use specialization-store to do type-based dispath that handles types at compile time. https://github.com/markcox80/specialization-store/
<aeth> Obviously it just uses macros, but it's macros you don't have to write.
<megachombass> pjb: https://codeshare.io/GkwJYA so, this should only give the the quote error duplicate and the setf's
<megachombass> hence i dont know how to fix those two
<aeth> s/dispath/dispatch/
vlatkoB has quit [Remote host closed the connection]
<pjb> megachombass: remove the quotes! In exec, ('move -> (move etc.
<pjb> megachombass: or ((move) …) instead of ('move …)
fikka has quit [Ping timeout: 264 seconds]
<pjb> megachombass: it's better to write ((move) …) because if you wanted to test for nil, you would have to put the parentheses ((nil) …) since nil is the same as () and (nil …) would be (() …) ie. an empty list of constant, so the … would never be evaluated.
<megachombass> i understand
<megachombass> and now i have the setf problems
<megachombass> seems its not the correct way to setf a variable
eschatologist has quit [Quit: ZNC 1.6.5+deb2build2 - http://znc.in]
<pjb> megachombass: you need to declare the variable!
<pjb> Use let (let (fibo1 fibo2) … (setf fibo1 …) …)
<megachombass> but setf doesnt declare it implicitly?
<pjb> Nope.
red-dot has quit [Quit: Going offline, see ya! (www.adiirc.com)]
red-dot has joined #lisp
fikka has joined #lisp
<megachombass> okey
<megachombass> 0 warnings now
arbv has quit [Ping timeout: 256 seconds]
<megachombass> https://codeshare.io/GkwJYA still have the error
arbv has joined #lisp
<Shinmera> _death: Oh. Welp.
nyef has joined #lisp
zazzerino has quit [Remote host closed the connection]
fikka has quit [Ping timeout: 252 seconds]
<megachombass> pjb: :ETIQ #S(HASH-TABLE :TEST FASTHASH-EQL (FIBO . 9999)) :ETIQNR #S(HASH-TABLE :TEST FASTHASH-EQL (NB . 0))> is not a symbol
puchacz has quit [Quit: Konversation terminated!]
Folkol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
eschatologist has joined #lisp
arbv has quit [Ping timeout: 256 seconds]
arbv has joined #lisp
<Shinmera> _death: Fixed
<pjb> megachombass: ok. So now apply the instructions in the debugging tutorial I gave you 3 days ago.
<pjb> megachombass: you still have the link, right?
smurfrobot has joined #lisp
arbv has quit [Ping timeout: 240 seconds]
solyd has joined #lisp
<megachombass> nope
<megachombass> if you still have it somewhere
arbv has joined #lisp
Achylles has quit [Quit: Leaving]
dieggsy has quit [Remote host closed the connection]
<pjb> megachombass: so, with clisp the debugger works better on interpreted code.
<pjb> So while it may be useful to use compile-file to check for more errors,
<pjb> you will have to reload the source file (load "foo.lisp") before debugging.
<pjb> megachombass: in your case, since you have a VM with a big vector, you may want to (setf *print-length* 10) so that it doesn't prints thousands of 0s from your memtab.
Karl_Dscc has quit [Remote host closed the connection]
dddddd has quit [Remote host closed the connection]
arbv has quit [Ping timeout: 276 seconds]
arbv has joined #lisp
<pjb> megachombass: so, have you found the bug?
<megachombass> trying to
fikka has joined #lisp
<megachombass> so there is my backtrace
<megachombass> in the tutorial
<megachombass> it says instantly wich functions fks up
<megachombass> oh no wait
<megachombass> okey let me read again the tutorial
<pjb> megachombass: on line 27 you see the function move.
<pjb> on line 23 it is called with the function apply
<pjb> on line 19 you see the evaluation of the body of move.
<pjb> the problem is in move.
<pjb> When you read the source of move, you see that you've left an occurence of GET: (setf (get vm adr) res)
<pjb> vm is a VM structure. GET expects a symbol. Hence the type-error.
Folkol has joined #lisp
fikka has quit [Ping timeout: 248 seconds]
<pjb> you see the call to system::%put on lines 13 and 14.
nydel has joined #lisp
<_death> Shinmera: cool, thx
<megachombass> well the error was indeed that
<megachombass> but i dont know how you can figure out that move was the problem on that backtrace
Folkol has quit [Client Quit]
<Shinmera> _death: I assume that optional argument mishap I introduced wasn't what confused you initially though, so to ask again: what was confusing about plaster-new?
<pjb> because it's the first user function that appears on the stack!
<pjb> line 28, not line 27.
<megachombass> oh so all other is system functions, so i dont have to take care bout it
<borei> hmm, can't find how to inforce type(s) for function parameters, except declare
<megachombass> and then, i have to find first function written by me to see whats going on
<borei> or it's only option ?
<|3b|> clhs check-type
<Shinmera> borei: Declare does the opposite of enforcing.
<pjb> megachombass: the last system function gives you a hint, it's system::%put, if you know that it's what's called when you use (setf gethash).
<pjb> yes.
<Shinmera> borei: Declare promises to the compiler that the variable will have that specific type. if it does not the program can burn your house down.
<megachombass> okey okey
<megachombass> now, i know to debug
<megachombass> im progressing
<pjb> (progn (check-type i integer) (cond ((< i 10) (throw 'done)) ((> i 15) (quit))) (locally (declare (i (integer 10 15))) (foo i)))
smurfrobot has quit [Remote host closed the connection]
zazzerino has joined #lisp
<_death> Shinmera: the first time I tried it, it put up a buffer but I entered "lisp" for type, I missed the C-x C-s message and tried to use C-c C-c (which is what I'd expect).. I think I did end up submitting the entry somehow, but because the type was nonexistent it failed, and the second time I tried to use it, it didn't go the same way (I wasn't presented with an empty buffer) and so I resorted to using the paste-region function
gilez has quit [Ping timeout: 248 seconds]
nydel has quit [Read error: Connection reset by peer]
dieggsy has joined #lisp
<Shinmera> _death: I see. Why would you expect C-c C-c?
void_pointer has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
<_death> Shinmera: C-c C-c -> submit and C-c C-k -> cancel is what I'm used to from writing mails.. magit also used to have these bindings, though it changed submit (in the commit message buffer) to C-x # at some point..
<Shinmera> _death: Ah. I avoided C-c C-c because in code buffers it usually means compile.
<Shinmera> And I wanted to preserve that for when you're looking at a paste.
fikka has joined #lisp
rumbler31 has quit [Remote host closed the connection]
fikka has quit [Ping timeout: 268 seconds]
arbv has quit [Ping timeout: 276 seconds]
<aeth> borei: declare behaves like check-type in SBCL when safety != 0 and assumes types when safety == 0. It is slightly smaller in disassembly because it doesn't let you replace the value with a valid value iirc. It might assume the type at all safety levels in some implementations. It looks like CCL ignores it and ECL ignores it. This would be hard to test on all implementations, though, because some might behave differently at different optimi
<aeth> might behave differently at different optimization levels, like SBCL.
arbv has joined #lisp
_mjl has joined #lisp
<aeth> (It's also possible that they might behave differently at the REPL than with a compiled file, too.)
<Shinmera> Regardless of what the implementation does, you should /NOT/ use declare to check types.
<Shinmera> It's not about what it does, it's about what it's designed for and what it reads as.
<Shinmera> A declaration is a promise, not a check.
<stylewarning> I tried to implement this type of behavior with WITH-EXPECTATIONS https://bitbucket.org/tarballs_are_good/policy-cond
<stylewarning> It’ll turn on/off checking depending on policy you set
_mjl has quit [Ping timeout: 256 seconds]
red-dot has quit [Quit: Going offline, see ya! (www.adiirc.com)]
<pjb> declare is to give information to the compiler, so it may perform type inference.
<aeth> It definitely looks like there's three possibilities: (1) declaration ignored, (2) declaration checked, (3) declaration assumed. SBCL with (not (zeorp safety)) seems to offer #2, #1 seems to be the most common, and #3 is the risky thing you definitely do NOT want to happen but that could happen.
<Xach> with-great-responsibility
<stylewarning> Xach: :D
red-dot has joined #lisp
<Shinmera> aeth: Again it doesn't matter. For readability alone you should not use declarations for type checks.
<aeth> Even with SBCL, I think #1 happens if the function is inline iirc
<pjb> For example, in (let ((x (foo))) (declare x integer) (+ x 1)) you're telling the compiler that foo returns an integer. So that the + in (+ x 1) can perform integer addition without testing whether x is a ratio, a floating point or a complex, and without signaling a type error for something else.
<pjb> But if foo returns something else than an integer, then you've LIED to the compiler and it will crash, like a vulgar C program!
<aeth> Possibly.
<pjb> On the other hand, in (let ((x (foo))) (check-type x integer) (+ x 1)) foo can return anything. But check-type will ensure that x is an integer after it's executed. Then the compiler can make the same assuption, but now, if foo returns something else than n integer, check-type will interact with the user to ensure that x is an integer or signal a type-error.
<pjb> check-type is much better!
solyd has quit [Quit: solyd]
Kevslinger has joined #lisp
<stylewarning> I feel like advanced users of Lisp in #lisp all too often reiterate basic facts about Lisp to one another, without actually intending to convey or share info about Lisp, but rather to just (re)broadcast facts that are easy to be opinionated about.
<stylewarning> (:
fikka has joined #lisp
nirved has quit [Quit: Leaving]
<Bike> is that an example of itself? is this an example? sociologists haven't yet worked it out
rumbler31 has joined #lisp
<Shinmera> stylewarning: It's a matter of opinion, but mine is right
rumbler31 has quit [Remote host closed the connection]
fikka has quit [Ping timeout: 240 seconds]
orivej has joined #lisp
Murii has quit [Quit: WeeChat 1.4]
smurfrobot has joined #lisp
atgreen has quit [Remote host closed the connection]
eivarv has quit [Quit: Sleep]
shrdlu68 has quit [Quit: Lost terminal]
BitPuffin has quit [Remote host closed the connection]
mishoo has quit [Ping timeout: 256 seconds]
fikka has joined #lisp
shka_ has quit [Ping timeout: 240 seconds]
eivarv has joined #lisp
shifty has quit [Ping timeout: 265 seconds]
windblow has joined #lisp
smurfrobot has quit [Remote host closed the connection]
fikka has quit [Ping timeout: 256 seconds]
warweasle has joined #lisp
Folkol has joined #lisp
pjb has quit [Ping timeout: 256 seconds]
hhdave has quit [Ping timeout: 240 seconds]
hhdave has joined #lisp
pjb has joined #lisp
gilez has joined #lisp
fikka has joined #lisp
epony has quit [Read error: Connection reset by peer]
epony has joined #lisp
smurfrobot has joined #lisp
jmercouris has joined #lisp
<jmercouris> pjb: Did you guys succeed in the assignment?
red-dot has quit [Quit: Going offline, see ya! (www.adiirc.com)]
red-dot has joined #lisp
wxie has joined #lisp
wxie has quit [Remote host closed the connection]
pjb has quit [Ping timeout: 240 seconds]
nowhere_man has quit [Ping timeout: 240 seconds]
smasta has joined #lisp
Kyo9142 has joined #lisp
nowhere_man has joined #lisp
marusich has joined #lisp
pjb has joined #lisp
Kyo9142 is now known as Kyo91`
Kyo91` has quit [Client Quit]
Kyo91 has joined #lisp
<pjb> jmercouris: last message was: <megachombass> im progressing
warweasle has quit [Read error: Connection reset by peer]
warweasle has joined #lisp
fisxoj has joined #lisp
<jmercouris> Hmm, well, hopefully he'll have some good luck
<jmercouris> We all make mistakes in this life
warweasle has quit [Client Quit]
pagnol has joined #lisp
ebrasca` has joined #lisp
damke has joined #lisp
damke_ has quit [Ping timeout: 264 seconds]
ebrasca has quit [Remote host closed the connection]
<jmercouris> Anyone familar with cl-who? http://weitz.de/cl-who/
<jmercouris> I'm getting extra spaces in some html generation, and I can't understand why
<jmercouris> here's a small snippet illustrating: https://gist.github.com/5cbceb59e8ff6f535a8eb2ca65423051
eschatologist has quit [Quit: ZNC 1.6.5+deb2build2 - http://znc.in]
<jmercouris> Here's the super bizzare part, converting the :h1 to a :a removes the extra spaces
brendyn has joined #lisp
zazzerino has quit [Remote host closed the connection]
eschatologist has joined #lisp
<pjb> Well, obviously I wrote my own html generator, so I don't have those problems… :com.informatimago.common-lisp.html-generator.html
<|3b|> jmercouris: might try turning off indentation in generated html if it is on
<megachombass> im back
<megachombass> had to prepare and eat dinner
<jmercouris> |3b|: How do I do that? is that some config during compilation or is there a command?
* |3b| doesn't remember if cl-who does indentation the correct-but-ugly way or not, doesn't look like it from examples
<|3b|> jmercouris: option to with-html-output
<|3b|> looks like it defaults to off though
<jmercouris> Ah okay, I see
<jmercouris> It sure seems like a bug to me
* |3b| notes that including the generated html along with some indication of what you think is wrong with it in the question might get you better answers
<jmercouris> I'll just make it an anchor for now that jumps down to the "features" section of the page :D
zazzerino has joined #lisp
<jmercouris> |3b|: I can upload the generated html as well, one moment please
<megachombass> pjb: this is the state of the code right now
<megachombass> what more can be done?
<megachombass> i really dont like the LOC syntax in his asem code, really doesnt represent anything
moei has quit [Quit: Leaving...]
<megachombass> because i belive teacher is going to write some asm by hand (as i dont have a compiler to give to him), and gonna wonder wtf (move (LOC -1 0) :R0) does represent
<|3b|> yeah, looks like you have indentation turned on
<|3b|> (and it does it the 'wrong' way)
<jmercouris> I must have it turned on in my site generator then
<jmercouris> I just recently forked site-generator, and I didn't touch that part of the code yet
<jmercouris> I'll have to change it, though I do like the idea of using an anchor anyway
<jmercouris> let me see if the optional param is set
<jmercouris> s/param/argument
ebrasca` is now known as ebrasca
<jmercouris> Though I guess those are synonyms really
* |3b| thinks there is a distinction, but never can remember which is which :(
<|3b|> one is the variable/binding while other is the value when called, or something like that
<jmercouris> Doesn't matter that much, as long as we have good context
* |3b| wouldn't be surprised if others define them differently though, naming is hard :)
<jmercouris> Anyways very interesting, I don't see with-output-to-html anywhere in the codebase
<jmercouris> damnit, wrong word order
<jmercouris> with-html-output-to-string exists
<jmercouris> and you're correct, indent is set to t
<jmercouris> are there any advantages to indenting? just readability or?
<jmercouris> at any rate, thank you for your help
<|3b|> yeah, advantages are readability, wasting bandwidth, and the bug you just ran into
dddddd has joined #lisp
bhyde has joined #lisp
<jmercouris> I'll never be working with the code indented outside of development
<jmercouris> maybe I should have it as a flag one can set in their config
<jmercouris> then again, development should mirror production as closely as possible :(
<|3b|> to indent html 'correctly', your html should look like ><a instead of <a>, with the indentation inside tags
<jmercouris> I'm not about to fork cl-who as well :D
<jmercouris> I've already pulled in enough dependencies lol
papachan has joined #lisp
smurfrobot has quit [Remote host closed the connection]
<pjb> megachombass: well, virtual machine can be anything. But if you make a machine with a PC, a SP, and 4 registers holding each integers or even words (integers modulo 2^p), usually the instructions are themselves encoded into integers. Here you have something more ressembling an interpreter of an assembler, than a virtual machine. I don't know if that was specified or not, but perhaps you would have wanted to make it more like a
<pjb> micro-processor. The example of virtual machine I gave you the url of was like that. The assembler converted the program into a sequence of byte, and the virtual machine interpreted those bytes.
<pjb> megachombass: the reason why it's a good thing is that it allows the programm running on this virtual machine to modify itself. Since you only have operations to deal with integers, and none to deal with lists such as (LOC -1 0), in the current VM you cannot write a program generating a program containing references to local variables or parameters!
oleo has quit [Ping timeout: 252 seconds]
<pjb> megachombass: (your current file only contains a dash, that's all). https://codeshare.io/GkwJYA
<megachombass> oh wait what
<megachombass> where is my code
<jmercouris> I'm guessing some asshole deleted it
<pjb> At this point, the following quote comes to mind: "You don't want to sell me death sticks. You want to go home and rethink your life." u
<pjb> I hope this was your only copy!
<pjb> sorry: was NOT
<pjb> ok, test seems to do the same as before.
<megachombass> ye, test prints the load machine contennt and at the end returns 5 (result of (fibo 5)
<pjb> megachombass: why do you read the fibos from strings?
<megachombass> because i needed to work with working assembly code
<megachombass> and that code
<megachombass> is the result of the lisp compiler
milanj has joined #lisp
<megachombass> as i havent even finished with the VM, and prolly will never have time to make the compiler for tomorrow, i needed some code to work with
<pjb> megachombass: since the lisp compiler produces a sexp, you can just quote it and use it directly!
<megachombass> sexp?
<pjb> SYMBOLIC EXPRESSION
fisxoj has quit [Quit: fisxoj]
<megachombass> but thats what i do
<megachombass> reading the string, i convert it to a sexp
<megachombass> that i can give to the vm
Selwyn has joined #lisp
red-dot has quit [Quit: Going offline, see ya! (www.adiirc.com)]
red-dot has joined #lisp
<pjb> megachombass: the point is that Lisp already contains a READER!
<megachombass> if i just '(my asem code) it doesnt work
<pjb> You don't need to read it yourself from the string! Just write (let ((fibo1 '((entreeprocedure) (@ foo) ...)) (fibo2 '((move …) …))) …)
<megachombass> going to try again
<pjb> It will work if you print it with *print-circle* and *print-readably* both set to T.
rotty has quit [Ping timeout: 264 seconds]
<ebrasca> megachombass: why you have - in line 29 ?
<pjb> Notice that - is a special variable in lisp that is bound to the form being evaluated in the REPL. It's NIL elsewhere.
<pjb> One can therefore have fun by adding lines of: - - - - - - - - - - - - - - - - - - - - - - - - in lisp sources…
jmercouris has quit [Ping timeout: 256 seconds]
<megachombass> ebrasca: wasnt me, someone that is checkign the code and adding things
<pjb> For more fun, you can also use + + + + or ++ ++ ++ or +++ +++ +++ +++ or * * * * * or ** ** ** or *** *** *** *** or / / / / or // // // or /// /// /// or any combination such as + - + - + - + etc.
rumbler31 has joined #lisp
<ebrasca> What is for codeshare ?
Selwyn has quit [Read error: Connection reset by peer]
<pjb> it's a paste that can be edited by anybody. Unless you lock your pastes.
<pjb> It allows collaborative editing.
<pjb> There's also an option for videochat.
<ebrasca> I am retarted , I think it is read only ...
<ebrasca> megachombass: Sory for mi mistake 2 times ...
<ebrasca> pjb: Thanks for explaining.
Kevslinger has quit [Quit: Connection closed for inactivity]
rumbler31 has quit [Ping timeout: 268 seconds]
wigust- has joined #lisp
marusich has quit [Ping timeout: 265 seconds]
<ebrasca> pjb: How I can copy all code for testing?
<pjb> Select all and copy work.
<pjb> You may have to click on the text first.
marusich has joined #lisp
fittestbits has quit [Quit: Leaving.]