ealfonso has quit [Read error: Connection reset by peer]
dmiles has quit [Read error: No route to host]
seok has joined #lisp
<seok>
how to create unique random string?
<seok>
Do I have to keep a list?
<seok>
string or number *
igemnace has joined #lisp
wigust has joined #lisp
<LdBeth>
seok: if the purpose is to create unique symbols there’s (gensym)
<_death>
you could keep a counter
<seok>
Yes there is
<seok>
I don't like to make them increment though
<ggole>
Strings aren't unique in general, but if you know there is a space of possible strings that won't come up other than by your generating them, you can simply use a counter
<seok>
perhaps I should hash it
dmiles has joined #lisp
<ggole>
What are you trying to do?
<seok>
web dev, generating unique ids for elements
<ggole>
A counter seems fine for that.
<LdBeth>
Are these elements persistent?
<seok>
they are generated by routing
<seok>
counter works
<seok>
just for minor security might be better to hash the counter or something
<LdBeth>
If you don’t have to process them later, counter works fine
<_death>
hmac(secret, counter)
<seok>
Thank you _death, looks god
oni-on-ion has joined #lisp
zhlyg has quit [Ping timeout: 246 seconds]
_whitelogger has joined #lisp
oni-on-ion has quit [Remote host closed the connection]
oni-on-ion has joined #lisp
wxie has quit [Ping timeout: 276 seconds]
oni-on-ion has quit [Remote host closed the connection]
oni-on-ion has joined #lisp
<pjb>
seok: (make-string 1) will always create a new unique string.
<pjb>
seok: since the string is unique, it's "random", whatever you want to mean by that.
<pjb>
ggole: strings are unique in general! (eq "" "") #| --> nil |#
<pjb>
ggole: You need a special optimization in the compiler to unify them, or special code to make sure you keep references to the same unique string.
<pjb>
Strings are NOT interned!
<pjb>
Perhaps you're confusing them with symbols?
<pjb>
seok: so you don't want unique random strings, you want a UUID generator!
oni-on-ion has quit [Remote host closed the connection]
oni-on-ion has joined #lisp
pyx has joined #lisp
pyx has quit [Client Quit]
<LdBeth>
unix like systems provide uuidgen :)
dale has quit [Quit: My computer has gone to sleep]
cosimone has joined #lisp
oni-on-ion has quit [Remote host closed the connection]
cosimone has quit [Client Quit]
oni-on-ion has joined #lisp
Ricchi has quit [Remote host closed the connection]
oni-on-ion has quit [Remote host closed the connection]
oni-on-ion has joined #lisp
ealfonso9 has quit [Ping timeout: 252 seconds]
oni-on-ion has quit [Remote host closed the connection]
oni-on-ion has joined #lisp
oni-on-ion has quit [Remote host closed the connection]
zotan has quit [Ping timeout: 264 seconds]
zotan has joined #lisp
<pjb>
LdBeth: this is not #unix !!! (ql:quickload :uuid) (uuid:make-v5-uuid uuid:+namespace-x500+ "test") #| --> 63A3AB2B-61B8-5B04-AE2F-70D3875C6E97 |#
nowhere_man has joined #lisp
zhlyg has joined #lisp
liberiga has quit [Ping timeout: 260 seconds]
nanozz has quit [Ping timeout: 244 seconds]
nsrahmad has joined #lisp
afidegnum has joined #lisp
<afidegnum>
if i understand well, ,item is to execute a single item in a list and ,@item executes all items in the list, both functions and their arguments, right ?
<no-defun-allowed>
I can't figure out why you thought that.
nsrahmad has left #lisp [#lisp]
<no-defun-allowed>
,foo in a quasiquoted value puts its value in normally, and ,@foo "splats" it by appending the list to the values before and after it.
<no-defun-allowed>
The evaluation rules aren't affected by whether you use , or ,@. Only how the result is used is changed.
<moldybits>
maybe he's talking about macros
<moldybits>
i dunno
<no-defun-allowed>
In a macro, you had better use `(progn ,@body) or something like that to run all items, otherwise you'll have multiple forms in there.
<afidegnum>
moldybits: :D :D :D :D
<afidegnum>
no-defun-allowed: thanks for the insight
<afidegnum>
moldybits: ok, let me rephrase it: inside the label, output what's inside the label containing the list where B C is figured and print the label of d
<afidegnum>
am i correct ?
Ni-chan has joined #lisp
count3rmeasure has joined #lisp
<zhlyg>
afidegnum: (PRINT (MACROEXPAND-1 ...)) is your friend
<moldybits>
afidegnum: maybe you should play with lists a bit at the repl? (cons 'a '(b c)) (cons 'a (list 'b c'))
<moldybits>
also trying to start using the correct terminology: symbols, not labels. evaluate, not execute.
varjag has joined #lisp
Demosthenex has quit [Ping timeout: 246 seconds]
<beach>
afidegnum: There are neither labels not output involved in backquotes.
<beach>
afidegnum: You can think of `(form1 ,form2 form3) as being translated into (list 'form1 form2 'form3) and of `(form1 ,@form2 form3) as being translated into (apppend (list 'form1) form2 (list 'form3)).
Demosthenex has joined #lisp
nowhere_man has quit [Remote host closed the connection]
nowhere_man has joined #lisp
lnostdal has joined #lisp
<beach>
afidegnum: Is that helpful to you?
<pjb>
moldybits: backquote is unrelated to macros.
<pjb>
moldybits: as your example, shows, it works outside of any macro context.
<pjb>
s/,//
count3rmeasure has quit [Quit: Leaving]
count3rmeasure has joined #lisp
_whitelogger has joined #lisp
orivej has joined #lisp
oni-on-ion has joined #lisp
oni-on-ion has quit [Remote host closed the connection]
oni-on-ion has joined #lisp
aoeu256 has joined #lisp
oni-on-ion has quit [Remote host closed the connection]
oni-on-ion has joined #lisp
semz has joined #lisp
semz has joined #lisp
semz has quit [Changing host]
lnostdal has quit [Read error: Connection reset by peer]
lnostdal has joined #lisp
ted_wroclaw has joined #lisp
orivej has quit [Ping timeout: 244 seconds]
dddddd has joined #lisp
wxie has joined #lisp
SaganMan has quit [Ping timeout: 244 seconds]
shka__ has quit [Ping timeout: 248 seconds]
nanoz has joined #lisp
Arcaelyx has quit [Ping timeout: 244 seconds]
oni-on-ion has quit [Remote host closed the connection]
oni-on-ion has joined #lisp
oni-on-ion has quit [Remote host closed the connection]
oni-on-ion has joined #lisp
oni-on-ion has quit [Remote host closed the connection]
oni-on-ion has joined #lisp
orivej has joined #lisp
igemnace has quit [Quit: WeeChat 2.5]
t58 has joined #lisp
wxie has quit [Ping timeout: 272 seconds]
theblacksquid has joined #lisp
EvW has joined #lisp
orivej has quit [Ping timeout: 245 seconds]
orivej has joined #lisp
EvW has quit [Ping timeout: 264 seconds]
bug2000 has quit [Remote host closed the connection]
Bike has joined #lisp
Inline has joined #lisp
xkapastel has joined #lisp
kqr has joined #lisp
akoana has joined #lisp
count3rmeasure has quit [Quit: Leaving]
lucasb has joined #lisp
Arcaelyx has joined #lisp
EvW1 has joined #lisp
dgfhdfg has joined #lisp
shka__ has joined #lisp
orivej has quit [Ping timeout: 248 seconds]
nowhereman has joined #lisp
nowhere_man has quit [Ping timeout: 264 seconds]
wigust- has joined #lisp
wigust has quit [Ping timeout: 245 seconds]
EvW1 has quit [Ping timeout: 276 seconds]
ted_wroclaw has quit [Ping timeout: 245 seconds]
nanoz has quit [Ping timeout: 244 seconds]
beluga0 has left #lisp ["goodbye"]
sahara3 has joined #lisp
sahara3 has quit [Ping timeout: 246 seconds]
igemnace has joined #lisp
nanoz has joined #lisp
theblacksquid has quit [Quit: WeeChat 1.9.1]
igemnace has quit [Ping timeout: 246 seconds]
manualcrank has joined #lisp
dgfhdfg has quit [Ping timeout: 268 seconds]
igemnace has joined #lisp
<afidegnum>
beach: thanks it works, sorry i was a litle away
akoana has left #lisp ["Leaving"]
akoana has joined #lisp
<beach>
No problem.
dave0 has quit [Quit: dave's not here]
sahara3 has joined #lisp
cl-arthur has quit [Read error: Connection reset by peer]
<sahara3>
hello
<oni-on-ion>
hi
<sahara3>
How are you?? oni-on-ion
<oni-on-ion>
i am well thank you! how are you ?
rippa has joined #lisp
<sahara3>
Not bad
<oni-on-ion>
great. what are you up to ?
<sahara3>
I hear music
<moldybits>
#lispcafe lol
vms14 has joined #lisp
<vms14>
guys, what do you use for db in lisp, and what db?
<vms14>
I see there is elephant, and postmodern for postgre, sqlite and so on
<vms14>
also, what libraries do you use for web related stuff in lisp?
<vms14>
I guess lisp is very well suited for web stuff, but I should prove it
<vms14>
do you like restas?
<vms14>
or weblocks
<sahara3>
anyone here is from venezuela?
<vms14>
someone used weblocks? it seems to be very nice, but I saw nothing more than comments from other people
<vms14>
and someone said that there was a mistake to make it continuation based
<Josh_2>
vms14: I use postgres as db, postmodern for accessing, hunchentoot as my server cl-who to generated html
nanozz has joined #lisp
<Josh_2>
I personally write my javascript manually but you can generate it automatically
<vms14>
so you're not using parenscript?
<Josh_2>
Nope
<vms14>
don't like it?
<Josh_2>
Because I've been using jquery
<vms14>
xD
<vms14>
you have some link to show?
<Josh_2>
If I wanted to do very similar things with javascript on similar pages then I would generate the javascript auto
<edgar-rft>
vms14: there's also #lispweb where more people might know answers
<Josh_2>
vms14: I don't sorry, my repos are private am afraid, the sites are for other people
nanoz has quit [Ping timeout: 245 seconds]
<vms14>
ty edgar-rft
<vms14>
forgot about lispweb and lispgames
<vms14>
btw, what lispers think about haskell?
<vms14>
I see a lot of lispers went to haskell and never returned
<vms14>
It seems a very nice language, I'd like to learn it some day, but I'd like to truly learn about macros first
<Josh_2>
I don't know if lots of people moved to haskell
<Josh_2>
but there is talk of the haskell vs lisp war in Land of Lisp xD
<semz>
where exactly did you see that? i never really got that impression
<vms14>
I saw some comments like "go to haskell to learn fp, then come back to lisp, and implement whatever you liked from haskell"
<vms14>
semz: maybe I'm wrong, but I see some haskellers who were lispers before
<vms14>
specially who loves fp
<vms14>
lispweb is a bit dead
<vms14>
I hope enterprises hire me for knowing lisp, but no one will do it
<vms14>
for a noob the fastest way is java or php
* vms14
cries
<Josh_2>
ikr
CloseToZero has quit [Quit: WeeChat 2.5]
moei has joined #lisp
<pjb>
vms14: just start up your own company, and use lisp to provide solutions to your customers.
<edgar-rft>
vms14: Starship Enterprise might hire you
<pjb>
edgar-rft: Starship Enterprise computers are not programmed in lisp!
<vms14>
pjb: that's what a recruiter told me during an interview
<vms14>
when I asked her what could I do to get hired
<vms14>
she said "go freelance"
<vms14>
and I was wtf, I want a job to learn much more than what I know now, then go freelance
<vms14>
I still being a noob in lisp btw
<pjb>
vms14: get hired in a started. That's where you'll learn fast. But you'll learn faster doing your own startup.
<vms14>
but I guess I'm able to do a shit ecommerce
<vms14>
also I know front end
<vms14>
well I had an idea for a startup, it's basically take customers who want websites and pass the project to a programmers
<vms14>
but at the first time I need to do those projects by my own
oni-on-ion has quit [Remote host closed the connection]
oni-on-ion has joined #lisp
<vms14>
what do you know about bottom up programming?
<vms14>
isn't a concept born in lisp?
<vms14>
and isn't it the lisp way?
<vms14>
how to really grasp bottom up programming?
gdsg has joined #lisp
<vms14>
and is functional programming strongly related with bottom up?
<vms14>
I have the sense they work very well together
<Josh_2>
It's building the language around a problem basic
<Josh_2>
basically*
<edgar-rft>
First get your bottom up, then do programming. That's how bottom-up programming works.
<Josh_2>
xD
<ck_>
"an idea for a startup, it's basically take customers who want websites and pass the project to a programmers" -- I'm amazed and absolutely sure that noone has ever done this before
<vms14>
ck_: xD
<edgar-rft>
Howto make money as a web dev - Create your own homepage and announce: "If you sent me 10 bucks I'll tell you howto make money with nearly no work!" Then whoever sends you 10 bucks gets an email "Howto make money with nearly no work - Create your own homepage and announce: If you send me 10 bucks..." etc.
<Josh_2>
Programming on your head
<vms14>
the sad part is I have no better idea for a startup
<ck_>
maybe you could also take the specifications from the customers to the engineers? That way, you talk to the customers so the engineers don't have to
<pjb>
Top-down programming is starting with: (defun main () (initialize) (loop while (there-is-some-input) do (process (get-some-input)))) and then implementing initialize, there-is-some-input, get-some-input, and process.
sauvin has quit [Read error: Connection reset by peer]
<vms14>
I see no info about bottom up programming
<Josh_2>
hmm
<vms14>
just basic definitions and some paul graham text
<pjb>
Bottom-up programming is starting with get-some-input, process, there-is-some-input, and initialize, and finally implementing main.
<pjb>
At large scale.
<Josh_2>
yes
<vms14>
as far as I know you "transform" the language to whatever you need
<Josh_2>
yeh
<vms14>
I see like you build an api, and the program just uses that api
<Josh_2>
It's kewl
<pjb>
The problem of top-down programming is that you will either have to modify main once you have implemented the lower levels, or you will have more complex implementation of the lower levels to conform to the API you defined before implementing them.
<pjb>
The problem of bottom-up programming is that you will probably implement functions (a toolkit) that won't be used in your current main application.
<Josh_2>
or u will write the same tools 100 times ʕ·͡ᴥ·ʔ
<pjb>
Hence the use of variants: inside-out and outside-in!
<vms14>
I just don't know how to write programs in this way
<Josh_2>
hmm
<vms14>
paul graham says that even if you make a library, that's bottom up programming
<pjb>
Inside-out is particularly nice. You start in the middle, doing top-down to implement then needed lower layer, and bottom-up to explore the implementation of the main.
<pjb>
But some people do outside-in, starting with a main, and some low-level API, and filling in the middle layers until something works.
oni-on-ion has quit [Remote host closed the connection]
<vms14>
I understand, you start by writing the functions you'll need, and building blocks
<vms14>
but meh
<pjb>
vms14: you can do all that, using STUBS!
oni-on-ion has joined #lisp
<pjb>
(defun main () (initialize) (loop while (there-is-some-input) do (process (get-some-input)))) (defun initialize ()) (defun there-is-some-input () t) (defun get-some-input () 42) (defun process (x) (print x))
<pjb>
then you run that against your test, and debug them…
<pjb>
But this stubbing works for all four options.
<Josh_2>
vms14: do you own PAIP?
<vms14>
yeah
<vms14>
it's free
<vms14>
<3
<vms14>
but I'm reading a bit of On Lisp
<Josh_2>
I think Chapter 3 is a good guide
<vms14>
to see if I really get the macros
<vms14>
I think macros are also an important part of bottom up
<Josh_2>
idk
<pjb>
macros are design patterns.
<vms14>
I know how to make macros, but I'm not able to see that "power"
<Josh_2>
do you load your system with quicklisp or asdf:load-system?
<krwq>
I think both work but I use quicklisp
<Lycurgus>
i thought ql was a pkg loader
vms14 has quit [Quit: WeeChat 2.3]
<krwq>
yes, if your system depends on other system which you only have on QL then asdf will likely fail
<Josh_2>
well I'm one confused boi
<krwq>
Josh_2: I think most of the folks were in the beginning
<Josh_2>
If only I hadn't been using cl for years oof
oni-on-ion has quit [Remote host closed the connection]
<krwq>
Josh_2: I've ended up setting it up so my new local projects auto register in ~/common-lisp so I don't remember much details on how this worked
<Josh_2>
well I have a symbolic link to a folder which contains a file called game-asdf.asd which has the definition for a system called "game" but when I launch sly and eval (asdf:load-system "game") asdf can't find it
<krwq>
did you restart your lisp or reloaded registry?
<krwq>
also try (ql:quickload :game) and see if it makes any difference
<krwq>
also not sure if systems are case-sensitive but your system might be called "GAME" and not "game"
<krwq>
actually, just tried and lowercase string or keyword work for me but uppercase string doesn't
<Josh_2>
I did restart yes
sonologico has joined #lisp
<krwq>
Josh_2: check if you symbolink link doesn't have extra `/`
<krwq>
in the suffix
<Josh_2>
id does not
<Josh_2>
it*
<krwq>
check if your project is in: asdf/source-registry:*source-registry* (C-c v <TAB>)
<krwq>
sorry C-c C-v <TAB>
<krwq>
(evaluate param name, move point to output and then shortcut)
randomizeusr has joined #lisp
<Josh_2>
It has got two projects from my sym linked directories
<Josh_2>
but no others
<Josh_2>
which is strange
<krwq>
Josh_2: ok so you have something to start with to see what's different between them
randomizeusr has quit [Quit: randomizeusr]
<krwq>
are your system names matching the directory name and asd file name?
<krwq>
perhaps something along these lines
<krwq>
not even sure if that matters but mine match
<Josh_2>
Okay I found it
_jrjsmrtn has left #lisp [#lisp]
<krwq>
what was the issue
<Josh_2>
I don't know ¯\_(ツ)_/¯
<Josh_2>
(asdf:load-system "game") still isn't working
<Josh_2>
but it is listed in asdf/source-registry:*source-registry*
<krwq>
(asdf:load-system :game) perhaps
<krwq>
or perhaps there is more than one system with that name?
<Josh_2>
Nope
monokrom has quit [Remote host closed the connection]
<Josh_2>
I don't think there is
igemnace has quit [Quit: WeeChat 2.5]
<Josh_2>
ahh well I'll figure it out another time
remexre has quit [Quit: WeeChat 2.3]
Inline has quit [Quit: Leaving]
orivej has quit [Ping timeout: 248 seconds]
kajo has joined #lisp
Jeanne-Kamikaze has quit [Quit: Leaving]
Lycurgus has quit [Quit: Exeunt]
orivej has joined #lisp
xkapastel has quit [Quit: Connection closed for inactivity]
oni-on-ion has joined #lisp
zhlyg has quit [Ping timeout: 272 seconds]
EvW has quit [Ping timeout: 264 seconds]
Ricchi has joined #lisp
mindCrime_ has joined #lisp
sahara3 has joined #lisp
mindCrime has quit [Ping timeout: 276 seconds]
mindCrime__ has joined #lisp
<sahara3>
what country are they?
mindCrime has joined #lisp
t58 has quit [Quit: Leaving]
mindCrime_ has quit [Ping timeout: 268 seconds]
mindCrime__ has quit [Ping timeout: 276 seconds]
dannyboy35 has joined #lisp
<dannyboy35>
Hi
<sahara3>
hi dannyboy35
sahara3 has left #lisp [#lisp]
sahara3 has joined #lisp
dannyboy35 has quit [Remote host closed the connection]
dannyboy35 has joined #lisp
xkapastel has joined #lisp
moei has quit [Quit: Leaving...]
sahara3 has left #lisp [#lisp]
dannyboy35 has quit [Remote host closed the connection]
dannyboy35 has joined #lisp
dannyboy35 has quit [Remote host closed the connection]
ltriant has joined #lisp
oni-on-ion has quit [Remote host closed the connection]
oni-on-ion has joined #lisp
kwhalekiller_ has joined #lisp
gdsg has quit [Quit: Leaving]
oni-on-ion has quit [Remote host closed the connection]
oni-on-ion has joined #lisp
oni-on-ion has quit [Remote host closed the connection]
oni-on-ion has joined #lisp
oni-on-ion has quit [Remote host closed the connection]
oni-on-ion has joined #lisp
dannyboy35 has joined #lisp
dannyboy35 has quit [Remote host closed the connection]