LINUX.ORG.RU

Сообщения saufesma

 

Можно ли переписать рекурсивную функцию с двумя листами в итеративную

Форум — Development

while, dolist не могу применить, подкиньте идей

(defun m-lst-PHI4 (lst-1 lst-2)
  (if (eq (car lst-1) nil)
      *lst-val-PHI4*
    (progn
    (push (+ (car lst-1) (car lst-2))
	   *lst-val-PHI4*)
    (m-lst-PHI4 (setq lst-1 (cdr lst-1))
		(setq lst-2 (cdr lst-2))))))

 

saufesma
()

Ne ustanavlivaetsa Debian 10.7.0 s Live CD

Форум — Linux-install

Ustanavlivayu po default i takaya

Command 'grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=Debian --force' returned non-zero exit status 1.

No space left on device. grub-install: error: failed to register the EFI boot entry: No space left on device.

v BIOS vse otklucheno, nikakih secure boot, i t.d. Vse perechital, nikak.

Partition dlya EFI 300MB, proboval vruchnuyu 2GB, to zhe samoe

 

saufesma
()

grub-efi-amd64-signed' package failed to install into /target/

Форум — Linux-install

Linux Mint 19.3 cannot install grub

«grub-efi-amd64-signed' package failed to install into /target/. Without the GRUB boot loader, the installed system will not boot».

mint@mint:~/Desktop$ sudo fdisk -l
Disk /dev/loop0: 1.9 GiB, 2014482432 bytes, 3934536 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/sda: 465.8 GiB, 500107862016 bytes, 976773168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt


Device         Start       End   Sectors   Size Type
/dev/sda1       2048   3999743   3997696   1.9G EFI System
/dev/sda2    3999744  63999999  60000256  28.6G Linux filesystem
/dev/sda3   64000000  71999487   7999488   3.8G Linux swap
/dev/sda4   71999488 271998975 199999488  95.4G Linux filesystem
/dev/sda5  271998976 976771071 704772096 336.1G Linux filesystem


mint@mint:~/Desktop$ sudo fdisk -l | grep -i "disklabel"
Disklabel type: gpt


mint@mint:~/Desktop$ ls /sys/firmware/efi/
config_table  fw_platform_size  runtime      systab
efivars       fw_vendor         runtime-map  vars


mint@mint:~/Desktop$ efibootmgr
BootCurrent: 000B
Timeout: 2 seconds
BootOrder: 002A,0000,0001,0002,0006,0007,0008,0009,000A,000B,000C,000D,000E
Boot0000  BIOS Setup       
Boot0001  Boot Menu
Boot0002  Diagnostic Screen
Boot0003  Recovery and Utility
Boot0004  Diagnostic Program
Boot0005  Diagnostic Progrogram ROM
Boot0006* Floppy Disk Drive:
Boot0007* Drive0 HDD:
Boot0008* Drive2 HDD:
Boot0009* Drive4 HDD:
Boot000A* Drive5 HDD:
Boot000B* CD/DVD Drive:
Boot000C* NETWORK:
Boot000D* USB HDD:
Boot000E* USB CD/DVD:
Boot000F* IDER BOOT CDROM
Boot0010* IDER BOOT Floppy
Boot0011* ATA HDD:
Boot0012  Intel(R) ME Setup      
Boot0013  Intel(R) AMT Fast Call for Help
Boot0014* Erase Disk
Boot002A* ubuntu



mint@mint:~/Desktop$ sudo dmidecode -t 0
# dmidecode 3.1
Getting SMBIOS data from sysfs.
SMBIOS 2.6 present.

