spraci.info

Search

Items tagged with: c

conversion of PostgreSQL binary timestamp (8 bytes) to useful formats:
int time_fnum = PQfnumber(res, "time");
char \*time = PQgetvalue(res, 0, time_fnum);

/* convert PostgreSQL timestamp to string */
long time_val = htobe64( *(uint64_t *)time);

struct timespec ts;

ts.tv_sec = (long)(time_val/1000000);
ts.tv_nsec = (time_val%1000000)\*1000;

char time_gmt_str[20];
char time_local_str[20];

struct tm \*t = gmtime(&ts.tv_sec);
strftime(time_gmt_str, 20, "%Y-%m-%d %H:%M:%S.%ld", t);
t = localtime(&ts.tv_sec);
strftime(time_local_str, 20, "%Y-%m-%d %H:%M:%S.%ld", t);

printf("Time value: 0x%016lX, time GMT: %s.%ld, time local: %s.%ld",
time_val,
time_gmt_str, ts.tv_nsec/1000,
time_local_str, ts.tv_nsec/1000
);

#C #programming #PostgreSQL
 

Gaming in Different Languages


#retrocomputing #6502 #65c02 #assembly #c #forth #game #microcontroller #optimization #processor #programminglanguages #python #retro #robot #hackaday
posted by pod_feeder_v2
Gaming in Different Languages
 
Image/photo

Computer History Museum. The Earliest Unix Code

Dennis Ritchie, an ordinary W.A.S.P.

What is it that runs the servers that hold our online world, be it the web or the cloud? What enables the mobile apps that are at the center of increasingly on-demand lives in the developed world and of mobile banking and messaging in the developing world? The answer is the operating system Unix and its many descendants: Linux, Android, BSD Unix, MacOS, iOS—the list goes on and on. Want to glimpse the Unix in your Mac? Open a Terminal window and enter “man roff” to view the Unix manual entry for an early text formatting program that lives within your operating system.
MORE: https://computerhistory.org/blog/the-earliest-unix-code-an-anniversary-source-code-release/

#unix #os #Ritchie #Thompson #C #language #history #museum #photo #programming #computer #science #software #development
 
Image/photo

Dennis Ritchie, an ordinary W.A.S.P.

He didn't crash any monuments or police cars. He was not a sjw moron, 'green' freak, 'meeetooo activist', anarchist, 'netizan' or coloured 'freedom fighter', etc. ... But he was the FATHER OF UNIX and C language.

Dennis M. Ritchie papers. Computer History Museum

Description
The Dennis M. Ritchie papers range in date from 1959 to 2011 and hold materials related to Ritchie’s college and graduate education, his career at Bell Laboratories, and his work on Unix and the C programming language. Types of materials include course materials, program listings, manuals, technical reports, memos, presentation materials, conference proceedings, books, photographs, and software.

The earliest portion of the papers consists of ma
... Show more...
 
I strive for writing a Fediverse client in C.
I dug into ActivityPub and associated standards and the abyss looked at me.
the json-ld is a huge standard and realization of only that standard's API would take too long. maybe some later.
so I quit thinking about writing support for full standard first and suppose that limited use like in common Fediverse networks would be just fine for the beginning.

#thoughts #programming #Fediverse #ActiviyPub #C
 
RIP Nissan | Protesters carry 'coffins' with automaker's CEOs amid Spanish plant shutdowns
#c
 
set up cgit for my repository for dnscrypt-proxy:
Git repository browser
gonna save the code there in case I need to patch anything.

will add more code to the cgit, I think. I have some patches for different packages. local cgit is better than github, bought by M$.

#cgit #ironbug.org #code #C #dnscrypt-proxy
 
I had to make this post.
It's about turning back from go-shit to pure C in dnscrypt-proxy.
yes, the original [b]dnscrypt-proxy 1.9.5[\b] works. it works just fine, as is. I had not even patch it.
I had a kind of quest to find the sources, it was not found at archive.org I found them at
https://snork.ca/posts/2018-06-24-dnscrypt-proxy-on-debian-maybe-final/dnscrypt-proxy-1.9.5.tar.gz
usual build process autoreconf -fi && configure [options, if necessary] && make. nothing to comment.
install it for auto run in your init system yourself. I use runit and I do it manually. I will make a package for Void Linux later.

