General-purpose, object-oriented programming language
POPULARITY
Welcome to Code Completion, Episode 46! We are a group of iOS developers and educators hoping to share what we love most about development, Apple technology, and completing your code! Follow us @CodeCompletion (https://twitter.com/CodeCompletion) on Twitter to hear about our upcoming livestreams, videos, and other content. Today, we discuss: - Code Completion Club: https://codecompletion.io/jointheclub - Indie App Spotlight, with a new app for you to check out: - Jellycuts by Zachary Lineman (@LinemanZachary): https://jellycuts.com - Our experience using SwiftUI, best practices, and hidden complexity. - Underdog devs link: https://www.underdogdevs.org/ - Asam sharp (@azamsharp) on Twitter: https://twitter.com/i/web/status/1422716472099487744 - SwiftUI Lab: https://swiftui-lab.com - Objc.io - Understanding SwiftUI: https://www.objc.io/books/thinking-in-swiftui/ - WWDC21 - Demystify SwiftUI: https://developer.apple.com/videos/play/wwdc2021/10022/ - The best architecture for SwiftUI does not exist. - Enums are great in Swift, and everyone should use them. - What announcements we expect at Apple's California Streaming event. - Ceramic Apple Watches are a danger to paint jobs everywhere. Also, join us for #CompleteTheCode and Compiler Error, two segments that test both your knowledge and our knowledge on Swift, Apple, and all things development! Your hosts for this week: * Spencer Curtis (https://twitter.com/SpencerCCurtis) * Ben Gohlke (https://twitter.com/FerrousGuy) * Fernando Olivares (https://twitter.com/FromJRtoSR) * Dimitri Bouniol (https://twitter.com/DimitriBouniol) Be sure to also sign up to our monthly newsletter (https://codecompletion.io/), where we will recap the topics we discussed, reveal the answers to #CompleteTheCode, and share even more things we learned in between episodes. You are what makes this show possible, so please be sure to share this with your friends and family who are also interested in any part of the app development process. Sponsor This week's episode of Code Completion is brought to you by Weekly Swift Exercises. Go to https://twitter.com/swiftexercises today to check it out! Complete the Code How would you transform the code below to use the new async/await pattern? ```swift // How would you transform the code below to use the new async/await pattern? print("Preparing request…") urlSession.dataTask(with: httpRequest) { data, response, error in DispatchQueue.main.async { print("Received response: (response)") } }.resume() print("Sent request!") ``` Be sure to tweet us (https://twitter.com/intent/tweet?text=%23CompleteTheCode%20cc%2F%20%40CodeCompletion&original_referer=https%3A%2F%2Fcodecompletion.io) with hashtag #CompleteTheCode (https://twitter.com/hashtag/CompleteTheCode) if you know the answer! Compiler Error This week's Compiler Error has a theme: SwiftUI View Modifiers! 1 - Much like UIKit, SwiftUI allows the interface orientation to be manipulated using statusBar(orientation:), moving the status bar to one of the four screen edges. 2 - Tooltips can be added to SwiftUI views using the help(_:) modifier, helping to guide the user around the interface without them needing to directly invoke any actions. 3 - Any view in the hierarchy can be modified with onOpenURL(perform:) to perform localized URL handling so long as it is part of the hierarchy when the URL is opened. 4 - A badge can be added to tab bar items using the badge(_:) modifier, but this will also add a visual indicator to list rows to help convey supplementary information.
This month, Jared fields questions from Xcoders on Twitter and Slack, as well as a few from the Underdog Devs. Questions, comments, or topic requests? Get in touch at info@seattlexcoders.org Links: Hacking with Swift Swift by Sundell Vapor Swift Framework Core Data Book by Objc.io Practical Core Data Core Data Potpurri Host: Jared Sorge Xcoders Links: Website Meetup
Bienvenue dans le deux-cent-vingt-neuvième épisode de CacaoCast! Dans cet épisode, Philippe Casgrain et Philippe Guitard discutent des sujets suivants: Apple - One more thing NSNorth - Le podcast BackToMac - Ce mois de novembre Icônes proxy - Faites-les apparaître plus rapidement avec Big Sur ObjC-Swift - Documentation sur la traduction des noms Astuce Xcode - Exception Breakpoints et tests unitaires Mockaroo - Un service web pour vos APIs à partir de vos données SwiftStrike - Un jeu en réalité augmentée Ecoutez cet épisode
Distrowatch reviews FuryBSD, LLDB on i386 for NetBSD, wpa_supplicant as lower-class citizen, KDE on FreeBSD updates, Travel Grant for BSDCan open, ZFS dataset for testing iocage within a jail, and more. Headlines Distrowatch Fury BSD Review (https://distrowatch.com/weekly.php?issue=20200127#furybsd) FuryBSD is the most recent addition to the DistroWatch database and provides a live desktop operating system based on FreeBSD. FuryBSD is not entirely different in its goals from NomadBSD, which we discussed recently. I wanted to take this FreeBSD-based project for a test drive and see how it compares to NomadBSD and other desktop-oriented projects in the FreeBSD family. FuryBSD supplies hybrid ISO/USB images which can be used to run a live desktop. There are two desktop editions currently, both for 64-bit (x86_64) machines: Xfce and KDE Plasma. The Xfce edition is 1.4GB in size and is the flavour I downloaded. The KDE Plasma edition is about 3.0GB in size. My fresh install of FuryBSD booted to a graphical login screen. From there I could sign into my account, which brings up the Xfce desktop. The installed version of Xfce is the same as the live version, with a few minor changes. Most of the desktop icons have been removed with just the file manager launchers remaining. The Getting Started and System Information icons have been removed. Otherwise the experience is virtually identical to the live media. FuryBSD uses a theme that is mostly grey and white with creamy yellow folder icons. The application menu launchers tend to have neutral icons, neither particularly bright and detailed or minimal. LLDB now works on i386 (http://blog.netbsd.org/tnf/entry/lldb_now_works_on_i386) Upstream describes LLDB as a next generation, high-performance debugger. It is built on top of LLVM/Clang toolchain, and features great integration with it. At the moment, it primarily supports debugging C, C++ and ObjC code, and there is interest in extending it to more languages. In February 2019, I have started working on LLDB, as contracted by the NetBSD Foundation. So far I've been working on reenabling continuous integration, squashing bugs, improving NetBSD core file support, extending NetBSD's ptrace interface to cover more register types and fix compat32 issues, fixing watchpoint and threading support. The original NetBSD port of LLDB was focused on amd64 only. In January, I have extended it to support i386 executables. This includes both 32-bit builds of LLDB (running natively on i386 kernel or via compat32) and debugging 32-bit programs from 64-bit LLDB. News Roundup wpa_supplicant is definitely a lower-class citizen, sorry (https://marc.info/?l=openbsd-misc&m=158068418807352&w=2) wpa_supplicant is definitely a lower-class citizen, sorry. I increasingly wonder why this stuff matters; transit costs are so much lower than the period when eduroam was setup, and their reliance on 802.11x is super weird in a world where, for the most part + entire cities have open wifi in their downtown core + edu vs edu+transit split horizon problems have to be solved anyways + many universities have parallel open wifi + rate limiting / fare-share approaches for the open-net, on unmetered + flat-rate solves the problem + LTE hotspot off a phone isn't a rip off anymore + other open networks exist essentially no one else feels compelled to do use 802.11x for a so called "semi-open access network", so I think they've lost the plot on friction vs benefit. (we've held hackathons at EDU campus that are locked down like that, and in every case we've said no way, gotten a wire with open net, and built our own wifi. we will not subject our developers to that extra complexity). KDE FreeBSD Updates Feb 2020 (https://euroquis.nl/freebsd/2020/02/08/freebsd.html) Some bits and bobs from the KDE FreeBSD team in february 2020. We met at the FreeBSD devsummit before FOSDEM, along with other FreeBSD people. Plans were made, schemes were forged, and Groff the Goat was introduced to some new people. The big ticket things: Frameworks are at 5.66 Plasma is at 5.17.5 (the beta 5.18 hasn’t been tried) KDE release service has landed 19.12.2 (same day it was released) Developer-centric: KDevelop is at 5.5.0 KUserfeedback landed its 1.0.0 release CMake is 3.16.3 Applications: Musescore is at 3.4.2 Elisa now part of the KDE release service updates Fuure work: KIO-Fuse probably needs extra real-world testing on FreeBSD. I don’t have that kind of mounts (just NFS in /etc/fstab) so I’m not the target audience. KTextEditor is missing .editorconfig support. That can come in with the next frameworks update, when consumers update anyway. Chasing it in an intermediate release is a bit problematic because it does require some rebuilds of consumers. Travel Grant Application for BSDCan is now open (https://lists.freebsd.org/pipermail/freebsd-announce/2020-February/001929.html) Hi everyone, The Travel Grant Application for BSDCan 2020 is now open. The Foundation can help you attend BSDCan through our travel grant program. Travel grants are available to FreeBSD developers and advocates who need assistance with travel expenses for attending conferences related to FreeBSD development. BSDCan 2020 applications are due April 9, 2020. Find out more and apply at: https://www.freebsdfoundation.org/what-we-do/grants/travel-grants/ Did you know the Foundation also provides grants for technical events not specifically focused on BSD? If you feel that your attendance at one of these events will benefit the FreeBSD Project and Community and you need assistance getting there, please fill out the general travel grant application. Your application must be received 7 weeks prior to the event. The general application can be found here: https://goo.gl/forms/QzsOMR8Jra0vqFYH2 Creating a ZFS dataset for testing iocage within a jail (https://dan.langille.org/2020/02/01/creating-a-zfs-dataset-for-testing-iocage-within-a-jail/) Be warned, this failed. I’m stalled and I have not completed this. I’m going to do jails within a jail. I already do that with poudriere in a jail but here I want to test an older version of iocage before upgrading my current jail hosts to a newer version. In this post: FreeBSD 12.1 py36-iocage-1.2_3 py36-iocage-1.2_4 This post includes my errors and mistakes. Perhaps you should proceed carefully and read it all first. Beastie Bits Reminder: the FreeBSD Journal is free! Check out these great articles (https://www.freebsdfoundation.org/journal/browser-based-edition/) Serenity GUI desktop running on an OpenBSD kernel (https://twitter.com/jcs/status/1224205573656322048) The Open Source Parts of MacOS (https://github.com/apple-open-source/macos) FOSDEM videos available (https://www.fosdem.org/2020/schedule/track/bsd/) Feedback/Questions Michael - Install with ZFS (http://dpaste.com/3WRC9CQ#wrap) Mohammad - Server Freeze (http://dpaste.com/3BYZKMS#wrap) Todd - ZFS Questions (http://dpaste.com/2J50HSJ#wrap) Send questions, comments, show ideas/topics, or stories you want mentioned on the show to feedback@bsdnow.tv (mailto:feedback@bsdnow.tv) Your browser does not support the HTML5 video tag.
Upgrading FreeBSD from 11.3 to 12.1, Distrowatch switching to FreeBSD, Torvalds says don’t run ZFS, iked(8) removed automatic IPv6 blocking, working towards LLDB on i386, and memory-hard Argon2 hashing scheme in NetBSD. Headlines Upgrading FreeBSD from 11.3 to 12.1 (https://blog.bimajority.org/2020/01/13/upgrading-freebsd-from-11-3-to-12-1/) Now here’s something more like what I was originally expecting the content on this blog to look like. I’m in the process of moving all of our FreeBSD servers (about 30 in total) from 11.3 to 12.1. We have our own local build of the OS, and until “packaged base” gets to a state where it’s reliably usable, we’re stuck doing upgrades the old-fashioned way. I created a set of notes for myself while cranking through these upgrades and I wanted to share them since they are not really work-specific and this process isn’t very well documented for people who haven’t been doing this sort of upgrade process for 25 years. Our source and object trees are read-only exported from the build server over NFS, which causes things to be slow. /etc/make.conf and /etc/src.conf are symbolic links on all of our servers to the master copies in /usr/src so that make installworld can find the configuration parameters the system was built with. Switching Distrowatch over to BSD (https://www.reddit.com/r/freebsd/comments/eodhit/switching_distrowatch_over_to_freebsd_ama/) This may be a little off-topic for this board (forgive me if it is, please). However, I wanted to say that I'm one of the people who works on DistroWatch (distrowatch.com) and this past week we had to deal with a server facing hardware failure. We had a discussion about whether to continue running Debian or switch to something else. The primary "something else" option turned out to be FreeBSD and it is what we eventually went with. It took a while to convert everything over from working with Debian GNU/Linux to FreeBSD 12 (some script incompatibilities, different paths, some changes to web server configuration, networking IPv6 troubles). But in the end we ended up with a good, FreeBSD-based experience. Since the transition was successful, though certainly not seamless, I thought people might want to do a Q&A on the migration process. Especially for those thinking of making the same switch. News Roundup iked(8) automatic IPv6 blocking removed (https://www.openbsd.org/faq/current.html#r20200114) iked(8) no longer automatically blocks unencrypted outbound IPv6 packets. This feature was intended to avoid accidental leakage, but in practice was found to mostly be a cause of misconfiguration. If you previously used iked(8)'s -6 flag to disable this feature, it is no longer needed and should be removed from /etc/rc.conf.local if used. Linus says dont run ZFS (https://itsfoss.com/linus-torvalds-zfs/) “Don’t use ZFS. It’s that simple. It was always more of a buzzword than anything else, I feel, and the licensing issues just make it a non-starter for me.” This is what Linus Torvalds said in a mailing list to once again express his disliking for ZFS filesystem specially over its licensing. To avoid unnecessary confusion, this is more intended for Linux distributions, kernel developers and maintainers rather than individual Linux users. GSoC 2019 Final Report: Incorporating the memory-hard Argon2 hashing scheme into NetBSD (https://blog.netbsd.org/tnf/entry/gsoc_2019_final_report_incorporating) We successfully incorporated the Argon2 reference implementation into NetBSD/amd64 for our 2019 Google Summer of Coding project. We introduced our project here and provided some hints on how to select parameters here. For our final report, we will provide an overview of what changes were made to complete the project. The Argon2 reference implementation, available here, is available under both the Creative Commons CC0 1.0 and the Apache Public License 2.0. To import the reference implementation into src/external, we chose to use the Apache 2.0 license for this project. Working towards LLDB on i386 NetBSD (https://blog.netbsd.org/tnf/entry/working_towards_lldb_on_i386) Upstream describes LLDB as a next generation, high-performance debugger. It is built on top of LLVM/Clang toolchain, and features great integration with it. At the moment, it primarily supports debugging C, C++ and ObjC code, and there is interest in extending it to more languages. In February 2019, I have started working on LLDB, as contracted by the NetBSD Foundation. So far I've been working on reenabling continuous integration, squashing bugs, improving NetBSD core file support, extending NetBSD's ptrace interface to cover more register types and fix compat32 issues, fixing watchpoint and threading support. Throughout December I've continued working on our build bot maintenance, in particular enabling compiler-rt tests. I've revived and finished my old patch for extended register state (XState) in core dumps. I've started working on bringing proper i386 support to LLDB. Beastie Bits An open source Civilization V (https://github.com/yairm210/UnCiv) BSD Groups in Italy (https://bsdnotizie.blogspot.com/2020/01/gruppi-bsd-in-italia.html) Why is Wednesday, November 17, 1858 the base time for OpenVMS? (https://www.slac.stanford.edu/~rkj/crazytime.txt) Benchmarking shell pipelines and the Unix “tools” philosophy (https://blog.plover.com/Unix/tools.html) LPI and BSD working together (https://youtu.be/QItb5aoj7Oc) Feedback/Questions Pat - March Meeting (http://dpaste.com/2BMGZVV#wrap) Madhukar - Overheating Laptop (http://dpaste.com/17WNVM8#wrap) Warren - R vs S (http://dpaste.com/3AZYFB1#wrap) Send questions, comments, show ideas/topics, or stories you want mentioned on the show to feedback@bsdnow.tv (mailto:feedback@bsdnow.tv) Your browser does not support the HTML5 video tag.
Announcing HyperbolaBSD, IPFW In-Kernel NAT setup on FreeBSD, Wayland and WebRTC enabled for NetBSD 9/Linux, LLDB Threading support ready for mainline, OpenSSH U2F/FIDO support in base, Dragonfly drm/i915: Update, and more. Headlines HyperbolaBSD Announcement (https://www.hyperbola.info/news/announcing-hyperbolabsd-roadmap/) Due to the Linux kernel rapidly proceeding down an unstable path, we are planning on implementing a completely new OS derived from several BSD implementations. This was not an easy decision to make, but we wish to use our time and resources to create a viable alternative to the current operating system trends which are actively seeking to undermine user choice and freedom. This will not be a "distro", but a hard fork of the OpenBSD kernel and userspace including new code written under GPLv3 and LGPLv3 to replace GPL-incompatible parts and non-free ones. Reasons for this include: Linux kernel forcing adaption of DRM, including HDCP. Linux kernel proposed usage of Rust (which contains freedom flaws and a centralized code repository that is more prone to cyber attack and generally requires internet access to use.) Linux kernel being written without security and in mind. (KSPP is basically a dead project and Grsec is no longer free software) Many GNU userspace and core utils are all forcing adaption of features without build time options to disable them. E.g. (PulseAudio / SystemD / Rust / Java as forced dependencies) As such, we will continue to support the Milky Way branch until 2022 when our legacy Linux-libre kernel reaches End of Life. Future versions of Hyperbola will be using HyperbolaBSD which will have the new kernel, userspace and not be ABI compatible with previous versions. HyperbolaBSD is intended to be modular and minimalist so other projects will be able to re-use the code under free license. Forum Post (https://forums.hyperbola.info/viewtopic.php?id=315) A simple IPFW In-Kernel NAT setup on FreeBSD (https://www.neelc.org/posts/freebsd-ipfw-nat/) After graduating college, I am moving from Brooklyn, NY to Redmond, WA (guess where I got a job). I always wanted to re-do my OPNsense firewall (currently a HP T730) with stock FreeBSD and IPFW’s in-kernel NAT. Why IPFW? Benchmarks have shown IPFW to be faster which is especially good for my Tor relay, and because I can! However, one downside of IPFW is less documentation vs PF, even less without natd (which we’re not using), and this took me time to figure this out. But since my T730 is already packed, I am testing this on a old PC with two NICs, and my laptop [1] as a client with an USB-to-Ethernet adapter. News Roundup HEADS UP: Wayland and WebRTC enabled for NetBSD 9/Linux (https://mail-index.netbsd.org/pkgsrc-users/2020/01/05/msg030124.html) This is just a heads up that the Wayland option is now turned on by default for NetBSD 9 and Linux in cases where it peacefully coexists with X11. Right now, this effects the following packages: graphics/MesaLib devel/SDL2 www/webkit-gtk x11/gtk3 The WebRTC option has also been enabled by default on NetBSD 9 for two Firefox versions: www/firefox, www/firefox68 Please keep me informed of any fallout. Hopefully, there will be none. If you want to try out Wayland-related things on NetBSD 9, wm/velox/MESSAGE may be interesting for you. LLDB Threading support now ready for mainline (https://blog.netbsd.org/tnf/entry/lldb_threading_support_now_ready) Upstream describes LLDB as a next generation, high-performance debugger. It is built on top of LLVM/Clang toolchain, and features great integration with it. At the moment, it primarily supports debugging C, C++ and ObjC code, and there is interest in extending it to more languages. In February, I have started working on LLDB, as contracted by the NetBSD Foundation. So far I've been working on reenabling continuous integration, squashing bugs, improving NetBSD core file support, extending NetBSD's ptrace interface to cover more register types and fix compat32 issues and fixing watchpoint support. Then, I've started working on improving thread support which is taking longer than expected. You can read more about that in my September 2019 report. So far the number of issues uncovered while enabling proper threading support has stopped me from merging the work-in-progress patches. However, I've finally reached the point where I believe that the current work can be merged and the remaining problems can be resolved afterwards. More on that and other LLVM-related events happening during the last month in this report. OpenSSH U2F/FIDO support in base (https://www.undeadly.org/cgi?action=article;sid=20191115064850) Hardware backed keys can be generated using "ssh-keygen -t ecdsa-sk" (or "ed25519-sk" if your token supports it). Many tokens require to be touched/tapped to confirm this step. You'll get a public/private keypair back as usual, except in this case, the private key file does not contain a highly-sensitive private key but instead holds a "key handle" that is used by the security key to derive the real private key at signing time. So, stealing a copy of the private key file without also stealing your security key (or access to it) should not give the attacker anything. drm/i915: Update to Linux 4.8.17 (http://lists.dragonflybsd.org/pipermail/commits/2019-December/720257.html) drm/i915: Update to Linux 4.8.17 Broxton, Valleyview and Cherryview support improvements Broadwell and Gen9/Skylake support improvements Broadwell brightness fixes from OpenBSD Atomic modesetting improvements Various bug fixes and performance enhancements Beastie Bits Visual Studio Code port for FreeBSD (https://github.com/tagattie/FreeBSD-VSCode) OpenBSD syscall call-from verification (https://marc.info/?l=openbsd-tech&m=157488907117170&w=2) Peertube on OpenBSD (https://www.22decembre.eu/en/2019/12/09/peertube-14-openbsd/) Fuzzing Filesystems on NetBSD via AFL+KCOV by Maciej Grochowski (https://www.youtube.com/watch?v=bbNCqFdQEyk&feature=youtu.be) Twitter Bot for Prop65 (https://twitter.com/prop65bot/status/1199003319307558912) Interactive vim tutorial (https://www.openvim.com/) First BSD user group meeting in Hamilton, February 11, 2020 18:30 - 21:00, Boston Pizza on Upper James St (http://studybsd.com/) *** Feedback/Questions Samir - cgit (http://dpaste.com/2B22M24#wrap) Russell - R (http://dpaste.com/0J5TYY0#wrap) Wolfgang - Question (http://dpaste.com/3MQAH27#wrap) Send questions, comments, show ideas/topics, or stories you want mentioned on the show to feedback@bsdnow.tv (mailto:feedback@bsdnow.tv) Your browser does not support the HTML5 video tag.
LLDB Threading support now ready, Multiple IPSec VPN tunnels with FreeBSD, Netflix Optimized FreeBSD's Network Stack More Than Doubled AMD EPYC Performance, happy eyeballs with unwind(8), AWS got FreeBSD ARM 12, OpenSSH U2F/FIDO support, and more. Headlines LLDB Threading support now ready for mainline (https://blog.netbsd.org/tnf/entry/lldb_threading_support_now_ready) Upstream describes LLDB as a next generation, high-performance debugger. It is built on top of LLVM/Clang toolchain, and features great integration with it. At the moment, it primarily supports debugging C, C++ and ObjC code, and there is interest in extending it to more languages. In February, I have started working on LLDB, as contracted by the NetBSD Foundation. So far I've been working on reenabling continuous integration, squashing bugs, improving NetBSD core file support, extending NetBSD's ptrace interface to cover more register types and fix compat32 issues and fixing watchpoint support. Then, I've started working on improving thread support which is taking longer than expected. You can read more about that in my September 2019 report. So far the number of issues uncovered while enabling proper threading support has stopped me from merging the work-in-progress patches. However, I've finally reached the point where I believe that the current work can be merged and the remaining problems can be resolved afterwards. More on that and other LLVM-related events happening during the last month in this report. Multiple IPSec VPN tunnels with FreeBSD (https://blog.socruel.nu/text-only/how-to-multiple-ipsec-vpn-tunnels-on-freebsd.txt) The FreeBSD handbook describes an IPSec VPN tunnel between 2 FreeBSD hosts (see https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/ipsec.html) But it is also possible to have multiple, 2 or more, IPSec VPN tunnels created and running on a FreeBSD host. How to implement and configure this is described below. The requirements is to have 3 locations (A, B and C) connected with IPSec VPN tunnels using FreeBSD (11.3-RELEASE). Each location has 1 IPSec VPN host running FreeBSD (VPN host A, B and C). VPN host A has 2 IPSec VPN tunnels: 1 to location B (VPN host B) and 1 to location C (VPN host C). News Roundup Netflix Optimized FreeBSD's Network Stack More Than Doubled AMD EPYC Performance (https://www.phoronix.com/scan.php?page=news_item&px=Netflix-NUMA-FreeBSD-Optimized) Drew Gallatin of Netflix presented at the recent EuroBSDcon 2019 conference in Norway on the company's network stack optimizations to FreeBSD. Netflix was working on being able to deliver 200Gb/s network performance for video streaming out of Intel Xeon and AMD EPYC servers, to which they are now at 190Gb/s+ and in the process that doubled the potential of EPYC Naples/Rome servers and also very hefty upgrades too for Intel. Netflix has long been known to be using FreeBSD in their data centers particularly where network performance is concerned. But in wanting to deliver 200Gb/s throughput from individual servers led them to making NUMA optimizations to the FreeBSD network stack. Allocating NUMA local memory for kernel TLS crypto buffers and for backing files sent via sentfile were among their optimizations. Changes to network connection handling and dealing with incoming connections to Nginx were also made. For those just wanting the end result, Netflix's NUMA optimizations to FreeBSD resulted in their Intel Xeon servers going from 105Gb/s to 191Gb/s while the NUMA fabric utilization dropped from 40% to 13%. unwind(8); "happy eyeballs" (https://marc.info/?l=openbsd-tech&m=157475113130337&w=2) In case you are wondering why happy eyeballs: It's a variation on this: https://en.wikipedia.org/wiki/Happy_Eyeballs unwind has a concept of a best nameserver type. It considers a configured DoT nameserver to be better than doing it's own recursive resolving. Recursive resolving is considered to be better than asking the dhcp provided nameservers. This diff sorts the nameserver types by quality, as above (validation, resolving, dead...), and as a tie breaker it adds the median of the round trip time of previous queries into the mix. One other interesting thing about this is that it gets us past captive portals without a check URL, that's why this diff is so huge, it rips out all the captive portal stuff (please apply with patch -E): 17 files changed, 385 insertions(+), 1683 deletions(-) Please test this. I'm particularly interested in reports from people who move between networks and need to get past captive portals. Amazon now has FreeBSD ARM 12 (https://aws.amazon.com/marketplace/pp/B081NF7BY7) Product Overview FreeBSD is an operating system used to power servers, desktops, and embedded systems. Derived from BSD, the version of UNIX developed at the University of California, Berkeley, FreeBSD has been continually developed by a large community for more than 30 years. FreeBSD's networking, security, storage, and monitoring features, including the pf firewall, the Capsicum and CloudABI capability frameworks, the ZFS filesystem, and the DTrace dynamic tracing framework, make FreeBSD the platform of choice for many of the busiest web sites and most pervasive embedded networking and storage systems. OpenSSH U2F/FIDO support in base (https://www.undeadly.org/cgi?action=article;sid=20191115064850) I just committed all the dependencies for OpenSSH security key (U2F) support to base and tweaked OpenSSH to use them directly. This means there will be no additional configuration hoops to jump through to use U2F/FIDO2 security keys. Hardware backed keys can be generated using "ssh-keygen -t ecdsa-sk" (or "ed25519-sk" if your token supports it). Many tokens require to be touched/tapped to confirm this step. You'll get a public/private keypair back as usual, except in this case, the private key file does not contain a highly-sensitive private key but instead holds a "key handle" that is used by the security key to derive the real private key at signing time. So, stealing a copy of the private key file without also stealing your security key (or access to it) should not give the attacker anything. Once you have generated a key, you can use it normally - i.e. add it to an agent, copy it to your destination's authorized_keys files (assuming they are running -current too), etc. At authentication time, you will be prompted to tap your security key to confirm the signature operation - this makes theft-of-access attacks against security keys more difficult too. Please test this thoroughly - it's a big change that we want to have stable before the next release. Beastie Bits DragonFly - git: virtio - Fix LUN scan issue w/ Google Cloud (http://lists.dragonflybsd.org/pipermail/commits/2019-November/719945.html) Really fast Markov chains in ~20 lines of sh, grep, cut and awk (https://0x0f0f0f.github.io/posts/2019/11/really-fast-markov-chains-in-~20-lines-of-sh-grep-cut-and-awk/) FreeBSD Journal Sept/Oct 2019 (https://www.freebsdfoundation.org/past-issues/security-3/) Michael Dexter is raising money for Bhyve development (https://twitter.com/michaeldexter/status/1201231729228308480) syscall call-from verification (https://marc.info/?l=openbsd-tech&m=157488907117170) FreeBSD Forums Howto Section (https://forums.freebsd.org/forums/howtos-and-faqs-moderated.39/) Feedback/Questions Jeroen - Feedback (http://dpaste.com/0PK1EG2#wrap) Savo - pfsense ports (http://dpaste.com/0PZ03B7#wrap) Tin - I want to learn C (http://dpaste.com/2GVNCYB#wrap) Send questions, comments, show ideas/topics, or stories you want mentioned on the show to feedback@bsdnow.tv (mailto:feedback@bsdnow.tv) Your browser does not support the HTML5 video tag.
LPI releases BSD Certification, openzfs trip report, Using FreeBSD with ports, LLDB threading support ready, Linux versus Open Source Unix, and more. Headlines Linux Professional Institute Releases BSD Specialist Certification - re BSD Certification Group (https://www.lpi.org/articles/linux-professional-institute-releases-bsd-specialist-certification) Linux Professional Institute extends its Open Technology certification track with the BSD Specialist Certification. Starting October 30, 2019, BSD Specialist exams will be globally available. The certification was developed in collaboration with the BSD Certification Group which merged with Linux Professional Institute in 2018. G. Matthew Rice, the Executive Director of Linux Professional Institute says that "the release of the BSD Specialist certification marks a major milestone for Linux Professional Institute. With this new credential, we are reaffirming our belief in the value of, and support for, all open source technologies. As much as possible, future credentials and educational programs will include coverage of BSD.” OpenZFS Trip Report (https://www.ixsystems.com/blog/openzfs-dev-summit-2019/) The seventh annual OpenZFS Developer Summit took place on November 4th and 5th in San Francisco and brought together a healthy mix of familiar faces and new community participants. Several folks from iXsystems took part in the talks, hacking, and socializing at this amazing annual event. The messages of the event can be summed up as Unification, Refinement, and Ecosystem Tooling. News Roundup Using FreeBSD with Ports (2/2): Tool-assisted updating (https://eerielinux.wordpress.com/2019/09/12/using-freebsd-with-ports-2-2-tool-assisted-updating/) Part 1 here: https://eerielinux.wordpress.com/2019/08/18/using-freebsd-with-ports-1-2-classic-way-with-tools/ In the previous post I explained why sometimes building your software from ports may make sense on FreeBSD. I also introduced the reader to the old-fashioned way of using tools to make working with ports a bit more convenient. In this follow-up post we’re going to take a closer look at portmaster and see how it especially makes updating from ports much, much easier. For people coming here without having read the previous article: What I describe here is not what every FreeBSD admin today should consider good practice (any more)! It can still be useful in special cases, but my main intention is to discuss this for building up the foundation for what you actually should do today. LLDB Threading support now ready for mainline (http://blog.netbsd.org/tnf/entry/lldb_threading_support_now_ready) Upstream describes LLDB as a next generation, high-performance debugger. It is built on top of LLVM/Clang toolchain, and features great integration with it. At the moment, it primarily supports debugging C, C++ and ObjC code, and there is interest in extending it to more languages. In February, I have started working on LLDB, as contracted by the NetBSD Foundation. So far I've been working on reenabling continuous integration, squashing bugs, improving NetBSD core file support, extending NetBSD's ptrace interface to cover more register types and fix compat32 issues and fixing watchpoint support. Then, I've started working on improving thread support which is taking longer than expected. You can read more about that in my September 2019 report. So far the number of issues uncovered while enabling proper threading support has stopped me from merging the work-in-progress patches. However, I've finally reached the point where I believe that the current work can be merged and the remaining problems can be resolved afterwards. More on that and other LLVM-related events happening during the last month in this report. Linux VS open source UNIX (https://www.adminbyaccident.com/politics/linux-vs-open-source-unix/) Beastie Bits Support for Realtek RTL8125 2.5Gb Ethernet controller (https://marc.info/?l=openbsd-tech&m=157380442230074&w=2) Computer Files Are Going Extinct (https://onezero.medium.com/the-death-of-the-computer-file-doc-43cb028c0506) FreeBSD kernel hacking (https://www.youtube.com/watch?v=4FUub_UtF3c) Modern BSD Computing for Fun on a VAX! Trying to use a VAX in today's world by Jeff Armstrong (https://youtu.be/e7cJ7v2lYdE) MidnightBSD 1.2 Released (https://www.justjournal.com/users/mbsd/entry/33779) Feedback/Questions Paulo - Zfs snapshots (http://dpaste.com/0WQRP43#wrap) Phillip - GCP (http://dpaste.com/075ZQE1#wrap) A Listener - Old episodes? (http://dpaste.com/3YJ4119#wrap) Send questions, comments, show ideas/topics, or stories you want mentioned on the show to feedback@bsdnow.tv (mailto:feedback@bsdnow.tv) Your browser does not support the HTML5 video tag.
Recently, Dropbox published a blog illustrating the costs & overhead of using C++ to code share between iOS and Android. The author, Eyal Guthmann from Dropbox, joins us to elaborate more on the topic. Was the problem C++? Why couldn't Dropbox simply hire more C++ developers? Why not React Native or Flutter? Is cross platform mobile development simply not viable?Interested in C++ or mobile development? Dropbox is hiring!Dropbox C++ drop articleRunning into problems with shared cross platform code in JavaScript is the episode where Alex talked about cross platform code shareability issues using JavascriptSunsetting React Native Airbnb article announcing that they are dropping React NativeConnect with us: https://twitter.com/insideiosdevEmail us at hello@insideiosdev.com
Replacing a (silently) failing disk in a ZFS pool, OPNsense 19.7 RC1 released, implementing DRM ioctl support for NetBSD, High quality/low latency VOIP server with umurmur/Mumble on OpenBSD, the PDP-7 where Unix began, LLDB watchpoints, and more. Headlines Replacing a (silently) failing disk in a ZFS pool (https://imil.net/blog/2019/07/02/Replacing-a-silently-failing-disk-in-a-ZFS-pool/) Maybe I can’t read, but I have the feeling that official documentations explain every single corner case for a given tool, except the one you will actually need. My today’s struggle: replacing a disk within a FreeBSD ZFS pool. What? there’s a shitton of docs on this topic! Are you stupid? I don’t know, maybe. Yet none covered the process in a simple, straight and complete manner. OPNsense 19.7 RC1 released (https://opnsense.org/opnsense-19-7-rc1-released/) Hi there, For four and a half years now, OPNsense is driving innovation through modularising and hardening the open source firewall, with simple and reliable firmware upgrades, multi-language support, HardenedBSD security, fast adoption of upstream software updates as well as clear and stable 2-Clause BSD licensing. We thank all of you for helping test, shape and contribute to the project! We know it would not be the same without you. Download links, an installation guide[1] and the checksums for the images can be found below as well. News Roundup Implementation of DRM ioctl Support for NetBSD kernel (https://blog.netbsd.org/tnf/entry/implementation_of_drm_ioctl_support) What is DRM ioctl ? Ioctls are input/output control system calls and DRM stands for direct rendering manager The DRM layer provides several services to graphics drivers, many of them driven by the application interfaces it provides through libdrm, the library that wraps most of the DRM ioctls. These include vblank event handling, memory management, output management, framebuffer management, command submission & fencing, suspend/resume support, and DMA services. Native DRM ioctl calls NetBSD was able to make native DRM ioctl calls with hardware rendering once xorg and proper mesa packages where installed. We used the glxinfo and glxgears applications to test this out. High quality / low latency VOIP server with umurmur/Mumble on OpenBSD (https://dataswamp.org/~solene/2019-07-04-umurmur.html) Discord users keep telling about their so called discord server, which is not dedicated to them at all. And Discord has a very bad quality and a lot of voice distorsion. Why not run your very own mumble server with high voice quality and low latency and privacy respect? This is very easy to setup on OpenBSD! Mumble is an open source voip client, it has a client named Mumble (available on various operating system) and at least Android, the server part is murmur but there is a lightweight server named umurmur. People authentication is done through certificate generated locally and automatically accepted on a server, and the certificate get associated with a nickname. Nobody can pick the same nickname as another person if it’s not the same certificate. TMWL June’19 — JS Fetch API, scheduling in Spring, thoughts on Unix (https://blog.softwaremill.com/tmwl-june19-js-fetch-api-scheduling-in-spring-thoughts-on-unix-fd54f50ecd64) Unix — going back to the roots From time to time, I like to review my knowledge in a certain area, even when I feel like I know a lot about it already. I go back to the basics and read tutorials, manuals, books or watch interesting videos. I’ve been using macOS for a couple of years now, previously being a linux user for some (relatively short) time. Both these operating systems have a common ancestor — Unix. While I’m definitely not an expert, I feel quite comfortable using linux & macOS — I understand the concepts behind the system architecture, know a lot of command line tools & navigate through the shell without a hassle. So-called unix philosophy is also close to my heart. I always feel like there’s more I could squeeze out of it. Recently, I found that book titled “Unix for dummies, 5th edition” which was published back in… 2004. Feels literally like AGES in the computer-related world. However, it was a great shot — the book starts with the basics, providing some brief history of Unix and how it came to life. It talks a lot about the structure of the system and where certain pieces fit (eg. “standard” set of tools), and how to understand permissions and work with files & directories. There’s even a whole chapter about shell-based text editors like Vi and Emacs! Despite the fact that I am familiar with most of these, I could still find some interesting pieces & tools that I either knew existed (but never had a chance to use), or even haven’t ever heard of. And almost all of these are still valid in the modern “incarnations” of Unix’s descendants: Linux and macOS. The book also talks about networking, surfing the web & working with email. It’s cute to see pictures of those old browsers rendering “ancient” Internet websites, but hey — this is how it looked like no more than fifteen years ago! I can really recommend this book to anyone working on modern macOS or Linux — you will certainly find some interesting pieces. Especially if you like to go back to the roots from time to time as I do! ThePDP-7 Where Unix Began (https://bsdimp.blogspot.com/2019/07/the-pdp-7-where-unix-began.html) In preparation for a talk on Seventh Edition Unix this fall, I stumbled upon a service list from DEC for all known PDP-7 machines. From that list, and other sources, I believe that PDP-7 serial number 34 was the original Unix machine. V0 Unix could run on only one of the PDP-7s. Of the 99 PDP-7s produced, only two had disks. Serial number 14 had an RA01 listed, presumably a disk, though of a different type. In addition to the PDP-7 being obsolete in 1970, no other PDP-7 could run Unix, limiting its appeal outside of Bell Labs. By porting Unix to the PDP-11 in 1970, the group ensured Unix would live on into the future. The PDP-9 and PDP-15 were both upgrades of the PDP-7, so to be fair, PDP-7 Unix did have a natural upgrade path (the PDP-11 out sold the 18 bit systems though ~600,000 to ~1000). Ken Thompson reports in a private email that there were 2 PDP-9s and 1 PDP-15 at Bell Labs that could run a version of the PDP-7 Unix, though those machines were viewed as born obsolete. LLDB: watchpoints, XSTATE in ptrace() and core dumps (https://blog.netbsd.org/tnf/entry/lldb_watchpoints_xstate_in_ptrace) Upstream describes LLDB as a next generation, high-performance debugger. It is built on top of LLVM/Clang toolchain, and features great integration with it. At the moment, it primarily supports debugging C, C++ and ObjC code, and there is interest in extending it to more languages. In February, I have started working on LLDB, as contracted by the NetBSD Foundation. So far I've been working on reenabling continuous integration, squashing bugs, improving NetBSD core file support and lately extending NetBSD's ptrace interface to cover more register types and fix compat32 issues. You can read more about that in my May 2019 report. In June, I have finally finished the remaining ptrace() work for xstate and got it merged both on NetBSD and LLDB end (meaning it's going to make it into NetBSD 9). I have also worked on debug register support in LLDB, effectively fixing watchpoint support. Once again I had to fight some upstream regressions. Beastie Bits Project Trident 19.07 Available (https://project-trident.org/post/2019-07-12_19.07_available/) A list of names from "Cold Blood" -- Any familiar? (https://www.montanalinux.org/cold-blood-list-of-numbers-201907.html) fern: a curses-based mastodon client modeled off usenet news readers & pine, with an emphasis on getting to 'timeline zero' (https://github.com/enkiv2/fern) OpenBSD Community goes Platinum for 2019! (https://undeadly.org/cgi?action=article;sid=20190707065226) tcp keepalive and dports on DragonFly (https://www.dragonflydigest.com/2019/07/15/23199.html) Feedback/Questions Patrick - OpenZFS/ZoL Module from Ports (http://dpaste.com/1W2HJ04) Brad - Services not starting (http://dpaste.com/345VM9Y#wrap) Simon - Feedback (http://dpaste.com/1B4ZKC8#wrap) Send questions, comments, show ideas/topics, or stories you want mentioned on the show to feedback@bsdnow.tv (mailto:feedback@bsdnow.tv) Your browser does not support the HTML5 video tag.
OpenZFS-kmod port available, using blacklistd with NPF as fail2ban replacement, ZFS raidz expansion alpha preview 1, audio VU-meter increases CO2 footprint rant, XSAVE and compat32 kernel work for LLDB, where icons for modern X applications come from, and more. Headlines ZFSonFreeBSD ports renamed OpenZFS (https://www.freshports.org/sysutils/openzfs-kmod) The ZFS on FreeBSD project has renamed the userland and kernel ports from zol and zol-kmod to openzfs and openzfs-kmod The new versions from this week are IOCTL compatible with the command line tools in FreeBSD 12.0, so you can use the old userland with the new kernel module (although obviously not the new features) With the renaming it is easier to specify which kernel module you want to load in /boot/loader.conf: > zfs_load=”YES” or > openzfs_load=”YES” To load traditional or the newer version of ZFS The kmod still requires FreeBSD 12-stable or 13-current because it depends on the newer crypto support in the kernel for the ZFS native encryption feature. Allan is looking at ways to work around this, but it may not be practical. We would like to do an unofficial poll on how people would the userland to co-exist. Add a suffix to the new commands in /usr/local (zfs.new zpool.new or whatever). One idea i’ve had is to move the zfs and zpool commands to /libexec and make /sbin/zfs and /sbin/zpool a switcher script, that will call the base or ports version based on a config file (or just based on if the port is installed) For testing purposes, generally you should be fine as long as you don’t run ‘zpool upgrade’, which will make your pool only importable using the newer ZFS. For extra safety, you can create a ‘zpool checkpoint’, which will allow you to undo any changes that are made to the pool during your testing with the new openzfs tools. Note: the checkpoint will undo EVERYTHING. So don’t save new data you want to keep. Note: Checkpoints disable all freeing operations, to prevent any data from being overwritten so that you can re-import at the checkpoint and undo any operation (including zfs destroy-ing a dataset), so also be careful you don’t run out of space during testing. Please test and provide feedback. How to use blacklistd(8) with NPF as a fail2ban replacement (https://www.unitedbsd.com/d/63-how-to-use-blacklistd8-with-npf-as-a-fail2ban-replacement) About blacklistd(8) blacklistd(8) provides an API that can be used by network daemons to communicate with a packet filter via a daemon to enforce opening and closing ports dynamically based on policy. The interface to the packet filter is in /libexec/blacklistd-helper (this is currently designed for npf) and the configuration file (inspired from inetd.conf) is in etc/blacklistd.conf Now, blacklistd(8) will require bpfjit(4) (Just-In-Time compiler for Berkeley Packet Filter) in order to properly work, in addition to, naturally, npf(7) as frontend and syslogd(8), as a backend to print diagnostic messages. Also remember npf shall rely on the npflog* virtual network interface to provide logging for tcpdump() to use. Unfortunately (dont' ask me why :P) in 8.1 all the required kernel components are still not compiled by default in the GENERIC kernel (though they are in HEAD), and are rather provided as modules. Enabling NPF and blacklistd services would normally result in them being automatically loaded as root, but predictably on securelevel=1 this is not going to happen News Roundup [WIP] raidz expansion, alpha preview 1 (https://github.com/zfsonlinux/zfs/pull/8853) Motivation and Context > This is a alpha-quality preview of RAID-Z expansion. This feature allows disks to be added one at a time to a RAID-Z group, expanding its capacity incrementally. This feature is especially useful for small pools (typically with only one RAID-Z group), where there isn't sufficient hardware to add capacity by adding a whole new RAID-Z group (typically doubling the number of disks). > For additional context as well as a design overview, see my short talk from the 2017 OpenZFS Developer Summit: slides video Rant: running audio VU-meter increases my CO2 footprint (https://medium.com/@MartinCracauer/bug-rant-running-audio-vu-meter-increases-my-co2-footprint-871d5c1bee5a) A couple months ago I noticed that the monitor on my workstation never power off anymore. Screensaver would go on, but DPMs (to do the poweroff) never kicked in. I grovels the output of various tools that display DPMS settings, which as usual in Xorg were useless. Everybody said DPMS is on with a timeout. I even wrote my own C program to use every available Xlib API call and even the xscreensaver library calls. (should make it available) No go, everybody says that DPMs is on, enabled and set on a timeout. Didn’t matter whether I let xscreeensaver do the job or just the X11 server. After a while I noticed that DPMS actually worked between starting my X11 server and starting all my clients. I have a minimal .xinitrc and start the actual session from a script, that is how I could notice. If I used a regular desktop login I wouldn’t have noticed. A server state bug was much more likely than a client bug. + See the article for the rest... XSAVE and compat32 kernel work for LLDB (http://blog.netbsd.org/tnf/entry/xsave_and_compat32_kernel_work) Upstream describes LLDB as a next generation, high-performance debugger. It is built on top of LLVM/Clang toolchain, and features great integration with it. At the moment, it primarily supports debugging C, C++ and ObjC code, and there is interest in extending it to more languages. In February, I have started working on LLDB, as contracted by the NetBSD Foundation. So far I've been working on reenabling continuous integration, squashing bugs, improving NetBSD core file support and lately extending NetBSD's ptrace interface to cover more register types. You can read more about that in my Apr 2019 report. In May, I was primarily continuing the work on new ptrace interface. Besides that, I've found and fixed a bug in ptrace() compat32 code, pushed LLVM buildbot to ‘green’ status and found some upstream LLVM regressions. More below. Some things about where icons for modern X applications come from (https://utcc.utoronto.ca/~cks/space/blog/unix/ModernXAppIcons) If you have a traditional window manager like fvwm, one of the things it can do is iconify X windows so that they turn into icons on the root window (which would often be called the 'desktop'). Even modern desktop environments that don't iconify programs to the root window (or their desktop) may have per-program icons for running programs in their dock or taskbar. If your window manager or desktop environment can do this, you might reasonably wonder where those icons come from by default. Although I don't know how it was done in the early days of X, the modern standard for this is part of the Extended Window Manager Hints. In EWMH, applications give the window manager a number of possible icons, generally in different sizes, as ARGB bitmaps (instead of, say, SVG format). The window manager or desktop environment can then pick whichever icon size it likes best, taking into account things like the display resolution and so on, and display it however it wants to (in its original size or scaled up or down). How this is communicated in specific is through the only good interprocess communication method that X supplies, namely X properties. In the specific case of icons, the NETWMICON property is what is used, and xprop can display the size information and an ASCII art summary of what each icon looks like. It's also possible to use some additional magic to read out the raw data from _NETWM_ICON in a useful format; see, for example, this Stackoverflow question and its answers. Beastie Bits Recent Security Innovations (http://undeadly.org/cgi?action=article;sid=20190605110020) Old Unix books + Solaris (https://imgur.com/a/HbSYtQI) Pro-Desktop - A Tiling Desktop Environment (https://bitcannon.net/post/pro-desktop/) The Tar Pipe (https://blog.extracheese.org/2010/05/the-tar-pipe.html) At least one vim trick you might not know (https://www.hillelwayne.com/post/intermediate-vim/) Feedback/Questions Johnny - listener feedback (http://dpaste.com/0ZQCQ8Y#wrap) Brian - Questions (http://dpaste.com/1843RNX#wrap) Mark - ZFS Question (http://dpaste.com/3M83X9G#wrap) Send questions, comments, show ideas/topics, or stories you want mentioned on the show to feedback@bsdnow.tv (mailto:feedback@bsdnow.tv) Your browser does not support the HTML5 video tag.
Running AIX on QEMU on Linux on Windows, your NAS fleet with TrueCommand, Unleashed 1.3 is available, LLDB: CPU register inspection support extension, V7 Unix programs often not written as expected, and more. Headlines Running AiX on QEMU on Linux on Windows YES it’s real! I’m using the Linux subsystem on Windows, as it’s easier to build this Qemu tree from source. I’m using Debian, but these steps will work on other systems that use Debian as a base. first thing first, you need to get your system with the needed pre-requisites to compile Great with those in place, now clone Artyom Tarasenko’s source repository Since the frame buffer apparently isn’t quite working just yet, I configure for something more like a text mode build. Now for me, GCC 7 didn’t build the source cleanly. I had to make a change to the file config-host.mak and remove all references to -Werror. Also I removed the sound hooks, as we won’t need them. Now you can build Qemu. Okay, all being well you now have a Qemu. Now following the steps from Artyom Tarasenko’s blog post, we can get started on the install! See article for rest of walkthrough. Take Command of Your NAS Fleet with TrueCommand Hundreds of thousands of FreeNAS and TrueNAS systems are deployed around the world, with many sites having dozens of systems. Managing multiple systems individually can be time-consuming. iXsystems has responded to the challenge by creating a “single pane of glass” application to simplify the scaling of data, drive management, and administration of iXsystems NAS platforms. We are proud to introduce TrueCommand. TrueCommand is a ZFS-aware management application that manages TrueNAS and FreeNAS systems. The public Beta of TrueCommand is available for download now. TrueCommand can be used with small iXsystems NAS fleets for free. Licenses can be purchased for large-scale deployments and enterprise support. TrueCommand expands on the ease of use and power of TrueNAS and FreeNAS systems with multi-system management and reporting. News Roundup Unleashed 1.3 Released This is the fourth release of Unleashed - an operating system fork of illumos. For more information about Unleashed itself and the download links, see our website. As one might expect, this release removes a few things. The most notable being the removal of ksh93 along with all its libs. As far as libc interfaces are concerned, a number of non-standard functions were removed. In general, they have been replaced by the standards-compliant versions. (getgrentr, fgetgrentr, getgrgidr, getgrnamr, ttynamer, getloginr, shmdt, sigwait, gethostname, putmsg, putpmsg, and getaddrinfo) Additionally, wordexp and wordfree have been removed from libc. Even though they are technically required by POSIX, software doesn't seem to use them. Because of the fragile implementation (shelling out), we took the OpenBSD approach and just removed them. The default compilation environment now includes XOPENSOURCE=700 and EXTENSIONS. Additionally, all applications now use 64-bit file offsets, making use of LARGEFILESOURCE, LARGEFILE64SOURCE, and FILEOFFSET_BITS unnecessary. Last but not least, nightly.sh is no more. In short, to build one simply runs 'make'. (See README for detailed build instructions.) Why Unleashed Why did we decide to fork illumos? After all, there are already many illumos distributions available to choose from. We felt we could do better than any of them by taking a more aggressive stance toward compatibility and reducing cruft from code and community interactions alike. LLDB: extending CPU register inspection support Upstream describes LLDB as a next generation, high-performance debugger. It is built on top of LLVM/Clang toolchain, and features great integration with it. At the moment, it primarily supports debugging C, C++ and ObjC code, and there is interest in extending it to more languages. In February, I have started working on LLDB, as contracted by the NetBSD Foundation. So far I've been working on reenabling continuous integration, squashing bugs, improving NetBSD core file support and updating NetBSD distribution to LLVM 8 (which is still stalled by unresolved regressions in inline assembly syntax). You can read more about that in my Mar 2019 report. In April, my main focus was on fixing and enhancing the support for reading and writing CPU registers. In this report, I'd like to shortly summarize what I have done, what I have learned in the process and what I still need to do. Future plans My work continues with the two milestones from last month, plus a third that's closely related: Add support for FPU registers support for NetBSD/i386 and NetBSD/amd64. Support XSAVE, XSAVEOPT, ... registers in core(5) files on NetBSD/amd64. Add support for Debug Registers support for NetBSD/i386 and NetBSD/amd64. The most important point right now is deciding on the format for passing the remaining registers, and implementing the missing ptrace interface kernel-side. The support for core files should follow using the same format then. Userland-side, I will work on adding matching ATF tests for ptrace features and implement LLDB side of support for the new ptrace interface and core file notes. Afterwards, I will start working on improving support for the same things on 32-bit (i386) executables. V7 Unix programs are often not written the way you would expect Yesterday I wrote that V7 ed read its terminal input in cooked mode a line at a time, which was an efficient, low-CPU design that was important on V7's small and low-power hardware. Then in comments, frankg pointed out that I was wrong about part of that, namely about how ed read its input. Sidebar: An interesting undocumented ed feature Reading this section of the source code for ed taught me that it has an interesting, undocumented, and entirely characteristic little behavior. Officially, ed commands that have you enter new text have that new text terminate by a . on a line by itself: In other words, it turns a single line with '.' into an EOF. The consequence of this is that if you type a real EOF at the start of a line, you get the same result, thus saving you one character (you use Control-D instead of '.' plus newline). This is very V7 Unix behavior, including the lack of documentation. This is also a natural behavior in one sense. A proper program has to react to EOF here in some way, and it might as well do so by ending the input mode. It's also natural to go on to try reading from the terminal again for subsequent commands; if this was a real and persistent EOF, for example because the pty closed, you'll just get EOF again and eventually quit. V7 ed is slightly unusual here in that it deliberately converts '.' by itself to EOF, instead of signaling this in a different way, but in a way that's also the simplest approach; if you have to have some signal for each case and you're going to treat them the same, you might as well have the same signal for both cases. Modern versions of ed appear to faithfully reimplement this convenient behavior, although they don't appear to document it. I haven't checked OpenBSD, but both FreeBSD ed and GNU ed work like this in a quick test. I haven't checked their source code to see if they implement it the same way. Beastie Bits CarolinaCon 15: Writing Exploit-Resistant Code With OpenBSD CFT: FreeBSD Package Base Initial FUSE support in DragonFly Two significant bugfixes for 5.4 Libretto 100ct: 166mhz Pentium, 16gb compactflash, 32mb ram running OpenBSD Feedback/Questions DJ - Feedback Fabian - ZFS ARC Caleb - Question A small programming note: After BSDNow episode 300, the podcast will switch to audio-only, using a new higher quality recording and production system. The live stream will likely still include video. Send questions, comments, show ideas/topics, or stories you want mentioned on the show to feedback@bsdnow.tv Your browser does not support the HTML5 video tag.
Alex and Andrew explain a bit why they've been out. Then they both talk about the first conference talks they ever gave and what they learned. AppDevCon conference talk in Amsterdam iOS Coding Tips email list #ioscodingtips on Twitter #ioscodingtips on LinkedIn Twitter @InsideiOSDev hello@insideiosdev.com
Womit implementierst Du Data Model? Ich wette mit CoreData. Was wäre wenn ich Dir sage, dass es ein Overkill ist. Dass man Daten einfacher repräsentieren kann. Dass es mit einer kleinen Lib geht, die in ObjC und Swift implementiert ist und nur aus 5 einfachen Klassen besteht. Würde Dich das interessieren? Session 1, Sonntag, Neuer Saal, Macoun 2017
Show Notes:* Apple Docs: https://developer.apple.com/documentation* Stack Overflow: https://stackoverflow.com* Kilo_Loco’s YouTube Channel: https://www.youtube.com/channel/UCv75sKQFFIenWHrprnrR9aA* Sean Allen’s YouTube Channel: https://www.youtube.com/channel/UCbTw29mcP12YlTt1EpUaVJw* Hacking With Swift: https://www.hackingwithswift.com* Objc.io: https://www.hackingwithswift.com* Ray Wenderlich: https://www.raywenderlich.com* Big Nerd Ranch: https://www.bignerdranch.com* Swift Community Podcast: https://www.swiftcommunitypodcast.orgSponsors:* Sentry $100 credit (only for new accounts): https://sentry.io/signup/?code=firesideswiftFireside Swift Theme song by Mike “Golden Pipes” DillinghamBlind Love Dub by Jeris (c) copyright 2017 Licensed under a Creative Commons Attribution (3.0) license. http://dig.ccmixter.org/files/VJ_Memes/55416 Ft: Kara Square (mindmapthat)
Our guest for this episode is Peter Mossad, Peter has been developing for iOS for over 10 years since his last year in college, starting with Xcode 3.0 to now. We talk about his journey and the struggle of getting out of the comfort zone (Objc) to (Swift), traveling abroad journey, what do you need to join companies in Germany and how to apply, SOLID principles and many other topics. Clean code: https://www.amazon.com/Clean-Code-Handbook-Software-Craftsmanship/dp/0132350882
Episode #5 2 Corinthians 1
The raywenderlich.com Podcast: For App Developers and Gamers
In this episode Keith Moon joins Janie and Dru to discuss Swift and Objective-C interop, then take a dive back into Mac programming to look at NSTouchBar. The post Swift-ObjC API Exchange and NSTouchBar – Podcast S07 E04 appeared first on Ray Wenderlich.
Episode #4 2 Timothy 2:1-7
Episode #2 John 15:1-15
This week, Soroush and Chris talk about what it's like to write Objective-C after a few years of Swift. Run Loops Episode 34: Promises … in Objective-C ObjC Lightweight Generics NSNumber Chris's as_ macros List comprehensions Key-Value Coding Programming Guide Chris: Cocoa's mutable-subclass pattern is an antipattern The Responder Chain Understanding Event Handling, Responders, and the Responder Chain Event Architecture The Future of Status Board Soroush: Why I don't write Swift Soroush: Reflections on six months of Swift
This week, Chris and Soroush discuss Soroush's latest project, which among other things involves porting his Swift Promises library to Objective-C. Soroush's Swift promise library Gist of Soroush's Objective-C promise library Fucking Block Syntax Episode 4: Promises Episode 15: Not Invented Here BAPromise CocoaPods, Carthage Bitcode Android Support Library Tiny Swift Idioms in Objective-C We didn't discuss this in the episode, but it's relevant: One Weird Trick to Lose Size
Karoly Lorentey is an independent Swift developer and the author of Optimizing Collections in Swift which was recently published by Objc.io. We discuss rediscovering his passion for programming, the joy of writing code no one ever sees, his journey from Sys-Admin to Mac developer to his 2 year exploration of Swift. Annoucements: Check out the Issue I wrote: https://swiftweekly.github.io/issue-76/ Contact me on Twitter if you're interested in working with me on the new Podcast and/or Newsletter idea I'm teaching Swift for two weeks at https://tumo.org Follow SwiftCoders on Instagram and Twitter for updates Links: https://twitter.com/lorentey https://www.objc.io/books/optimizing-collections/ https://talk.objc.io/episodes/S01E55-sorted-arrays-with-binary-search https://github.com/lorentey http://www.latex-project.org https://github.com/apple/swift/pull/10558 https://en.wikipedia.org/wiki/Macro_(computer_science) https://developer.apple.com/videos/play/wwdc2017/402/ http://ankit.im/swift/2016/02/29/swift-abstract-syntax-tree/ http://redbullairrace.com https://en.wikipedia.org/wiki/Nadia_Comăneci https://en.wikipedia.org/wiki/Nadia_(film) https://en.wikipedia.org/wiki/Béla_Károlyi Listen on iTunes. Support this podcast via Patreon. Questions, comments, or you just wanna say Hi? Contact your host @garricn on Twitter. This episode was recorded using the Cast platform by @JulianLepinski. Wanna start your own podcast? Try Cast!
There's been a constant push and pull on ObjC bridging since Swift 1.x, trying to seek a balance but always swaying in the other direction.
Episode #5 Luke 5:27-32
Chris and Soroush discuss Uncle Bob's controversial blog post about languages with type systems that he finds too strict. Uncle Bob's original post: The Dark Path The Kotlin Programming Language SwiftCheck: property testing in Swift Fox: property testing for ObjC Proof in Functions Null References: The Billion Dollar Mistake Chris Eidhof's response: Types vs TDD Uncle Bob's follow up: Types and Tests Soroush's post from a few years ago: Test and Types
Episode #4 John 8:31-36
Episode #3 Matthew 28:16-20
I'm super excited to have Chris Eidhof as a guest this week. Chris is the Founder of Objc.io, UIKonf, and Swift Talk, the author of Functional Swift and Advanced Swift, and he also travels the world speaking about Swift. Enjoy! Links: Chris on Twitter - @ChrisEidhof - https://twitter.com/ChrisEidhofSwift Talk - https://talk.objc.ioLoadingViewConrtrollers - https://talk.objc.io/episodes/S01E03-loading-view-controllersThe Books - https://www.objc.io/books/Objc.io - https://www.objc.ioWebsite - http://www.eidhof.nlSwift Summit - https://www.swiftsummit.comChris is also the founder of UIKonf - http://www.uikonf.comFriends of ChrisWouter Swierstra - @WouterSwierstra - https://twitter.com/WouterSwierstraEelco Lempsink - @eelco - https://twitter.com/eelcoFlorian Kugler - @FlorianKugler - https://twitter.com/FlorianKuglerPeter Steinberger - @steipete - https://twitter.com/steipeteDaniel Eggert - @danielboedewadt - https://twitter.com/danielboedewadtBatch Script - https://en.wikipedia.org/wiki/Batch_fileDelphi - https://en.wikipedia.org/wiki/Delphi_(programming_language)PHP - https://en.wikipedia.org/wiki/PHPRuby - https://en.wikipedia.org/wiki/Ruby_(programming_language)Ruby on Rails - https://en.wikipedia.org/wiki/Ruby_on_RailsAjax - https://en.wikipedia.org/wiki/Ajax_(programming)Haskell - https://en.wikipedia.org/wiki/Haskell_(programming_language)Ayaka Nonaka - @ayanonagon - https://twitter.com/ayanonagonLoadingViewControllers inspired by this talk - https://realm.io/news/tryswift-ayaka-nonaka-boundaries-in-practice/THC - https://en.wikipedia.org/wiki/Tuindorp_Hustler_ClickLeon Kirchhoff - https://twitter.com/leonkiBootcamp Berlin - https://twitter.com/sbcBerlinDenekamp - https://en.wikipedia.org/wiki/Denekamp Listen on iTunes. Questions, comments, or you just wanna say Hi? Contact your host @garricn on Twitter This episode was recorded using the Cast platform by @JulianLepinski. Wanna start your own podcast? Try Cast!
Olá pessoal, depois de um pequeno atraso, estamos de novo com mais um episódio. Dessa vez resolvemos falar sobre o processo de migração dos projetos para o Swift 3. Maiores dificuldades, muitas dicas e altas confusões - com o Xcode :D Convidados da semana: Daniel Bonates, Guilherme Rambo, Cassius Pacheco The Grand Renaming, controle de acesso aos métodos e tipos, a evolução do Grand Central Dispatch, maiores dificuldades da migração, libs e frameworks que exigiram maiores mudanças, novidades para o Objective-C que facilitam a interação com Swift e muito mais. Dica do Podcaster: Daniel: - A conversão pra Swift 3 vai quebrar coisas, sobre o quanto, vai depender de alguns fatores. Por isso a migração merece atenção e planejamento - Tente separar em etapas: * Dependências: Enumerá-las e pesquisar o suporte (não apenas se oferece suporte, mas qual a versão mínima do iOS para isso acontecer) * Código nativo do app * Código legado ObjC e suas interações com Swift * Storyboards: O Xcode 8 vai modificar muita coisa nas suas telas, quebrar o storyboards em partes, links internos e xibs pode poupar um bocado de esforço na conversão. No pod cast eu citamos outra idéia de como proceder sobre os storyboards após a conversão do projeto pra Swift 3 Dicas de migração de libs open source http://www.jessesquires.com/migrating-to-swift-3/ Swifty Delegates http://khanlou.com/2016/09/swifty-delegates/ Dica sobre o excesso de log com Xcode 8: https://twitter.com/rustyshelf/status/775505191160328194 Referências: https://twitter.com/_mochs/status/783927375612510209 https://developer.apple.com/library/content/documentation/Swift/Conceptual/Swift_Programming_Language/AdvancedOperators.html https://swift.org/blog/swift-3-0-released/ https://swift.org/migration-guide/ Swift Evolution > Proposals https://github.com/apple/swift-evolution/tree/master/proposals
1:15: Introduction: Chris Eidhof OBJC.io 2:05: Structs in Swift Blog post Functional programming inspiration Mutations in structs can be positive 3:55: Problems that can be solved Unexpected changes, unexpected mutations Make mutable opt-in 8:15: When mutating can be useful Change an element at a specific index Struct copies are very expensive 11:15: Benchmarks 15:30: New Data and Updates Strategies for communicating changes in state 23:00 Writing simple code Subjective Issues with structs Swift Summit 27:00: ObjectiveC.io Functional Swift 33:00 Other projects Advanced Swift Functional Swift Conference Picks: The Retro Mac Cast (Andrew) 68KMLA.org Forums (Andrew) Twin Cities Startup Week (Jayme) Eli Document Picker (Rod) Functional Swift (Rod) Michael Vey Fall of Hades (Chuck) Webinar Jam (Chuck) Get a Coder Job (Chuck) Kyle Fuller (Chris) Links: Hired.com Chris on Twitter
1:15: Introduction: Chris Eidhof OBJC.io 2:05: Structs in Swift Blog post Functional programming inspiration Mutations in structs can be positive 3:55: Problems that can be solved Unexpected changes, unexpected mutations Make mutable opt-in 8:15: When mutating can be useful Change an element at a specific index Struct copies are very expensive 11:15: Benchmarks 15:30: New Data and Updates Strategies for communicating changes in state 23:00 Writing simple code Subjective Issues with structs Swift Summit 27:00: ObjectiveC.io Functional Swift 33:00 Other projects Advanced Swift Functional Swift Conference Picks: The Retro Mac Cast (Andrew) 68KMLA.org Forums (Andrew) Twin Cities Startup Week (Jayme) Eli Document Picker (Rod) Functional Swift (Rod) Michael Vey Fall of Hades (Chuck) Webinar Jam (Chuck) Get a Coder Job (Chuck) Kyle Fuller (Chris) Links: Hired.com Chris on Twitter
More Than Just Code podcast - iOS and Swift development, news and advice
We start off with some follow up on Amazon Underground. We discuss iOS 9 Content Blocking extensions. We discuss the waining support of Flash in web ads, web browsers & the enterprise. We speculate on the products to be announced on Sept 9th - also whether Apple will make a play into providing content & games on the Apple TV. Aaron illuminates his progress using Swift. Picks: VHS Camcorder app and QuartzCode app. Episode 55 Show Notes Mic Pringle Darryl Bayliss Amazon Underground iOS 9 Content Blocking Extensions Explained - iMore iOS 9 content blocking will transform the mobile Web: I’ve tried it Cloud to Butt Amazon - Technical guidelines (no more Flash) Fluid Coupling - Asymco Apple & IBM iPad Pro planned for Sept. 9 debut with iPad mini 4; October pre-orders, November launch Apple TV 4 hardware revealed: A8 chip, black remote, 8/16GB storage, same ports, no 4K Jimmy Iovine Dr. Dre Apple Executive Bios Moving Swiftly - Allan Pike argues that now is the time for Swift Advanced Swift - Objc.io Book Kung Fury Official Movie Kentucky Fried Movie Paint Code Principle For Mac Episode 55 Picks VHS Camcorder by Rarevision QuartzCode app
Thank you RailsClips Kickstarter Backers! 02:02 - Is Objective-C dead? Will all apps eventually be written in Swift? Will Objective-C’s popularity decline? Replacing/Rewriting Frameworks Updating Code? Legacy Code? Dependency Injection, NSObject iPhreaks Show Episode #85: Prototyping with Jay Thrash 08:48 - Xcode Support 10:18 - Mixing Objc and Swift (Becoming Bilingual) or Choosing One or the Other? Current Apps Using Swift GitHub iPhreaks Show Episode #98: Carthage with Justin Spahr-Summers Gotchas with Using Both Objc = fear, Swift = familiarity Complementary Languages and Options Challenging Yourself as a Developer (Expanding Your Toolbelt) 25:33 - Is there a dying language? 27:05 - If you learn Swift are you disadvantaged if you don’t know Objc? Picks iOS Animations by Tutorials by Ray Wenderlich (Alondo) Elevator Saga (Alondo) Vibrato.fm (Jaim) CODE 87-Key Illuminated Mechanical Keyboard with White LED Backlighting - Cherry MX Clear (Chuck) Grifiti Fat Wrist Pad (Chuck) Pebble Watch Kickstarter Campaign (Chuck) Ready Player One by Ernest Cline (Chuck) Are you attending MicroConf? Chuck wants to know! Tweet him at @cmaxw.
Thank you RailsClips Kickstarter Backers! 02:02 - Is Objective-C dead? Will all apps eventually be written in Swift? Will Objective-C’s popularity decline? Replacing/Rewriting Frameworks Updating Code? Legacy Code? Dependency Injection, NSObject iPhreaks Show Episode #85: Prototyping with Jay Thrash 08:48 - Xcode Support 10:18 - Mixing Objc and Swift (Becoming Bilingual) or Choosing One or the Other? Current Apps Using Swift GitHub iPhreaks Show Episode #98: Carthage with Justin Spahr-Summers Gotchas with Using Both Objc = fear, Swift = familiarity Complementary Languages and Options Challenging Yourself as a Developer (Expanding Your Toolbelt) 25:33 - Is there a dying language? 27:05 - If you learn Swift are you disadvantaged if you don’t know Objc? Picks iOS Animations by Tutorials by Ray Wenderlich (Alondo) Elevator Saga (Alondo) Vibrato.fm (Jaim) CODE 87-Key Illuminated Mechanical Keyboard with White LED Backlighting - Cherry MX Clear (Chuck) Grifiti Fat Wrist Pad (Chuck) Pebble Watch Kickstarter Campaign (Chuck) Ready Player One by Ernest Cline (Chuck) Are you attending MicroConf? Chuck wants to know! Tweet him at @cmaxw.
Mark and Gordon discuss the goto fail bug, editing environments, and the magical properties of beards. Facebook's KVOController Objc.io KeyValueObserver AppCode tweet on unreachable code Apple's goto fail; bug AppCode RapGenius - Objective-C isn't what you think it is (if you think like a Rubyist)
Bienvenue dans le cent-dixième épisode de CacaoCast! Dans cet épisode, Philippe Casgrain et Philippe Guitard discutent des sujets suivants: objc.io - Un nouvel article chaque mois randomuser.me - Pour créer rapidement une banque d’usagers-test helpbook - Un plugin VoodooPad pour créer des fichiers d’aide pour MacOSX Astuce gcc/clang - Saviez-vous que le compilateur retournera une valeur si vous créez une section de code avec des doubles-accolades? TWSReleaseNotesView - Critique pour iOS7 AFCoreImageSerializer - Appliquez des filtres lors du téléchargement de vos images Ecoutez cet épisode
本视频录于 2013 年 5 月 11 号杭州的 Ruby 开发者沙龙上。分享嘉宾李龑,本来是纪实摄影师,2012年开始成为全职程序员,现就职于阿里巴巴 Mac Labs,参与 iOS 和 OS X 产品的开发。2012年5月到11月,在一家创业公司工作时,使用 RubyMotion 开发了一款社交应用的 iPad 客户端。
James (MrGeckosMedia.com), joined by, Eduardo (MegaEduX.com), and Nick, explains libraries and frameworks.11:56Example code from episode.LibrariesLibraries included, /usr/lib/libcrypto.dylib and /usr/lib/libssl.dylib#import #import int main (int argc, const char * argv[]) { NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; NSString *string = @"Hello"; OpenSSL_add_all_algorithms(); unsigned char outbuf[EVP_MAX_MD_SIZE]; unsigned int templen, inlen = [string length]; const char *input = [string UTF8String]; EVP_MD_CTX ctx; const EVP_MD *digest = EVP_md5(); if(!digest) { NSLog(@"cannot get digest with name MD5"); return 1; } EVP_MD_CTX_init(&ctx); EVP_DigestInit(&ctx,digest); if(!EVP_DigestUpdate(&ctx,input,inlen)) { NSLog(@"EVP_DigestUpdate() failed!"); EVP_MD_CTX_cleanup(&ctx); return 1; } if (!EVP_DigestFinal(&ctx, outbuf, &templen)) { NSLog(@"EVP_DigesttFinal() failed!"); EVP_MD_CTX_cleanup(&ctx); return 1; } EVP_MD_CTX_cleanup(&ctx); NSMutableString *md5 = [NSMutableString string]; for (int i=0; i
James (MrGeckosMedia.com), joined by, Eduardo (MegaEduX.com), and John (@ZimiPoder), shows how Dictionaries, Arrays and Property Lists works in Cocoa.12:40Example code from episode.#import int main (int argc, const char * argv[]) { NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; NSLog(@"Array"); NSArray *array = [NSArray arrayWithObjects:@"Orange", @"Apple", @"Banana", nil]; for (int i=0; i
James (MrGeckosMedia.com), joined by, Noah (RockntheSweater.com), and Karl, explains how file managing works in c and cocoa.7:49Example code from episode.Files C Example#import BOOL file_exist(const char *fileName) { FILE *file = fopen(fileName, "r"); if (file) { fclose(file); return YES; } return NO;}int main (int argc, const char * argv[]) { NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; const char *ourFile = [[@"~/Desktop/file.txt" stringByExpandingTildeInPath] UTF8String]; FILE *file; if (!file_exist(ourFile)) { file = fopen(ourFile, "w"); time_t currTime = time(NULL); fprintf(file, "%s: We just made this file.n", ctime(&currTime)); } else { file = fopen(ourFile, "a"); } time_t currTime = time(NULL); fprintf(file, "%s: Here is a new line in this file.n", ctime(&currTime)); fclose(file); [pool drain]; return 0;}Files Cocoa Exmaple#import int main (int argc, const char * argv[]) { NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; NSFileManager *manager = [NSFileManager defaultManager]; NSString *ourFile = [@"~/Desktop/file.txt" stringByExpandingTildeInPath]; NSFileHandle *file; if (![manager fileExistsAtPath:ourFile]) { [manager createFileAtPath:ourFile contents:nil attributes:nil]; file = [NSFileHandle fileHandleForWritingAtPath:ourFile]; [file writeData:[[NSString stringWithFormat:@"%@: Here is a new file.n", [NSDate date]] dataUsingEncoding:NSUTF8StringEncoding]]; } else { file = [NSFileHandle fileHandleForWritingAtPath:ourFile]; [file seekToEndOfFile]; } [file writeData:[[NSString stringWithFormat:@"%@: Here is a new line.n", [NSDate date]] dataUsingEncoding:NSUTF8StringEncoding]]; [file closeFile]; [pool drain]; return 0;}Keynote used in this EpisodeKeynote in PDF Format
James (MrGeckosMedia.com), joined by, Eduardo (MegaEduX.com), and Karl, teaches how loops, arguments, and goto works in Cocoa.15:35Example code from episode.Loops Example#import int main (int argc, const char * argv[]) { NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; int i=0; while (i!=2) { NSLog(@"%d", i); i++; } i=0; do { NSLog(@"%d", i); i++; } while (i!=3); NSArray *anArray = [NSArray arrayWithObjects:@"Apples", @"Oranges", @"Grapes", @"Bananas", nil]; for (int d=0; d
James (MrGeckosMedia.com), joined by, Eduardo (MegaEduX.com), Martin (QueenZSoftware.com), John (@zimipoder), and Garrett, teaches how to read the documentation that comes with xcode.10:48Keynote used in this EpisodeKeynote in PDF Format
James (MrGeckosMedia.com), joined by, Eduardo (MegaEduX.com), Noah (RockntheSweater.com), and Martin (QueenZSoftware.com), teaches about the syntax of cocoa, how equations work in cocoa, how to do if statements, functions, and classes.33:56Example code from episode.Example 1 - If Statements and Equations#import int times(int value, int by);int main (int argc, const char * argv[]) { NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; int value = 1230; NSLog(@"Value: %d", value); NSLog(@"Value: %d", value%500); NSLog(@"Value: %d", value/100); NSLog(@"Value: %d", times(value, 4232)); if (value>1242) { NSLog(@"%d is greater then 1242", value); } else if (value>=1242) { NSLog(@"%d is greater then or equal to 1242", value); } else if (value
James (MrGeckosMedia.com), joined by, Eduardo (MegaEduX.com), Nick, and Karl, teaches the basics of installing Xcode, setting up a project and making a "Hello, World!" command line utility.30:16Example code from episode.#import int main (int argc, const char * argv[]) { NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; NSString *name = @"World"; if (argc>1) { name = [[[NSString alloc] initWithBytes:argv[1] length:strlen(argv[1]) encoding:NSUTF8StringEncoding] autorelease]; } NSLog(@"Hello, %@", name); [pool drain]; return 0;}