Handle 0x000D, DMI type 0, 24 bytes
BIOS Information
	Vendor: FUJITSU // Phoenix Technologies Ltd.
	Version: Version 2.09
	Release Date: 05/27/2013
	Address: 0xE0000
	Runtime Size: 128 kB
	ROM Size: 3456 kB
	Characteristics:
		PCI is supported
		PC Card (PCMCIA) is supported
		PNP is supported
		BIOS is upgradeable
		BIOS shadowing is allowed
		Boot from CD is supported
		Selectable boot is supported
		EDD is supported
		3.5"/720 kB floppy services are supported (int 13h)
		Print screen service is supported (int 5h)
		8042 keyboard services are supported (int 9h)
		Serial services are supported (int 14h)
		Printer services are supported (int 17h)
		CGA/mono video services are supported (int 10h)
		ACPI is supported
		USB legacy is supported
		BIOS boot specification is supported
		Function key-initiated network boot is supported
		Targeted content distribution is supported
	BIOS Revision: 2.9

Looks like sort of solution but does not work for me

https://www.linux.org/threads/get-the-error-the-grub-efi-amd64-signed-package...

sudo mkdir -p /mnt/boot/efi
sudo mount /dev/sda2 /mnt
sudo mount /dev/sda1 /mnt/boot/efi
for i in /dev /dev/pts /proc /sys; do sudo mount -B $i /mnt$i; done
sudo chroot /mnt
sudo apt-get update
sudo apt-get install ubuntu-system-adjustments
apt install --reinstall grub-efi-amd64-signed
sudo os-prober
sudo update-grub
exit

chroot and apt-get commands not found.

Where Disk /dev/loop0 comes from, no idea.

Any ideas how to fix it are really welcomed.

I get some clue at

https://wiki.debian.org/UEFI

# efibootmgr -c -d /dev/sdb -p 1 -w -L debian -l '\EFI\debian\grubx64.efi'
BootCurrent: 0019
Timeout: 0 seconds
BootOrder: 0019,0006,0007,0008,0009,000A,000B,000C,000D,000E,000F,0010,0011,0012,0013
Boot0000  Setup
Boot0001  Boot Menu
Boot0002  Diagnostic Splash Screen
Boot0003  Startup Interrupt Menu
Boot0004  ME Configuration Menu
Boot0005  Rescue and Recovery
Boot0006* USB CD
Boot0007* USB FDD
Boot0008* ATAPI CD0
Boot0009* ATA HDD2
Boot000A* ATA HDD0
Boot000B* ATA HDD1
Boot000C* USB HDD
Boot000D* PCI LAN
Boot000E* ATAPI CD1
Boot000F* ATAPI CD2
Boot0010  Other CD
Boot0011* ATA HDD3
Boot0012* ATA HDD4
Boot0013  Other HDD
Boot0014* IDER BOOT CDROM
Boot0015* IDER BOOT Floppy
Boot0016* ATA HDD
Boot0017* ATAPI CD:
Boot0018* PCI LAN
Boot0019* debian

 

saufesma
()

Разбор кода на McCLIM

Форум — Development

Там где не получается сообразить поставил много вопросительных знаков. Надеюсь получить ответы от профессионалов.

Распространителям зарубежной литературы здесь нечего делать, идите лесом.

(in-package :common-lisp-user)
(defpackage :first-app
	    (:use :clim :clim-lisp)
	    (:export first-app))
(in-package :first-app)

(defun av-test-display-screen (frame pane)
  (declare (ignore frame)) 
  (with-text-size (pane :large)
    (fresh-line pane)
    (present '(com-reset-clock-1) 'command :stream pane)
    (fresh-line pane)))

(define-application-frame av-test ()
  ((own-window-p :initform nil)) ;;  These slots will typically hold
                                 ;;  any per-instance frame state.

  (:menu-bar t)
  (:panes
   (screen :application
           :display-time t
	   :display-function #'av-test-display-screen
           :text-style (make-text-style :sans-serif :roman :normal))
   (interactor :interactor :min-width 600)
   (doc :pointer-documentation))
  (:layouts
   (defaults
	 (vertically ()
	   screen
	   interactor
	   doc))))