now, download the 'fresh' dnscrypt-resolvers.csv from here (get raw file to get csv, not the html!):
https://github.com/dyne/dnscrypt-proxy/blob/master/dnscrypt-resolvers.csv

then, we can run util... Show more...
 
Bin ja mal gespannt, wie man das plausibel erklären wird....
MicMun - 2020-04-19 07:28:26 GMT
Interessant, wenn der #Stickoxid Anteil auch mit weniger Autos gleich bleibt.
Aber #Diesel-Fahrverbote aufgrund vermutlich falscher Messungen durchdrücken.
Gilt jedenfalls in #Stuttgart, mal schauen, wie es in anderen Städten aussieht.

https://www.focus.de/auto/news/diesel-drama-stuttgart-schafft-seinen-feinstaub-alarm-ab-fahrverbote-bleiben-trotzdem_id_11888497.html
 

COVID-19 cases of unknown source perplex researchers


"Studies on the evolutionary relations between the novel coronaviruses have provided more clues, suggesting it's still difficult to determine the #origin of the #virus, while experts called for more solid and authoritative researches.

The #US has found at least four #COVID-19 cases of unknown source, media reported Saturday.

"The two concerns should be put together to consider to avoid arbitrary information without adequate evidence," Zhang said.

An English paper submitted by Yu Wenbin, an associate researcher at the #... Show more...
 

Little Hex Tricks Make Little Displays a Little Easier





#computerhacks #howto #microcontrollers #7segment #bitmanipulation #bittwiddling #c #excel #issi #led #registers #spreadsheet #hackaday
posted by pod_feeder_v2
Little Hex Tricks Make Little Displays a Little Easier
 
OSTechNix - 2019-12-12 08:12:57 GMT
True.
#DennisRitchie #Programming #C
 
We hired one in our #Alameda office but are looking for another in either our #Minneapolis #Minnesota office or the #California office

Nice-to-haves*:
Knowledge of C/C++ and #Java and experience with #PHP/MySQL
Knowledge of Unix & #Linux (we previously supported #BSD, #Solaris, and perhaps some others, but just Linux now)
Basic networking experi... Show more...
 
#programming #C
 
Barrierefreie Softwareentwicklung mit Windows Presentation Foundation
https://www.heise.de/developer/artikel/Barrierefreie-Softwareentwicklung-mit-Windows-Presentation-Foundation-4488573.html
#Barrierefreiheit #C #WPF
 
#C = 3
#CC = 33
MASONIC NUMBER MAGIC FOR
COMPLETE CONTROL #CLASH

#MUSIC
#c #cc #clash #music
 
@Ian Gager Actually, no, i really don't see what an observer having effect on the observed has to do with your point about Santa.
Nor do I understand what you're speaking of in regard to drones.
Feel free to elaborate.
In the meantime, elaboration via one of the bands of lads (multiple phds in physics are held within the band, hopefully that satisfies your desire for science, academics, and critical thinking.):

#C o S 1 (Semi-Axiomatic) The creator exists, so does magic, we call him SMILEY_LOVE


#CoS 1 0: There is a creator (Semi-axiomatic)
There is a god, well at least there is a creator. We (semi) establish its existence thus. The simple truth is that while the existence of a creator remains axiomatic (meaning postulated and not observed), we at least observe the creation so we recu... Show more...
 
Patches and HOW-TO to build GRIEF to Linux.
GRIEF is a BRIEF text editor (80s) clone.

https://github.com/nereusx/grief-fix

#linux #c
#linux #c
 
A utility (in C) to convert markdown documents to Unix *roff format (man, mdoc, mm and mom packages).

https://github.com/nereusx/md2roff

#linux #bsd #c #unix
#linux #bsd #c #unix
 
