IRC channel logs

2017-05-02.log

back to list of logs

<enderby>ACTION wishes there was a proper csv parse module
<daviid>enderby: there a couple of csv modules 'outthere'
<enderby>yeah, i'm trying out a second one now. first one errored if you have blank fields :(
<daviid>enderby: i'm using one which used to be here: http://www.neilvandyke.org/csv-scm/, but that url does not work anymore. if you are interested i can uploaded it on lisppaste
<daviid>ah, it's here now
<enderby>yeah sure!
<daviid> http://www.neilvandyke.org/csv-scm/
<enderby>thnxu
<daviid>sorry
<daviid> http://www.neilvandyke.org/racket/csv-reading/
<enderby>ah
<enderby>is that compatible with guile?
<daviid>well I have the 'same' code by the same author here ...
<daviid>well the same no! on that racket site last is Version 3:4 — 2016-12-09, I have 0.5 :) (which you can see on the list as well)
<daviid>enderby: i beleive that code is compatible with guile yes, but did not tested
<enderby>ok i'll look into doing that, thanks
<daviid>i don't see instruction on how to grab the source code though
<enderby>racket has some package commands to install, have to look it up tho
<daviid>raco pkg install csv-reading
<enderby>yeah
<enderby>req's 2 other packages
<enderby>dunno how compatible they are with guile
<enderby>super frustrating
<daviid>we should write something for guile-lib really, this is (no so often but...) a recurrent request
<enderby>yeah it's pretty standard for languages i feel
<enderby>daviid: does the 0.5 version you have not have the pkg dependencies?
<daviid>ls
<daviid>enderby: no
<daviid>enderby: what guile version are you using?
<enderby>2.22
<daviid>ok, let me try this module here then I'll paste if it still works
<daviid>it's beena while I did not use it
<enderby>koo thnx
<daviid>it compiles fine here
<enderby>sweet
<daviid>enderby: http://paste.lisp.org/+7EOR
<enderby>thank you!
<daviid>enderby: you can make a module like this http://paste.lisp.org/+7EOR/1
<daviid>then (add-to-load-path "where-you-drp-the-module-and-thecsv-code")
<daviid>,use (csv)
<daviid>and try it ... let me know
<enderby>ok, i will
<enderby>daviid: it works (with blank fields). thank you v much
<enderby>now i have to rewrite my sxml-match, but i'm happy :)
<daviid>enderby: ok cool!
<daviid>could you paste (update my paste) with a csv (couple of lines is enough) then your csv-reader and call, I'll keep it as an example
<enderby>sure
<daviid>tx
<enderby>umm...i haven't been using modules correctly and have just been doing (load "file.scm") which I know is wrong, but I've been having a lot of trouble loading modules that I compile myself
<enderby>but the sexp I used with that input was (call-with-input-file "table-ex.csv" csv->sxml)
<daviid>enderby: you should try to use modules yes
<daviid>enderby: have to leave, i'm in a library that closes its door now!
<enderby>ok
<enderby>thanks for the help
<daviid>bbl or tomorow
<paroneayea>whee
<brendyn>manumanumanu: Morning
<CharlieBrown>Is it hard to edit Lisp in Vim?
<bookug>try slimv
<amz3`>if your are wondering what's behind RFC 3501 aka. IMAPrev1 wonder no more
<amz3`> http://paste.lisp.org/display/345638
<amz3`>this is basically it!
<amz3`>(without the IDLE extension)
<amz3`>(and without RFC822 which allows to retrieve the full text of an email)
<amz3`>(also it without string literal support which would allow to retrieve RFC822 mails)
<amz3`>also it miss UID command https://tools.ietf.org/html/rfc3501.html#section-6.4.8
<amz3`>which is basically the way to go, I am not sure why the other commands don't deal with IUD directly
<amz3`>anyway!
<amz3`>I understand IMAP now!
<amz3`>I now need to understand how one can retrieve new messages based on a timestemp it's probably UID SEARCH SOMETHING. But I need to figure what is SOMETHING.
<amz3`>Have a good day:!
***sajith is now known as Guest24075
<manumanumanu>amz3: I think it should be possible to be. Finding prime factors is faster than trial division, and combining them might be non-trivial :)
<manumanumanu>brendyn: I solved it using power-sets, but that ended up being slower than trial division
<brendyn>manumanumanu: I was trying to write a procedure to generate a power set but I couldn't figure it out
<manumanumanu>brendyn: I made one that was horribly inefficient, and found one reasonably fast on rosetta-code
<brendyn>I don't want to cheat :/
<manumanumanu>I think I have found another solution. I find the prime factors with exponents, and then write a recursive procedure that works through all combinations. That way, we get the power set as we go :)
<brendyn>That's what I was doing
<manumanumanu>that way, we could possibly even use futures if the problem is slow enough to benefit from paralell execution
<manumanumanu>brendyn: Nope. Still slower. I'll just have to stick to trial division.
<brendyn>manumanumanu: Is it supposed to be faster?
<manumanumanu>brendyn: Well, who knows? there are ways to find the sum of all divisors using the prime factors that is fast, so why not find all the divisors?
<brendyn>manumanumanu: maybe you could go in reverse. for 2 2 3 5, take the product, 60, and divide it up in all combinations?
<mbuf>Is there a typed version of guile (like Typed Racket)?
<random-nick>mbuf: no
<random-nick>I don't think it's impossible to do, just no one has done it yet
<manumanumanu>brendyn: the slow part is getting all the combination :(
<manumanumanu>The fastest I got was taking 60 and then getting all the divisors for a every prime factor, and then removing the duplicates.
<manumanumanu>still slower than trial divison (but not by much)
<mbuf>random-nick, okay
<nalaginrut>nikita1: I forgot to close connection when it comes to 404, fixed
<nalaginrut>ACTION is preparing for releasing 0.2
<nalaginrut>oh, lot of docs to write, that's the only step I hate ;-P
<mbuf>are there any examples of sites built with GNU Artanis?
<nalaginrut>mbuf: I'll prepare a docker image, actually there is one for old release
<nalaginrut>mbuf: sorry I misunderstood
<nalaginrut>mbuf: there're examples in the source code, I'll add more
<mbuf>nalaginrut, what documentation are you referring to?
<nalaginrut>mbuf: sorry I misunderstood what you mean so please ignore the previous talk
<nalaginrut>mbuf: there're some simple examples in the source code, no serious site yet
<nalaginrut>mbuf: but the new server core is done, so I will write something, at least rebuild my blog with it
<mbuf>nalaginrut, I can help you with any documentation
<nalaginrut>mbuf: thank you very much!
<random-nick>documentation might be boring, but it's one of the most important things for a framework/library
<nalaginrut>mbuf: there're lot of new things in 0.2, but you have to wait my update for it ;-)
<nalaginrut>I mean for the manual
<nalaginrut>random-nick: yes I'm kidding ;-)
<mbuf>nalaginrut, sure, just ping me when you need help
<nalaginrut>Artanis is not so open for contribution before 0.2 because of the brand new server core design may break many old things, now I'll make it open
<mbuf>nalaginrut, Software never gets finished, only released :)
<nalaginrut>mbuf: I may need someone to check the English, I'm not a native speaker
<mbuf>nalaginrut, neither am I, but, I like documentation
<mbuf>nalaginrut, also gives me a way to learn to use the framework
<nalaginrut>and I think we need many interesting examples, please play it as you like
<nalaginrut>mbuf: the old manual is here http://www.gnu.org/software/artanis/manual/manual.html
<nalaginrut>for 0.1.2
<mbuf>nalaginrut, okay
<brendyn>manumanumanu: Have you done SICP?
<OrangeShark>mbuf: there is a typed language for guile called Theme-D http://tohoyn.netau.net/theme-d/
<manumanumanu>brendyn:I started it a long time ago
<brendyn>manumanumanu: Same. I just started again. I'm up to 1.31
<mbuf>OrangeShark, nice, thanks!
<nikita1>mbuf: I'm using Artanis in production but for closed enteprise site, as a reporting service with heavy db communications, charting, plotting of stats, etc. The framework itself is excellent with a big future. there were some odds with new version but they are gone one-by-one...
<mbuf>nikita1, if I may ask, what do you use for front-end?
<nikita1>mbuf: pure html + some js plugins to improve table data presentation.
<mbuf>nikita1, okay
<nikita1>for graphics -- i use a simple ploticus library
<mbuf>nikita1, I basically want to use it only for backend
<mbuf>nikita1, any performance or benchmarking info will be useful though
<nikita1>mbuf: For my usecases, Artanis serves ready-for-output data (f.e. static content) in 8-80ms, other time is db communications.
<mbuf>nikita1, I see
<davexunit>is it possible to get a list of all loaded modules?
<wingo>davexunit: yes
<wingo>you have to traverse the module tree
<wingo>do (resolve-module '())
<wingo>then visit each k,v in module-submodules of that module, and so on
<davexunit>wingo: awesome, thanks.
<davexunit>I was thinking about making a "tree shaker" of sorts that could slim down a binary tarball for a guile program
<wingo>one day :)
<wingo>lots of 50% solutions that can be had tho
<davexunit>my 50% solution idea is a script that just removes modules that aren't used at all.
<davexunit>I'm not sure how much of a win it will be, but the thought crossed my mind to test it out.
***lloda` is now known as lloda
<spk121>...that moment when you write a test program to debug some modules, and you spend hours debugging your test program...
<amz3`> https://github.com/juditacs/wordcount#the-task
<catonano>amz3` do you want to try with Guile ?
<amz3`>it sound fun
<amz3`>hey catonano I just stumbled upon this https://github.com/nyxtom/salient it's javascript but it's interesting
<catonano>amz3: it's interesting, but there are other libs like that, as far as I know. In Python, mainly. Guix has a machine learning file with several packages in it. If it's not Guile scheme, I'm not so attracted ;-)
<wingo>mooooo
<daviid>heya!
<wingo>good evening :)
<daviid>good evening wingo
<wingo>how are things
<daviid>davexunit: if you write this 'all loaded modules', let us know
<daviid>wingo: fine! working hard to get guile-cv first public release out...
<daviid>i need to finalize image histograms and improve im-compose, then i'll release
<random-nick>why doesn't guile implement MIT/GNU Scheme's sc-syntax-transformer and then use it to make macros like match hygienic?
<wingo>random-nick: guile uses syntax-case; a different system.
<random-nick>yes, but couldn't sc-syntax-transformer be implemented on top of syntax-case?
<wingo>random-nick: i don't know :) perhaps!
***daviid is now known as Guest23149
<Guest23149>wow! my laptop totally froze, this did not happen in years...
<daviid>tha was me :)
<amz3`>nikita1: how does artanis handle cookies?
<nikita1>amz3`: heh, cookies seem to be broken in new version, they cannot be read, but can be set.
<nikita1>(through :cookies-set! api)
<amz3`>nikita1: how do you handle auth in your app?
<amz3`>through nginx password files?
<amz3`>I hear nginx can set a header in the HTTP request to assert the login or something
<nikita1>amz3`: through nginx
<amz3`>ah ok, just read about that trick
<amz3`>I tried artanis sometime ago, but I did not see the point
<amz3`>right now, the only boilerplate i move from project to project is the static asset route handler
<nikita1>amz3`: nginx has http_basic_auth module
<amz3`>and routes are defined in terms of ice-9's match
<amz3`>over the request method and request's path components
<amz3`>tho I have no app in production so to speak
***ertesx is now known as ertes
<random-nick>hello, I tried to implement sc-macro-transformer with syntax-case but failed
<random-nick>I don't think it's possible
<random-nick>here's my try, failing for obvious reasons: http://paste.lisp.org/display/345687
<ArneBab>I just discovered the origin of the No Silver Bullet: http://worrydream.com/refs/Brooks-NoSilverBullet.pdf (1986) — it already discussed many of the things about design I discovered over the years. ← what marbles a quick search to support an argument can turn up ☺