;; default-frame-top-level will also establish a simple restart
;; for abort, and bind the standard stream variables. *query-io* will be bound
;; to the value returned by frame-query-io
(defun reset-clock-1 (&key (stream *query-io*) (ow t))
;;                            ^^^    ^^^        ^  ^
;;                     keyword-name   var     k-n  v
  (multiple-value-bind (second minute hour day month)
      (decode-universal-time (get-universal-time))
    (declare (ignore second)) ;; self explanatory, var second is not used
                              ;; anywhere
    (restart-case
	;; restartable-form
	(progn
	  ;; For instance, an accepting-values whose fields consist of
	  ;; gadgets may appear in an ordinary CLIM
          ;; stream pane.
	  ;; For example, accepting-values dialogs can be implemented by
          ;; using an encapsulating stream that tailors calls to accept and
	  ;; prompt-for-accept in such a way that the output is captured and
	  ;; formatted into a dialog that contains prompts and fields
          ;; that can be clicked on and modified by the user.

	  ;; (For example, the behavior of accepting-values can be implemented
	  ;; by creating a special class of stream that turns calls to
	  ;; accept into fields of a dialog.) ????????????? HOW TO???

	  ;; accepting-values (&optional stream &key own-window exit-boxes
	  ;; initially-select-query-identifier modify-initial-query
	  ;; resynchronize-every-pass resize-frame align-prompts label
	  ;; scroll-bars x-position y-position width height command-table
	  ;; frame-class) &body body   [Macro]

	  (clim:accepting-values (stream :own-window ow)
				 ;; (accepting-values (stream :own-window ow)
				 ;;            same as?????
				 ;; (accepting-values
				 ;; (&optional stream
				 ;; &key own-window
				 ;; what is ow)   ??????????
	    (format stream "Enter the time~%")
	    (setq month (clim:accept 'integer :stream stream
				      :default month :prompt "Month"))
	    (terpri stream)
	    (setq day (clim:accept 'integer :stream stream
				    :default day :prompt "Day"))
	    (terpri stream)
	    (setq hour (clim:accept 'integer :stream stream
				     :default hour :prompt "Hour"))
	    (terpri stream)
	    (setq minute (clim:accept 'integer :stream stream
				       :default minute :prompt "Minute")))
	  ;; This could be code to reset the time, but instead
	  ;; we’re just printing it out
	  (format nil "New values: Month: ~D, Day: ~D, Time: ~D:~2,'0D."
		  month day hour minute))
      ;; case-name is abort, it names this restart. 
      (abort () (format nil "Time not set")))))

(define-av-test-command (com-reset-clock-1 :name t :menu nil) ()
  (with-slots (own-window-p) clim:*application-frame*
    (format t "Result: ~S~%" (multiple-value-list
			      ;; (defun reset-clock-1
			      ;; (&key (stream *query-io*) (ow t)) ...)
			      (reset-clock-1 :ow own-window-p))))
  (finish-output *standard-output*)) ;;       ^         ^
;;                                            |      av-test slot
;;                                          no idea???
(defun first-app ()
(run-frame-top-level (make-application-frame 'av-test)))

 

saufesma
()

не пойму как запускать

Форум — Admin

Существует путь прописанный в

%echo &PATH /usr/local/sbin
заливю туда папки bin, doc, some выполняемый файл находится в bin
%bin-bin
no such file
копирую bin-bin в директорию /usr/local/sbin
%bin-bin
работает
но если в другой папке находится другой ему нужный файл то bin-bin его не найдёт. Если же нужный файл вытащить в директорию /usr/local/sbin то bin-bin его найдёт. Подскажите как выкрутится чтобы всё из папок работало.

 

saufesma
()

Как получить результаты от defmethod, defgeneric

Форум — Development
(defclass shape () ()
  (:documentation "The foundation of all shapes."))

(defclass triangle (shape)
  ((a :reader side-a :initarg :side-a)
   (b :reader side-b :initarg :side-b)
   (c :reader side-c :initarg :side-c)))
;; Constructor
(defun make-triangle (a b c)
  ;; All sides should be represented as floats
  (make-instance 'triangle :side-a (coerce a 'float)
		           :side-b (coerce b 'float)
		           :side-c (coerce c 'float)))
;; The function three-sides-to-angle will be useful in the bodies of the
;; methods that return the angles of the triangle.
;;; Return the angle A between adjacent sides b and c
;;; and opposite side a, given all sides of a triangle
;;; Law of Cosine: a^2 = b^2 + c^2 - 2 bc(cos A)
(defun three-sides-to-angle (a b c)
  (acos (/ (- (+ (expt b 2)
		 (expt c 2))
		 (expt a 2))
	   (* 2 b c))))
;; Next, we define the methods for returning the individual angles of a
;; triangle.
(defmethod angle-A ((tri triangle))
  (three-sides-to-angle
   (side-a tri) (side-b tri) (side-c tri)))
(defmethod angle-B ((tri triangle))
  (three-sides-to-angle
   (side-b tri) (side-c tri) (side-a tri)))
(defmethod angle-C ((tri triangle))
  (three-sides-to-angle
   (side-c tri) (side-a tri) (side-b tri)))
;; We choose to define explicitly the generic functions for the operations
;; that are part of the exturnal protocol. The defgeneric forms indicate
;; that these three operations are intended to work on any shape:
(defgeneric dimensions (shape)
  (:documentation "Returns list of side lengths."))
(defgeneric angles (shape)
  (:documentation "Returns list of angles."))
(defgeneric area (shape)
  (:documentation "Returns area of the shape."))
;; The three external operations that deal with existing triangles can be
;; defined in terms of the internal operations, without depending on any
;; knowledge of how those internal operations are implemented.
(defmethod dimensions ((tri triangle))
  (list (side-a tri)
	(side-b tri)
	(side-c tri)))
(defmethod angles ((tri triangle))
  (list (side-A tri)
	(side-B tri)
	(side-C tri)))
;;; Return the area of a triangle
;;; Algorithm is: area = ab(sin C) / 2
(defmethod area ((tri triangle))
  (* (side-a tri) (side-b tri)
     (sin (angle-C tri))
     .5))

Как получить результаты от defmethod, defgeneric

CL-USER> (make-triangle 20 30 40)
#<TRIANGLE {100300A2B3}>
CL-USER> (three-sides-to-angle 20 30 40)
0.5053605
CL-USER> (three-sides-to-angle 60 40 80)
0.8127556

Попробовал, а он мне вот
CL-USER> (dimensions triangle)
; Evaluation aborted on #<UNBOUND-VARIABLE TRIANGLE {10030E3E33}>.
CL-USER> (dimensions 'triangle)
; Evaluation aborted on #<SB-PCL::NO-APPLICABLE-METHOD-ERROR {100344E173}>.
CL-USER> (angle-A tri)
; Evaluation aborted on #<UNBOUND-VARIABLE TRI {10035E79E3}>.

Source: Sonya Keene Object-oriented programming in Common Lisp.

 

saufesma
()

HyperSpec loop macro

Форум — Development

Меня интересует как это применять на практике, в умных книжках об этом ничего нет. Надеюсь что кто-нибудь знает.

HyperSpec

 loop [name-clause] {variable-clause}* {main-clause}* => result*

name-clause::= named name 

variable-clause::= with-clause | initial-final | for-as-clause 

with-clause::= with var1 [type-spec] [= form1] {and var2 [type-spec] [= form2]}* 

main-clause::= unconditional | accumulation | conditional | termination-test | initial-final 

initial-final::= initially compound-form+ | finally compound-form+ 

unconditional::= {do | doing} compound-form+ | return {form | it} 

accumulation::= list-accumulation | numeric-accumulation 

list-accumulation::= {collect | collecting | append | appending | nconc | nconcing} {form | it}  
                     [into simple-var] 

numeric-accumulation::= {count | counting | sum | summing | } 
                         maximize | maximizing | minimize | minimizing {form | it} 
                        [into simple-var] [type-spec] 

conditional::= {if | when | unless} form selectable-clause {and selectable-clause}*  
               [else selectable-clause {and selectable-clause}*]  
               [end] 

selectable-clause::= unconditional | accumulation | conditional 

termination-test::= while form | until form | repeat form | always form | never form | thereis form 

for-as-clause::= {for | as} for-as-subclause {and for-as-subclause}* 

for-as-subclause::= for-as-arithmetic | for-as-in-list | for-as-on-list | for-as-equals-then | 
                    for-as-across | for-as-hash | for-as-package 

for-as-arithmetic::= var [type-spec] for-as-arithmetic-subclause 

for-as-arithmetic-subclause::= arithmetic-up | arithmetic-downto | arithmetic-downfrom 

arithmetic-up::= [[{from | upfrom} form1 |   {to | upto | below} form2 |   by form3]]+ 

arithmetic-downto::= [[{{from form1}}1  |   {{{downto | above} form2}}1  |   by form3]] 

arithmetic-downfrom::= [[{{downfrom form1}}1  |   {to | downto | above} form2 |   by form3]] 

for-as-in-list::= var [type-spec] in form1 [by step-fun] 

for-as-on-list::= var [type-spec] on form1 [by step-fun] 

for-as-equals-then::= var [type-spec] = form1 [then form2] 

for-as-across::= var [type-spec] across vector 

for-as-hash::= var [type-spec] being {each | the}  
               {{hash-key | hash-keys} {in | of} hash-table  
                [using (hash-value other-var)] |  
                {hash-value | hash-values} {in | of} hash-table  
                [using (hash-key other-var)]} 

for-as-package::= var [type-spec] being {each | the}  
                  {symbol | symbols | 
                   present-symbol | present-symbols | 
                   external-symbol | external-symbols} 
                  [{in | of} package] 

type-spec::= simple-type-spec | destructured-type-spec 

simple-type-spec::= fixnum | float | t | nil 

destructured-type-spec::= of-type d-type-spec 

d-type-spec::= type-specifier | (d-type-spec . d-type-spec) 

var::= d-var-spec 

var1::= d-var-spec 

var2::= d-var-spec 

other-var::= d-var-spec 

d-var-spec::= simple-var | nil | (d-var-spec . d-var-spec) 

 

saufesma
()

sbcl выдал странную ошибку

Форум — Development
(defun list-moment-left-A
  (map left-moment-A *left-forces-A* *left-A*))
; in: DEFUN LIST-MOMENT-LEFT-A
;     (SB-INT:NAMED-LAMBDA LIST-MOMENT-LEFT-A
;         (MAP LEFT-MOMENT-A *LEFT-FORCES-A* *LEFT-A*)
;       (BLOCK LIST-MOMENT-LEFT-A))
; 
; caught STYLE-WARNING:
;   The variable MAP is defined but never used.
; 
; caught STYLE-WARNING:
;   The variable LEFT-MOMENT-A is defined but never used.
; 
; compilation unit finished
;   caught 2 STYLE-WARNING conditions
LIST-MOMENT-LEFT-A

 

saufesma
()

После установки slime sbcl swank из коробки не могу найти их конфигов

Форум — Admin

М-х slime работает на ура, хотя inferior-lisp в моём .emacs не прописан. Скажите где эти конфиги устанавливаются при установке этих пакетов?

 ,

saufesma
()

Не работает функция

Форум — Development
(defvar n)
(setq n 3)

(defun list-reverse (list)
  (do ((z 1 (- n 1))
       (x list (cdr x))
       (y '() (cons (car x) y)))
      ((= z 0)
       y)))

(list-reverse '(a b c d f e g)) => '(a b c)

и оно никак. Надо обязательно на do сделать, а то я с ним не разберусь.

Там люди вот такое выдают на do.

(defun factorial (n)
(do (( j n (- j 1))
(f 1 (* j f )))
((= j 0) f )))
(defun list-reverse (list n)
  (do ((n (- n 1))
       (x list (cdr x))
       (y '() (cons (car x) y)))
      ((= n 0) y)
    (print (list n x y))))

( LIST-REVERSE '(b n v g f k) 3)

(2 (B N V G F K) NIL) 
(2 (N V G F K) (B)) 
(2 (V G F K) (N B)) 
(2 (G F K) (V N B)) 
(2 (F K) (G V N B)) 
(2 (K) (F G V N B)) 
(2 NIL (K F G V N B)) 
(2 NIL (NIL K F G V N B)) 
(2 NIL (NIL NIL K F G V N B)) 
(2 NIL (NIL NIL NIL K F G V N B)) 
(2 NIL (NIL NIL NIL NIL K F G V N B)) 
(2 NIL (NIL NIL NIL NIL NIL K F G V N B)) 
(2 NIL (NIL NIL NIL NIL NIL NIL K F G V N B)) 
(2 NIL (NIL NIL NIL NIL NIL NIL NIL K F G V N B)) 
(2 NIL (NIL NIL NIL NIL NIL NIL NIL NIL K F G V N B)) 
(2 NIL (NIL NIL NIL NIL NIL NIL NIL NIL NIL K F G V N B)) 
(2 NIL (NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL K F G V N B)) 
и т.д.

пока не понял почему

ну вот с + заработала

(defun list-reverse (list)
  (do ((n 0 (+ n 1))
       (x list (cdr x))
       (y '() (cons (car x) y)))
      ((= n 3) y)
    (print (list n x y))))
LIST-REVERSE
CL-USER> ( LIST-REVERSE '(b v c x z))

(0 (B V C X Z) NIL) 
(1 (V C X Z) (B)) 
(2 (C X Z) (V B)) 
(C V B)

 

saufesma
()

Не могу написать код по заданному алгоритму

Форум — Development

Граждане и гражданки ЛОР не дайте свихнуться, а дайте код на Lisp или Scheme

у меня два списка (а1 а2 а3 ... an) (Р0 Р1 Р2 ... Pn)

в первом проходе получаю списки (а1) (Р0) и решение такого ур-ия

M1 = P0 * a1

в втором проходе получаю списки (a1 a2) (P0 P1) и решение такого ур-ия

M2 = P0 * a2 + (P1 * (a2 - a1))

в третьем проходе плучаю списки (a1 a2 a3) (P0 P1 P2) и решение такого ур-ия

M3 = P0 * a3 + (P1 * (a3 - a1) + P2 *(a3 - a2))

ну и т.д.

Общее уравнение

 i
 Mn = P0 * an + ΣPi * (an - ai)
 i=1

мозги колом встали

 ,

saufesma
()

Динамически добавляемые текстовые поля

Форум — Development
#lang racket/gui
; Make a frame by instantiating the frame% class
(define frame (new frame% [label "Example"]))

;; переменная количества сил действующих на балку
(define num 0)

;; поле ввода количества сил действующих на балку
(define how-many-fields (new text-field%
                             [label "Сколько сил"]
                [parent frame]
                [callback (λ (w e) (set! num (string->number (send w
get-value))))]))

;;здесь наверное должен быть макрос
;;бестолковая попытка добавления текстовых полей в форму
(define (count n t-f)
  (if (= n 0)
      t-f
      (count (- n 1) t-f)))

;; количество этих полей должно быть равно num, как к такой
;  проблеме подходить
(define tf (new text-field% [label "bla"]
                [parent frame]))
(count num tf)

; Show the frame by calling its show method
(send frame show #t)

 

saufesma
()

cmucl on linux mint

Форум — Development

Зараза

/opt/cmucl-21d/bin$ lisp bash: /home/wool/opt/cmucl-21d/bin/lisp: No such file or directory

/opt/cmucl-21d/bin$ ./lisp bash: ./lisp: No such file or directory

echo $PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/brlcad/bin:/home/wool/opt/cmucl-21d/bin

где-то простой косяк

может потому, что не system wide /home/wool/opt/cmucl-21d/bin

новый bash зпускаешь и

echo $PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/brlcad/bin

 

saufesma
()

poplog

Форум — Development

кто-нибудь пробовал работать с poplog?

https://www.cs.bham.ac.uk/research/projects/poplog/V16/AREADME.html

 

saufesma
()

Добавьте пример letrec

Форум — Development

r5rs приводит пример

(letrec ((even?
          (lambda (n)
            (if (zero? n)
                #t
                (odd? (- n 1))))) ;; ---> <bindings> should have 
                         ;;the form ((<variable1> <init1>)
                         ;;в данном случае
                         ;;<variable1> n
                         ;;<init1> (lambda (n) ...)
         (odd?
          (lambda (n)
            (if (zero? n)
                #f
                (even? (- n 1)))))) ;;---> <bindings>
  (even? 88)) ;;---> <body>

library syntax: (letrec <bindings> <body>)

Из-за того что

library procedure: (odd? n)

library procedure: (even? n)

These numerical predicates test a number for a particular property, returning #t or #f.

пример выглядит не совсем понятным.

Бросьте более читаемый примерчик использования letrec.

 

saufesma
()

Есть ли VARKON CAD скомпилированный в/как AppImage

Форум — Development

Нигде не могу найти, хотелось бы посмотреть как оно устроено.

 

saufesma
()

На какой градус повернуть оси в 3Д чертеже чтобы получить аксонометрию в 2Д

Форум — Science & Engineering

Оси, default

Х горизонтально слева направо

Y вверх

Z на user

 

saufesma
()

Вопрос грамотным форумчанам

Форум — Talks

Объясните, мне один момент. no-such-file, monk, DarkEld3r

вот здесь беседа очень грамотных людей

DrRacket and elisp окончательно запутался (комментарий)

сегодняшняя беседа идет уже 9 часов, по моим подсчётам.

Вот мой вопрос почему это количество постов не перетекает в качество, то есть в предложение сделать, что-либо, управляемый механизм, управляемую технологическую цепочку, что угодно. Ведь если такого нет это всё просто болталогия даже если она и интересная. Ведь это 9 часов жизни в никуда. Может уже стоит попробовать, что-то предложить создать.

Перемещено Zhbert из general

 

saufesma
()

DrRacket and elisp окончательно запутался

Форум — Development

Не могу понять уже, что я тут писал, всего-то нужна функция которая режет лист на две части и возвращает левую часть то, что я написал на ракете, не работает и не пойму почему

#lang racket
(define *distance-lst* (list 1 2 3 4 5 6))

(define *A-distance* 3)
(define *left-A-lst* '())

(define d-lst (length *distance-lst*))
(define *output-lst* '())
(define (slice input-lst a output-lst)
  (if (< (first input-lst) a)
      (slice (cons (first input-lst) output-lst)
             a
             (set! input-lst (rest input-lst)))
      output-lst))
     
;;(define (split-lst lst-input a lst-output)
;  (if (< (first lst-input) a)
 ;     (split-lst (set! lst-input (rest lst-input))
  ;                     a
   ;                    (set! lst-output
    ;                         (cons
     ;                         (first lst-input) lst-output)))
 ; lst-output))

(slice *distance-lst* *A-distance* *left-A-lst*)

и вот на elisp и работает как надо, задолбало, что не так не могу понять эту ракету

(defun slice (input-lst a output-lst)
(if (< (car input-lst) a)
(slice (cdr input-lst) a (push (car input-lst) output-lst))
output-lst))

(nreverse (slice '(1 2 3 4 5 6) 5 '()))

 ,

saufesma
()

Emacs -> sbcl, wishfull thinking

Форум — Development

Никто не пробовал соединить emacs widget с sbcl, я вот к чему, пишем интерфейс на emаcs а обработчик вызывает код на sbcl и уже там происходит вычисление кода, common lisp кода.

 ,

saufesma
()

RSS подписка на новые темы