Utility in C to cleanup the PATH duplicated and non-existance entries
https://github.com/nereusx/dotfiles/tree/master/src
#linux #c #unix #bsd
#linux #c #unix #bsd
 
@duilio@pluspora.com - Does anyone truly know a programming language? Yes. Yes, they do. Me? Not so much. I suppose this would be a good problem for #perl. Or maybe not. My next attempt would be in #ruby. And then #C. The problem for me as that once the domain switches to bits, it gets confusing for me. I can express the problem:

I have a file:
10010111 01011111 ... 00011100 11011011
and I want to create seven files:
01001011 10101111 1 ... 00011100 1101101100100101 11010111 11 ... 00011100 1101101100010010 11101011 111 ... 00011100 1101101100001001 01110101 1111 ... 00011100 1101101100000100 10111010 11111 ... 00011100 1101101100000010 01011101 011111 ... 00011100 1101101100000001 00101110 1011111 ... 00011100 11011011
and then look at each file in a hex reader and see if any ASCII "pops" out
 

The Ultimate Contributor's Guide to Xfce


#xfce #xfce4 #gnu #linux #desktopenvironment #floss #opensource #freesoftware #coding #c #contribution #git
 

A Guide to Undefined Behavior in C and C++


Understanding undefined behaviour is an essential part of mastering programming languages like C and C++. Still most books I've seen teaching these languages don't touch on it at all, or gloss over it very quickly. Those that do cover it in some way seem to mostly focus on the technicality. This three part series goes a bit deeper and explains the reasoning behind undefined behaviour and why it's important to a much greater extent. This should be essential reading for anyone serious about programming in C or C++.

https://blog.regehr.org/archives/213

#programming #cpp #c #undefinedbehaviour
 
Hallo Festgemeinde :)

Ich bin nicht ganz so #neuhier
Habe mich in den letzen Wochen während meiner spärlich bemessenen Freizeit hier in Ruhe umgeschaut und dabei versucht, nichts kaputt zu machen.
Nun bin ich zu dem Entschluss gekommen, dass es mir hier gefallen könnte und lasse mich also in D* gemütlich nieder.
Ich interesseriere mich für #Mode, #Katzen, #Essen,#Trinken und #Schlafen :D

Außerdem für #C und #Assembler, weil ich gerade versuche, das zu lernen.
 
Hallo Festgemeinde :)

Ich bin nicht ganz so #neuhier
Habe mich in den letzen Wochen während meiner spärlich bemessenen Freizeit hier in Ruhe umgeschaut und dabei versucht, nichts kaputt zu machen.
Nun bin ich zu dem Entschluss gekommen, dass es mir hier gefallen könnte und lasse mich also in D* gemütlich nieder.
Ich interesseriere mich für #Mode, #Katzen, #Essen,#Trinken und #Schlafen :D

Außerdem für #C und #Assembler, weil ich gerade versuche, das zu lernen.
 
Image/photo
Image/photo
Image/photo
Image/photo
Just sharing. This cute Misaka-like C is amazing.
/*[*/#include<stdio.h>//
&#35;include<stdlib.h>//]++++[->++[->+>++++<<]<][(c)2013]
&#35;ifndef e//[o
&#35;include<string.h>//]![misaka.c,size=3808,crc=d0ec3b36][
&#35;define e
... Show more...
 
I would think there would be a text editor written in C, and expressed in all the major toolkits. What are the major toolkits anyway? I think of Gtk as a major toolkit. Am I crazy? When you look at what I would think would be major, important software packages... toolkits... they all seem sort of half-maintained to me. Am I crazy? And they seem like such afterthoughts. It is weird to me how little thought is put into toolkits. Am I crazy? I'm crazy, right? WHY AM IT CRAZY!? #texteditor #toolkit #c #gtk
 
My lightweight #raycasting #3D library is now in a pretty usable state.

It's #CC0 ( #FOSS ) pure #C language, header-only, with no dependencies and uses only integer math, so it's very fast. You can use it to make cool oldschool looking #games. Here are #Pokitto #demos I made to demonstrate it can run on very limited computers:

