- 85
- 306 991
Philip Bohun
เข้าร่วมเมื่อ 19 ธ.ค. 2011
Luajit is Wicked Fast?
I ran a benchmark found on the luajit site and compared it to a few other languages, including c.
มุมมอง: 375
วีดีโอ
07 Assembly: Writing ls
มุมมอง 1.3K2 หลายเดือนก่อน
Today we're going to write a simple version of the ls program to learn about the DOS file system.
06 Assembly: Writing Cat
มุมมอง 2.5K5 หลายเดือนก่อน
Today we're going to write the cat program, a program that writes file contents to stdout.
05 Assembly: Segment Registers
มุมมอง 8047 หลายเดือนก่อน
Today we'll take a look at the segment registers as well as setting segments within our assembly code.
04 Assembly: EXE files and Write Bytes
มุมมอง 5428 หลายเดือนก่อน
Today we're going to look at the much improved EXE files and how to write bytes like we could in Linux.
03 Assembly: COM Files and Debug
มุมมอง 3979 หลายเดือนก่อน
Today I will go through the basics of a COM executable as well as the basics of how to use the Debug program built into DOS.
02 Assembly: Useful Info
มุมมอง 4099 หลายเดือนก่อน
Here I'll give some useful info a bout using DOSBox, 32 bit registers, and how to create your own batch files to make shortcuts.
01 Assembly Programming in DOSBox
มุมมอง 1.9K9 หลายเดือนก่อน
Assembly language programming returns! In order to have a stable system to program on I'm going to use DOSBox. dosbox-x: dosbox-x.com/ flat assembler: flatassembler.net/download.php hx dox extender: www.japheth.de/HX.html another hx dos extender: github.com/Baron-von-Riedesel/HX
07 HTTP Library in Common Lisp
มุมมอง 1549 หลายเดือนก่อน
Today we're going to write a handler for SIGINT and a loop to test it. Source Code: gitlab.com/pbohun/tinynet
06 HTTP Library in Common Lisp
มุมมอง 17811 หลายเดือนก่อน
Today we're going to write a function to select a route to our server's route table. Source Code: gitlab.com/pbohun/tinynet
05 HTTP Library in Common Lisp
มุมมอง 280ปีที่แล้ว
Today we're going to write a function to add a route to our server's route table. Source Code: gitlab.com/pbohun/tinynet
04 HTTP Library in Common Lisp
มุมมอง 285ปีที่แล้ว
Today we're going to write a function to listen on a TCP socket. Source Code: gitlab.com/pbohun/tinynet
03 HTTP Library in Common Lisp
มุมมอง 488ปีที่แล้ว
Today we're going to write a function to parse an http response and add some documentation strings to our functions. Source Code: gitlab.com/pbohun/tinynet
02 HTTP Library in Common Lisp
มุมมอง 934ปีที่แล้ว
Today we're continuing work on an HTTP 1.1 library in Common Lisp. Specifically, for Steel Bank Common Lisp. Our ultimate goal today is creating a function to parse an http request, but I end up covering a bunch of different pieces of information about Common Lisp. Source Code: gitlab.com/pbohun/tinynet
01 HTTP Library in Common Lisp
มุมมอง 3.9Kปีที่แล้ว
Today we're going to start creating a small HTTP 1.1 library in Common Lisp. Specifically, for Steel Bank Common Lisp. Source Code: gitlab.com/pbohun/tinynet
The gcc -march=native flag made C code faster than Lua with FFI, at least in my environment. I also added Go, Java, PyPy and Ruby to this benchmark. Here is the github repo for those who are interested: 0riginaln0/benchmark
This is a great video, I'm using it to learn during work!
If you run the emacs command M-x signal-process it will ask you for a process name or id which can be gotten from the list-processes command, but the lisp repel is always called inferior-lisp so type that in and then it asks for the signal and you type 2 and the code will quit properly. Too bad this series is on hiatus, this was a fun project.
I think the problem is that you are doing double orecision arithmetics in the C code. Try chaning the literals from 0.3 to 0.3f and so forth. That should get you decent SSE vectorization. If you add an additional -march=native flag, you shouls be anle to get close to maximum performance on your hardware.
You should research more I would be interested
What about Julia?
That's vwry interesting, can you output somehow the jit code generated at runtime by lua and compare it with compiled c?
Consider using Emacs's electric pair mode which inserts pairs of parentheses, which makes it much easier to program Lisp(this reduces your problems with parens). Also you can use rainbow delimiters package for coloring of parens which helps a lot.
interesting. in my tests, replacing the calloc call to a non heap allocated structured improved the C performance a lot, but then i think the O2 even O3 flag optimized the whole code out
There is NO PRIVACY at all on the internet.
mount c /home/phil/Apps/dos/cdrive c: set path=/pathic apps: C:\apps\fasm: C:\apps\hxrt\bin hdpmi32.exe -r cls
Good work. I like to use x86 assembly with debug and batch files as open source container. Most of these container batch files have to start with one or more parameter(%1 %2 %3) attached to build and to modify the routine inside. Example to start with row color "text" attached: CENTER.BAT 8 1b "output this center align". Imagine If we start an exe file with decimal or hexadecimal values attached located in the PSP we have to convert the ASCII numbers digit by digit to use the values. But these batch file don’t need to do this, because we order Debug to convert it.
cld ; clear direction flag for increase the pointer of string instructions
mov ah,62h ; get segment of PSP int 21h ; return in BX segment
hello
I can't believe it. The youtube algorithm actually suggested something amazing that I did not actively look for. That has not happened in a long time. I like this very much. Greetings from Germany!
Good video as always
please don-t use light mode man
love to these tutorials with all the learning, haven't continued past 53:24 but you could have use (assoc '"Content-Length" headers :test #'string-equal) on the headers alist to get the headers cons for content length
Good explanation. I was trying to wrap my head around this and you distilled it down and cut out the bs. Thanks!
Please incresae font size next time
Pretty much exactly what I'm looking for something that I can easily deploy on my home server I know how to use a cluster of vm's (I currently have a small vm cluster set up), I like the simplicity of this form of processing, I may just employ this technique, especially because my home server does get a low number of requests. And using compiled languages!!
quality content, thank you for this series.
We can read from a file 64 kb at once and for larger files we have to call the read function again and again til the end of file. Check CF and AX after each call.
I think there is a bug in this program. Let's say my file is 1030 bytes long. It will print the first 1024 bytes on the first iteration, But on the second it will print the remaining 6bytes, plus the other 1018 bytes that were left on the buffer from the privious iteration, because you are reusing the same buffer and never cleaned it up.
Actually, if you look at the documentation for the read and write syscalls, the number of bytes read is returned in AX, which the code then moves to CX to use as the number of bytes to write, so this will work just fine.
Isn't this more akin to `type.exe` in the windows world?
Yeah, but more people know about cat than type.exe
Very clear and concise, loved it!
Writing Dog next?
Awsome!
I used CGI years ago to learn about how the http protocol works (GET vs POST etc). Now I use nginx and haven't been able to get CGI working; I'm sure somebody knows how to set that up, but not me haha.
great content, well presented. Thanks, Phillip!
I came back for a second watch! after revisiting a lisp book trying to understand some topics I had not, I remembered this series and wanted to see some lisp in action!!
Is it just me or is the sound is to the left???
A lot of other instructions use the DS segment by default, but if the instruction use the BP register or SP as offset register than SS segment is default.
There are some more powerfull string instructions that use segment register. lods(b/w/d) = DS:SI, stos(b/w/d) = ES:DI, movs(b/w/d) = DS:SI + ES:DI. If the direction flag is not set the string instruction increase the offset register SI and DI for a byte or add 2 or add 4 for word and dword to the offset register.
Good work. I like to use x86 assembly with DosBox, but i use a special debug version that provide 16 bit and 32 bit instructions to create a com file. I put all instructions to build a routine into a batch file using batch files as an open source container to telecontrol debug. I made some videos(no speech) to show how it works and to share the batch files. Have fun.😊
Love it
This is insane. Exactly what i was looking for
Thanks for this. :D.
I'd rather write Perl. 🤣
nice
Soliduscode not exit
thank you for this video on such an obscure assembler. hope you a nice day
my 2c for a shorter get-path: (remove-if #'str:blankp (str:split "/" s)) and even (str:split "/" s :omit-nulls t) also (= … 0) => (zerop …)
Hi, cool series and nice trick to catch a C-c. There's a simpler recipe on the Cookbook -> scripting. With SBCL, you can handle the sb-sys:interactive-interrupt condition, and there's the library with-user-abort (on Quicklisp) to make it portable.
😬 "promo sm"
Point 1: Decentralized. - My answer: Yeah your assessment is not bad. idk why pople jump to calling bitcoin decentralized rather than distributed. Also, isn't the internet itself btc runs on kind of centralized to a certain degree? Like, ISP's seem to control and direct most of the traffic, that sounds centralized enough to me. Point 2: Not private - My answer: Bitcoin isn't private, but it's not the only crypto coin out there, and as I'm sure you know, there are privacy focused blockckains existing today, like Monero, and more being developed, like Midnight. Point 3: Energy efficiency - My answer: btc is likely not very efficient energetically, again, other blockchains are appearing mitigating this, such as Ripple and Cardano (this last one has the upcoming midnight sidechain btw). So yeah in essence I'd say btc isn't perfect, right now it's just digital gold, but there are alternatives coming up, btc is just the first step.
Cool
Hey mate, what program did you use to create the slide for this video?
Love it. Thank you