Arc Forumnew | comments | leaders | submit | christianbryant's commentslogin

Thanks, Kartik!

I appreciate the info. I was actually just looking at Mu since I cloned that code for review recently. Since the framework I'll be doing this in is a testing suite, Mu may be the best model for me to follow.

Since I'm focused on UDP, Looking at comments in ac.scm in Arc, I realized MzScheme might hold the answer - there are plenty of UDP functions in those libraries.

Let me poke around a but and I'll shoot you an email if I have something to pass by you for opinion.

-----

3 points by christianbryant 2320 days ago | link

It's about now I realize I'm using an old Arc (hence the MzScheme reference). Moving to arc-nu and Racket (as noted by Zachary) which provides all the UDP I need ;-)

I'll spend some time on this - appreciate the responses.

-----

4 points by akkartik 2319 days ago | link

Great. Just one caveat: we tend to have more experience with just Anarki (https://github.com/arclanguage/anarki) which is also using the latest Racket.

If you're thinking of https://github.com/arclanguage/arc-nu, the author hasn't been active here in a while, so you may need to ping Pauan separately.

-----

3 points by christianbryant 2319 days ago | link

Ah... thanks for that note. I am working with Anarki primarily now as noted earlier for News and similar, but also didn't catch on that it was the main working model here.

-----


How about UDP calls? I sucked this CL snippet a while back (sorry I don't have the author info at hand). Creates a socket, sends data and receives data:

  (defun create-client (port buffer)
     (let ((socket (usocket:socket-connect "127.0.0.1" port
					 :protocol 
                                         :datagram
					 :element-type 
  '(unsigned-byte 8))))
    (unwind-protect
	 (progn
	   (format t "Sending data~%")
	   (replace buffer #(1 2 3 4 5 6 7 8))
	   (format t "Receiving data~%")
	   (usocket:socket-send socket buffer 8)
	   (usocket:socket-receive socket buffer 8)
	   (format t "~A~%" buffer))
      (usocket:socket-close socket))))

-----

2 points by hjek 2294 days ago | link

Check the Racket docs on UDP[0]. Arc itself is very high-level, but you can do more low-level stuff via Racket interop.

[0]: https://docs.racket-lang.org/reference/udp.html

-----


Appreciate it. I want to just write the code that contacts the server. Some Python pseudocode to represent the basics is below, but that just represents basic socket foo, minus the code for authentication, etc. The code would run through a list of 20+ systems and just connect one by one and log that system's local datetime. The assumption is we're doing UDP communication.

  client = socket
  host = local_system
  data = datetime_query
  remotedata = datetime_response
  target = remote_system

  client.connect (remotehost, port)
  client.send (data, target)
  remotedata.receive (remotedata, host)

  if remotedata:
	print 'Remote system date and time is:', remotedata
	else print 'No data received.'

-----

2 points by christianbryant 2320 days ago | link | parent | on: Mention of Arc on HN

Did you invite Shawn on over? He has quite a diverse language set in his GitHub projects. Even some Emacs Lisp which I have to give +1 for ;-)

-----


My immediate interest is in "News". I was seeking a codebase to work from that would put me in a similar space as HN in look and function. I came across Anarki and was pleased to see it was related to Arc which I have recently been playing with.

My longterm interest is in shifting my mental focus to a more Lisp-oriented way of programming and thinking. I'm not a programmer by trade; I am a software tester and scripter, mostly. I use Python typically, but after working on an OS build I had to learn Guile and Emacs Lisp quickly. I fell in love with Lisp and Scheme due to this experience.

Arc interest came about after reading about it on Paul Graham's website. I'd worked through a portion of Practical Common Lisp by Seibel and decided to try out Arc. It felt right. Since I also happen to work in the Information Security space, I have ideas that for the most part feel like Lisp is the right language, but I will need to become more proficient. Anarki feels like a good place to start to get there from.

Side note: An an automation tester at UCLA working with SenseTalk via Eggplant, I came across Mu while researching alternatives to Eggplant in areas it fails to provide results, such as passing and receiving AIX system calls, or validating logs are being written to. Mu has caught my attention for the longterm, as well, so kudos for both Anarki and Mu.

-----

2 points by akkartik 2321 days ago | link

Thanks for the kind words, and for the pointer to SenseTalk and Eggplant! I'd never heard of it, so I went off to correct that and ended up at this paper after a few clicks:

"Software Verification of Orion Cockpit Displays", https://ntrs.nasa.gov/archive/nasa/casi.ntrs.nasa.gov/201700...

Very interesting. Though the thought of NASA just using Python and a proprietary solution seems worrying. Maybe it's just for the test harness and other scaffolding, not code that will actually run in orbit.

-----

2 points by christianbryant 2320 days ago | link

I know lots of large organizations use Eggplant but this paper is a new one to me. Thanks - had to share this with my co-workers! Everyone seems enthused we share a testing tool with NASA ;-)

I work in Healthcare and we use Eggplant to test a large functional area of our Electronic Health Record (EHR). Like many automation tools, much of the success of the testing comes down to the testing team and how they develop the scripts.

I approach automated scripting design the way I approach programming an app, so I am pretty formal and diligent, I think. Hopefully I am taking lessons learned from Lisp and applying them to my work in automated testing to make the best tests I can.

-----

2 points by christianbryant 2322 days ago | link

It's kismet, perhaps, but I also worked on a project called Arc some 9 years ago before I found - well, Arc. It was a build tool chain written in Scheme, developed by Gregor Klinke. I was at the height of my interest in Lisp and Scheme back then, and I liked the idea of this project for potentially building a Software Configuration Management system oriented to Scheme and Lisp.

Looking back at this project with new eyes, perhaps swapping out Scheme for Arc, I wonder...

Arc build tool project http://savannah.nongnu.org/projects/arc

-----