Image/photoImage/photoImage/photo

However you can use it on PC just as well, all you need is something to manage the IO, e.g. #SDL:

Image/photo

Go on and make something cool with it :-)

link: https://gitlab.com/drummyfish/raycastlib

#gamedev #gitlab #freegamers
 

Alte Sprache: C


Was Programmiersprachen betrifft, ist [url=http://https://de.wikipedia.org/wiki/C_(Programmiersprache)]C mein absoluter Favorit[/url]. Die Sprache liegt mir einfach und ich mag die extreme Nähe zur Maschine. Bisher habe ich C für fast all’ meine Programme genutzt, dabei viel mit dynamischer Speicherverwaltung gemacht und bin daher bestens vertraut mit Zeigern und Speicherreservierung. C hat - zugegeben - einige Nachteile, das steht außer Frage, aber viele dieser Schwachstellen kann man mit ein wenig Aufwand wieder ausbügeln. Beispielsweise kann man auch in Eigenarbeit die fehlende Objektorientierung in ANSI C implementieren und enums, typedef, Strukturen und der Präprozessor bieten viele Möglichkeiten den Code stark zu personalisieren.
Ich kam vor einigen Monaten, arbeitsbedingt, mit C# in Kontakt und habe damit mittl... Show more...
 

Friclicli status update: NCurses GUI


Image/photo

The screenshot shows the current state of the Friclicli GUI. It is inspired by the GUI from the mutt mail client and my plan is to make the Friclicli GUI look and feel similar to the GUI from mutt: On the top you will have a navigation bar, the big area in the middle will display posts with comments in a threaded view, below that is an info bar and at the bottom you will find a bar that will show you status messages and that will also ask for data like the password in the screenshot above.
About the project:

Friclicli will (hopefully) be a CLI based client for the decentralised social network Friendica. It is written in C and licensed under the terms of the GNU General Public License v3. The source code is available on GitLab:

https://gitlab.com/ncc1988/friclicli

#Friclicli #Friendica #API #Client #C #FLOSS #Software #GPLv3

@Moritz Strohm Software
 
I find it irksome backtracing where classes have inherited functions from. I can't be the only one. Especially in C for some reason. Well, not classes, specifically. It's just when you've got this thing and five #include statements (or twenty, or fifty). And I don't know where the thing came from. These are things they never really teach you. What is that thing? How did it get here? Where does that highway go to? This is not my beautiful house. This is not my beautiful wife. #backtrace #C #functions #methods #ruby #talkingheads
 
rustc building and system integration is mess as hell

but this is where the real horrors are

https://bugzilla.mozilla.org/show_bug.cgi?id=1065377
https://bugzilla.mozilla.org/show_bug.cgi?id=104642

Mozilla can't upgrade it's autoconf from 2.13 for more than a 17 years already..

#mozilla #firefox #seamonkey #spidermonkey #js #javascript #autoconf #autoconf213 #bug #bugs #c #c++ #cpp #problems #hate #ignorance #rust #rustc #morelanguages #onemorebetterlanguage
 
isl-0.20 is out -> gcc 8.1.0 and gcc 8.2.0 won't build with it.
S - Stabilization

#c #clang #isl #gcc #linux #gnulinux #linuxfromscratch
 
Hey everyone, I'm #oldhere. My advisor in college steered me away from #C and toward #FORTRAN because there was, "No future in C."
 
nods
I am partial to our Church Of Space 1 statement. Not saying it is the "Truth" but I will say that I do feel it offers significant idea for thought consideration. (but far be I to tell anyone what TRUTH is)

#C o S 1 (Semi-Axiomatic) The creator exists, so does magic, we call him SMILEY_LOVE

#CoS 1 0: There is a creator (Semi-axiomatic)
There is a god, well at least there is a creator. We (semi) establish its existence thus. The simple truth is that while the existence of a creator remains axiomatic (meaning postulated and not observed), we at least observe the creation so we recursively reach for the creator. We cannot, through reason alone, understand the creation out of nothing. We cannot comprehend that nothing would give something. We need something to give something, as we cannot imagine crea... Show more...
 

DistroWatch Weekly, Issue 761 30 April 2018


Review of Ubuntu 18.04 LTS, UBPorts to run on Librem 5, Slackware
PulseAudio optional, educational Linux comics, Accessing ZFS snapshots,
upcoming release Fedora 28, Ubuntu running GNOME Shell vs Unity, Manjaro
Webdad, Alien-OS.

https://distrowatch.com/podcast/dww20180430.mp3
#" #l #i #n #u #x #c #a #s #t #s #" #, #" #d #i #s #t #r #o #w #a #t #c #h #"
#, # #l #i #n #u #x #c #a #s #t #d #r #o #w #h
 

DistroWatch Weekly, Issue 761 30 April 2018


Review of Ubuntu 18.04 LTS, UBPorts to run on Librem 5, Slackware
PulseAudio optional, educational Linux comics, Accessing ZFS snapshots,
upcoming release Fedora 28, Ubuntu running GNOME Shell vs Unity, Manjaro
Webdad, Alien-OS.

https://distrowatch.com/podcast/dww20180430.mp3
#l #i #n #u #x #c #a #s #t #s
#l #i #n #u #x #c #a #s #t
 

DistroWatch Weekly, Issue 756 26 March 2018


Review of NuTyX 10.0, VenenuX offers POS edition, Neptune supplies KDS
packages for Debian, openSUSE's package portal, SolydXK for Raspberry
Pi, SysV init development, running legacy or new software, package
database updated on distrowatch site.

https://distrowatch.com/podcast/dww20180326.mp3
#l #i #n #u #x #c #a #s #t #s
#l #i #n #u #x #c #a #s #t
 

DistroWatch Weekly, Issue 755 19 March 2018


Review of ArchMerge 6.4.1, Librem 5 runs Plasma Mobile Desktop, Ubuntu
Budgie's new support forum, Cinnamon gets performance boost, Learning at
the Linux Academy, Omarine, CloverOS.

https://distrowatch.com/podcast/dww20180319.mp3
#l #i #n #u #x #c #a #s #t #s
#l #i #n #u #x #c #a #s #t
 

DistroWatch Weekly, Issue 754 12 March 2018


Review of Sabayon and Antergos, Kinvolk announces fork of Container,
Solus software manager improvements, OpenBSD and clang patch CPU bugs,
Fedora IoT edition, Manjaro builds for ARM devices, Debian updates
install media, size of the linux kernel.

https://distrowatch.com/podcast/dww20180312.mp3
#l #i #n #u #x #c #a #s #t #s
#l #i #n #u #x #c #a #s #t
 

DistroWatch Weekly, Issue 752 26 February 2018


Review of OviOS 2.31, elementary OS default disk encryption, UBports
gets more test devices, Redcore works to harden their distro, Mageia
reacts to database breach, testing distributions in a web browser,
performing off-line upgrades, documentation sources, archmerge, Pegasus
OS GNU/Linux, Delta Linux.

https://distrowatch.com/podcast/dww20180226.mp3
#l #i #n #u #x #c #a #s #t #s
#l #i #n #u #x #c #a #s #t
 
Hi Everyone,

I'm #newhere having made the jump from Facebook to diaspora* a couple days ago, I am looking to connect with folks who may have shared interests. I live in #arizona #usa and work as a software engineer. I program mostly in #c on a #aix #unix and #gnu #linux platform. I am a long time member of the free software foundation #fsf.

After graduation from high school in the 1980s I have decided to go... Show more...
 

One year of C

So one thing seems to be clear: yes, it’s possible to write a non-trivial amount of C code that does something useful without going mad (and it’s even quite enjoyable I might add).
https://floooh.github.io/2018/06/02/one-year-of-c.html

Interesting writeup.

\#programming #c #c++
 
Later posts Earlier posts